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 0002d080 080002a0 080002a0 000012a0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 00004e1c 0802d320 0802d320 0002e320 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .ARM 00000008 0803213c 0803213c 0003313c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .init_array 00000004 08032144 08032144 00033144 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .fini_array 00000004 08032148 08032148 00033148 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .data 00000224 24000000 0803214c 00034000 2**2 CONTENTS, ALLOC, LOAD, DATA 7 .bss 0002b054 24000224 08032370 00034224 2**2 ALLOC 8 ._user_heap_stack 00000600 2402b278 08032370 00034278 2**0 ALLOC 9 .lwip_sec 0001930b 2402b878 08032370 00034878 2**2 ALLOC 10 .ARM.attributes 0000002e 00000000 00000000 00034224 2**0 CONTENTS, READONLY 11 .debug_info 00052690 00000000 00000000 00034252 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 12 .debug_abbrev 0000b925 00000000 00000000 000868e2 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 13 .debug_aranges 00003890 00000000 00000000 00092208 2**3 CONTENTS, READONLY, DEBUGGING, OCTETS 14 .debug_rnglists 00002d2b 00000000 00000000 00095a98 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 15 .debug_macro 0004f916 00000000 00000000 000987c3 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 16 .debug_line 00058cf9 00000000 00000000 000e80d9 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 17 .debug_str 0018f1f5 00000000 00000000 00140dd2 2**0 CONTENTS, READONLY, DEBUGGING, OCTETS 18 .comment 00000043 00000000 00000000 002cffc7 2**0 CONTENTS, READONLY 19 .debug_frame 0000fd04 00000000 00000000 002d000c 2**2 CONTENTS, READONLY, DEBUGGING, OCTETS 20 .debug_line_str 00000064 00000000 00000000 002dfd10 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: 0802d308 .word 0x0802d308 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: 0802d308 .word 0x0802d308 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: 08031d80 .word 0x08031d80 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 f81f bl 802abc0 } 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 f8ac bl 8029e94 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 fc03 bl 802abd0 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: 0802d358 .word 0x0802d358 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 fb0e bl 802abd0 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 faed bl 802abd0 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 facc bl 802abd0 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: 0802d32c .word 0x0802d32c 8001740: 0802d35c .word 0x0802d35c 8001744: 0802d364 .word 0x0802d364 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 : \li Is blocking when a debugger is connected, but the previous character sent has not been transmitted. \param [in] ch Character to transmit. \returns Character to transmit. */ __STATIC_INLINE uint32_t ITM_SendChar (uint32_t ch) { 8001ce4: b480 push {r7} 8001ce6: b083 sub sp, #12 8001ce8: af00 add r7, sp, #0 8001cea: 6078 str r0, [r7, #4] if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 8001cec: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8001cf0: f8d3 3e80 ldr.w r3, [r3, #3712] @ 0xe80 8001cf4: f003 0301 and.w r3, r3, #1 8001cf8: 2b00 cmp r3, #0 8001cfa: d013 beq.n 8001d24 ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */ 8001cfc: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8001d00: f8d3 3e00 ldr.w r3, [r3, #3584] @ 0xe00 8001d04: f003 0301 and.w r3, r3, #1 if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */ 8001d08: 2b00 cmp r3, #0 8001d0a: d00b beq.n 8001d24 { while (ITM->PORT[0U].u32 == 0UL) 8001d0c: e000 b.n 8001d10 { __NOP(); 8001d0e: bf00 nop while (ITM->PORT[0U].u32 == 0UL) 8001d10: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8001d14: 681b ldr r3, [r3, #0] 8001d16: 2b00 cmp r3, #0 8001d18: d0f9 beq.n 8001d0e } ITM->PORT[0U].u8 = (uint8_t)ch; 8001d1a: f04f 4360 mov.w r3, #3758096384 @ 0xe0000000 8001d1e: 687a ldr r2, [r7, #4] 8001d20: b2d2 uxtb r2, r2 8001d22: 701a strb r2, [r3, #0] } return (ch); 8001d24: 687b ldr r3, [r7, #4] } 8001d26: 4618 mov r0, r3 8001d28: 370c adds r7, #12 8001d2a: 46bd mov sp, r7 8001d2c: f85d 7b04 ldr.w r7, [sp], #4 8001d30: 4770 bx lr 08001d32 <__io_putchar>: //{ // printf("DMA callback\n"); //} int __io_putchar(int ch) { 8001d32: b580 push {r7, lr} 8001d34: b082 sub sp, #8 8001d36: af00 add r7, sp, #0 8001d38: 6078 str r0, [r7, #4] #ifdef UART_TASK_LOGS // HAL_UART_Transmit(&huart8, (uint8_t *)&ch, 1, 0xFFFF); // Use UART8 as debug interface ITM_SendChar(ch); // Use SWV as debug interface 8001d3a: 687b ldr r3, [r7, #4] 8001d3c: 4618 mov r0, r3 8001d3e: f7ff ffd1 bl 8001ce4 #endif return ch; 8001d42: 687b ldr r3, [r7, #4] } 8001d44: 4618 mov r0, r3 8001d46: 3708 adds r7, #8 8001d48: 46bd mov sp, r7 8001d4a: bd80 pop {r7, pc} 08001d4c
: /** * @brief The application entry point. * @retval int */ int main(void) { 8001d4c: b580 push {r7, lr} 8001d4e: b084 sub sp, #16 8001d50: af00 add r7, sp, #0 /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MPU Configuration--------------------------------------------------------*/ MPU_Config(); 8001d52: f000 fc8d bl 8002670 if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 8001d56: 4b5f ldr r3, [pc, #380] @ (8001ed4 ) 8001d58: 695b ldr r3, [r3, #20] 8001d5a: f403 3300 and.w r3, r3, #131072 @ 0x20000 8001d5e: 2b00 cmp r3, #0 8001d60: d11b bne.n 8001d9a __ASM volatile ("dsb 0xF":::"memory"); 8001d62: f3bf 8f4f dsb sy } 8001d66: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d68: f3bf 8f6f isb sy } 8001d6c: bf00 nop SCB->ICIALLU = 0UL; /* invalidate I-Cache */ 8001d6e: 4b59 ldr r3, [pc, #356] @ (8001ed4 ) 8001d70: 2200 movs r2, #0 8001d72: f8c3 2250 str.w r2, [r3, #592] @ 0x250 __ASM volatile ("dsb 0xF":::"memory"); 8001d76: f3bf 8f4f dsb sy } 8001d7a: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d7c: f3bf 8f6f isb sy } 8001d80: bf00 nop SCB->CCR |= (uint32_t)SCB_CCR_IC_Msk; /* enable I-Cache */ 8001d82: 4b54 ldr r3, [pc, #336] @ (8001ed4 ) 8001d84: 695b ldr r3, [r3, #20] 8001d86: 4a53 ldr r2, [pc, #332] @ (8001ed4 ) 8001d88: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8001d8c: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 8001d8e: f3bf 8f4f dsb sy } 8001d92: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001d94: f3bf 8f6f isb sy } 8001d98: e000 b.n 8001d9c if (SCB->CCR & SCB_CCR_IC_Msk) return; /* return if ICache is already enabled */ 8001d9a: bf00 nop if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 8001d9c: 4b4d ldr r3, [pc, #308] @ (8001ed4 ) 8001d9e: 695b ldr r3, [r3, #20] 8001da0: f403 3380 and.w r3, r3, #65536 @ 0x10000 8001da4: 2b00 cmp r3, #0 8001da6: d138 bne.n 8001e1a SCB->CSSELR = 0U; /* select Level 1 data cache */ 8001da8: 4b4a ldr r3, [pc, #296] @ (8001ed4 ) 8001daa: 2200 movs r2, #0 8001dac: f8c3 2084 str.w r2, [r3, #132] @ 0x84 __ASM volatile ("dsb 0xF":::"memory"); 8001db0: f3bf 8f4f dsb sy } 8001db4: bf00 nop ccsidr = SCB->CCSIDR; 8001db6: 4b47 ldr r3, [pc, #284] @ (8001ed4 ) 8001db8: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 8001dbc: 60fb str r3, [r7, #12] sets = (uint32_t)(CCSIDR_SETS(ccsidr)); 8001dbe: 68fb ldr r3, [r7, #12] 8001dc0: 0b5b lsrs r3, r3, #13 8001dc2: f3c3 030e ubfx r3, r3, #0, #15 8001dc6: 60bb str r3, [r7, #8] ways = (uint32_t)(CCSIDR_WAYS(ccsidr)); 8001dc8: 68fb ldr r3, [r7, #12] 8001dca: 08db lsrs r3, r3, #3 8001dcc: f3c3 0309 ubfx r3, r3, #0, #10 8001dd0: 607b str r3, [r7, #4] SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8001dd2: 68bb ldr r3, [r7, #8] 8001dd4: 015a lsls r2, r3, #5 8001dd6: f643 73e0 movw r3, #16352 @ 0x3fe0 8001dda: 4013 ands r3, r2 ((ways << SCB_DCISW_WAY_Pos) & SCB_DCISW_WAY_Msk) ); 8001ddc: 687a ldr r2, [r7, #4] 8001dde: 0792 lsls r2, r2, #30 SCB->DCISW = (((sets << SCB_DCISW_SET_Pos) & SCB_DCISW_SET_Msk) | 8001de0: 493c ldr r1, [pc, #240] @ (8001ed4 ) 8001de2: 4313 orrs r3, r2 8001de4: f8c1 3260 str.w r3, [r1, #608] @ 0x260 } while (ways-- != 0U); 8001de8: 687b ldr r3, [r7, #4] 8001dea: 1e5a subs r2, r3, #1 8001dec: 607a str r2, [r7, #4] 8001dee: 2b00 cmp r3, #0 8001df0: d1ef bne.n 8001dd2 } while(sets-- != 0U); 8001df2: 68bb ldr r3, [r7, #8] 8001df4: 1e5a subs r2, r3, #1 8001df6: 60ba str r2, [r7, #8] 8001df8: 2b00 cmp r3, #0 8001dfa: d1e5 bne.n 8001dc8 __ASM volatile ("dsb 0xF":::"memory"); 8001dfc: f3bf 8f4f dsb sy } 8001e00: bf00 nop SCB->CCR |= (uint32_t)SCB_CCR_DC_Msk; /* enable D-Cache */ 8001e02: 4b34 ldr r3, [pc, #208] @ (8001ed4 ) 8001e04: 695b ldr r3, [r3, #20] 8001e06: 4a33 ldr r2, [pc, #204] @ (8001ed4 ) 8001e08: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8001e0c: 6153 str r3, [r2, #20] __ASM volatile ("dsb 0xF":::"memory"); 8001e0e: f3bf 8f4f dsb sy } 8001e12: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8001e14: f3bf 8f6f isb sy } 8001e18: e000 b.n 8001e1c if (SCB->CCR & SCB_CCR_DC_Msk) return; /* return if DCache is already enabled */ 8001e1a: bf00 nop SCB_EnableDCache(); /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); 8001e1c: f003 fcbe bl 800579c /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); 8001e20: f000 f87c bl 8001f1c /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); 8001e24: f000 fb08 bl 8002438 MX_DMA_Init(); 8001e28: f000 fade bl 80023e8 MX_UART8_Init(); 8001e2c: f000 f950 bl 80020d0 MX_CRC_Init(); 8001e30: f000 f8f2 bl 8002018 MX_RNG_Init(); 8001e34: f000 f936 bl 80020a4 MX_USART1_UART_Init(); 8001e38: f000 f996 bl 8002168 MX_USART2_UART_Init(); 8001e3c: f000 f9e4 bl 8002208 MX_USART3_UART_Init(); 8001e40: f000 fa32 bl 80022a8 MX_USART6_UART_Init(); 8001e44: f000 fa80 bl 8002348 MX_IWDG1_Init(); 8001e48: f000 f910 bl 800206c // HAL_DMA_RegisterCallback(&hdma_uart8_rx, HAL_DMA_XFER_CPLT_CB_ID, dmaCallback); /* USER CODE END 2 */ /* Init scheduler */ osKernelInitialize(); 8001e4c: f00f fa28 bl 80112a0 /* USER CODE BEGIN RTOS_MUTEX */ /* add mutexes, ... */ resMeasurementsMutex = osMutexNew (NULL); 8001e50: 2000 movs r0, #0 8001e52: f00f fc34 bl 80116be 8001e56: 4603 mov r3, r0 8001e58: 4a1f ldr r2, [pc, #124] @ (8001ed8 ) 8001e5a: 6013 str r3, [r2, #0] sensorsInfoMutex = osMutexNew (NULL); 8001e5c: 2000 movs r0, #0 8001e5e: f00f fc2e bl 80116be 8001e62: 4603 mov r3, r0 8001e64: 4a1d ldr r2, [pc, #116] @ (8001edc ) 8001e66: 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); 8001e68: 4b1d ldr r3, [pc, #116] @ (8001ee0 ) 8001e6a: 2200 movs r2, #0 8001e6c: 2100 movs r1, #0 8001e6e: 481d ldr r0, [pc, #116] @ (8001ee4 ) 8001e70: f00f fb44 bl 80114fc 8001e74: 4603 mov r3, r0 8001e76: 4a1c ldr r2, [pc, #112] @ (8001ee8 ) 8001e78: 6013 str r3, [r2, #0] /* creation of relay2Timer */ relay2TimerHandle = osTimerNew(relay2TimerCallback, osTimerOnce, NULL, &relay2Timer_attributes); 8001e7a: 4b1c ldr r3, [pc, #112] @ (8001eec ) 8001e7c: 2200 movs r2, #0 8001e7e: 2100 movs r1, #0 8001e80: 481b ldr r0, [pc, #108] @ (8001ef0 ) 8001e82: f00f fb3b bl 80114fc 8001e86: 4603 mov r3, r0 8001e88: 4a1a ldr r2, [pc, #104] @ (8001ef4 ) 8001e8a: 6013 str r3, [r2, #0] /* creation of relay3Timer */ relay3TimerHandle = osTimerNew(relay3TimerCallback, osTimerOnce, NULL, &relay3Timer_attributes); 8001e8c: 4b1a ldr r3, [pc, #104] @ (8001ef8 ) 8001e8e: 2200 movs r2, #0 8001e90: 2100 movs r1, #0 8001e92: 481a ldr r0, [pc, #104] @ (8001efc ) 8001e94: f00f fb32 bl 80114fc 8001e98: 4603 mov r3, r0 8001e9a: 4a19 ldr r2, [pc, #100] @ (8001f00 ) 8001e9c: 6013 str r3, [r2, #0] /* creation of relay4Timer */ relay4TimerHandle = osTimerNew(relay4TimerCallback, osTimerOnce, NULL, &relay4Timer_attributes); 8001e9e: 4b19 ldr r3, [pc, #100] @ (8001f04 ) 8001ea0: 2200 movs r2, #0 8001ea2: 2100 movs r1, #0 8001ea4: 4818 ldr r0, [pc, #96] @ (8001f08 ) 8001ea6: f00f fb29 bl 80114fc 8001eaa: 4603 mov r3, r0 8001eac: 4a17 ldr r2, [pc, #92] @ (8001f0c ) 8001eae: 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); 8001eb0: 4a17 ldr r2, [pc, #92] @ (8001f10 ) 8001eb2: 2100 movs r1, #0 8001eb4: 4817 ldr r0, [pc, #92] @ (8001f14 ) 8001eb6: f00f fa52 bl 801135e 8001eba: 4603 mov r3, r0 8001ebc: 4a16 ldr r2, [pc, #88] @ (8001f18 ) 8001ebe: 6013 str r3, [r2, #0] /* USER CODE BEGIN RTOS_THREADS */ /* add threads, ... */ mqtt_cli_init(); 8001ec0: f001 fbd4 bl 800366c // Uart8TasksInit(); UartTasksInit(); 8001ec4: f002 fafa bl 80044bc #ifdef USER_MOCKS MockMeasurmetsTaskInit(); #else MeasurmentsReqSchedulerTaskInit(); 8001ec8: f003 faae bl 8005428 /* USER CODE BEGIN RTOS_EVENTS */ /* add events, ... */ /* USER CODE END RTOS_EVENTS */ /* Start scheduler */ osKernelStart(); 8001ecc: f00f fa0c bl 80112e8 /* We should never get here as control is now taken by the scheduler */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) 8001ed0: bf00 nop 8001ed2: e7fd b.n 8001ed0 8001ed4: e000ed00 .word 0xe000ed00 8001ed8: 24002258 .word 0x24002258 8001edc: 2400225c .word 0x2400225c 8001ee0: 080319e4 .word 0x080319e4 8001ee4: 080025f1 .word 0x080025f1 8001ee8: 24000668 .word 0x24000668 8001eec: 080319f4 .word 0x080319f4 8001ef0: 08002611 .word 0x08002611 8001ef4: 24000698 .word 0x24000698 8001ef8: 08031a04 .word 0x08031a04 8001efc: 08002631 .word 0x08002631 8001f00: 240006c8 .word 0x240006c8 8001f04: 08031a14 .word 0x08031a14 8001f08: 08002651 .word 0x08002651 8001f0c: 240006f8 .word 0x240006f8 8001f10: 080319c0 .word 0x080319c0 8001f14: 080025d1 .word 0x080025d1 8001f18: 24000664 .word 0x24000664 08001f1c : /** * @brief System Clock Configuration * @retval None */ void SystemClock_Config(void) { 8001f1c: b580 push {r7, lr} 8001f1e: b09c sub sp, #112 @ 0x70 8001f20: af00 add r7, sp, #0 RCC_OscInitTypeDef RCC_OscInitStruct = {0}; 8001f22: f107 0324 add.w r3, r7, #36 @ 0x24 8001f26: 224c movs r2, #76 @ 0x4c 8001f28: 2100 movs r1, #0 8001f2a: 4618 mov r0, r3 8001f2c: f028 fe48 bl 802abc0 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; 8001f30: 1d3b adds r3, r7, #4 8001f32: 2220 movs r2, #32 8001f34: 2100 movs r1, #0 8001f36: 4618 mov r0, r3 8001f38: f028 fe42 bl 802abc0 /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); 8001f3c: 2002 movs r0, #2 8001f3e: f008 fa77 bl 800a430 /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); 8001f42: 2300 movs r3, #0 8001f44: 603b str r3, [r7, #0] 8001f46: 4b32 ldr r3, [pc, #200] @ (8002010 ) 8001f48: 6adb ldr r3, [r3, #44] @ 0x2c 8001f4a: 4a31 ldr r2, [pc, #196] @ (8002010 ) 8001f4c: f023 0301 bic.w r3, r3, #1 8001f50: 62d3 str r3, [r2, #44] @ 0x2c 8001f52: 4b2f ldr r3, [pc, #188] @ (8002010 ) 8001f54: 6adb ldr r3, [r3, #44] @ 0x2c 8001f56: f003 0301 and.w r3, r3, #1 8001f5a: 603b str r3, [r7, #0] 8001f5c: 4b2d ldr r3, [pc, #180] @ (8002014 ) 8001f5e: 699b ldr r3, [r3, #24] 8001f60: 4a2c ldr r2, [pc, #176] @ (8002014 ) 8001f62: f443 4340 orr.w r3, r3, #49152 @ 0xc000 8001f66: 6193 str r3, [r2, #24] 8001f68: 4b2a ldr r3, [pc, #168] @ (8002014 ) 8001f6a: 699b ldr r3, [r3, #24] 8001f6c: f403 4340 and.w r3, r3, #49152 @ 0xc000 8001f70: 603b str r3, [r7, #0] 8001f72: 683b ldr r3, [r7, #0] while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} 8001f74: bf00 nop 8001f76: 4b27 ldr r3, [pc, #156] @ (8002014 ) 8001f78: 699b ldr r3, [r3, #24] 8001f7a: f403 5300 and.w r3, r3, #8192 @ 0x2000 8001f7e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 8001f82: d1f8 bne.n 8001f76 /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_LSI 8001f84: 2329 movs r3, #41 @ 0x29 8001f86: 627b str r3, [r7, #36] @ 0x24 |RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; 8001f88: f44f 3380 mov.w r3, #65536 @ 0x10000 8001f8c: 62bb str r3, [r7, #40] @ 0x28 RCC_OscInitStruct.LSIState = RCC_LSI_ON; 8001f8e: 2301 movs r3, #1 8001f90: 63bb str r3, [r7, #56] @ 0x38 RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; 8001f92: 2301 movs r3, #1 8001f94: 63fb str r3, [r7, #60] @ 0x3c RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; 8001f96: 2302 movs r3, #2 8001f98: 64bb str r3, [r7, #72] @ 0x48 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; 8001f9a: 2302 movs r3, #2 8001f9c: 64fb str r3, [r7, #76] @ 0x4c RCC_OscInitStruct.PLL.PLLM = 5; 8001f9e: 2305 movs r3, #5 8001fa0: 653b str r3, [r7, #80] @ 0x50 RCC_OscInitStruct.PLL.PLLN = 160; 8001fa2: 23a0 movs r3, #160 @ 0xa0 8001fa4: 657b str r3, [r7, #84] @ 0x54 RCC_OscInitStruct.PLL.PLLP = 2; 8001fa6: 2302 movs r3, #2 8001fa8: 65bb str r3, [r7, #88] @ 0x58 RCC_OscInitStruct.PLL.PLLQ = 2; 8001faa: 2302 movs r3, #2 8001fac: 65fb str r3, [r7, #92] @ 0x5c RCC_OscInitStruct.PLL.PLLR = 2; 8001fae: 2302 movs r3, #2 8001fb0: 663b str r3, [r7, #96] @ 0x60 RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; 8001fb2: 2308 movs r3, #8 8001fb4: 667b str r3, [r7, #100] @ 0x64 RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1VCOWIDE; 8001fb6: 2300 movs r3, #0 8001fb8: 66bb str r3, [r7, #104] @ 0x68 RCC_OscInitStruct.PLL.PLLFRACN = 0; 8001fba: 2300 movs r3, #0 8001fbc: 66fb str r3, [r7, #108] @ 0x6c if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) 8001fbe: f107 0324 add.w r3, r7, #36 @ 0x24 8001fc2: 4618 mov r0, r3 8001fc4: f008 faf4 bl 800a5b0 8001fc8: 4603 mov r3, r0 8001fca: 2b00 cmp r3, #0 8001fcc: d001 beq.n 8001fd2 { Error_Handler(); 8001fce: f000 fbbf bl 8002750 } /** Initializes the CPU, AHB and APB buses clocks */ RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK 8001fd2: 233f movs r3, #63 @ 0x3f 8001fd4: 607b str r3, [r7, #4] |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2 |RCC_CLOCKTYPE_D3PCLK1|RCC_CLOCKTYPE_D1PCLK1; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; 8001fd6: 2303 movs r3, #3 8001fd8: 60bb str r3, [r7, #8] RCC_ClkInitStruct.SYSCLKDivider = RCC_SYSCLK_DIV1; 8001fda: 2300 movs r3, #0 8001fdc: 60fb str r3, [r7, #12] RCC_ClkInitStruct.AHBCLKDivider = RCC_HCLK_DIV2; 8001fde: 2308 movs r3, #8 8001fe0: 613b str r3, [r7, #16] RCC_ClkInitStruct.APB3CLKDivider = RCC_APB3_DIV2; 8001fe2: 2340 movs r3, #64 @ 0x40 8001fe4: 617b str r3, [r7, #20] RCC_ClkInitStruct.APB1CLKDivider = RCC_APB1_DIV2; 8001fe6: 2340 movs r3, #64 @ 0x40 8001fe8: 61bb str r3, [r7, #24] RCC_ClkInitStruct.APB2CLKDivider = RCC_APB2_DIV2; 8001fea: f44f 6380 mov.w r3, #1024 @ 0x400 8001fee: 61fb str r3, [r7, #28] RCC_ClkInitStruct.APB4CLKDivider = RCC_APB4_DIV2; 8001ff0: 2340 movs r3, #64 @ 0x40 8001ff2: 623b str r3, [r7, #32] if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) 8001ff4: 1d3b adds r3, r7, #4 8001ff6: 2102 movs r1, #2 8001ff8: 4618 mov r0, r3 8001ffa: f008 ff33 bl 800ae64 8001ffe: 4603 mov r3, r0 8002000: 2b00 cmp r3, #0 8002002: d001 beq.n 8002008 { Error_Handler(); 8002004: f000 fba4 bl 8002750 } } 8002008: bf00 nop 800200a: 3770 adds r7, #112 @ 0x70 800200c: 46bd mov sp, r7 800200e: bd80 pop {r7, pc} 8002010: 58000400 .word 0x58000400 8002014: 58024800 .word 0x58024800 08002018 : * @brief CRC Initialization Function * @param None * @retval None */ static void MX_CRC_Init(void) { 8002018: b580 push {r7, lr} 800201a: 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; 800201c: 4b11 ldr r3, [pc, #68] @ (8002064 ) 800201e: 4a12 ldr r2, [pc, #72] @ (8002068 ) 8002020: 601a str r2, [r3, #0] hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_DISABLE; 8002022: 4b10 ldr r3, [pc, #64] @ (8002064 ) 8002024: 2201 movs r2, #1 8002026: 711a strb r2, [r3, #4] hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE; 8002028: 4b0e ldr r3, [pc, #56] @ (8002064 ) 800202a: 2200 movs r2, #0 800202c: 715a strb r2, [r3, #5] hcrc.Init.GeneratingPolynomial = 4129; 800202e: 4b0d ldr r3, [pc, #52] @ (8002064 ) 8002030: f241 0221 movw r2, #4129 @ 0x1021 8002034: 609a str r2, [r3, #8] hcrc.Init.CRCLength = CRC_POLYLENGTH_16B; 8002036: 4b0b ldr r3, [pc, #44] @ (8002064 ) 8002038: 2208 movs r2, #8 800203a: 60da str r2, [r3, #12] hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_NONE; 800203c: 4b09 ldr r3, [pc, #36] @ (8002064 ) 800203e: 2200 movs r2, #0 8002040: 615a str r2, [r3, #20] hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_DISABLE; 8002042: 4b08 ldr r3, [pc, #32] @ (8002064 ) 8002044: 2200 movs r2, #0 8002046: 619a str r2, [r3, #24] hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES; 8002048: 4b06 ldr r3, [pc, #24] @ (8002064 ) 800204a: 2201 movs r2, #1 800204c: 621a str r2, [r3, #32] if (HAL_CRC_Init(&hcrc) != HAL_OK) 800204e: 4805 ldr r0, [pc, #20] @ (8002064 ) 8002050: f003 fd9c bl 8005b8c 8002054: 4603 mov r3, r0 8002056: 2b00 cmp r3, #0 8002058: d001 beq.n 800205e { Error_Handler(); 800205a: f000 fb79 bl 8002750 } /* USER CODE BEGIN CRC_Init 2 */ /* USER CODE END CRC_Init 2 */ } 800205e: bf00 nop 8002060: bd80 pop {r7, pc} 8002062: bf00 nop 8002064: 24000248 .word 0x24000248 8002068: 58024c00 .word 0x58024c00 0800206c : * @brief IWDG1 Initialization Function * @param None * @retval None */ static void MX_IWDG1_Init(void) { 800206c: b580 push {r7, lr} 800206e: af00 add r7, sp, #0 /* USER CODE END IWDG1_Init 0 */ /* USER CODE BEGIN IWDG1_Init 1 */ /* USER CODE END IWDG1_Init 1 */ hiwdg1.Instance = IWDG1; 8002070: 4b0a ldr r3, [pc, #40] @ (800209c ) 8002072: 4a0b ldr r2, [pc, #44] @ (80020a0 ) 8002074: 601a str r2, [r3, #0] hiwdg1.Init.Prescaler = IWDG_PRESCALER_64; 8002076: 4b09 ldr r3, [pc, #36] @ (800209c ) 8002078: 2204 movs r2, #4 800207a: 605a str r2, [r3, #4] hiwdg1.Init.Window = 249; 800207c: 4b07 ldr r3, [pc, #28] @ (800209c ) 800207e: 22f9 movs r2, #249 @ 0xf9 8002080: 60da str r2, [r3, #12] hiwdg1.Init.Reload = 249; 8002082: 4b06 ldr r3, [pc, #24] @ (800209c ) 8002084: 22f9 movs r2, #249 @ 0xf9 8002086: 609a str r2, [r3, #8] if (HAL_IWDG_Init(&hiwdg1) != HAL_OK) 8002088: 4804 ldr r0, [pc, #16] @ (800209c ) 800208a: f008 f8e8 bl 800a25e 800208e: 4603 mov r3, r0 8002090: 2b00 cmp r3, #0 8002092: d001 beq.n 8002098 { Error_Handler(); 8002094: f000 fb5c bl 8002750 } /* USER CODE BEGIN IWDG1_Init 2 */ /* USER CODE END IWDG1_Init 2 */ } 8002098: bf00 nop 800209a: bd80 pop {r7, pc} 800209c: 2400026c .word 0x2400026c 80020a0: 58004800 .word 0x58004800 080020a4 : * @brief RNG Initialization Function * @param None * @retval None */ static void MX_RNG_Init(void) { 80020a4: b580 push {r7, lr} 80020a6: 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; 80020a8: 4b07 ldr r3, [pc, #28] @ (80020c8 ) 80020aa: 4a08 ldr r2, [pc, #32] @ (80020cc ) 80020ac: 601a str r2, [r3, #0] hrng.Init.ClockErrorDetection = RNG_CED_ENABLE; 80020ae: 4b06 ldr r3, [pc, #24] @ (80020c8 ) 80020b0: 2200 movs r2, #0 80020b2: 605a str r2, [r3, #4] if (HAL_RNG_Init(&hrng) != HAL_OK) 80020b4: 4804 ldr r0, [pc, #16] @ (80020c8 ) 80020b6: f00b f8b3 bl 800d220 80020ba: 4603 mov r3, r0 80020bc: 2b00 cmp r3, #0 80020be: d001 beq.n 80020c4 { Error_Handler(); 80020c0: f000 fb46 bl 8002750 } /* USER CODE BEGIN RNG_Init 2 */ /* USER CODE END RNG_Init 2 */ } 80020c4: bf00 nop 80020c6: bd80 pop {r7, pc} 80020c8: 2400027c .word 0x2400027c 80020cc: 48021800 .word 0x48021800 080020d0 : * @brief UART8 Initialization Function * @param None * @retval None */ static void MX_UART8_Init(void) { 80020d0: b580 push {r7, lr} 80020d2: 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; 80020d4: 4b22 ldr r3, [pc, #136] @ (8002160 ) 80020d6: 4a23 ldr r2, [pc, #140] @ (8002164 ) 80020d8: 601a str r2, [r3, #0] huart8.Init.BaudRate = 115200; 80020da: 4b21 ldr r3, [pc, #132] @ (8002160 ) 80020dc: f44f 32e1 mov.w r2, #115200 @ 0x1c200 80020e0: 605a str r2, [r3, #4] huart8.Init.WordLength = UART_WORDLENGTH_8B; 80020e2: 4b1f ldr r3, [pc, #124] @ (8002160 ) 80020e4: 2200 movs r2, #0 80020e6: 609a str r2, [r3, #8] huart8.Init.StopBits = UART_STOPBITS_1; 80020e8: 4b1d ldr r3, [pc, #116] @ (8002160 ) 80020ea: 2200 movs r2, #0 80020ec: 60da str r2, [r3, #12] huart8.Init.Parity = UART_PARITY_NONE; 80020ee: 4b1c ldr r3, [pc, #112] @ (8002160 ) 80020f0: 2200 movs r2, #0 80020f2: 611a str r2, [r3, #16] huart8.Init.Mode = UART_MODE_TX_RX; 80020f4: 4b1a ldr r3, [pc, #104] @ (8002160 ) 80020f6: 220c movs r2, #12 80020f8: 615a str r2, [r3, #20] huart8.Init.HwFlowCtl = UART_HWCONTROL_NONE; 80020fa: 4b19 ldr r3, [pc, #100] @ (8002160 ) 80020fc: 2200 movs r2, #0 80020fe: 619a str r2, [r3, #24] huart8.Init.OverSampling = UART_OVERSAMPLING_16; 8002100: 4b17 ldr r3, [pc, #92] @ (8002160 ) 8002102: 2200 movs r2, #0 8002104: 61da str r2, [r3, #28] huart8.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 8002106: 4b16 ldr r3, [pc, #88] @ (8002160 ) 8002108: 2200 movs r2, #0 800210a: 621a str r2, [r3, #32] huart8.Init.ClockPrescaler = UART_PRESCALER_DIV1; 800210c: 4b14 ldr r3, [pc, #80] @ (8002160 ) 800210e: 2200 movs r2, #0 8002110: 625a str r2, [r3, #36] @ 0x24 huart8.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; 8002112: 4b13 ldr r3, [pc, #76] @ (8002160 ) 8002114: 2200 movs r2, #0 8002116: 629a str r2, [r3, #40] @ 0x28 if (HAL_UART_Init(&huart8) != HAL_OK) 8002118: 4811 ldr r0, [pc, #68] @ (8002160 ) 800211a: f00b fc07 bl 800d92c 800211e: 4603 mov r3, r0 8002120: 2b00 cmp r3, #0 8002122: d001 beq.n 8002128 { Error_Handler(); 8002124: f000 fb14 bl 8002750 } if (HAL_UARTEx_SetTxFifoThreshold(&huart8, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 8002128: 2100 movs r1, #0 800212a: 480d ldr r0, [pc, #52] @ (8002160 ) 800212c: f00e f8a7 bl 801027e 8002130: 4603 mov r3, r0 8002132: 2b00 cmp r3, #0 8002134: d001 beq.n 800213a { Error_Handler(); 8002136: f000 fb0b bl 8002750 } if (HAL_UARTEx_SetRxFifoThreshold(&huart8, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 800213a: 2100 movs r1, #0 800213c: 4808 ldr r0, [pc, #32] @ (8002160 ) 800213e: f00e f8dc bl 80102fa 8002142: 4603 mov r3, r0 8002144: 2b00 cmp r3, #0 8002146: d001 beq.n 800214c { Error_Handler(); 8002148: f000 fb02 bl 8002750 } if (HAL_UARTEx_DisableFifoMode(&huart8) != HAL_OK) 800214c: 4804 ldr r0, [pc, #16] @ (8002160 ) 800214e: f00e f85d bl 801020c 8002152: 4603 mov r3, r0 8002154: 2b00 cmp r3, #0 8002156: d001 beq.n 800215c { Error_Handler(); 8002158: f000 fafa bl 8002750 } /* USER CODE BEGIN UART8_Init 2 */ /* USER CODE END UART8_Init 2 */ } 800215c: bf00 nop 800215e: bd80 pop {r7, pc} 8002160: 24000290 .word 0x24000290 8002164: 40007c00 .word 0x40007c00 08002168 : * @brief USART1 Initialization Function * @param None * @retval None */ static void MX_USART1_UART_Init(void) { 8002168: b580 push {r7, lr} 800216a: 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; 800216c: 4b24 ldr r3, [pc, #144] @ (8002200 ) 800216e: 4a25 ldr r2, [pc, #148] @ (8002204 ) 8002170: 601a str r2, [r3, #0] huart1.Init.BaudRate = 115200; 8002172: 4b23 ldr r3, [pc, #140] @ (8002200 ) 8002174: f44f 32e1 mov.w r2, #115200 @ 0x1c200 8002178: 605a str r2, [r3, #4] huart1.Init.WordLength = UART_WORDLENGTH_8B; 800217a: 4b21 ldr r3, [pc, #132] @ (8002200 ) 800217c: 2200 movs r2, #0 800217e: 609a str r2, [r3, #8] huart1.Init.StopBits = UART_STOPBITS_1; 8002180: 4b1f ldr r3, [pc, #124] @ (8002200 ) 8002182: 2200 movs r2, #0 8002184: 60da str r2, [r3, #12] huart1.Init.Parity = UART_PARITY_NONE; 8002186: 4b1e ldr r3, [pc, #120] @ (8002200 ) 8002188: 2200 movs r2, #0 800218a: 611a str r2, [r3, #16] huart1.Init.Mode = UART_MODE_TX_RX; 800218c: 4b1c ldr r3, [pc, #112] @ (8002200 ) 800218e: 220c movs r2, #12 8002190: 615a str r2, [r3, #20] huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8002192: 4b1b ldr r3, [pc, #108] @ (8002200 ) 8002194: 2200 movs r2, #0 8002196: 619a str r2, [r3, #24] huart1.Init.OverSampling = UART_OVERSAMPLING_16; 8002198: 4b19 ldr r3, [pc, #100] @ (8002200 ) 800219a: 2200 movs r2, #0 800219c: 61da str r2, [r3, #28] huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 800219e: 4b18 ldr r3, [pc, #96] @ (8002200 ) 80021a0: 2200 movs r2, #0 80021a2: 621a str r2, [r3, #32] huart1.Init.ClockPrescaler = UART_PRESCALER_DIV1; 80021a4: 4b16 ldr r3, [pc, #88] @ (8002200 ) 80021a6: 2200 movs r2, #0 80021a8: 625a str r2, [r3, #36] @ 0x24 huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 80021aa: 4b15 ldr r3, [pc, #84] @ (8002200 ) 80021ac: 2201 movs r2, #1 80021ae: 629a str r2, [r3, #40] @ 0x28 huart1.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 80021b0: 4b13 ldr r3, [pc, #76] @ (8002200 ) 80021b2: f44f 3200 mov.w r2, #131072 @ 0x20000 80021b6: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart1) != HAL_OK) 80021b8: 4811 ldr r0, [pc, #68] @ (8002200 ) 80021ba: f00b fbb7 bl 800d92c 80021be: 4603 mov r3, r0 80021c0: 2b00 cmp r3, #0 80021c2: d001 beq.n 80021c8 { Error_Handler(); 80021c4: f000 fac4 bl 8002750 } if (HAL_UARTEx_SetTxFifoThreshold(&huart1, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 80021c8: 2100 movs r1, #0 80021ca: 480d ldr r0, [pc, #52] @ (8002200 ) 80021cc: f00e f857 bl 801027e 80021d0: 4603 mov r3, r0 80021d2: 2b00 cmp r3, #0 80021d4: d001 beq.n 80021da { Error_Handler(); 80021d6: f000 fabb bl 8002750 } if (HAL_UARTEx_SetRxFifoThreshold(&huart1, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 80021da: 2100 movs r1, #0 80021dc: 4808 ldr r0, [pc, #32] @ (8002200 ) 80021de: f00e f88c bl 80102fa 80021e2: 4603 mov r3, r0 80021e4: 2b00 cmp r3, #0 80021e6: d001 beq.n 80021ec { Error_Handler(); 80021e8: f000 fab2 bl 8002750 } if (HAL_UARTEx_DisableFifoMode(&huart1) != HAL_OK) 80021ec: 4804 ldr r0, [pc, #16] @ (8002200 ) 80021ee: f00e f80d bl 801020c 80021f2: 4603 mov r3, r0 80021f4: 2b00 cmp r3, #0 80021f6: d001 beq.n 80021fc { Error_Handler(); 80021f8: f000 faaa bl 8002750 } /* USER CODE BEGIN USART1_Init 2 */ /* USER CODE END USART1_Init 2 */ } 80021fc: bf00 nop 80021fe: bd80 pop {r7, pc} 8002200: 24000324 .word 0x24000324 8002204: 40011000 .word 0x40011000 08002208 : * @brief USART2 Initialization Function * @param None * @retval None */ static void MX_USART2_UART_Init(void) { 8002208: b580 push {r7, lr} 800220a: 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; 800220c: 4b24 ldr r3, [pc, #144] @ (80022a0 ) 800220e: 4a25 ldr r2, [pc, #148] @ (80022a4 ) 8002210: 601a str r2, [r3, #0] huart2.Init.BaudRate = 115200; 8002212: 4b23 ldr r3, [pc, #140] @ (80022a0 ) 8002214: f44f 32e1 mov.w r2, #115200 @ 0x1c200 8002218: 605a str r2, [r3, #4] huart2.Init.WordLength = UART_WORDLENGTH_8B; 800221a: 4b21 ldr r3, [pc, #132] @ (80022a0 ) 800221c: 2200 movs r2, #0 800221e: 609a str r2, [r3, #8] huart2.Init.StopBits = UART_STOPBITS_1; 8002220: 4b1f ldr r3, [pc, #124] @ (80022a0 ) 8002222: 2200 movs r2, #0 8002224: 60da str r2, [r3, #12] huart2.Init.Parity = UART_PARITY_NONE; 8002226: 4b1e ldr r3, [pc, #120] @ (80022a0 ) 8002228: 2200 movs r2, #0 800222a: 611a str r2, [r3, #16] huart2.Init.Mode = UART_MODE_TX_RX; 800222c: 4b1c ldr r3, [pc, #112] @ (80022a0 ) 800222e: 220c movs r2, #12 8002230: 615a str r2, [r3, #20] huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8002232: 4b1b ldr r3, [pc, #108] @ (80022a0 ) 8002234: 2200 movs r2, #0 8002236: 619a str r2, [r3, #24] huart2.Init.OverSampling = UART_OVERSAMPLING_16; 8002238: 4b19 ldr r3, [pc, #100] @ (80022a0 ) 800223a: 2200 movs r2, #0 800223c: 61da str r2, [r3, #28] huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 800223e: 4b18 ldr r3, [pc, #96] @ (80022a0 ) 8002240: 2200 movs r2, #0 8002242: 621a str r2, [r3, #32] huart2.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002244: 4b16 ldr r3, [pc, #88] @ (80022a0 ) 8002246: 2200 movs r2, #0 8002248: 625a str r2, [r3, #36] @ 0x24 huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 800224a: 4b15 ldr r3, [pc, #84] @ (80022a0 ) 800224c: 2201 movs r2, #1 800224e: 629a str r2, [r3, #40] @ 0x28 huart2.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 8002250: 4b13 ldr r3, [pc, #76] @ (80022a0 ) 8002252: f44f 3200 mov.w r2, #131072 @ 0x20000 8002256: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart2) != HAL_OK) 8002258: 4811 ldr r0, [pc, #68] @ (80022a0 ) 800225a: f00b fb67 bl 800d92c 800225e: 4603 mov r3, r0 8002260: 2b00 cmp r3, #0 8002262: d001 beq.n 8002268 { Error_Handler(); 8002264: f000 fa74 bl 8002750 } if (HAL_UARTEx_SetTxFifoThreshold(&huart2, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 8002268: 2100 movs r1, #0 800226a: 480d ldr r0, [pc, #52] @ (80022a0 ) 800226c: f00e f807 bl 801027e 8002270: 4603 mov r3, r0 8002272: 2b00 cmp r3, #0 8002274: d001 beq.n 800227a { Error_Handler(); 8002276: f000 fa6b bl 8002750 } if (HAL_UARTEx_SetRxFifoThreshold(&huart2, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 800227a: 2100 movs r1, #0 800227c: 4808 ldr r0, [pc, #32] @ (80022a0 ) 800227e: f00e f83c bl 80102fa 8002282: 4603 mov r3, r0 8002284: 2b00 cmp r3, #0 8002286: d001 beq.n 800228c { Error_Handler(); 8002288: f000 fa62 bl 8002750 } if (HAL_UARTEx_DisableFifoMode(&huart2) != HAL_OK) 800228c: 4804 ldr r0, [pc, #16] @ (80022a0 ) 800228e: f00d ffbd bl 801020c 8002292: 4603 mov r3, r0 8002294: 2b00 cmp r3, #0 8002296: d001 beq.n 800229c { Error_Handler(); 8002298: f000 fa5a bl 8002750 } /* USER CODE BEGIN USART2_Init 2 */ /* USER CODE END USART2_Init 2 */ } 800229c: bf00 nop 800229e: bd80 pop {r7, pc} 80022a0: 240003b8 .word 0x240003b8 80022a4: 40004400 .word 0x40004400 080022a8 : * @brief USART3 Initialization Function * @param None * @retval None */ static void MX_USART3_UART_Init(void) { 80022a8: b580 push {r7, lr} 80022aa: 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; 80022ac: 4b24 ldr r3, [pc, #144] @ (8002340 ) 80022ae: 4a25 ldr r2, [pc, #148] @ (8002344 ) 80022b0: 601a str r2, [r3, #0] huart3.Init.BaudRate = 115200; 80022b2: 4b23 ldr r3, [pc, #140] @ (8002340 ) 80022b4: f44f 32e1 mov.w r2, #115200 @ 0x1c200 80022b8: 605a str r2, [r3, #4] huart3.Init.WordLength = UART_WORDLENGTH_8B; 80022ba: 4b21 ldr r3, [pc, #132] @ (8002340 ) 80022bc: 2200 movs r2, #0 80022be: 609a str r2, [r3, #8] huart3.Init.StopBits = UART_STOPBITS_1; 80022c0: 4b1f ldr r3, [pc, #124] @ (8002340 ) 80022c2: 2200 movs r2, #0 80022c4: 60da str r2, [r3, #12] huart3.Init.Parity = UART_PARITY_NONE; 80022c6: 4b1e ldr r3, [pc, #120] @ (8002340 ) 80022c8: 2200 movs r2, #0 80022ca: 611a str r2, [r3, #16] huart3.Init.Mode = UART_MODE_TX_RX; 80022cc: 4b1c ldr r3, [pc, #112] @ (8002340 ) 80022ce: 220c movs r2, #12 80022d0: 615a str r2, [r3, #20] huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; 80022d2: 4b1b ldr r3, [pc, #108] @ (8002340 ) 80022d4: 2200 movs r2, #0 80022d6: 619a str r2, [r3, #24] huart3.Init.OverSampling = UART_OVERSAMPLING_16; 80022d8: 4b19 ldr r3, [pc, #100] @ (8002340 ) 80022da: 2200 movs r2, #0 80022dc: 61da str r2, [r3, #28] huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 80022de: 4b18 ldr r3, [pc, #96] @ (8002340 ) 80022e0: 2200 movs r2, #0 80022e2: 621a str r2, [r3, #32] huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1; 80022e4: 4b16 ldr r3, [pc, #88] @ (8002340 ) 80022e6: 2200 movs r2, #0 80022e8: 625a str r2, [r3, #36] @ 0x24 huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 80022ea: 4b15 ldr r3, [pc, #84] @ (8002340 ) 80022ec: 2201 movs r2, #1 80022ee: 629a str r2, [r3, #40] @ 0x28 huart3.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 80022f0: 4b13 ldr r3, [pc, #76] @ (8002340 ) 80022f2: f44f 3200 mov.w r2, #131072 @ 0x20000 80022f6: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart3) != HAL_OK) 80022f8: 4811 ldr r0, [pc, #68] @ (8002340 ) 80022fa: f00b fb17 bl 800d92c 80022fe: 4603 mov r3, r0 8002300: 2b00 cmp r3, #0 8002302: d001 beq.n 8002308 { Error_Handler(); 8002304: f000 fa24 bl 8002750 } if (HAL_UARTEx_SetTxFifoThreshold(&huart3, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 8002308: 2100 movs r1, #0 800230a: 480d ldr r0, [pc, #52] @ (8002340 ) 800230c: f00d ffb7 bl 801027e 8002310: 4603 mov r3, r0 8002312: 2b00 cmp r3, #0 8002314: d001 beq.n 800231a { Error_Handler(); 8002316: f000 fa1b bl 8002750 } if (HAL_UARTEx_SetRxFifoThreshold(&huart3, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 800231a: 2100 movs r1, #0 800231c: 4808 ldr r0, [pc, #32] @ (8002340 ) 800231e: f00d ffec bl 80102fa 8002322: 4603 mov r3, r0 8002324: 2b00 cmp r3, #0 8002326: d001 beq.n 800232c { Error_Handler(); 8002328: f000 fa12 bl 8002750 } if (HAL_UARTEx_DisableFifoMode(&huart3) != HAL_OK) 800232c: 4804 ldr r0, [pc, #16] @ (8002340 ) 800232e: f00d ff6d bl 801020c 8002332: 4603 mov r3, r0 8002334: 2b00 cmp r3, #0 8002336: d001 beq.n 800233c { Error_Handler(); 8002338: f000 fa0a bl 8002750 } /* USER CODE BEGIN USART3_Init 2 */ /* USER CODE END USART3_Init 2 */ } 800233c: bf00 nop 800233e: bd80 pop {r7, pc} 8002340: 2400044c .word 0x2400044c 8002344: 40004800 .word 0x40004800 08002348 : * @brief USART6 Initialization Function * @param None * @retval None */ static void MX_USART6_UART_Init(void) { 8002348: b580 push {r7, lr} 800234a: 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; 800234c: 4b24 ldr r3, [pc, #144] @ (80023e0 ) 800234e: 4a25 ldr r2, [pc, #148] @ (80023e4 ) 8002350: 601a str r2, [r3, #0] huart6.Init.BaudRate = 115200; 8002352: 4b23 ldr r3, [pc, #140] @ (80023e0 ) 8002354: f44f 32e1 mov.w r2, #115200 @ 0x1c200 8002358: 605a str r2, [r3, #4] huart6.Init.WordLength = UART_WORDLENGTH_8B; 800235a: 4b21 ldr r3, [pc, #132] @ (80023e0 ) 800235c: 2200 movs r2, #0 800235e: 609a str r2, [r3, #8] huart6.Init.StopBits = UART_STOPBITS_1; 8002360: 4b1f ldr r3, [pc, #124] @ (80023e0 ) 8002362: 2200 movs r2, #0 8002364: 60da str r2, [r3, #12] huart6.Init.Parity = UART_PARITY_NONE; 8002366: 4b1e ldr r3, [pc, #120] @ (80023e0 ) 8002368: 2200 movs r2, #0 800236a: 611a str r2, [r3, #16] huart6.Init.Mode = UART_MODE_TX_RX; 800236c: 4b1c ldr r3, [pc, #112] @ (80023e0 ) 800236e: 220c movs r2, #12 8002370: 615a str r2, [r3, #20] huart6.Init.HwFlowCtl = UART_HWCONTROL_NONE; 8002372: 4b1b ldr r3, [pc, #108] @ (80023e0 ) 8002374: 2200 movs r2, #0 8002376: 619a str r2, [r3, #24] huart6.Init.OverSampling = UART_OVERSAMPLING_16; 8002378: 4b19 ldr r3, [pc, #100] @ (80023e0 ) 800237a: 2200 movs r2, #0 800237c: 61da str r2, [r3, #28] huart6.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 800237e: 4b18 ldr r3, [pc, #96] @ (80023e0 ) 8002380: 2200 movs r2, #0 8002382: 621a str r2, [r3, #32] huart6.Init.ClockPrescaler = UART_PRESCALER_DIV1; 8002384: 4b16 ldr r3, [pc, #88] @ (80023e0 ) 8002386: 2200 movs r2, #0 8002388: 625a str r2, [r3, #36] @ 0x24 huart6.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_TXINVERT_INIT; 800238a: 4b15 ldr r3, [pc, #84] @ (80023e0 ) 800238c: 2201 movs r2, #1 800238e: 629a str r2, [r3, #40] @ 0x28 huart6.AdvancedInit.TxPinLevelInvert = UART_ADVFEATURE_TXINV_ENABLE; 8002390: 4b13 ldr r3, [pc, #76] @ (80023e0 ) 8002392: f44f 3200 mov.w r2, #131072 @ 0x20000 8002396: 62da str r2, [r3, #44] @ 0x2c if (HAL_UART_Init(&huart6) != HAL_OK) 8002398: 4811 ldr r0, [pc, #68] @ (80023e0 ) 800239a: f00b fac7 bl 800d92c 800239e: 4603 mov r3, r0 80023a0: 2b00 cmp r3, #0 80023a2: d001 beq.n 80023a8 { Error_Handler(); 80023a4: f000 f9d4 bl 8002750 } if (HAL_UARTEx_SetTxFifoThreshold(&huart6, UART_TXFIFO_THRESHOLD_1_8) != HAL_OK) 80023a8: 2100 movs r1, #0 80023aa: 480d ldr r0, [pc, #52] @ (80023e0 ) 80023ac: f00d ff67 bl 801027e 80023b0: 4603 mov r3, r0 80023b2: 2b00 cmp r3, #0 80023b4: d001 beq.n 80023ba { Error_Handler(); 80023b6: f000 f9cb bl 8002750 } if (HAL_UARTEx_SetRxFifoThreshold(&huart6, UART_RXFIFO_THRESHOLD_1_8) != HAL_OK) 80023ba: 2100 movs r1, #0 80023bc: 4808 ldr r0, [pc, #32] @ (80023e0 ) 80023be: f00d ff9c bl 80102fa 80023c2: 4603 mov r3, r0 80023c4: 2b00 cmp r3, #0 80023c6: d001 beq.n 80023cc { Error_Handler(); 80023c8: f000 f9c2 bl 8002750 } if (HAL_UARTEx_DisableFifoMode(&huart6) != HAL_OK) 80023cc: 4804 ldr r0, [pc, #16] @ (80023e0 ) 80023ce: f00d ff1d bl 801020c 80023d2: 4603 mov r3, r0 80023d4: 2b00 cmp r3, #0 80023d6: d001 beq.n 80023dc { Error_Handler(); 80023d8: f000 f9ba bl 8002750 } /* USER CODE BEGIN USART6_Init 2 */ /* USER CODE END USART6_Init 2 */ } 80023dc: bf00 nop 80023de: bd80 pop {r7, pc} 80023e0: 240004e0 .word 0x240004e0 80023e4: 40011400 .word 0x40011400 080023e8 : /** * Enable DMA controller clock */ static void MX_DMA_Init(void) { 80023e8: b580 push {r7, lr} 80023ea: b082 sub sp, #8 80023ec: af00 add r7, sp, #0 /* DMA controller clock enable */ __HAL_RCC_DMA2_CLK_ENABLE(); 80023ee: 4b11 ldr r3, [pc, #68] @ (8002434 ) 80023f0: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 80023f4: 4a0f ldr r2, [pc, #60] @ (8002434 ) 80023f6: f043 0302 orr.w r3, r3, #2 80023fa: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 80023fe: 4b0d ldr r3, [pc, #52] @ (8002434 ) 8002400: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8002404: f003 0302 and.w r3, r3, #2 8002408: 607b str r3, [r7, #4] 800240a: 687b ldr r3, [r7, #4] /* DMA interrupt init */ /* DMA2_Stream6_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream6_IRQn, 5, 0); 800240c: 2200 movs r2, #0 800240e: 2105 movs r1, #5 8002410: 2045 movs r0, #69 @ 0x45 8002412: f003 fb1b bl 8005a4c HAL_NVIC_EnableIRQ(DMA2_Stream6_IRQn); 8002416: 2045 movs r0, #69 @ 0x45 8002418: f003 fb32 bl 8005a80 /* DMA2_Stream7_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream7_IRQn, 5, 0); 800241c: 2200 movs r2, #0 800241e: 2105 movs r1, #5 8002420: 2046 movs r0, #70 @ 0x46 8002422: f003 fb13 bl 8005a4c HAL_NVIC_EnableIRQ(DMA2_Stream7_IRQn); 8002426: 2046 movs r0, #70 @ 0x46 8002428: f003 fb2a bl 8005a80 } 800242c: bf00 nop 800242e: 3708 adds r7, #8 8002430: 46bd mov sp, r7 8002432: bd80 pop {r7, pc} 8002434: 58024400 .word 0x58024400 08002438 : * @brief GPIO Initialization Function * @param None * @retval None */ static void MX_GPIO_Init(void) { 8002438: b580 push {r7, lr} 800243a: b08c sub sp, #48 @ 0x30 800243c: af00 add r7, sp, #0 GPIO_InitTypeDef GPIO_InitStruct = {0}; 800243e: f107 031c add.w r3, r7, #28 8002442: 2200 movs r2, #0 8002444: 601a str r2, [r3, #0] 8002446: 605a str r2, [r3, #4] 8002448: 609a str r2, [r3, #8] 800244a: 60da str r2, [r3, #12] 800244c: 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(); 800244e: 4b5d ldr r3, [pc, #372] @ (80025c4 ) 8002450: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002454: 4a5b ldr r2, [pc, #364] @ (80025c4 ) 8002456: f043 0310 orr.w r3, r3, #16 800245a: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 800245e: 4b59 ldr r3, [pc, #356] @ (80025c4 ) 8002460: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002464: f003 0310 and.w r3, r3, #16 8002468: 61bb str r3, [r7, #24] 800246a: 69bb ldr r3, [r7, #24] __HAL_RCC_GPIOH_CLK_ENABLE(); 800246c: 4b55 ldr r3, [pc, #340] @ (80025c4 ) 800246e: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002472: 4a54 ldr r2, [pc, #336] @ (80025c4 ) 8002474: f043 0380 orr.w r3, r3, #128 @ 0x80 8002478: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 800247c: 4b51 ldr r3, [pc, #324] @ (80025c4 ) 800247e: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002482: f003 0380 and.w r3, r3, #128 @ 0x80 8002486: 617b str r3, [r7, #20] 8002488: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOC_CLK_ENABLE(); 800248a: 4b4e ldr r3, [pc, #312] @ (80025c4 ) 800248c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8002490: 4a4c ldr r2, [pc, #304] @ (80025c4 ) 8002492: f043 0304 orr.w r3, r3, #4 8002496: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 800249a: 4b4a ldr r3, [pc, #296] @ (80025c4 ) 800249c: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80024a0: f003 0304 and.w r3, r3, #4 80024a4: 613b str r3, [r7, #16] 80024a6: 693b ldr r3, [r7, #16] __HAL_RCC_GPIOA_CLK_ENABLE(); 80024a8: 4b46 ldr r3, [pc, #280] @ (80025c4 ) 80024aa: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80024ae: 4a45 ldr r2, [pc, #276] @ (80025c4 ) 80024b0: f043 0301 orr.w r3, r3, #1 80024b4: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80024b8: 4b42 ldr r3, [pc, #264] @ (80025c4 ) 80024ba: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80024be: f003 0301 and.w r3, r3, #1 80024c2: 60fb str r3, [r7, #12] 80024c4: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOB_CLK_ENABLE(); 80024c6: 4b3f ldr r3, [pc, #252] @ (80025c4 ) 80024c8: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80024cc: 4a3d ldr r2, [pc, #244] @ (80025c4 ) 80024ce: f043 0302 orr.w r3, r3, #2 80024d2: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80024d6: 4b3b ldr r3, [pc, #236] @ (80025c4 ) 80024d8: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80024dc: f003 0302 and.w r3, r3, #2 80024e0: 60bb str r3, [r7, #8] 80024e2: 68bb ldr r3, [r7, #8] __HAL_RCC_GPIOD_CLK_ENABLE(); 80024e4: 4b37 ldr r3, [pc, #220] @ (80025c4 ) 80024e6: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80024ea: 4a36 ldr r2, [pc, #216] @ (80025c4 ) 80024ec: f043 0308 orr.w r3, r3, #8 80024f0: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 80024f4: 4b33 ldr r3, [pc, #204] @ (80025c4 ) 80024f6: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 80024fa: f003 0308 and.w r3, r3, #8 80024fe: 607b str r3, [r7, #4] 8002500: 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); 8002502: 2200 movs r2, #0 8002504: 213c movs r1, #60 @ 0x3c 8002506: 4830 ldr r0, [pc, #192] @ (80025c8 ) 8002508: f007 fe90 bl 800a22c /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14, GPIO_PIN_RESET); 800250c: 2200 movs r2, #0 800250e: f44f 41f0 mov.w r1, #30720 @ 0x7800 8002512: 482e ldr r0, [pc, #184] @ (80025cc ) 8002514: f007 fe8a bl 800a22c /*Configure GPIO pins : PE2 PE3 PE4 PE5 */ GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5; 8002518: 233c movs r3, #60 @ 0x3c 800251a: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 800251c: 2301 movs r3, #1 800251e: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_NOPULL; 8002520: 2300 movs r3, #0 8002522: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 8002524: 2300 movs r3, #0 8002526: 62bb str r3, [r7, #40] @ 0x28 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 8002528: f107 031c add.w r3, r7, #28 800252c: 4619 mov r1, r3 800252e: 4826 ldr r0, [pc, #152] @ (80025c8 ) 8002530: f007 fcb4 bl 8009e9c /*Configure GPIO pins : PD11 PD12 PD13 PD14 */ GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14; 8002534: f44f 43f0 mov.w r3, #30720 @ 0x7800 8002538: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 800253a: 2301 movs r3, #1 800253c: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_NOPULL; 800253e: 2300 movs r3, #0 8002540: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 8002542: 2300 movs r3, #0 8002544: 62bb str r3, [r7, #40] @ 0x28 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 8002546: f107 031c add.w r3, r7, #28 800254a: 4619 mov r1, r3 800254c: 481f ldr r0, [pc, #124] @ (80025cc ) 800254e: f007 fca5 bl 8009e9c /*Configure GPIO pins : PD1 PD2 PD4 */ GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_4; 8002552: 2316 movs r3, #22 8002554: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_INPUT; 8002556: 2300 movs r3, #0 8002558: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_NOPULL; 800255a: 2300 movs r3, #0 800255c: 627b str r3, [r7, #36] @ 0x24 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 800255e: f107 031c add.w r3, r7, #28 8002562: 4619 mov r1, r3 8002564: 4819 ldr r0, [pc, #100] @ (80025cc ) 8002566: f007 fc99 bl 8009e9c /* 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); 800256a: 2200 movs r2, #0 800256c: 213c movs r1, #60 @ 0x3c 800256e: 4816 ldr r0, [pc, #88] @ (80025c8 ) 8002570: f007 fe5c bl 800a22c GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; 8002574: f44f 4340 mov.w r3, #49152 @ 0xc000 8002578: 61fb str r3, [r7, #28] GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 800257a: 2301 movs r3, #1 800257c: 623b str r3, [r7, #32] GPIO_InitStruct.Pull = GPIO_PULLUP; 800257e: 2301 movs r3, #1 8002580: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 8002582: 2300 movs r3, #0 8002584: 62bb str r3, [r7, #40] @ 0x28 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 8002586: f107 031c add.w r3, r7, #28 800258a: 4619 mov r1, r3 800258c: 480e ldr r0, [pc, #56] @ (80025c8 ) 800258e: f007 fc85 bl 8009e9c HAL_GPIO_WritePin(GPIOE, GPIO_PIN_14, GPIO_PIN_RESET); 8002592: 2200 movs r2, #0 8002594: f44f 4180 mov.w r1, #16384 @ 0x4000 8002598: 480b ldr r0, [pc, #44] @ (80025c8 ) 800259a: f007 fe47 bl 800a22c HAL_Delay(100); 800259e: 2064 movs r0, #100 @ 0x64 80025a0: f003 f958 bl 8005854 HAL_GPIO_WritePin(GPIOE, GPIO_PIN_14, GPIO_PIN_SET); 80025a4: 2201 movs r2, #1 80025a6: f44f 4180 mov.w r1, #16384 @ 0x4000 80025aa: 4807 ldr r0, [pc, #28] @ (80025c8 ) 80025ac: f007 fe3e bl 800a22c HAL_GPIO_WritePin(GPIOE, GPIO_PIN_15, GPIO_PIN_SET); 80025b0: 2201 movs r2, #1 80025b2: f44f 4100 mov.w r1, #32768 @ 0x8000 80025b6: 4804 ldr r0, [pc, #16] @ (80025c8 ) 80025b8: f007 fe38 bl 800a22c /* USER CODE END MX_GPIO_Init_2 */ } 80025bc: bf00 nop 80025be: 3730 adds r7, #48 @ 0x30 80025c0: 46bd mov sp, r7 80025c2: bd80 pop {r7, pc} 80025c4: 58024400 .word 0x58024400 80025c8: 58021000 .word 0x58021000 80025cc: 58020c00 .word 0x58020c00 080025d0 : * @param argument: Not used * @retval None */ /* USER CODE END Header_StartDefaultTask */ void StartDefaultTask(void *argument) { 80025d0: b580 push {r7, lr} 80025d2: b082 sub sp, #8 80025d4: af00 add r7, sp, #0 80025d6: 6078 str r0, [r7, #4] /* init code for LWIP */ MX_LWIP_Init(); 80025d8: f00d ff8c bl 80104f4 /* USER CODE BEGIN 5 */ /* Infinite loop */ for(;;) { HAL_IWDG_Refresh(&hiwdg1); 80025dc: 4803 ldr r0, [pc, #12] @ (80025ec ) 80025de: f007 fe8d bl 800a2fc osDelay(pdMS_TO_TICKS(100)); 80025e2: 2064 movs r0, #100 @ 0x64 80025e4: f00e ff59 bl 801149a HAL_IWDG_Refresh(&hiwdg1); 80025e8: bf00 nop 80025ea: e7f7 b.n 80025dc 80025ec: 2400026c .word 0x2400026c 080025f0 : /* USER CODE END 5 */ } /* relay1TimerCallback function */ void relay1TimerCallback(void *argument) { 80025f0: b580 push {r7, lr} 80025f2: b082 sub sp, #8 80025f4: af00 add r7, sp, #0 80025f6: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay1TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_5, GPIO_PIN_RESET); 80025f8: 2200 movs r2, #0 80025fa: 2120 movs r1, #32 80025fc: 4803 ldr r0, [pc, #12] @ (800260c ) 80025fe: f007 fe15 bl 800a22c /* USER CODE END relay1TimerCallback */ } 8002602: bf00 nop 8002604: 3708 adds r7, #8 8002606: 46bd mov sp, r7 8002608: bd80 pop {r7, pc} 800260a: bf00 nop 800260c: 58021000 .word 0x58021000 08002610 : /* relay2TimerCallback function */ void relay2TimerCallback(void *argument) { 8002610: b580 push {r7, lr} 8002612: b082 sub sp, #8 8002614: af00 add r7, sp, #0 8002616: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay2TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_3, GPIO_PIN_RESET); 8002618: 2200 movs r2, #0 800261a: 2108 movs r1, #8 800261c: 4803 ldr r0, [pc, #12] @ (800262c ) 800261e: f007 fe05 bl 800a22c /* USER CODE END relay2TimerCallback */ } 8002622: bf00 nop 8002624: 3708 adds r7, #8 8002626: 46bd mov sp, r7 8002628: bd80 pop {r7, pc} 800262a: bf00 nop 800262c: 58021000 .word 0x58021000 08002630 : /* relay3TimerCallback function */ void relay3TimerCallback(void *argument) { 8002630: b580 push {r7, lr} 8002632: b082 sub sp, #8 8002634: af00 add r7, sp, #0 8002636: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay3TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_4, GPIO_PIN_RESET); 8002638: 2200 movs r2, #0 800263a: 2110 movs r1, #16 800263c: 4803 ldr r0, [pc, #12] @ (800264c ) 800263e: f007 fdf5 bl 800a22c /* USER CODE END relay3TimerCallback */ } 8002642: bf00 nop 8002644: 3708 adds r7, #8 8002646: 46bd mov sp, r7 8002648: bd80 pop {r7, pc} 800264a: bf00 nop 800264c: 58021000 .word 0x58021000 08002650 : /* relay4TimerCallback function */ void relay4TimerCallback(void *argument) { 8002650: b580 push {r7, lr} 8002652: b082 sub sp, #8 8002654: af00 add r7, sp, #0 8002656: 6078 str r0, [r7, #4] /* USER CODE BEGIN relay4TimerCallback */ HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_RESET); 8002658: 2200 movs r2, #0 800265a: 2104 movs r1, #4 800265c: 4803 ldr r0, [pc, #12] @ (800266c ) 800265e: f007 fde5 bl 800a22c /* USER CODE END relay4TimerCallback */ } 8002662: bf00 nop 8002664: 3708 adds r7, #8 8002666: 46bd mov sp, r7 8002668: bd80 pop {r7, pc} 800266a: bf00 nop 800266c: 58021000 .word 0x58021000 08002670 : /* MPU Configuration */ void MPU_Config(void) { 8002670: b580 push {r7, lr} 8002672: b084 sub sp, #16 8002674: af00 add r7, sp, #0 MPU_Region_InitTypeDef MPU_InitStruct = {0}; 8002676: 463b mov r3, r7 8002678: 2200 movs r2, #0 800267a: 601a str r2, [r3, #0] 800267c: 605a str r2, [r3, #4] 800267e: 609a str r2, [r3, #8] 8002680: 60da str r2, [r3, #12] /* Disables the MPU */ HAL_MPU_Disable(); 8002682: f003 fa0b bl 8005a9c /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; 8002686: 2301 movs r3, #1 8002688: 703b strb r3, [r7, #0] MPU_InitStruct.Number = MPU_REGION_NUMBER0; 800268a: 2300 movs r3, #0 800268c: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x0; 800268e: 2300 movs r3, #0 8002690: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; 8002692: 231f movs r3, #31 8002694: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x87; 8002696: 2387 movs r3, #135 @ 0x87 8002698: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 800269a: 2300 movs r3, #0 800269c: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; 800269e: 2300 movs r3, #0 80026a0: 72fb strb r3, [r7, #11] MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; 80026a2: 2301 movs r3, #1 80026a4: 733b strb r3, [r7, #12] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 80026a6: 2301 movs r3, #1 80026a8: 737b strb r3, [r7, #13] MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; 80026aa: 2300 movs r3, #0 80026ac: 73bb strb r3, [r7, #14] MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; 80026ae: 2300 movs r3, #0 80026b0: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80026b2: 463b mov r3, r7 80026b4: 4618 mov r0, r3 80026b6: f003 fa29 bl 8005b0c /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER1; 80026ba: 2301 movs r3, #1 80026bc: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x24020000; 80026be: 4b13 ldr r3, [pc, #76] @ (800270c ) 80026c0: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_128KB; 80026c2: 2310 movs r3, #16 80026c4: 723b strb r3, [r7, #8] MPU_InitStruct.SubRegionDisable = 0x0; 80026c6: 2300 movs r3, #0 80026c8: 727b strb r3, [r7, #9] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL1; 80026ca: 2301 movs r3, #1 80026cc: 72bb strb r3, [r7, #10] MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS; 80026ce: 2303 movs r3, #3 80026d0: 72fb strb r3, [r7, #11] MPU_InitStruct.IsShareable = MPU_ACCESS_NOT_SHAREABLE; 80026d2: 2300 movs r3, #0 80026d4: 737b strb r3, [r7, #13] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80026d6: 463b mov r3, r7 80026d8: 4618 mov r0, r3 80026da: f003 fa17 bl 8005b0c /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER2; 80026de: 2302 movs r3, #2 80026e0: 707b strb r3, [r7, #1] MPU_InitStruct.BaseAddress = 0x24040000; 80026e2: 4b0b ldr r3, [pc, #44] @ (8002710 ) 80026e4: 607b str r3, [r7, #4] MPU_InitStruct.Size = MPU_REGION_SIZE_512B; 80026e6: 2308 movs r3, #8 80026e8: 723b strb r3, [r7, #8] MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; 80026ea: 2300 movs r3, #0 80026ec: 72bb strb r3, [r7, #10] MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; 80026ee: 2301 movs r3, #1 80026f0: 737b strb r3, [r7, #13] MPU_InitStruct.IsBufferable = MPU_ACCESS_BUFFERABLE; 80026f2: 2301 movs r3, #1 80026f4: 73fb strb r3, [r7, #15] HAL_MPU_ConfigRegion(&MPU_InitStruct); 80026f6: 463b mov r3, r7 80026f8: 4618 mov r0, r3 80026fa: f003 fa07 bl 8005b0c /* Enables the MPU */ HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT); 80026fe: 2004 movs r0, #4 8002700: f003 f9e4 bl 8005acc } 8002704: bf00 nop 8002706: 3710 adds r7, #16 8002708: 46bd mov sp, r7 800270a: bd80 pop {r7, pc} 800270c: 24020000 .word 0x24020000 8002710: 24040000 .word 0x24040000 08002714 : * a global variable "uwTick" used as application time base. * @param htim : TIM handle * @retval None */ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { 8002714: b580 push {r7, lr} 8002716: b082 sub sp, #8 8002718: af00 add r7, sp, #0 800271a: 6078 str r0, [r7, #4] /* USER CODE BEGIN Callback 0 */ /* USER CODE END Callback 0 */ if (htim->Instance == TIM6) { 800271c: 687b ldr r3, [r7, #4] 800271e: 681b ldr r3, [r3, #0] 8002720: 4a09 ldr r2, [pc, #36] @ (8002748 ) 8002722: 4293 cmp r3, r2 8002724: d101 bne.n 800272a HAL_IncTick(); 8002726: f003 f875 bl 8005814 } /* USER CODE BEGIN Callback 1 */ if (htim->Instance == TIM6) { 800272a: 687b ldr r3, [r7, #4] 800272c: 681b ldr r3, [r3, #0] 800272e: 4a06 ldr r2, [pc, #24] @ (8002748 ) 8002730: 4293 cmp r3, r2 8002732: d104 bne.n 800273e MilliTimer++; 8002734: 4b05 ldr r3, [pc, #20] @ (800274c ) 8002736: 681b ldr r3, [r3, #0] 8002738: 3301 adds r3, #1 800273a: 4a04 ldr r2, [pc, #16] @ (800274c ) 800273c: 6013 str r3, [r2, #0] } /* USER CODE END Callback 1 */ } 800273e: bf00 nop 8002740: 3708 adds r7, #8 8002742: 46bd mov sp, r7 8002744: bd80 pop {r7, pc} 8002746: bf00 nop 8002748: 40001000 .word 0x40001000 800274c: 2402b124 .word 0x2402b124 08002750 : /** * @brief This function is executed in case of error occurrence. * @retval None */ void Error_Handler(void) { 8002750: b580 push {r7, lr} 8002752: af00 add r7, sp, #0 __ASM volatile ("cpsid i" : : : "memory"); 8002754: b672 cpsid i } 8002756: 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(); 8002758: f7ff faae bl 8001cb8 <__NVIC_SystemReset> 0800275c <__NVIC_SystemReset>: { 800275c: b480 push {r7} 800275e: af00 add r7, sp, #0 __ASM volatile ("dsb 0xF":::"memory"); 8002760: f3bf 8f4f dsb sy } 8002764: bf00 nop (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 8002766: 4b06 ldr r3, [pc, #24] @ (8002780 <__NVIC_SystemReset+0x24>) 8002768: 68db ldr r3, [r3, #12] 800276a: f403 62e0 and.w r2, r3, #1792 @ 0x700 SCB->AIRCR = (uint32_t)((0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 800276e: 4904 ldr r1, [pc, #16] @ (8002780 <__NVIC_SystemReset+0x24>) 8002770: 4b04 ldr r3, [pc, #16] @ (8002784 <__NVIC_SystemReset+0x28>) 8002772: 4313 orrs r3, r2 8002774: 60cb str r3, [r1, #12] __ASM volatile ("dsb 0xF":::"memory"); 8002776: f3bf 8f4f dsb sy } 800277a: bf00 nop __NOP(); 800277c: bf00 nop 800277e: e7fd b.n 800277c <__NVIC_SystemReset+0x20> 8002780: e000ed00 .word 0xe000ed00 8002784: 05fa0004 .word 0x05fa0004 08002788 : 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) { 8002788: b580 push {r7, lr} 800278a: b082 sub sp, #8 800278c: af00 add r7, sp, #0 800278e: 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 8002790: 4b16 ldr r3, [pc, #88] @ (80027ec ) 8002792: 685b ldr r3, [r3, #4] 8002794: 2b00 cmp r3, #0 8002796: d007 beq.n 80027a8 8002798: 4b14 ldr r3, [pc, #80] @ (80027ec ) 800279a: 689b ldr r3, [r3, #8] 800279c: 2b00 cmp r3, #0 800279e: d003 beq.n 80027a8 80027a0: 4b12 ldr r3, [pc, #72] @ (80027ec ) 80027a2: 68db ldr r3, [r3, #12] 80027a4: 2b00 cmp r3, #0 80027a6: d104 bne.n 80027b2 { osDelay (pdMS_TO_TICKS (1000)); 80027a8: f44f 707a mov.w r0, #1000 @ 0x3e8 80027ac: f00e fe75 bl 801149a continue; 80027b0: e003 b.n 80027ba } else { printf ("DHCP/Static IP O.K.\n"); 80027b2: 480f ldr r0, [pc, #60] @ (80027f0 ) 80027b4: f028 f8da bl 802a96c break; 80027b8: e000 b.n 80027bc if (gnetif.ip_addr.addr == 0 || gnetif.netmask.addr == 0 || gnetif.gw.addr == 0) // system has no valid ip address 80027ba: e7e9 b.n 8002790 } } while (1) { if (!mqttClient.isconnected) { 80027bc: 4b0d ldr r3, [pc, #52] @ (80027f4 ) 80027be: 6a1b ldr r3, [r3, #32] 80027c0: 2b00 cmp r3, #0 80027c2: d109 bne.n 80027d8 // try to connect to the broker if (MqttConnectBroker () != MQTT_SUCCESS) { 80027c4: f000 fb92 bl 8002eec 80027c8: 4603 mov r3, r0 80027ca: 2b00 cmp r3, #0 80027cc: d0f6 beq.n 80027bc osDelay (pdMS_TO_TICKS (1000)); 80027ce: f44f 707a mov.w r0, #1000 @ 0x3e8 80027d2: f00e fe62 bl 801149a 80027d6: e7f1 b.n 80027bc } } else { MQTTYield (&mqttClient, 500); // handle timer 80027d8: f44f 71fa mov.w r1, #500 @ 0x1f4 80027dc: 4805 ldr r0, [pc, #20] @ (80027f4 ) 80027de: f025 f9c7 bl 8027b70 osDelay (pdMS_TO_TICKS (100)); 80027e2: 2064 movs r0, #100 @ 0x64 80027e4: f00e fe59 bl 801149a if (!mqttClient.isconnected) { 80027e8: e7e8 b.n 80027bc 80027ea: bf00 nop 80027ec: 24002264 .word 0x24002264 80027f0: 0802d508 .word 0x0802d508 80027f4: 24000740 .word 0x24000740 080027f8 : } } } void MqttClientPubTask (void* argument) { 80027f8: b590 push {r4, r7, lr} 80027fa: f5ad 7d19 sub.w sp, sp, #612 @ 0x264 80027fe: af04 add r7, sp, #16 8002800: f507 7314 add.w r3, r7, #592 @ 0x250 8002804: f5a3 7313 sub.w r3, r3, #588 @ 0x24c 8002808: 6018 str r0, [r3, #0] char messageBuffer[512] = { 0x00 }; 800280a: f507 7314 add.w r3, r7, #592 @ 0x250 800280e: f5a3 7305 sub.w r3, r3, #532 @ 0x214 8002812: 2200 movs r2, #0 8002814: 601a str r2, [r3, #0] 8002816: 3304 adds r3, #4 8002818: f44f 72fe mov.w r2, #508 @ 0x1fc 800281c: 2100 movs r1, #0 800281e: 4618 mov r0, r3 8002820: f028 f9ce bl 802abc0 char topicTextBuffer[32] = { 0x00 }; 8002824: f507 7314 add.w r3, r7, #592 @ 0x250 8002828: f5a3 730d sub.w r3, r3, #564 @ 0x234 800282c: 2200 movs r2, #0 800282e: 601a str r2, [r3, #0] 8002830: 3304 adds r3, #4 8002832: 2200 movs r2, #0 8002834: 601a str r2, [r3, #0] 8002836: 605a str r2, [r3, #4] 8002838: 609a str r2, [r3, #8] 800283a: 60da str r2, [r3, #12] 800283c: 611a str r2, [r3, #16] 800283e: 615a str r2, [r3, #20] 8002840: 619a str r2, [r3, #24] uint32_t bytesInBuffer = 0; 8002842: 2300 movs r3, #0 8002844: f8c7 3248 str.w r3, [r7, #584] @ 0x248 uint8_t boardNumber = 0; 8002848: 2300 movs r3, #0 800284a: f887 324f strb.w r3, [r7, #591] @ 0x24f MQTTMessage message; while (1) { if (mqttClient.isconnected) { 800284e: 4b93 ldr r3, [pc, #588] @ (8002a9c ) 8002850: 6a1b ldr r3, [r3, #32] 8002852: 2b00 cmp r3, #0 8002854: f000 833d beq.w 8002ed2 if (is_link_up ()) { 8002858: f00d fe3c bl 80104d4 800285c: 4603 mov r3, r0 800285e: 2b00 cmp r3, #0 8002860: f000 8337 beq.w 8002ed2 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002864: 2300 movs r3, #0 8002866: f887 324f strb.w r3, [r7, #591] @ 0x24f 800286a: e10e b.n 8002a8a osMutexAcquire (resMeasurementsMutex, osWaitForever); 800286c: 4b8c ldr r3, [pc, #560] @ (8002aa0 ) 800286e: 681b ldr r3, [r3, #0] 8002870: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8002874: 4618 mov r0, r3 8002876: f00e ffa8 bl 80117ca RESMeasurements* resMeas = &resMeasurements[boardNumber]; 800287a: f897 224f ldrb.w r2, [r7, #591] @ 0x24f 800287e: 4613 mov r3, r2 8002880: 011b lsls r3, r3, #4 8002882: 1a9b subs r3, r3, r2 8002884: 009b lsls r3, r3, #2 8002886: 4a87 ldr r2, [pc, #540] @ (8002aa4 ) 8002888: 4413 add r3, r2 800288a: f8c7 323c str.w r3, [r7, #572] @ 0x23c sprintf (topicTextBuffer, "RESmeasurments/%d", boardNumber + 1); 800288e: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002892: 1c5a adds r2, r3, #1 8002894: f107 031c add.w r3, r7, #28 8002898: 4983 ldr r1, [pc, #524] @ (8002aa8 ) 800289a: 4618 mov r0, r3 800289c: f028 f86e bl 802a97c bytesInBuffer = sprintf (messageBuffer, "{\"voltageRMS\":[%.2f, %.2f, %.2f], ", resMeas->voltageRMS[0], resMeas->voltageRMS[1], resMeas->voltageRMS[2]); 80028a0: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028a4: edd3 7a00 vldr s15, [r3] 80028a8: eeb7 5ae7 vcvt.f64.f32 d5, s15 80028ac: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028b0: edd3 7a01 vldr s15, [r3, #4] 80028b4: eeb7 7ae7 vcvt.f64.f32 d7, s15 80028b8: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028bc: edd3 6a02 vldr s13, [r3, #8] 80028c0: eeb7 6ae6 vcvt.f64.f32 d6, s13 80028c4: f107 003c add.w r0, r7, #60 @ 0x3c 80028c8: ed8d 6b02 vstr d6, [sp, #8] 80028cc: ed8d 7b00 vstr d7, [sp] 80028d0: ec53 2b15 vmov r2, r3, d5 80028d4: 4975 ldr r1, [pc, #468] @ (8002aac ) 80028d6: f028 f851 bl 802a97c 80028da: 4603 mov r3, r0 80028dc: 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]); 80028e0: f107 023c add.w r2, r7, #60 @ 0x3c 80028e4: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 80028e8: 18d0 adds r0, r2, r3 80028ea: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028ee: edd3 7a03 vldr s15, [r3, #12] 80028f2: eeb7 5ae7 vcvt.f64.f32 d5, s15 80028f6: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80028fa: edd3 7a04 vldr s15, [r3, #16] 80028fe: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002902: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002906: edd3 6a05 vldr s13, [r3, #20] 800290a: eeb7 6ae6 vcvt.f64.f32 d6, s13 800290e: ed8d 6b02 vstr d6, [sp, #8] 8002912: ed8d 7b00 vstr d7, [sp] 8002916: ec53 2b15 vmov r2, r3, d5 800291a: 4965 ldr r1, [pc, #404] @ (8002ab0 ) 800291c: f028 f82e bl 802a97c 8002920: 4603 mov r3, r0 8002922: 461a mov r2, r3 8002924: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002928: 4413 add r3, r2 800292a: 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]); 800292e: f107 023c add.w r2, r7, #60 @ 0x3c 8002932: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002936: 18d0 adds r0, r2, r3 8002938: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800293c: edd3 7a06 vldr s15, [r3, #24] 8002940: eeb7 5ae7 vcvt.f64.f32 d5, s15 8002944: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002948: edd3 7a07 vldr s15, [r3, #28] 800294c: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002950: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002954: edd3 6a08 vldr s13, [r3, #32] 8002958: eeb7 6ae6 vcvt.f64.f32 d6, s13 800295c: ed8d 6b02 vstr d6, [sp, #8] 8002960: ed8d 7b00 vstr d7, [sp] 8002964: ec53 2b15 vmov r2, r3, d5 8002968: 4952 ldr r1, [pc, #328] @ (8002ab4 ) 800296a: f028 f807 bl 802a97c 800296e: 4603 mov r3, r0 8002970: 461a mov r2, r3 8002972: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002976: 4413 add r3, r2 8002978: 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]); 800297c: f107 023c add.w r2, r7, #60 @ 0x3c 8002980: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002984: 18d0 adds r0, r2, r3 8002986: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 800298a: edd3 7a09 vldr s15, [r3, #36] @ 0x24 800298e: eeb7 5ae7 vcvt.f64.f32 d5, s15 8002992: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 8002996: edd3 7a0a vldr s15, [r3, #40] @ 0x28 800299a: eeb7 7ae7 vcvt.f64.f32 d7, s15 800299e: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80029a2: edd3 6a0b vldr s13, [r3, #44] @ 0x2c 80029a6: eeb7 6ae6 vcvt.f64.f32 d6, s13 80029aa: ed8d 6b02 vstr d6, [sp, #8] 80029ae: ed8d 7b00 vstr d7, [sp] 80029b2: ec53 2b15 vmov r2, r3, d5 80029b6: 4940 ldr r1, [pc, #256] @ (8002ab8 ) 80029b8: f027 ffe0 bl 802a97c 80029bc: 4603 mov r3, r0 80029be: 461a mov r2, r3 80029c0: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 80029c4: 4413 add r3, r2 80029c6: 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]); 80029ca: f107 023c add.w r2, r7, #60 @ 0x3c 80029ce: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 80029d2: 18d0 adds r0, r2, r3 80029d4: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80029d8: edd3 7a0c vldr s15, [r3, #48] @ 0x30 80029dc: eeb7 5ae7 vcvt.f64.f32 d5, s15 80029e0: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80029e4: edd3 7a0d vldr s15, [r3, #52] @ 0x34 80029e8: eeb7 7ae7 vcvt.f64.f32 d7, s15 80029ec: f8d7 323c ldr.w r3, [r7, #572] @ 0x23c 80029f0: edd3 6a0e vldr s13, [r3, #56] @ 0x38 80029f4: eeb7 6ae6 vcvt.f64.f32 d6, s13 80029f8: ed8d 6b02 vstr d6, [sp, #8] 80029fc: ed8d 7b00 vstr d7, [sp] 8002a00: ec53 2b15 vmov r2, r3, d5 8002a04: 492d ldr r1, [pc, #180] @ (8002abc ) 8002a06: f027 ffb9 bl 802a97c 8002a0a: 4603 mov r3, r0 8002a0c: 461a mov r2, r3 8002a0e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002a12: 4413 add r3, r2 8002a14: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"lastSeen\": %ld}", slaveLastSeen[boardNumber]); 8002a18: f107 023c add.w r2, r7, #60 @ 0x3c 8002a1c: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002a20: 18d0 adds r0, r2, r3 8002a22: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002a26: 4a26 ldr r2, [pc, #152] @ (8002ac0 ) 8002a28: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8002a2c: 461a mov r2, r3 8002a2e: 4925 ldr r1, [pc, #148] @ (8002ac4 ) 8002a30: f027 ffa4 bl 802a97c 8002a34: 4603 mov r3, r0 8002a36: 461a mov r2, r3 8002a38: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002a3c: 4413 add r3, r2 8002a3e: f8c7 3248 str.w r3, [r7, #584] @ 0x248 osMutexRelease (resMeasurementsMutex); 8002a42: 4b17 ldr r3, [pc, #92] @ (8002aa0 ) 8002a44: 681b ldr r3, [r3, #0] 8002a46: 4618 mov r0, r3 8002a48: f00e ff0a bl 8011860 message.payload = (void*)messageBuffer; 8002a4c: f507 7314 add.w r3, r7, #592 @ 0x250 8002a50: f5a3 7311 sub.w r3, r3, #580 @ 0x244 8002a54: f107 023c add.w r2, r7, #60 @ 0x3c 8002a58: 609a str r2, [r3, #8] message.payloadlen = strlen (messageBuffer); 8002a5a: f107 033c add.w r3, r7, #60 @ 0x3c 8002a5e: 4618 mov r0, r3 8002a60: f7fd fc9e bl 80003a0 8002a64: 4602 mov r2, r0 8002a66: f507 7314 add.w r3, r7, #592 @ 0x250 8002a6a: f5a3 7311 sub.w r3, r3, #580 @ 0x244 8002a6e: 60da str r2, [r3, #12] MQTTPublish (&mqttClient, topicTextBuffer, &message); // publish a message 8002a70: f107 020c add.w r2, r7, #12 8002a74: f107 031c add.w r3, r7, #28 8002a78: 4619 mov r1, r3 8002a7a: 4808 ldr r0, [pc, #32] @ (8002a9c ) 8002a7c: f025 fa97 bl 8027fae for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002a80: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002a84: 3301 adds r3, #1 8002a86: f887 324f strb.w r3, [r7, #591] @ 0x24f 8002a8a: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002a8e: 2b03 cmp r3, #3 8002a90: f67f aeec bls.w 800286c } for (boardNumber = 0; boardNumber < SLAVES_COUNT + 1; boardNumber++) { 8002a94: 2300 movs r3, #0 8002a96: f887 324f strb.w r3, [r7, #591] @ 0x24f 8002a9a: e215 b.n 8002ec8 8002a9c: 24000740 .word 0x24000740 8002aa0: 24002258 .word 0x24002258 8002aa4: 24002098 .word 0x24002098 8002aa8: 0802d51c .word 0x0802d51c 8002aac: 0802d530 .word 0x0802d530 8002ab0: 0802d554 .word 0x0802d554 8002ab4: 0802d578 .word 0x0802d578 8002ab8: 0802d59c .word 0x0802d59c 8002abc: 0802d5c0 .word 0x0802d5c0 8002ac0: 24002248 .word 0x24002248 8002ac4: 0802d5e0 .word 0x0802d5e0 if (boardNumber > 0) { 8002ac8: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002acc: 2b00 cmp r3, #0 8002ace: f000 81b3 beq.w 8002e38 osMutexAcquire (sensorsInfoMutex, osWaitForever); 8002ad2: 4bc5 ldr r3, [pc, #788] @ (8002de8 ) 8002ad4: 681b ldr r3, [r3, #0] 8002ad6: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8002ada: 4618 mov r0, r3 8002adc: f00e fe75 bl 80117ca SesnorsInfo* sensors = &sensorsInfo[boardNumber - 1]; 8002ae0: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002ae4: 1e5a subs r2, r3, #1 8002ae6: 4613 mov r3, r2 8002ae8: 005b lsls r3, r3, #1 8002aea: 4413 add r3, r2 8002aec: 011b lsls r3, r3, #4 8002aee: 4abf ldr r2, [pc, #764] @ (8002dec ) 8002af0: 4413 add r3, r2 8002af2: f8c7 3240 str.w r3, [r7, #576] @ 0x240 sprintf (topicTextBuffer, "Sensors/%d", boardNumber); 8002af6: f897 224f ldrb.w r2, [r7, #591] @ 0x24f 8002afa: f107 031c add.w r3, r7, #28 8002afe: 49bc ldr r1, [pc, #752] @ (8002df0 ) 8002b00: 4618 mov r0, r3 8002b02: f027 ff3b bl 802a97c bytesInBuffer = sprintf (messageBuffer, "{\"pvTemperature\":[%.1f, %.1f], ", sensors->pvTemperature[0], sensors->pvTemperature[1]); 8002b06: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b0a: edd3 7a00 vldr s15, [r3] 8002b0e: eeb7 6ae7 vcvt.f64.f32 d6, s15 8002b12: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b16: edd3 7a01 vldr s15, [r3, #4] 8002b1a: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002b1e: f107 003c add.w r0, r7, #60 @ 0x3c 8002b22: ed8d 7b00 vstr d7, [sp] 8002b26: ec53 2b16 vmov r2, r3, d6 8002b2a: 49b2 ldr r1, [pc, #712] @ (8002df4 ) 8002b2c: f027 ff26 bl 802a97c 8002b30: 4603 mov r3, r0 8002b32: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"fanVoltage\":%.2f, ", sensors->fanVoltage); 8002b36: f107 023c add.w r2, r7, #60 @ 0x3c 8002b3a: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b3e: 18d0 adds r0, r2, r3 8002b40: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b44: edd3 7a02 vldr s15, [r3, #8] 8002b48: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002b4c: ec53 2b17 vmov r2, r3, d7 8002b50: 49a9 ldr r1, [pc, #676] @ (8002df8 ) 8002b52: f027 ff13 bl 802a97c 8002b56: 4603 mov r3, r0 8002b58: 461a mov r2, r3 8002b5a: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b5e: 4413 add r3, r2 8002b60: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"pvEncoderX\":%.2f, ", sensors->pvEncoderX); 8002b64: f107 023c add.w r2, r7, #60 @ 0x3c 8002b68: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b6c: 18d0 adds r0, r2, r3 8002b6e: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002b72: edd3 7a03 vldr s15, [r3, #12] 8002b76: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002b7a: ec53 2b17 vmov r2, r3, d7 8002b7e: 499f ldr r1, [pc, #636] @ (8002dfc ) 8002b80: f027 fefc bl 802a97c 8002b84: 4603 mov r3, r0 8002b86: 461a mov r2, r3 8002b88: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b8c: 4413 add r3, r2 8002b8e: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"pvEncoderY\":%.2f, ", sensors->pvEncoderY); 8002b92: f107 023c add.w r2, r7, #60 @ 0x3c 8002b96: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002b9a: 18d0 adds r0, r2, r3 8002b9c: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002ba0: edd3 7a04 vldr s15, [r3, #16] 8002ba4: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002ba8: ec53 2b17 vmov r2, r3, d7 8002bac: 4994 ldr r1, [pc, #592] @ (8002e00 ) 8002bae: f027 fee5 bl 802a97c 8002bb2: 4603 mov r3, r0 8002bb4: 461a mov r2, r3 8002bb6: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002bba: 4413 add r3, r2 8002bbc: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXStatus\":%d, ", sensors->motorXStatus); 8002bc0: f107 023c add.w r2, r7, #60 @ 0x3c 8002bc4: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002bc8: 18d0 adds r0, r2, r3 8002bca: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002bce: 7d1b ldrb r3, [r3, #20] 8002bd0: 461a mov r2, r3 8002bd2: 498c ldr r1, [pc, #560] @ (8002e04 ) 8002bd4: f027 fed2 bl 802a97c 8002bd8: 4603 mov r3, r0 8002bda: 461a mov r2, r3 8002bdc: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002be0: 4413 add r3, r2 8002be2: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYStatus\":%d, ", sensors->motorYStatus); 8002be6: f107 023c add.w r2, r7, #60 @ 0x3c 8002bea: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002bee: 18d0 adds r0, r2, r3 8002bf0: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002bf4: 7d5b ldrb r3, [r3, #21] 8002bf6: 461a mov r2, r3 8002bf8: 4983 ldr r1, [pc, #524] @ (8002e08 ) 8002bfa: f027 febf bl 802a97c 8002bfe: 4603 mov r3, r0 8002c00: 461a mov r2, r3 8002c02: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c06: 4413 add r3, r2 8002c08: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXAveCurrent\":%.3f, ", sensors->motorXAveCurrent); 8002c0c: f107 023c add.w r2, r7, #60 @ 0x3c 8002c10: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c14: 18d0 adds r0, r2, r3 8002c16: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002c1a: edd3 7a06 vldr s15, [r3, #24] 8002c1e: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002c22: ec53 2b17 vmov r2, r3, d7 8002c26: 4979 ldr r1, [pc, #484] @ (8002e0c ) 8002c28: f027 fea8 bl 802a97c 8002c2c: 4603 mov r3, r0 8002c2e: 461a mov r2, r3 8002c30: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c34: 4413 add r3, r2 8002c36: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYAveCurrent\":%.3f, ", sensors->motorYAveCurrent); 8002c3a: f107 023c add.w r2, r7, #60 @ 0x3c 8002c3e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c42: 18d0 adds r0, r2, r3 8002c44: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002c48: edd3 7a07 vldr s15, [r3, #28] 8002c4c: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002c50: ec53 2b17 vmov r2, r3, d7 8002c54: 496e ldr r1, [pc, #440] @ (8002e10 ) 8002c56: f027 fe91 bl 802a97c 8002c5a: 4603 mov r3, r0 8002c5c: 461a mov r2, r3 8002c5e: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c62: 4413 add r3, r2 8002c64: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorXPeakCurrent\":%.3f, ", sensors->motorXPeakCurrent); 8002c68: f107 023c add.w r2, r7, #60 @ 0x3c 8002c6c: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c70: 18d0 adds r0, r2, r3 8002c72: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002c76: edd3 7a08 vldr s15, [r3, #32] 8002c7a: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002c7e: ec53 2b17 vmov r2, r3, d7 8002c82: 4964 ldr r1, [pc, #400] @ (8002e14 ) 8002c84: f027 fe7a bl 802a97c 8002c88: 4603 mov r3, r0 8002c8a: 461a mov r2, r3 8002c8c: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c90: 4413 add r3, r2 8002c92: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"motorYPeakCurrent\":%.3f, ", sensors->motorYPeakCurrent); 8002c96: f107 023c add.w r2, r7, #60 @ 0x3c 8002c9a: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002c9e: 18d0 adds r0, r2, r3 8002ca0: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002ca4: edd3 7a09 vldr s15, [r3, #36] @ 0x24 8002ca8: eeb7 7ae7 vcvt.f64.f32 d7, s15 8002cac: ec53 2b17 vmov r2, r3, d7 8002cb0: 4959 ldr r1, [pc, #356] @ (8002e18 ) 8002cb2: f027 fe63 bl 802a97c 8002cb6: 4603 mov r3, r0 8002cb8: 461a mov r2, r3 8002cba: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002cbe: 4413 add r3, r2 8002cc0: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitXSwitchUp\":%d, ", sensors->limitXSwitchUp); 8002cc4: f107 023c add.w r2, r7, #60 @ 0x3c 8002cc8: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002ccc: 18d0 adds r0, r2, r3 8002cce: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002cd2: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8002cd6: 461a mov r2, r3 8002cd8: 4950 ldr r1, [pc, #320] @ (8002e1c ) 8002cda: f027 fe4f bl 802a97c 8002cde: 4603 mov r3, r0 8002ce0: 461a mov r2, r3 8002ce2: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002ce6: 4413 add r3, r2 8002ce8: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitXSwitchDown\":%d, ", sensors->limitXSwitchDown); 8002cec: f107 023c add.w r2, r7, #60 @ 0x3c 8002cf0: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002cf4: 18d0 adds r0, r2, r3 8002cf6: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002cfa: f893 3029 ldrb.w r3, [r3, #41] @ 0x29 8002cfe: 461a mov r2, r3 8002d00: 4947 ldr r1, [pc, #284] @ (8002e20 ) 8002d02: f027 fe3b bl 802a97c 8002d06: 4603 mov r3, r0 8002d08: 461a mov r2, r3 8002d0a: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d0e: 4413 add r3, r2 8002d10: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitXSwitchCenter\":%d, ", sensors->limitXSwitchCenter); 8002d14: f107 023c add.w r2, r7, #60 @ 0x3c 8002d18: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d1c: 18d0 adds r0, r2, r3 8002d1e: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002d22: f893 302a ldrb.w r3, [r3, #42] @ 0x2a 8002d26: 461a mov r2, r3 8002d28: 493e ldr r1, [pc, #248] @ (8002e24 ) 8002d2a: f027 fe27 bl 802a97c 8002d2e: 4603 mov r3, r0 8002d30: 461a mov r2, r3 8002d32: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d36: 4413 add r3, r2 8002d38: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitYSwitchUp\":%d, ", sensors->limitYSwitchUp); 8002d3c: f107 023c add.w r2, r7, #60 @ 0x3c 8002d40: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d44: 18d0 adds r0, r2, r3 8002d46: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002d4a: f893 302b ldrb.w r3, [r3, #43] @ 0x2b 8002d4e: 461a mov r2, r3 8002d50: 4935 ldr r1, [pc, #212] @ (8002e28 ) 8002d52: f027 fe13 bl 802a97c 8002d56: 4603 mov r3, r0 8002d58: 461a mov r2, r3 8002d5a: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d5e: 4413 add r3, r2 8002d60: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitYSwitchDown\":%d, ", sensors->limitYSwitchDown); 8002d64: f107 023c add.w r2, r7, #60 @ 0x3c 8002d68: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d6c: 18d0 adds r0, r2, r3 8002d6e: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002d72: f893 302c ldrb.w r3, [r3, #44] @ 0x2c 8002d76: 461a mov r2, r3 8002d78: 492c ldr r1, [pc, #176] @ (8002e2c ) 8002d7a: f027 fdff bl 802a97c 8002d7e: 4603 mov r3, r0 8002d80: 461a mov r2, r3 8002d82: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d86: 4413 add r3, r2 8002d88: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"limitYSwitchCenter\":%d, ", sensors->limitYSwitchCenter); 8002d8c: f107 023c add.w r2, r7, #60 @ 0x3c 8002d90: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002d94: 18d0 adds r0, r2, r3 8002d96: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002d9a: f893 302d ldrb.w r3, [r3, #45] @ 0x2d 8002d9e: 461a mov r2, r3 8002da0: 4923 ldr r1, [pc, #140] @ (8002e30 ) 8002da2: f027 fdeb bl 802a97c 8002da6: 4603 mov r3, r0 8002da8: 461a mov r2, r3 8002daa: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002dae: 4413 add r3, r2 8002db0: f8c7 3248 str.w r3, [r7, #584] @ 0x248 bytesInBuffer += sprintf (&messageBuffer[bytesInBuffer], "\"powerSupplyFailMask\":%d}", sensors->powerSupplyFailMask); 8002db4: f107 023c add.w r2, r7, #60 @ 0x3c 8002db8: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002dbc: 18d0 adds r0, r2, r3 8002dbe: f8d7 3240 ldr.w r3, [r7, #576] @ 0x240 8002dc2: f893 302e ldrb.w r3, [r3, #46] @ 0x2e 8002dc6: 461a mov r2, r3 8002dc8: 491a ldr r1, [pc, #104] @ (8002e34 ) 8002dca: f027 fdd7 bl 802a97c 8002dce: 4603 mov r3, r0 8002dd0: 461a mov r2, r3 8002dd2: f8d7 3248 ldr.w r3, [r7, #584] @ 0x248 8002dd6: 4413 add r3, r2 8002dd8: f8c7 3248 str.w r3, [r7, #584] @ 0x248 osMutexRelease (sensorsInfoMutex); 8002ddc: 4b02 ldr r3, [pc, #8] @ (8002de8 ) 8002dde: 681b ldr r3, [r3, #0] 8002de0: 4618 mov r0, r3 8002de2: f00e fd3d bl 8011860 8002de6: e050 b.n 8002e8a 8002de8: 2400225c .word 0x2400225c 8002dec: 24002188 .word 0x24002188 8002df0: 0802d5f4 .word 0x0802d5f4 8002df4: 0802d600 .word 0x0802d600 8002df8: 0802d620 .word 0x0802d620 8002dfc: 0802d634 .word 0x0802d634 8002e00: 0802d648 .word 0x0802d648 8002e04: 0802d65c .word 0x0802d65c 8002e08: 0802d670 .word 0x0802d670 8002e0c: 0802d684 .word 0x0802d684 8002e10: 0802d6a0 .word 0x0802d6a0 8002e14: 0802d6bc .word 0x0802d6bc 8002e18: 0802d6d8 .word 0x0802d6d8 8002e1c: 0802d6f4 .word 0x0802d6f4 8002e20: 0802d70c .word 0x0802d70c 8002e24: 0802d724 .word 0x0802d724 8002e28: 0802d740 .word 0x0802d740 8002e2c: 0802d758 .word 0x0802d758 8002e30: 0802d770 .word 0x0802d770 8002e34: 0802d78c .word 0x0802d78c } else { sprintf (topicTextBuffer, "Sensors/%d", boardNumber); 8002e38: f897 224f ldrb.w r2, [r7, #591] @ 0x24f 8002e3c: f107 031c add.w r3, r7, #28 8002e40: 4926 ldr r1, [pc, #152] @ (8002edc ) 8002e42: 4618 mov r0, r3 8002e44: f027 fd9a bl 802a97c uint8_t mainBoardPowerSupplyFailMask = ~((HAL_GPIO_ReadPin (GPIOD, GPIO_PIN_4) << 1) | HAL_GPIO_ReadPin (GPIOD, GPIO_PIN_2)) & 0x3; 8002e48: 2110 movs r1, #16 8002e4a: 4825 ldr r0, [pc, #148] @ (8002ee0 ) 8002e4c: f007 f9d6 bl 800a1fc 8002e50: 4603 mov r3, r0 8002e52: 005b lsls r3, r3, #1 8002e54: b25c sxtb r4, r3 8002e56: 2104 movs r1, #4 8002e58: 4821 ldr r0, [pc, #132] @ (8002ee0 ) 8002e5a: f007 f9cf bl 800a1fc 8002e5e: 4603 mov r3, r0 8002e60: b25b sxtb r3, r3 8002e62: 4323 orrs r3, r4 8002e64: b25b sxtb r3, r3 8002e66: 43db mvns r3, r3 8002e68: b25b sxtb r3, r3 8002e6a: b2db uxtb r3, r3 8002e6c: f003 0303 and.w r3, r3, #3 8002e70: f887 3247 strb.w r3, [r7, #583] @ 0x247 bytesInBuffer = sprintf (messageBuffer, "{\"powerSupplyFailMask\":%d}", mainBoardPowerSupplyFailMask); 8002e74: f897 2247 ldrb.w r2, [r7, #583] @ 0x247 8002e78: f107 033c add.w r3, r7, #60 @ 0x3c 8002e7c: 4919 ldr r1, [pc, #100] @ (8002ee4 ) 8002e7e: 4618 mov r0, r3 8002e80: f027 fd7c bl 802a97c 8002e84: 4603 mov r3, r0 8002e86: f8c7 3248 str.w r3, [r7, #584] @ 0x248 } message.payload = (void*)messageBuffer; 8002e8a: f507 7314 add.w r3, r7, #592 @ 0x250 8002e8e: f5a3 7311 sub.w r3, r3, #580 @ 0x244 8002e92: f107 023c add.w r2, r7, #60 @ 0x3c 8002e96: 609a str r2, [r3, #8] message.payloadlen = strlen (messageBuffer); 8002e98: f107 033c add.w r3, r7, #60 @ 0x3c 8002e9c: 4618 mov r0, r3 8002e9e: f7fd fa7f bl 80003a0 8002ea2: 4602 mov r2, r0 8002ea4: f507 7314 add.w r3, r7, #592 @ 0x250 8002ea8: f5a3 7311 sub.w r3, r3, #580 @ 0x244 8002eac: 60da str r2, [r3, #12] MQTTPublish (&mqttClient, topicTextBuffer, &message); // publish a message 8002eae: f107 020c add.w r2, r7, #12 8002eb2: f107 031c add.w r3, r7, #28 8002eb6: 4619 mov r1, r3 8002eb8: 480b ldr r0, [pc, #44] @ (8002ee8 ) 8002eba: f025 f878 bl 8027fae for (boardNumber = 0; boardNumber < SLAVES_COUNT + 1; boardNumber++) { 8002ebe: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002ec2: 3301 adds r3, #1 8002ec4: f887 324f strb.w r3, [r7, #591] @ 0x24f 8002ec8: f897 324f ldrb.w r3, [r7, #591] @ 0x24f 8002ecc: 2b04 cmp r3, #4 8002ece: f67f adfb bls.w 8002ac8 } } } osDelay (pdMS_TO_TICKS (1000)); 8002ed2: f44f 707a mov.w r0, #1000 @ 0x3e8 8002ed6: f00e fae0 bl 801149a if (mqttClient.isconnected) { 8002eda: e4b8 b.n 800284e 8002edc: 0802d5f4 .word 0x0802d5f4 8002ee0: 58020c00 .word 0x58020c00 8002ee4: 0802d7a8 .word 0x0802d7a8 8002ee8: 24000740 .word 0x24000740 08002eec : } } uint32_t MqttConnectBroker () { 8002eec: b580 push {r7, lr} 8002eee: b09c sub sp, #112 @ 0x70 8002ef0: af04 add r7, sp, #16 uint8_t boardNumber = 0; 8002ef2: 2300 movs r3, #0 8002ef4: f887 305f strb.w r3, [r7, #95] @ 0x5f int ret; NewNetwork (&net); 8002ef8: 4839 ldr r0, [pc, #228] @ (8002fe0 ) 8002efa: f025 f991 bl 8028220 ret = ConnectNetwork (&net, BROKER_IP, MQTT_PORT); 8002efe: f240 725b movw r2, #1883 @ 0x75b 8002f02: 4938 ldr r1, [pc, #224] @ (8002fe4 ) 8002f04: 4836 ldr r0, [pc, #216] @ (8002fe0 ) 8002f06: f025 f9a7 bl 8028258 8002f0a: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002f0c: 6dbb ldr r3, [r7, #88] @ 0x58 8002f0e: 2b00 cmp r3, #0 8002f10: d005 beq.n 8002f1e printf ("ConnectNetwork failed.\n"); 8002f12: 4835 ldr r0, [pc, #212] @ (8002fe8 ) 8002f14: f027 fd2a bl 802a96c return -1; 8002f18: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8002f1c: e05c b.n 8002fd8 } MQTTClientInit (&mqttClient, &net, 1000, sndBuffer, sizeof (sndBuffer), rcvBuffer, sizeof (rcvBuffer)); 8002f1e: f44f 6380 mov.w r3, #1024 @ 0x400 8002f22: 9302 str r3, [sp, #8] 8002f24: 4b31 ldr r3, [pc, #196] @ (8002fec ) 8002f26: 9301 str r3, [sp, #4] 8002f28: f44f 6380 mov.w r3, #1024 @ 0x400 8002f2c: 9300 str r3, [sp, #0] 8002f2e: 4b30 ldr r3, [pc, #192] @ (8002ff0 ) 8002f30: f44f 727a mov.w r2, #1000 @ 0x3e8 8002f34: 492a ldr r1, [pc, #168] @ (8002fe0 ) 8002f36: 482f ldr r0, [pc, #188] @ (8002ff4 ) 8002f38: f024 faac bl 8027494 MQTTPacket_connectData data = MQTTPacket_connectData_initializer; 8002f3c: 4a2e ldr r2, [pc, #184] @ (8002ff8 ) 8002f3e: 463b mov r3, r7 8002f40: 4611 mov r1, r2 8002f42: 2258 movs r2, #88 @ 0x58 8002f44: 4618 mov r0, r3 8002f46: f027 ff32 bl 802adae data.willFlag = 0; 8002f4a: 2300 movs r3, #0 8002f4c: 76fb strb r3, [r7, #27] data.MQTTVersion = 3; 8002f4e: 2303 movs r3, #3 8002f50: 723b strb r3, [r7, #8] data.clientID.cstring = "test_user1"; 8002f52: 4b2a ldr r3, [pc, #168] @ (8002ffc ) 8002f54: 60fb str r3, [r7, #12] data.username.cstring = "test_user1"; 8002f56: 4b29 ldr r3, [pc, #164] @ (8002ffc ) 8002f58: 643b str r3, [r7, #64] @ 0x40 data.password.cstring = "1234"; 8002f5a: 4b29 ldr r3, [pc, #164] @ (8003000 ) 8002f5c: 64fb str r3, [r7, #76] @ 0x4c data.keepAliveInterval = 100; 8002f5e: 2364 movs r3, #100 @ 0x64 8002f60: 833b strh r3, [r7, #24] data.cleansession = 1; 8002f62: 2301 movs r3, #1 8002f64: 76bb strb r3, [r7, #26] ret = MQTTConnect (&mqttClient, &data); 8002f66: 463b mov r3, r7 8002f68: 4619 mov r1, r3 8002f6a: 4822 ldr r0, [pc, #136] @ (8002ff4 ) 8002f6c: f024 feee bl 8027d4c 8002f70: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002f72: 6dbb ldr r3, [r7, #88] @ 0x58 8002f74: 2b00 cmp r3, #0 8002f76: d008 beq.n 8002f8a net_disconnect (&net); 8002f78: 4819 ldr r0, [pc, #100] @ (8002fe0 ) 8002f7a: f025 f9f6 bl 802836a printf ("MQTTConnect failed. Code %d\n", ret); 8002f7e: 6db9 ldr r1, [r7, #88] @ 0x58 8002f80: 4820 ldr r0, [pc, #128] @ (8003004 ) 8002f82: f027 fc8b bl 802a89c return ret; 8002f86: 6dbb ldr r3, [r7, #88] @ 0x58 8002f88: e026 b.n 8002fd8 } for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002f8a: 2300 movs r3, #0 8002f8c: f887 305f strb.w r3, [r7, #95] @ 0x5f 8002f90: e01a b.n 8002fc8 ret = MQTTSubscribe (&mqttClient, subscribeTopicNames[boardNumber], QOS0, MqttMessageArrived); 8002f92: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002f96: 4a1c ldr r2, [pc, #112] @ (8003008 ) 8002f98: f852 1023 ldr.w r1, [r2, r3, lsl #2] 8002f9c: 4b1b ldr r3, [pc, #108] @ (800300c ) 8002f9e: 2200 movs r2, #0 8002fa0: 4814 ldr r0, [pc, #80] @ (8002ff4 ) 8002fa2: f024 ffee bl 8027f82 8002fa6: 65b8 str r0, [r7, #88] @ 0x58 if (ret != MQTT_SUCCESS) { 8002fa8: 6dbb ldr r3, [r7, #88] @ 0x58 8002faa: 2b00 cmp r3, #0 8002fac: d007 beq.n 8002fbe net_disconnect (&net); 8002fae: 480c ldr r0, [pc, #48] @ (8002fe0 ) 8002fb0: f025 f9db bl 802836a printf ("MQTTSubscribe failed.\n"); 8002fb4: 4816 ldr r0, [pc, #88] @ (8003010 ) 8002fb6: f027 fcd9 bl 802a96c return ret; 8002fba: 6dbb ldr r3, [r7, #88] @ 0x58 8002fbc: e00c b.n 8002fd8 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8002fbe: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002fc2: 3301 adds r3, #1 8002fc4: f887 305f strb.w r3, [r7, #95] @ 0x5f 8002fc8: f897 305f ldrb.w r3, [r7, #95] @ 0x5f 8002fcc: 2b03 cmp r3, #3 8002fce: d9e0 bls.n 8002f92 } } printf ("MQTT_ConnectBroker O.K.\n"); 8002fd0: 4810 ldr r0, [pc, #64] @ (8003014 ) 8002fd2: f027 fccb bl 802a96c return MQTT_SUCCESS; 8002fd6: 2300 movs r3, #0 } 8002fd8: 4618 mov r0, r3 8002fda: 3760 adds r7, #96 @ 0x60 8002fdc: 46bd mov sp, r7 8002fde: bd80 pop {r7, pc} 8002fe0: 24000730 .word 0x24000730 8002fe4: 0802d7c4 .word 0x0802d7c4 8002fe8: 0802d7d4 .word 0x0802d7d4 8002fec: 24000bac .word 0x24000bac 8002ff0: 240007ac .word 0x240007ac 8002ff4: 24000740 .word 0x24000740 8002ff8: 0802d850 .word 0x0802d850 8002ffc: 0802d7ec .word 0x0802d7ec 8003000: 0802d7f8 .word 0x0802d7f8 8003004: 0802d800 .word 0x0802d800 8003008: 08031a24 .word 0x08031a24 800300c: 0800317d .word 0x0800317d 8003010: 0802d820 .word 0x0802d820 8003014: 0802d838 .word 0x0802d838 08003018 : void RelayCtrl (int32_t relayNumber, int32_t relayTimeOn) { 8003018: b580 push {r7, lr} 800301a: b082 sub sp, #8 800301c: af00 add r7, sp, #0 800301e: 6078 str r0, [r7, #4] 8003020: 6039 str r1, [r7, #0] switch (relayNumber) { 8003022: 687b ldr r3, [r7, #4] 8003024: 3b01 subs r3, #1 8003026: 2b03 cmp r3, #3 8003028: f200 8098 bhi.w 800315c 800302c: a201 add r2, pc, #4 @ (adr r2, 8003034 ) 800302e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8003032: bf00 nop 8003034: 08003045 .word 0x08003045 8003038: 0800308b .word 0x0800308b 800303c: 080030d1 .word 0x080030d1 8003040: 08003117 .word 0x08003117 case 1: if (relayTimeOn > 0) { 8003044: 683b ldr r3, [r7, #0] 8003046: 2b00 cmp r3, #0 8003048: dd0b ble.n 8003062 osTimerStart (relay1TimerHandle, relayTimeOn * 1000); 800304a: 4b47 ldr r3, [pc, #284] @ (8003168 ) 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 faca bl 80115f4 8003060: e004 b.n 800306c } else { osTimerStop (relay1TimerHandle); 8003062: 4b41 ldr r3, [pc, #260] @ (8003168 ) 8003064: 681b ldr r3, [r3, #0] 8003066: 4618 mov r0, r3 8003068: f00e faf2 bl 8011650 } 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_5, GPIO_PIN_SET); 8003072: 2201 movs r2, #1 8003074: 2120 movs r1, #32 8003076: 483d ldr r0, [pc, #244] @ (800316c ) 8003078: f007 f8d8 bl 800a22c } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_5, GPIO_PIN_RESET); } break; 800307c: e06f b.n 800315e HAL_GPIO_WritePin (GPIOE, GPIO_PIN_5, GPIO_PIN_RESET); 800307e: 2200 movs r2, #0 8003080: 2120 movs r1, #32 8003082: 483a ldr r0, [pc, #232] @ (800316c ) 8003084: f007 f8d2 bl 800a22c break; 8003088: e069 b.n 800315e case 2: if (relayTimeOn > 0) { 800308a: 683b ldr r3, [r7, #0] 800308c: 2b00 cmp r3, #0 800308e: dd0b ble.n 80030a8 osTimerStart (relay2TimerHandle, relayTimeOn * 1000); 8003090: 4b37 ldr r3, [pc, #220] @ (8003170 ) 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 faa7 bl 80115f4 80030a6: e004 b.n 80030b2 } else { osTimerStop (relay2TimerHandle); 80030a8: 4b31 ldr r3, [pc, #196] @ (8003170 ) 80030aa: 681b ldr r3, [r3, #0] 80030ac: 4618 mov r0, r3 80030ae: f00e facf bl 8011650 } 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_3, GPIO_PIN_SET); 80030b8: 2201 movs r2, #1 80030ba: 2108 movs r1, #8 80030bc: 482b ldr r0, [pc, #172] @ (800316c ) 80030be: f007 f8b5 bl 800a22c } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_3, GPIO_PIN_RESET); } break; 80030c2: e04c b.n 800315e HAL_GPIO_WritePin (GPIOE, GPIO_PIN_3, GPIO_PIN_RESET); 80030c4: 2200 movs r2, #0 80030c6: 2108 movs r1, #8 80030c8: 4828 ldr r0, [pc, #160] @ (800316c ) 80030ca: f007 f8af bl 800a22c break; 80030ce: e046 b.n 800315e case 3: if (relayTimeOn > 0) { 80030d0: 683b ldr r3, [r7, #0] 80030d2: 2b00 cmp r3, #0 80030d4: dd0b ble.n 80030ee osTimerStart (relay3TimerHandle, relayTimeOn * 1000); 80030d6: 4b27 ldr r3, [pc, #156] @ (8003174 ) 80030d8: 681a ldr r2, [r3, #0] 80030da: 683b ldr r3, [r7, #0] 80030dc: f44f 717a mov.w r1, #1000 @ 0x3e8 80030e0: fb01 f303 mul.w r3, r1, r3 80030e4: 4619 mov r1, r3 80030e6: 4610 mov r0, r2 80030e8: f00e fa84 bl 80115f4 80030ec: e004 b.n 80030f8 } else { osTimerStop (relay3TimerHandle); 80030ee: 4b21 ldr r3, [pc, #132] @ (8003174 ) 80030f0: 681b ldr r3, [r3, #0] 80030f2: 4618 mov r0, r3 80030f4: f00e faac bl 8011650 } if (relayTimeOn != 0) { 80030f8: 683b ldr r3, [r7, #0] 80030fa: 2b00 cmp r3, #0 80030fc: d005 beq.n 800310a HAL_GPIO_WritePin (GPIOE, GPIO_PIN_4, GPIO_PIN_SET); 80030fe: 2201 movs r2, #1 8003100: 2110 movs r1, #16 8003102: 481a ldr r0, [pc, #104] @ (800316c ) 8003104: f007 f892 bl 800a22c } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_4, GPIO_PIN_RESET); } break; 8003108: e029 b.n 800315e HAL_GPIO_WritePin (GPIOE, GPIO_PIN_4, GPIO_PIN_RESET); 800310a: 2200 movs r2, #0 800310c: 2110 movs r1, #16 800310e: 4817 ldr r0, [pc, #92] @ (800316c ) 8003110: f007 f88c bl 800a22c break; 8003114: e023 b.n 800315e case 4: if (relayTimeOn > 0) { 8003116: 683b ldr r3, [r7, #0] 8003118: 2b00 cmp r3, #0 800311a: dd0b ble.n 8003134 osTimerStart (relay4TimerHandle, relayTimeOn * 1000); 800311c: 4b16 ldr r3, [pc, #88] @ (8003178 ) 800311e: 681a ldr r2, [r3, #0] 8003120: 683b ldr r3, [r7, #0] 8003122: f44f 717a mov.w r1, #1000 @ 0x3e8 8003126: fb01 f303 mul.w r3, r1, r3 800312a: 4619 mov r1, r3 800312c: 4610 mov r0, r2 800312e: f00e fa61 bl 80115f4 8003132: e004 b.n 800313e } else { osTimerStop (relay4TimerHandle); 8003134: 4b10 ldr r3, [pc, #64] @ (8003178 ) 8003136: 681b ldr r3, [r3, #0] 8003138: 4618 mov r0, r3 800313a: f00e fa89 bl 8011650 } if (relayTimeOn != 0) { 800313e: 683b ldr r3, [r7, #0] 8003140: 2b00 cmp r3, #0 8003142: d005 beq.n 8003150 HAL_GPIO_WritePin (GPIOE, GPIO_PIN_2, GPIO_PIN_SET); 8003144: 2201 movs r2, #1 8003146: 2104 movs r1, #4 8003148: 4808 ldr r0, [pc, #32] @ (800316c ) 800314a: f007 f86f bl 800a22c } else { HAL_GPIO_WritePin (GPIOE, GPIO_PIN_2, GPIO_PIN_RESET); } break; 800314e: e006 b.n 800315e HAL_GPIO_WritePin (GPIOE, GPIO_PIN_2, GPIO_PIN_RESET); 8003150: 2200 movs r2, #0 8003152: 2104 movs r1, #4 8003154: 4805 ldr r0, [pc, #20] @ (800316c ) 8003156: f007 f869 bl 800a22c break; 800315a: e000 b.n 800315e default: break; 800315c: bf00 nop } } 800315e: bf00 nop 8003160: 3708 adds r7, #8 8003162: 46bd mov sp, r7 8003164: bd80 pop {r7, pc} 8003166: bf00 nop 8003168: 24000668 .word 0x24000668 800316c: 58021000 .word 0x58021000 8003170: 24000698 .word 0x24000698 8003174: 240006c8 .word 0x240006c8 8003178: 240006f8 .word 0x240006f8 0800317c : void MqttMessageArrived (MessageData* msg) { 800317c: b580 push {r7, lr} 800317e: b09c sub sp, #112 @ 0x70 8003180: af00 add r7, sp, #0 8003182: 6078 str r0, [r7, #4] SerialProtocolCommands spCommand = spUnknown; 8003184: 2310 movs r3, #16 8003186: f887 306f strb.w r3, [r7, #111] @ 0x6f BoardNoOverTopic topicForBoard = unknownBoard; 800318a: 2305 movs r3, #5 800318c: f887 306e strb.w r3, [r7, #110] @ 0x6e uint8_t boardNumber = 0; 8003190: 2300 movs r3, #0 8003192: f887 306d strb.w r3, [r7, #109] @ 0x6d MQTTMessage* message = msg->message; 8003196: 687b ldr r3, [r7, #4] 8003198: 681b ldr r3, [r3, #0] 800319a: 653b str r3, [r7, #80] @ 0x50 char topicName[32] = { 0 }; 800319c: 2300 movs r3, #0 800319e: 61bb str r3, [r7, #24] 80031a0: f107 031c add.w r3, r7, #28 80031a4: 2200 movs r2, #0 80031a6: 601a str r2, [r3, #0] 80031a8: 605a str r2, [r3, #4] 80031aa: 609a str r2, [r3, #8] 80031ac: 60da str r2, [r3, #12] 80031ae: 611a str r2, [r3, #16] 80031b0: 615a str r2, [r3, #20] 80031b2: 619a str r2, [r3, #24] memcpy (topicName, msg->topicName->lenstring.data, msg->topicName->lenstring.len); 80031b4: 687b ldr r3, [r7, #4] 80031b6: 685b ldr r3, [r3, #4] 80031b8: 6899 ldr r1, [r3, #8] 80031ba: 687b ldr r3, [r7, #4] 80031bc: 685b ldr r3, [r3, #4] 80031be: 685b ldr r3, [r3, #4] 80031c0: 461a mov r2, r3 80031c2: f107 0318 add.w r3, r7, #24 80031c6: 4618 mov r0, r3 80031c8: f027 fdf1 bl 802adae for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 80031cc: 2300 movs r3, #0 80031ce: f887 306d strb.w r3, [r7, #109] @ 0x6d 80031d2: e017 b.n 8003204 if (strcmp (topicName, subscribeTopicNames[boardNumber]) == 0) { 80031d4: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 80031d8: 4ab5 ldr r2, [pc, #724] @ (80034b0 ) 80031da: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80031de: f107 0318 add.w r3, r7, #24 80031e2: 4611 mov r1, r2 80031e4: 4618 mov r0, r3 80031e6: f7fd f87b bl 80002e0 80031ea: 4603 mov r3, r0 80031ec: 2b00 cmp r3, #0 80031ee: d104 bne.n 80031fa topicForBoard = (BoardNoOverTopic)(boardNumber); 80031f0: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 80031f4: f887 306e strb.w r3, [r7, #110] @ 0x6e break; 80031f8: e008 b.n 800320c for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 80031fa: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 80031fe: 3301 adds r3, #1 8003200: f887 306d strb.w r3, [r7, #109] @ 0x6d 8003204: f897 306d ldrb.w r3, [r7, #109] @ 0x6d 8003208: 2b03 cmp r3, #3 800320a: d9e3 bls.n 80031d4 } } if (topicForBoard == unknownBoard) { 800320c: f897 306e ldrb.w r3, [r7, #110] @ 0x6e 8003210: 2b05 cmp r3, #5 8003212: f000 8212 beq.w 800363a return; } cJSON* json = cJSON_Parse (message->payload); 8003216: 6d3b ldr r3, [r7, #80] @ 0x50 8003218: 689b ldr r3, [r3, #8] 800321a: 4618 mov r0, r3 800321c: f7fe f99a bl 8001554 8003220: 64f8 str r0, [r7, #76] @ 0x4c const cJSON* objectItem = NULL; 8003222: 2300 movs r3, #0 8003224: 64bb str r3, [r7, #72] @ 0x48 InterProcessData data = { 0 }; 8003226: f107 0308 add.w r3, r7, #8 800322a: 2200 movs r2, #0 800322c: 601a str r2, [r3, #0] 800322e: 605a str r2, [r3, #4] 8003230: 609a str r2, [r3, #8] 8003232: 60da str r2, [r3, #12] uint32_t arraySize = 0; 8003234: 2300 movs r3, #0 8003236: 647b str r3, [r7, #68] @ 0x44 if (topicForBoard != main_board) { 8003238: f897 306e ldrb.w r3, [r7, #110] @ 0x6e 800323c: 2b00 cmp r3, #0 800323e: f000 8180 beq.w 8003542 for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 8003242: 2300 movs r3, #0 8003244: 66bb str r3, [r7, #104] @ 0x68 8003246: e177 b.n 8003538 spCommand = spUnknown; 8003248: 2310 movs r3, #16 800324a: f887 306f strb.w r3, [r7, #111] @ 0x6f objectItem = cJSON_GetObjectItemCaseSensitive (json, topicCommands[topicCmdNumber]); 800324e: 4a99 ldr r2, [pc, #612] @ (80034b4 ) 8003250: 6ebb ldr r3, [r7, #104] @ 0x68 8003252: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8003256: 4619 mov r1, r3 8003258: 6cf8 ldr r0, [r7, #76] @ 0x4c 800325a: f7fe fce5 bl 8001c28 800325e: 64b8 str r0, [r7, #72] @ 0x48 if (objectItem != NULL) { 8003260: 6cbb ldr r3, [r7, #72] @ 0x48 8003262: 2b00 cmp r3, #0 8003264: f000 8165 beq.w 8003532 switch (topicCmdNumber) { 8003268: 6ebb ldr r3, [r7, #104] @ 0x68 800326a: 2b0e cmp r3, #14 800326c: f200 8150 bhi.w 8003510 8003270: a201 add r2, pc, #4 @ (adr r2, 8003278 ) 8003272: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8003276: bf00 nop 8003278: 080032b5 .word 0x080032b5 800327c: 080032bb .word 0x080032bb 8003280: 080032c9 .word 0x080032c9 8003284: 08003339 .word 0x08003339 8003288: 08003353 .word 0x08003353 800328c: 08003359 .word 0x08003359 8003290: 0800338b .word 0x0800338b 8003294: 080033a9 .word 0x080033a9 8003298: 08003415 .word 0x08003415 800329c: 08003437 .word 0x08003437 80032a0: 08003457 .word 0x08003457 80032a4: 0800345d .word 0x0800345d 80032a8: 0800346b .word 0x0800346b 80032ac: 08003479 .word 0x08003479 80032b0: 080034f7 .word 0x080034f7 case fanSpeedTopic: spCommand = spSetFanSpeed; 80032b4: 2302 movs r3, #2 80032b6: f887 306f strb.w r3, [r7, #111] @ 0x6f case motorXonTopic: if (spCommand == spUnknown) { 80032ba: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80032be: 2b10 cmp r3, #16 80032c0: d102 bne.n 80032c8 spCommand = spSetMotorXOn; 80032c2: 2303 movs r3, #3 80032c4: f887 306f strb.w r3, [r7, #111] @ 0x6f } case motorYonTopic: if (spCommand == spUnknown) { 80032c8: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80032cc: 2b10 cmp r3, #16 80032ce: d102 bne.n 80032d6 spCommand = spSetMotorYOn; 80032d0: 2304 movs r3, #4 80032d2: f887 306f strb.w r3, [r7, #111] @ 0x6f } if (cJSON_IsArray (objectItem)) { 80032d6: 6cb8 ldr r0, [r7, #72] @ 0x48 80032d8: f7fe fccc bl 8001c74 80032dc: 4603 mov r3, r0 80032de: 2b00 cmp r3, #0 80032e0: f000 8118 beq.w 8003514 data.spCommand = spCommand; 80032e4: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 80032e8: 723b strb r3, [r7, #8] arraySize = cJSON_GetArraySize (objectItem); 80032ea: 6cb8 ldr r0, [r7, #72] @ 0x48 80032ec: f7fe fbfc bl 8001ae8 80032f0: 4603 mov r3, r0 80032f2: 647b str r3, [r7, #68] @ 0x44 if (arraySize == 2) { 80032f4: 6c7b ldr r3, [r7, #68] @ 0x44 80032f6: 2b02 cmp r3, #2 80032f8: f040 810c bne.w 8003514 for (int i = 0; i < arraySize; i++) { 80032fc: 2300 movs r3, #0 80032fe: 667b str r3, [r7, #100] @ 0x64 8003300: e015 b.n 800332e cJSON* item = cJSON_GetArrayItem (objectItem, i); 8003302: 6e79 ldr r1, [r7, #100] @ 0x64 8003304: 6cb8 ldr r0, [r7, #72] @ 0x48 8003306: f7fe fc33 bl 8001b70 800330a: 63b8 str r0, [r7, #56] @ 0x38 if (cJSON_IsNumber (item)) { 800330c: 6bb8 ldr r0, [r7, #56] @ 0x38 800330e: f7fe fc9a bl 8001c46 8003312: 4603 mov r3, r0 8003314: 2b00 cmp r3, #0 8003316: d007 beq.n 8003328 data.values.integerValues.value[i] = item->valueint; 8003318: 6bbb ldr r3, [r7, #56] @ 0x38 800331a: 695a ldr r2, [r3, #20] 800331c: 6e7b ldr r3, [r7, #100] @ 0x64 800331e: 009b lsls r3, r3, #2 8003320: 3370 adds r3, #112 @ 0x70 8003322: 443b add r3, r7 8003324: f843 2c64 str.w r2, [r3, #-100] for (int i = 0; i < arraySize; i++) { 8003328: 6e7b ldr r3, [r7, #100] @ 0x64 800332a: 3301 adds r3, #1 800332c: 667b str r3, [r7, #100] @ 0x64 800332e: 6e7b ldr r3, [r7, #100] @ 0x64 8003330: 6c7a ldr r2, [r7, #68] @ 0x44 8003332: 429a cmp r2, r3 8003334: d8e5 bhi.n 8003302 } } } } break; 8003336: e0ed b.n 8003514 case diodeTopic: if (cJSON_IsNumber (objectItem)) { 8003338: 6cb8 ldr r0, [r7, #72] @ 0x48 800333a: f7fe fc84 bl 8001c46 800333e: 4603 mov r3, r0 8003340: 2b00 cmp r3, #0 8003342: f000 80e9 beq.w 8003518 data.spCommand = spSetDiodeOn; 8003346: 2307 movs r3, #7 8003348: 723b strb r3, [r7, #8] data.values.integerValues.value[0] = objectItem->valueint; 800334a: 6cbb ldr r3, [r7, #72] @ 0x48 800334c: 695b ldr r3, [r3, #20] 800334e: 60fb str r3, [r7, #12] } break; 8003350: e0e2 b.n 8003518 case motorXMaxCurrentTopic: spCommand = spSetmotorXMaxCurrent; 8003352: 2305 movs r3, #5 8003354: f887 306f strb.w r3, [r7, #111] @ 0x6f case motorYMaxCurrentTopic: if (cJSON_IsNumber (objectItem)) { 8003358: 6cb8 ldr r0, [r7, #72] @ 0x48 800335a: f7fe fc74 bl 8001c46 800335e: 4603 mov r3, r0 8003360: 2b00 cmp r3, #0 8003362: f000 80db beq.w 800351c if (spCommand == spUnknown) { 8003366: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 800336a: 2b10 cmp r3, #16 800336c: d102 bne.n 8003374 spCommand = spSetmotorYMaxCurrent; 800336e: 2306 movs r3, #6 8003370: f887 306f strb.w r3, [r7, #111] @ 0x6f } data.spCommand = spCommand; 8003374: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 8003378: 723b strb r3, [r7, #8] data.values.flaotValues.value[0] = objectItem->valuedouble; 800337a: 6cbb ldr r3, [r7, #72] @ 0x48 800337c: ed93 7b06 vldr d7, [r3, #24] 8003380: eef7 7bc7 vcvt.f32.f64 s15, d7 8003384: edc7 7a03 vstr s15, [r7, #12] } break; 8003388: e0c8 b.n 800351c case clearPeakElectricalMeasurementsTopic: if (cJSON_IsNumber (objectItem)) { 800338a: 6cb8 ldr r0, [r7, #72] @ 0x48 800338c: f7fe fc5b bl 8001c46 8003390: 4603 mov r3, r0 8003392: 2b00 cmp r3, #0 8003394: f000 80c4 beq.w 8003520 if (objectItem->valueint == 1) { 8003398: 6cbb ldr r3, [r7, #72] @ 0x48 800339a: 695b ldr r3, [r3, #20] 800339c: 2b01 cmp r3, #1 800339e: f040 80bf bne.w 8003520 data.spCommand = spClearPeakMeasurments; 80033a2: 2308 movs r3, #8 80033a4: 723b strb r3, [r7, #8] } } break; 80033a6: e0bb b.n 8003520 case mainBoardRelayTopic: if (cJSON_IsArray (objectItem)) { 80033a8: 6cb8 ldr r0, [r7, #72] @ 0x48 80033aa: f7fe fc63 bl 8001c74 80033ae: 4603 mov r3, r0 80033b0: 2b00 cmp r3, #0 80033b2: f000 80b7 beq.w 8003524 arraySize = cJSON_GetArraySize (objectItem); 80033b6: 6cb8 ldr r0, [r7, #72] @ 0x48 80033b8: f7fe fb96 bl 8001ae8 80033bc: 4603 mov r3, r0 80033be: 647b str r3, [r7, #68] @ 0x44 if (arraySize == 2) { 80033c0: 6c7b ldr r3, [r7, #68] @ 0x44 80033c2: 2b02 cmp r3, #2 80033c4: f040 80ae bne.w 8003524 int32_t relayNumber = -1; 80033c8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80033cc: 663b str r3, [r7, #96] @ 0x60 cJSON* item = cJSON_GetArrayItem (objectItem, 0); 80033ce: 2100 movs r1, #0 80033d0: 6cb8 ldr r0, [r7, #72] @ 0x48 80033d2: f7fe fbcd bl 8001b70 80033d6: 63f8 str r0, [r7, #60] @ 0x3c if (cJSON_IsNumber (item)) { 80033d8: 6bf8 ldr r0, [r7, #60] @ 0x3c 80033da: f7fe fc34 bl 8001c46 80033de: 4603 mov r3, r0 80033e0: 2b00 cmp r3, #0 80033e2: d002 beq.n 80033ea relayNumber = item->valueint; 80033e4: 6bfb ldr r3, [r7, #60] @ 0x3c 80033e6: 695b ldr r3, [r3, #20] 80033e8: 663b str r3, [r7, #96] @ 0x60 } int32_t relayTimeOn = 0; 80033ea: 2300 movs r3, #0 80033ec: 65fb str r3, [r7, #92] @ 0x5c item = cJSON_GetArrayItem (objectItem, 1); 80033ee: 2101 movs r1, #1 80033f0: 6cb8 ldr r0, [r7, #72] @ 0x48 80033f2: f7fe fbbd bl 8001b70 80033f6: 63f8 str r0, [r7, #60] @ 0x3c if (cJSON_IsNumber (item)) { 80033f8: 6bf8 ldr r0, [r7, #60] @ 0x3c 80033fa: f7fe fc24 bl 8001c46 80033fe: 4603 mov r3, r0 8003400: 2b00 cmp r3, #0 8003402: d002 beq.n 800340a relayTimeOn = item->valueint; 8003404: 6bfb ldr r3, [r7, #60] @ 0x3c 8003406: 695b ldr r3, [r3, #20] 8003408: 65fb str r3, [r7, #92] @ 0x5c } RelayCtrl (relayNumber, relayTimeOn); 800340a: 6df9 ldr r1, [r7, #92] @ 0x5c 800340c: 6e38 ldr r0, [r7, #96] @ 0x60 800340e: f7ff fe03 bl 8003018 } } break; 8003412: e087 b.n 8003524 case setEncoderXValue: if (cJSON_IsNumber (objectItem)) { 8003414: 6cb8 ldr r0, [r7, #72] @ 0x48 8003416: f7fe fc16 bl 8001c46 800341a: 4603 mov r3, r0 800341c: 2b00 cmp r3, #0 800341e: f000 8083 beq.w 8003528 data.spCommand = spSetEncoderXValue; 8003422: 2309 movs r3, #9 8003424: 723b strb r3, [r7, #8] data.values.flaotValues.value[0] = objectItem->valuedouble; 8003426: 6cbb ldr r3, [r7, #72] @ 0x48 8003428: ed93 7b06 vldr d7, [r3, #24] 800342c: eef7 7bc7 vcvt.f32.f64 s15, d7 8003430: edc7 7a03 vstr s15, [r7, #12] } break; 8003434: e078 b.n 8003528 case setEncoderYValue: if (cJSON_IsNumber (objectItem)) { 8003436: 6cb8 ldr r0, [r7, #72] @ 0x48 8003438: f7fe fc05 bl 8001c46 800343c: 4603 mov r3, r0 800343e: 2b00 cmp r3, #0 8003440: d074 beq.n 800352c data.spCommand = spSetEncoderYValue; 8003442: 230a movs r3, #10 8003444: 723b strb r3, [r7, #8] data.values.flaotValues.value[0] = objectItem->valuedouble; 8003446: 6cbb ldr r3, [r7, #72] @ 0x48 8003448: ed93 7b06 vldr d7, [r3, #24] 800344c: eef7 7bc7 vcvt.f32.f64 s15, d7 8003450: edc7 7a03 vstr s15, [r7, #12] } break; 8003454: e06a b.n 800352c case setVoltageMeasGains: spCommand = spSetVoltageMeasGains; 8003456: 230b movs r3, #11 8003458: f887 306f strb.w r3, [r7, #111] @ 0x6f case setVoltageMeasOffsets: if (spCommand == spUnknown) { 800345c: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 8003460: 2b10 cmp r3, #16 8003462: d102 bne.n 800346a spCommand = spSetVoltageMeasOffsets; 8003464: 230c movs r3, #12 8003466: f887 306f strb.w r3, [r7, #111] @ 0x6f } case setCurrentMeasGains: if (spCommand == spUnknown) { 800346a: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 800346e: 2b10 cmp r3, #16 8003470: d102 bne.n 8003478 spCommand = spSetCurrentMeasGains; 8003472: 230d movs r3, #13 8003474: f887 306f strb.w r3, [r7, #111] @ 0x6f } case setCurrentMeasOffsets: if (spCommand == spUnknown) { 8003478: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 800347c: 2b10 cmp r3, #16 800347e: d102 bne.n 8003486 spCommand = spSetCurrentMeasOffsets; 8003480: 230e movs r3, #14 8003482: f887 306f strb.w r3, [r7, #111] @ 0x6f } if (cJSON_IsArray (objectItem)) { 8003486: 6cb8 ldr r0, [r7, #72] @ 0x48 8003488: f7fe fbf4 bl 8001c74 800348c: 4603 mov r3, r0 800348e: 2b00 cmp r3, #0 8003490: d04e beq.n 8003530 data.spCommand = spCommand; 8003492: f897 306f ldrb.w r3, [r7, #111] @ 0x6f 8003496: 723b strb r3, [r7, #8] arraySize = cJSON_GetArraySize (objectItem); 8003498: 6cb8 ldr r0, [r7, #72] @ 0x48 800349a: f7fe fb25 bl 8001ae8 800349e: 4603 mov r3, r0 80034a0: 647b str r3, [r7, #68] @ 0x44 if (arraySize == 3) { 80034a2: 6c7b ldr r3, [r7, #68] @ 0x44 80034a4: 2b03 cmp r3, #3 80034a6: d143 bne.n 8003530 for (int i = 0; i < arraySize; i++) { 80034a8: 2300 movs r3, #0 80034aa: 65bb str r3, [r7, #88] @ 0x58 80034ac: e01e b.n 80034ec 80034ae: bf00 nop 80034b0: 08031a24 .word 0x08031a24 80034b4: 08031a38 .word 0x08031a38 cJSON* item = cJSON_GetArrayItem (objectItem, i); 80034b8: 6db9 ldr r1, [r7, #88] @ 0x58 80034ba: 6cb8 ldr r0, [r7, #72] @ 0x48 80034bc: f7fe fb58 bl 8001b70 80034c0: 6438 str r0, [r7, #64] @ 0x40 if (cJSON_IsNumber (item)) { 80034c2: 6c38 ldr r0, [r7, #64] @ 0x40 80034c4: f7fe fbbf bl 8001c46 80034c8: 4603 mov r3, r0 80034ca: 2b00 cmp r3, #0 80034cc: d00b beq.n 80034e6 data.values.flaotValues.value[i] = item->valuedouble; 80034ce: 6c3b ldr r3, [r7, #64] @ 0x40 80034d0: ed93 7b06 vldr d7, [r3, #24] 80034d4: eef7 7bc7 vcvt.f32.f64 s15, d7 80034d8: 6dbb ldr r3, [r7, #88] @ 0x58 80034da: 009b lsls r3, r3, #2 80034dc: 3370 adds r3, #112 @ 0x70 80034de: 443b add r3, r7 80034e0: 3b64 subs r3, #100 @ 0x64 80034e2: edc3 7a00 vstr s15, [r3] for (int i = 0; i < arraySize; i++) { 80034e6: 6dbb ldr r3, [r7, #88] @ 0x58 80034e8: 3301 adds r3, #1 80034ea: 65bb str r3, [r7, #88] @ 0x58 80034ec: 6dbb ldr r3, [r7, #88] @ 0x58 80034ee: 6c7a ldr r2, [r7, #68] @ 0x44 80034f0: 429a cmp r2, r3 80034f2: d8e1 bhi.n 80034b8 } } } } break; 80034f4: e01c b.n 8003530 case resetSystem: if (cJSON_IsNumber (objectItem)) { 80034f6: 6cb8 ldr r0, [r7, #72] @ 0x48 80034f8: f7fe fba5 bl 8001c46 80034fc: 4603 mov r3, r0 80034fe: 2b00 cmp r3, #0 8003500: d006 beq.n 8003510 if (objectItem->valueint == 1) { 8003502: 6cbb ldr r3, [r7, #72] @ 0x48 8003504: 695b ldr r3, [r3, #20] 8003506: 2b01 cmp r3, #1 8003508: d102 bne.n 8003510 data.spCommand = spResetSystem; 800350a: 230f movs r3, #15 800350c: 723b strb r3, [r7, #8] break; 800350e: e010 b.n 8003532 } } default: break; 8003510: bf00 nop 8003512: e00e b.n 8003532 break; 8003514: bf00 nop 8003516: e00c b.n 8003532 break; 8003518: bf00 nop 800351a: e00a b.n 8003532 break; 800351c: bf00 nop 800351e: e008 b.n 8003532 break; 8003520: bf00 nop 8003522: e006 b.n 8003532 break; 8003524: bf00 nop 8003526: e004 b.n 8003532 break; 8003528: bf00 nop 800352a: e002 b.n 8003532 break; 800352c: bf00 nop 800352e: e000 b.n 8003532 break; 8003530: bf00 nop for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 8003532: 6ebb ldr r3, [r7, #104] @ 0x68 8003534: 3301 adds r3, #1 8003536: 66bb str r3, [r7, #104] @ 0x68 8003538: 6ebb ldr r3, [r7, #104] @ 0x68 800353a: 2b0e cmp r3, #14 800353c: f77f ae84 ble.w 8003248 8003540: e01b b.n 800357a } } } } else { for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 8003542: 2300 movs r3, #0 8003544: 657b str r3, [r7, #84] @ 0x54 8003546: e015 b.n 8003574 objectItem = cJSON_GetObjectItemCaseSensitive (json, topicCommands[topicCmdNumber]); 8003548: 4a3e ldr r2, [pc, #248] @ (8003644 ) 800354a: 6d7b ldr r3, [r7, #84] @ 0x54 800354c: f852 3023 ldr.w r3, [r2, r3, lsl #2] 8003550: 4619 mov r1, r3 8003552: 6cf8 ldr r0, [r7, #76] @ 0x4c 8003554: f7fe fb68 bl 8001c28 8003558: 64b8 str r0, [r7, #72] @ 0x48 if (objectItem != NULL) { 800355a: 6cbb ldr r3, [r7, #72] @ 0x48 800355c: 2b00 cmp r3, #0 800355e: d006 beq.n 800356e if (topicCmdNumber == resetSystem) { 8003560: 6d7b ldr r3, [r7, #84] @ 0x54 8003562: 2b0e cmp r3, #14 8003564: d103 bne.n 800356e __ASM volatile ("cpsid i" : : : "memory"); 8003566: b672 cpsid i } 8003568: bf00 nop __disable_irq (); NVIC_SystemReset (); 800356a: f7ff f8f7 bl 800275c <__NVIC_SystemReset> for (int topicCmdNumber = 0; topicCmdNumber < MAX_COMMANDS_IN_MQTT_PAYLOAD; topicCmdNumber++) { 800356e: 6d7b ldr r3, [r7, #84] @ 0x54 8003570: 3301 adds r3, #1 8003572: 657b str r3, [r7, #84] @ 0x54 8003574: 6d7b ldr r3, [r7, #84] @ 0x54 8003576: 2b0e cmp r3, #14 8003578: dde6 ble.n 8003548 } } } } switch (topicForBoard) { 800357a: f897 306e ldrb.w r3, [r7, #110] @ 0x6e 800357e: 2b04 cmp r3, #4 8003580: d84c bhi.n 800361c 8003582: a201 add r2, pc, #4 @ (adr r2, 8003588 ) 8003584: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8003588: 0800361d .word 0x0800361d 800358c: 0800359d .word 0x0800359d 8003590: 080035bd .word 0x080035bd 8003594: 080035dd .word 0x080035dd 8003598: 080035fd .word 0x080035fd case main_board: break; case board_1: if (uart1TaskData.sendCmdToSlaveQueue != NULL) { 800359c: 4b2a ldr r3, [pc, #168] @ (8003648 ) 800359e: 6adb ldr r3, [r3, #44] @ 0x2c 80035a0: 2b00 cmp r3, #0 80035a2: d007 beq.n 80035b4 osMessageQueuePut (uart1TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 80035a4: 4b28 ldr r3, [pc, #160] @ (8003648 ) 80035a6: 6ad8 ldr r0, [r3, #44] @ 0x2c 80035a8: f107 0108 add.w r1, r7, #8 80035ac: 2364 movs r3, #100 @ 0x64 80035ae: 2200 movs r2, #0 80035b0: f00e fb4a bl 8011c48 } printf ("Send cmd to board 1\n"); 80035b4: 4825 ldr r0, [pc, #148] @ (800364c ) 80035b6: f027 f9d9 bl 802a96c break; 80035ba: e030 b.n 800361e case board_2: if (uart3TaskData.sendCmdToSlaveQueue != NULL) { 80035bc: 4b24 ldr r3, [pc, #144] @ (8003650 ) 80035be: 6adb ldr r3, [r3, #44] @ 0x2c 80035c0: 2b00 cmp r3, #0 80035c2: d007 beq.n 80035d4 osMessageQueuePut (uart3TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 80035c4: 4b22 ldr r3, [pc, #136] @ (8003650 ) 80035c6: 6ad8 ldr r0, [r3, #44] @ 0x2c 80035c8: f107 0108 add.w r1, r7, #8 80035cc: 2364 movs r3, #100 @ 0x64 80035ce: 2200 movs r2, #0 80035d0: f00e fb3a bl 8011c48 } printf ("Send cmd to board 2\n"); 80035d4: 481f ldr r0, [pc, #124] @ (8003654 ) 80035d6: f027 f9c9 bl 802a96c break; 80035da: e020 b.n 800361e case board_3: if (uart6TaskData.sendCmdToSlaveQueue != NULL) { 80035dc: 4b1e ldr r3, [pc, #120] @ (8003658 ) 80035de: 6adb ldr r3, [r3, #44] @ 0x2c 80035e0: 2b00 cmp r3, #0 80035e2: d007 beq.n 80035f4 osMessageQueuePut (uart6TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 80035e4: 4b1c ldr r3, [pc, #112] @ (8003658 ) 80035e6: 6ad8 ldr r0, [r3, #44] @ 0x2c 80035e8: f107 0108 add.w r1, r7, #8 80035ec: 2364 movs r3, #100 @ 0x64 80035ee: 2200 movs r2, #0 80035f0: f00e fb2a bl 8011c48 } printf ("Send cmd to board 3\n"); 80035f4: 4819 ldr r0, [pc, #100] @ (800365c ) 80035f6: f027 f9b9 bl 802a96c break; 80035fa: e010 b.n 800361e case board_4: if (uart2TaskData.sendCmdToSlaveQueue != NULL) { 80035fc: 4b18 ldr r3, [pc, #96] @ (8003660 ) 80035fe: 6adb ldr r3, [r3, #44] @ 0x2c 8003600: 2b00 cmp r3, #0 8003602: d007 beq.n 8003614 osMessageQueuePut (uart2TaskData.sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 8003604: 4b16 ldr r3, [pc, #88] @ (8003660 ) 8003606: 6ad8 ldr r0, [r3, #44] @ 0x2c 8003608: f107 0108 add.w r1, r7, #8 800360c: 2364 movs r3, #100 @ 0x64 800360e: 2200 movs r2, #0 8003610: f00e fb1a bl 8011c48 } printf ("Send cmd to board 4\n"); 8003614: 4813 ldr r0, [pc, #76] @ (8003664 ) 8003616: f027 f9a9 bl 802a96c break; 800361a: e000 b.n 800361e default: break; 800361c: bf00 nop } cJSON_Delete (json); 800361e: 6cf8 ldr r0, [r7, #76] @ 0x4c 8003620: f7fd fab4 bl 8000b8c printf ("MQTT Topic:%s, MSG[%d]:%s\n", topicName, (int)message->payloadlen, (char*)message->payload); 8003624: 6d3b ldr r3, [r7, #80] @ 0x50 8003626: 68db ldr r3, [r3, #12] 8003628: 461a mov r2, r3 800362a: 6d3b ldr r3, [r7, #80] @ 0x50 800362c: 689b ldr r3, [r3, #8] 800362e: f107 0118 add.w r1, r7, #24 8003632: 480d ldr r0, [pc, #52] @ (8003668 ) 8003634: f027 f932 bl 802a89c 8003638: e000 b.n 800363c return; 800363a: bf00 nop } 800363c: 3770 adds r7, #112 @ 0x70 800363e: 46bd mov sp, r7 8003640: bd80 pop {r7, pc} 8003642: bf00 nop 8003644: 08031a38 .word 0x08031a38 8003648: 24001efc .word 0x24001efc 800364c: 0802d8a8 .word 0x0802d8a8 8003650: 24001f34 .word 0x24001f34 8003654: 0802d8bc .word 0x0802d8bc 8003658: 24001f6c .word 0x24001f6c 800365c: 0802d8d0 .word 0x0802d8d0 8003660: 24001fa4 .word 0x24001fa4 8003664: 0802d8e4 .word 0x0802d8e4 8003668: 0802d8f8 .word 0x0802d8f8 0800366c : void mqtt_cli_init (void) { 800366c: b580 push {r7, lr} 800366e: af00 add r7, sp, #0 mqttClientSubTaskHandle = osThreadNew (MqttClientSubTask, NULL, &mqttClientSubTaskAttr); // subscribe task 8003670: 4a08 ldr r2, [pc, #32] @ (8003694 ) 8003672: 2100 movs r1, #0 8003674: 4808 ldr r0, [pc, #32] @ (8003698 ) 8003676: f00d fe72 bl 801135e 800367a: 4603 mov r3, r0 800367c: 4a07 ldr r2, [pc, #28] @ (800369c ) 800367e: 6013 str r3, [r2, #0] mqttClientPubTaskHandle = osThreadNew (MqttClientPubTask, NULL, &mqttClientPubTaskAttr); // publish task 8003680: 4a07 ldr r2, [pc, #28] @ (80036a0 ) 8003682: 2100 movs r1, #0 8003684: 4807 ldr r0, [pc, #28] @ (80036a4 ) 8003686: f00d fe6a bl 801135e 800368a: 4603 mov r3, r0 800368c: 4a06 ldr r2, [pc, #24] @ (80036a8 ) 800368e: 6013 str r3, [r2, #0] } 8003690: bf00 nop 8003692: bd80 pop {r7, pc} 8003694: 08031a74 .word 0x08031a74 8003698: 08002789 .word 0x08002789 800369c: 24000728 .word 0x24000728 80036a0: 08031a98 .word 0x08031a98 80036a4: 080027f9 .word 0x080027f9 80036a8: 2400072c .word 0x2400072c 080036ac : buff[newBuffPos++] = (uint8_t)((uData >> (i * 8)) & 0xFF); } *buffPos = newBuffPos; } void WriteDataToBuffer (uint8_t* buff, uint16_t* buffPos, void* data, uint8_t dataSize) { 80036ac: b480 push {r7} 80036ae: b089 sub sp, #36 @ 0x24 80036b0: af00 add r7, sp, #0 80036b2: 60f8 str r0, [r7, #12] 80036b4: 60b9 str r1, [r7, #8] 80036b6: 607a str r2, [r7, #4] 80036b8: 70fb strb r3, [r7, #3] uint32_t* uDataPtr = data; 80036ba: 687b ldr r3, [r7, #4] 80036bc: 61bb str r3, [r7, #24] uint32_t uData = *uDataPtr; 80036be: 69bb ldr r3, [r7, #24] 80036c0: 681b ldr r3, [r3, #0] 80036c2: 617b str r3, [r7, #20] uint8_t i = 0; 80036c4: 2300 movs r3, #0 80036c6: 77fb strb r3, [r7, #31] uint8_t newBuffPos = *buffPos; 80036c8: 68bb ldr r3, [r7, #8] 80036ca: 881b ldrh r3, [r3, #0] 80036cc: 77bb strb r3, [r7, #30] for (i = 0; i < dataSize; i++) { 80036ce: 2300 movs r3, #0 80036d0: 77fb strb r3, [r7, #31] 80036d2: e00e b.n 80036f2 buff[newBuffPos++] = (uint8_t)((uData >> (i * 8)) & 0xFF); 80036d4: 7ffb ldrb r3, [r7, #31] 80036d6: 00db lsls r3, r3, #3 80036d8: 697a ldr r2, [r7, #20] 80036da: 40da lsrs r2, r3 80036dc: 7fbb ldrb r3, [r7, #30] 80036de: 1c59 adds r1, r3, #1 80036e0: 77b9 strb r1, [r7, #30] 80036e2: 4619 mov r1, r3 80036e4: 68fb ldr r3, [r7, #12] 80036e6: 440b add r3, r1 80036e8: b2d2 uxtb r2, r2 80036ea: 701a strb r2, [r3, #0] for (i = 0; i < dataSize; i++) { 80036ec: 7ffb ldrb r3, [r7, #31] 80036ee: 3301 adds r3, #1 80036f0: 77fb strb r3, [r7, #31] 80036f2: 7ffa ldrb r2, [r7, #31] 80036f4: 78fb ldrb r3, [r7, #3] 80036f6: 429a cmp r2, r3 80036f8: d3ec bcc.n 80036d4 } *buffPos = newBuffPos; 80036fa: 7fbb ldrb r3, [r7, #30] 80036fc: b29a uxth r2, r3 80036fe: 68bb ldr r3, [r7, #8] 8003700: 801a strh r2, [r3, #0] } 8003702: bf00 nop 8003704: 3724 adds r7, #36 @ 0x24 8003706: 46bd mov sp, r7 8003708: f85d 7b04 ldr.w r7, [sp], #4 800370c: 4770 bx lr 0800370e : void ReadFloatFromBuffer(uint8_t* buff, uint16_t* buffPos, float* data) { 800370e: b480 push {r7} 8003710: b087 sub sp, #28 8003712: af00 add r7, sp, #0 8003714: 60f8 str r0, [r7, #12] 8003716: 60b9 str r1, [r7, #8] 8003718: 607a str r2, [r7, #4] uint32_t* word = (uint32_t *)data; 800371a: 687b ldr r3, [r7, #4] 800371c: 617b str r3, [r7, #20] *word = CONVERT_BYTES_TO_WORD(&buff[*buffPos]); 800371e: 68bb ldr r3, [r7, #8] 8003720: 881b ldrh r3, [r3, #0] 8003722: 3303 adds r3, #3 8003724: 68fa ldr r2, [r7, #12] 8003726: 4413 add r3, r2 8003728: 781b ldrb r3, [r3, #0] 800372a: 061a lsls r2, r3, #24 800372c: 68bb ldr r3, [r7, #8] 800372e: 881b ldrh r3, [r3, #0] 8003730: 3302 adds r3, #2 8003732: 68f9 ldr r1, [r7, #12] 8003734: 440b add r3, r1 8003736: 781b ldrb r3, [r3, #0] 8003738: 041b lsls r3, r3, #16 800373a: 431a orrs r2, r3 800373c: 68bb ldr r3, [r7, #8] 800373e: 881b ldrh r3, [r3, #0] 8003740: 3301 adds r3, #1 8003742: 68f9 ldr r1, [r7, #12] 8003744: 440b add r3, r1 8003746: 781b ldrb r3, [r3, #0] 8003748: 021b lsls r3, r3, #8 800374a: 4313 orrs r3, r2 800374c: 68ba ldr r2, [r7, #8] 800374e: 8812 ldrh r2, [r2, #0] 8003750: 4611 mov r1, r2 8003752: 68fa ldr r2, [r7, #12] 8003754: 440a add r2, r1 8003756: 7812 ldrb r2, [r2, #0] 8003758: 4313 orrs r3, r2 800375a: 461a mov r2, r3 800375c: 697b ldr r3, [r7, #20] 800375e: 601a str r2, [r3, #0] *buffPos += sizeof(float); 8003760: 68bb ldr r3, [r7, #8] 8003762: 881b ldrh r3, [r3, #0] 8003764: 3304 adds r3, #4 8003766: b29a uxth r2, r3 8003768: 68bb ldr r3, [r7, #8] 800376a: 801a strh r2, [r3, #0] } 800376c: bf00 nop 800376e: 371c adds r7, #28 8003770: 46bd mov sp, r7 8003772: f85d 7b04 ldr.w r7, [sp], #4 8003776: 4770 bx lr 08003778 : *data = CONVERT_BYTES_TO_SHORT_WORD(&buff[*buffPos]); *buffPos += sizeof(uint32_t); } void ReadByteFromBufer(uint8_t* buff, uint16_t* buffPos, uint8_t* data) { 8003778: b480 push {r7} 800377a: b085 sub sp, #20 800377c: af00 add r7, sp, #0 800377e: 60f8 str r0, [r7, #12] 8003780: 60b9 str r1, [r7, #8] 8003782: 607a str r2, [r7, #4] *data = CONVERT_BYTES_TO_SHORT_WORD(&buff[*buffPos]); 8003784: 68bb ldr r3, [r7, #8] 8003786: 881b ldrh r3, [r3, #0] 8003788: 3301 adds r3, #1 800378a: 68fa ldr r2, [r7, #12] 800378c: 4413 add r3, r2 800378e: 781b ldrb r3, [r3, #0] 8003790: 021b lsls r3, r3, #8 8003792: b25a sxtb r2, r3 8003794: 68bb ldr r3, [r7, #8] 8003796: 881b ldrh r3, [r3, #0] 8003798: 4619 mov r1, r3 800379a: 68fb ldr r3, [r7, #12] 800379c: 440b add r3, r1 800379e: 781b ldrb r3, [r3, #0] 80037a0: b25b sxtb r3, r3 80037a2: 4313 orrs r3, r2 80037a4: b25b sxtb r3, r3 80037a6: b2da uxtb r2, r3 80037a8: 687b ldr r3, [r7, #4] 80037aa: 701a strb r2, [r3, #0] *buffPos += sizeof(uint8_t); 80037ac: 68bb ldr r3, [r7, #8] 80037ae: 881b ldrh r3, [r3, #0] 80037b0: 3301 adds r3, #1 80037b2: b29a uxth r2, r3 80037b4: 68bb ldr r3, [r7, #8] 80037b6: 801a strh r2, [r3, #0] } 80037b8: bf00 nop 80037ba: 3714 adds r7, #20 80037bc: 46bd mov sp, r7 80037be: f85d 7b04 ldr.w r7, [sp], #4 80037c2: 4770 bx lr 080037c4 : uint16_t PrepareReqFrame (uint8_t* txBuffer, uint16_t frameId, SerialProtocolCommands frameCommand, uint8_t* dataBuffer, uint16_t dataLength) { 80037c4: b580 push {r7, lr} 80037c6: b086 sub sp, #24 80037c8: af00 add r7, sp, #0 80037ca: 60f8 str r0, [r7, #12] 80037cc: 607b str r3, [r7, #4] 80037ce: 460b mov r3, r1 80037d0: 817b strh r3, [r7, #10] 80037d2: 4613 mov r3, r2 80037d4: 727b strb r3, [r7, #9] uint16_t crc = 0; 80037d6: 2300 movs r3, #0 80037d8: 82bb strh r3, [r7, #20] uint16_t txBufferPos = 0; 80037da: 2300 movs r3, #0 80037dc: 82fb strh r3, [r7, #22] uint16_t frameCmd = ((uint16_t)frameCommand); 80037de: 7a7b ldrb r3, [r7, #9] 80037e0: 827b strh r3, [r7, #18] memset (txBuffer, 0x00, dataLength); 80037e2: 8c3b ldrh r3, [r7, #32] 80037e4: 461a mov r2, r3 80037e6: 2100 movs r1, #0 80037e8: 68f8 ldr r0, [r7, #12] 80037ea: f027 f9e9 bl 802abc0 txBuffer[txBufferPos++] = FRAME_INDICATOR; 80037ee: 8afb ldrh r3, [r7, #22] 80037f0: 1c5a adds r2, r3, #1 80037f2: 82fa strh r2, [r7, #22] 80037f4: 461a mov r2, r3 80037f6: 68fb ldr r3, [r7, #12] 80037f8: 4413 add r3, r2 80037fa: 22aa movs r2, #170 @ 0xaa 80037fc: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameId); 80037fe: 8afb ldrh r3, [r7, #22] 8003800: 1c5a adds r2, r3, #1 8003802: 82fa strh r2, [r7, #22] 8003804: 461a mov r2, r3 8003806: 68fb ldr r3, [r7, #12] 8003808: 4413 add r3, r2 800380a: 897a ldrh r2, [r7, #10] 800380c: b2d2 uxtb r2, r2 800380e: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameId); 8003810: 897b ldrh r3, [r7, #10] 8003812: 0a1b lsrs r3, r3, #8 8003814: b29a uxth r2, r3 8003816: 8afb ldrh r3, [r7, #22] 8003818: 1c59 adds r1, r3, #1 800381a: 82f9 strh r1, [r7, #22] 800381c: 4619 mov r1, r3 800381e: 68fb ldr r3, [r7, #12] 8003820: 440b add r3, r1 8003822: b2d2 uxtb r2, r2 8003824: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameCmd); 8003826: 8afb ldrh r3, [r7, #22] 8003828: 1c5a adds r2, r3, #1 800382a: 82fa strh r2, [r7, #22] 800382c: 461a mov r2, r3 800382e: 68fb ldr r3, [r7, #12] 8003830: 4413 add r3, r2 8003832: 8a7a ldrh r2, [r7, #18] 8003834: b2d2 uxtb r2, r2 8003836: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameCmd); 8003838: 8a7b ldrh r3, [r7, #18] 800383a: 0a1b lsrs r3, r3, #8 800383c: b29a uxth r2, r3 800383e: 8afb ldrh r3, [r7, #22] 8003840: 1c59 adds r1, r3, #1 8003842: 82f9 strh r1, [r7, #22] 8003844: 4619 mov r1, r3 8003846: 68fb ldr r3, [r7, #12] 8003848: 440b add r3, r1 800384a: b2d2 uxtb r2, r2 800384c: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (dataLength); 800384e: 8afb ldrh r3, [r7, #22] 8003850: 1c5a adds r2, r3, #1 8003852: 82fa strh r2, [r7, #22] 8003854: 461a mov r2, r3 8003856: 68fb ldr r3, [r7, #12] 8003858: 4413 add r3, r2 800385a: 8c3a ldrh r2, [r7, #32] 800385c: b2d2 uxtb r2, r2 800385e: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (dataLength); 8003860: 8c3b ldrh r3, [r7, #32] 8003862: 0a1b lsrs r3, r3, #8 8003864: b29a uxth r2, r3 8003866: 8afb ldrh r3, [r7, #22] 8003868: 1c59 adds r1, r3, #1 800386a: 82f9 strh r1, [r7, #22] 800386c: 4619 mov r1, r3 800386e: 68fb ldr r3, [r7, #12] 8003870: 440b add r3, r1 8003872: b2d2 uxtb r2, r2 8003874: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = 0x00; 8003876: 8afb ldrh r3, [r7, #22] 8003878: 1c5a adds r2, r3, #1 800387a: 82fa strh r2, [r7, #22] 800387c: 461a mov r2, r3 800387e: 68fb ldr r3, [r7, #12] 8003880: 4413 add r3, r2 8003882: 2200 movs r2, #0 8003884: 701a strb r2, [r3, #0] if (dataLength > 0) { 8003886: 8c3b ldrh r3, [r7, #32] 8003888: 2b00 cmp r3, #0 800388a: d00b beq.n 80038a4 memcpy (&txBuffer[txBufferPos], dataBuffer, dataLength); 800388c: 8afb ldrh r3, [r7, #22] 800388e: 68fa ldr r2, [r7, #12] 8003890: 4413 add r3, r2 8003892: 8c3a ldrh r2, [r7, #32] 8003894: 6879 ldr r1, [r7, #4] 8003896: 4618 mov r0, r3 8003898: f027 fa89 bl 802adae txBufferPos += dataLength; 800389c: 8afa ldrh r2, [r7, #22] 800389e: 8c3b ldrh r3, [r7, #32] 80038a0: 4413 add r3, r2 80038a2: 82fb strh r3, [r7, #22] } crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)txBuffer, txBufferPos); 80038a4: 8afb ldrh r3, [r7, #22] 80038a6: 461a mov r2, r3 80038a8: 68f9 ldr r1, [r7, #12] 80038aa: 480f ldr r0, [pc, #60] @ (80038e8 ) 80038ac: f002 f9d2 bl 8005c54 80038b0: 4603 mov r3, r0 80038b2: 82bb strh r3, [r7, #20] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (crc); 80038b4: 8afb ldrh r3, [r7, #22] 80038b6: 1c5a adds r2, r3, #1 80038b8: 82fa strh r2, [r7, #22] 80038ba: 461a mov r2, r3 80038bc: 68fb ldr r3, [r7, #12] 80038be: 4413 add r3, r2 80038c0: 8aba ldrh r2, [r7, #20] 80038c2: b2d2 uxtb r2, r2 80038c4: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (crc); 80038c6: 8abb ldrh r3, [r7, #20] 80038c8: 0a1b lsrs r3, r3, #8 80038ca: b29a uxth r2, r3 80038cc: 8afb ldrh r3, [r7, #22] 80038ce: 1c59 adds r1, r3, #1 80038d0: 82f9 strh r1, [r7, #22] 80038d2: 4619 mov r1, r3 80038d4: 68fb ldr r3, [r7, #12] 80038d6: 440b add r3, r1 80038d8: b2d2 uxtb r2, r2 80038da: 701a strb r2, [r3, #0] return txBufferPos; 80038dc: 8afb ldrh r3, [r7, #22] } 80038de: 4618 mov r0, r3 80038e0: 3718 adds r7, #24 80038e2: 46bd mov sp, r7 80038e4: bd80 pop {r7, pc} 80038e6: bf00 nop 80038e8: 24000248 .word 0x24000248 080038ec : uint16_t PrepareRespFrame (uint8_t* txBuffer, uint16_t frameId, SerialProtocolCommands frameCommand, SerialProtocolRespStatus respStatus, uint8_t* dataBuffer, uint16_t dataLength) { 80038ec: b580 push {r7, lr} 80038ee: b084 sub sp, #16 80038f0: af00 add r7, sp, #0 80038f2: 6078 str r0, [r7, #4] 80038f4: 4608 mov r0, r1 80038f6: 4611 mov r1, r2 80038f8: 461a mov r2, r3 80038fa: 4603 mov r3, r0 80038fc: 807b strh r3, [r7, #2] 80038fe: 460b mov r3, r1 8003900: 707b strb r3, [r7, #1] 8003902: 4613 mov r3, r2 8003904: 703b strb r3, [r7, #0] uint16_t crc = 0; 8003906: 2300 movs r3, #0 8003908: 81bb strh r3, [r7, #12] uint16_t txBufferPos = 0; 800390a: 2300 movs r3, #0 800390c: 81fb strh r3, [r7, #14] uint16_t frameCmd = ((uint16_t)frameCommand) | 0x8000; // MSB set means response 800390e: 787b ldrb r3, [r7, #1] 8003910: b21a sxth r2, r3 8003912: 4b43 ldr r3, [pc, #268] @ (8003a20 ) 8003914: 4313 orrs r3, r2 8003916: b21b sxth r3, r3 8003918: 817b strh r3, [r7, #10] memset (txBuffer, 0x00, dataLength); 800391a: 8bbb ldrh r3, [r7, #28] 800391c: 461a mov r2, r3 800391e: 2100 movs r1, #0 8003920: 6878 ldr r0, [r7, #4] 8003922: f027 f94d bl 802abc0 txBuffer[txBufferPos++] = FRAME_INDICATOR; 8003926: 89fb ldrh r3, [r7, #14] 8003928: 1c5a adds r2, r3, #1 800392a: 81fa strh r2, [r7, #14] 800392c: 461a mov r2, r3 800392e: 687b ldr r3, [r7, #4] 8003930: 4413 add r3, r2 8003932: 22aa movs r2, #170 @ 0xaa 8003934: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameId); 8003936: 89fb ldrh r3, [r7, #14] 8003938: 1c5a adds r2, r3, #1 800393a: 81fa strh r2, [r7, #14] 800393c: 461a mov r2, r3 800393e: 687b ldr r3, [r7, #4] 8003940: 4413 add r3, r2 8003942: 887a ldrh r2, [r7, #2] 8003944: b2d2 uxtb r2, r2 8003946: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameId); 8003948: 887b ldrh r3, [r7, #2] 800394a: 0a1b lsrs r3, r3, #8 800394c: b29a uxth r2, r3 800394e: 89fb ldrh r3, [r7, #14] 8003950: 1c59 adds r1, r3, #1 8003952: 81f9 strh r1, [r7, #14] 8003954: 4619 mov r1, r3 8003956: 687b ldr r3, [r7, #4] 8003958: 440b add r3, r1 800395a: b2d2 uxtb r2, r2 800395c: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (frameCmd); 800395e: 89fb ldrh r3, [r7, #14] 8003960: 1c5a adds r2, r3, #1 8003962: 81fa strh r2, [r7, #14] 8003964: 461a mov r2, r3 8003966: 687b ldr r3, [r7, #4] 8003968: 4413 add r3, r2 800396a: 897a ldrh r2, [r7, #10] 800396c: b2d2 uxtb r2, r2 800396e: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (frameCmd); 8003970: 897b ldrh r3, [r7, #10] 8003972: 0a1b lsrs r3, r3, #8 8003974: b29a uxth r2, r3 8003976: 89fb ldrh r3, [r7, #14] 8003978: 1c59 adds r1, r3, #1 800397a: 81f9 strh r1, [r7, #14] 800397c: 4619 mov r1, r3 800397e: 687b ldr r3, [r7, #4] 8003980: 440b add r3, r1 8003982: b2d2 uxtb r2, r2 8003984: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (dataLength); 8003986: 89fb ldrh r3, [r7, #14] 8003988: 1c5a adds r2, r3, #1 800398a: 81fa strh r2, [r7, #14] 800398c: 461a mov r2, r3 800398e: 687b ldr r3, [r7, #4] 8003990: 4413 add r3, r2 8003992: 8bba ldrh r2, [r7, #28] 8003994: b2d2 uxtb r2, r2 8003996: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (dataLength); 8003998: 8bbb ldrh r3, [r7, #28] 800399a: 0a1b lsrs r3, r3, #8 800399c: b29a uxth r2, r3 800399e: 89fb ldrh r3, [r7, #14] 80039a0: 1c59 adds r1, r3, #1 80039a2: 81f9 strh r1, [r7, #14] 80039a4: 4619 mov r1, r3 80039a6: 687b ldr r3, [r7, #4] 80039a8: 440b add r3, r1 80039aa: b2d2 uxtb r2, r2 80039ac: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = (uint8_t)respStatus; 80039ae: 89fb ldrh r3, [r7, #14] 80039b0: 1c5a adds r2, r3, #1 80039b2: 81fa strh r2, [r7, #14] 80039b4: 461a mov r2, r3 80039b6: 687b ldr r3, [r7, #4] 80039b8: 4413 add r3, r2 80039ba: 783a ldrb r2, [r7, #0] 80039bc: 701a strb r2, [r3, #0] if (dataLength > 0) { 80039be: 8bbb ldrh r3, [r7, #28] 80039c0: 2b00 cmp r3, #0 80039c2: d00b beq.n 80039dc memcpy (&txBuffer[txBufferPos], dataBuffer, dataLength); 80039c4: 89fb ldrh r3, [r7, #14] 80039c6: 687a ldr r2, [r7, #4] 80039c8: 4413 add r3, r2 80039ca: 8bba ldrh r2, [r7, #28] 80039cc: 69b9 ldr r1, [r7, #24] 80039ce: 4618 mov r0, r3 80039d0: f027 f9ed bl 802adae txBufferPos += dataLength; 80039d4: 89fa ldrh r2, [r7, #14] 80039d6: 8bbb ldrh r3, [r7, #28] 80039d8: 4413 add r3, r2 80039da: 81fb strh r3, [r7, #14] } crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)txBuffer, txBufferPos); 80039dc: 89fb ldrh r3, [r7, #14] 80039de: 461a mov r2, r3 80039e0: 6879 ldr r1, [r7, #4] 80039e2: 4810 ldr r0, [pc, #64] @ (8003a24 ) 80039e4: f002 f936 bl 8005c54 80039e8: 4603 mov r3, r0 80039ea: 81bb strh r3, [r7, #12] txBuffer[txBufferPos++] = GET_SHORT_WORD_FIRST_BYTE (crc); 80039ec: 89fb ldrh r3, [r7, #14] 80039ee: 1c5a adds r2, r3, #1 80039f0: 81fa strh r2, [r7, #14] 80039f2: 461a mov r2, r3 80039f4: 687b ldr r3, [r7, #4] 80039f6: 4413 add r3, r2 80039f8: 89ba ldrh r2, [r7, #12] 80039fa: b2d2 uxtb r2, r2 80039fc: 701a strb r2, [r3, #0] txBuffer[txBufferPos++] = GET_SHORT_WORD_SECOND_BYTE (crc); 80039fe: 89bb ldrh r3, [r7, #12] 8003a00: 0a1b lsrs r3, r3, #8 8003a02: b29a uxth r2, r3 8003a04: 89fb ldrh r3, [r7, #14] 8003a06: 1c59 adds r1, r3, #1 8003a08: 81f9 strh r1, [r7, #14] 8003a0a: 4619 mov r1, r3 8003a0c: 687b ldr r3, [r7, #4] 8003a0e: 440b add r3, r1 8003a10: b2d2 uxtb r2, r2 8003a12: 701a strb r2, [r3, #0] return txBufferPos; 8003a14: 89fb ldrh r3, [r7, #14] } 8003a16: 4618 mov r0, r3 8003a18: 3710 adds r7, #16 8003a1a: 46bd mov sp, r7 8003a1c: bd80 pop {r7, pc} 8003a1e: bf00 nop 8003a20: ffff8000 .word 0xffff8000 8003a24: 24000248 .word 0x24000248 08003a28 : /* USER CODE END 0 */ /** * Initializes the Global MSP. */ void HAL_MspInit(void) { 8003a28: b580 push {r7, lr} 8003a2a: b086 sub sp, #24 8003a2c: af00 add r7, sp, #0 /* USER CODE BEGIN MspInit 0 */ /* USER CODE END MspInit 0 */ PWREx_AVDTypeDef sConfigAVD = {0}; 8003a2e: f107 0310 add.w r3, r7, #16 8003a32: 2200 movs r2, #0 8003a34: 601a str r2, [r3, #0] 8003a36: 605a str r2, [r3, #4] PWR_PVDTypeDef sConfigPVD = {0}; 8003a38: f107 0308 add.w r3, r7, #8 8003a3c: 2200 movs r2, #0 8003a3e: 601a str r2, [r3, #0] 8003a40: 605a str r2, [r3, #4] __HAL_RCC_SYSCFG_CLK_ENABLE(); 8003a42: 4b1c ldr r3, [pc, #112] @ (8003ab4 ) 8003a44: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8003a48: 4a1a ldr r2, [pc, #104] @ (8003ab4 ) 8003a4a: f043 0302 orr.w r3, r3, #2 8003a4e: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 8003a52: 4b18 ldr r3, [pc, #96] @ (8003ab4 ) 8003a54: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8003a58: f003 0302 and.w r3, r3, #2 8003a5c: 607b str r3, [r7, #4] 8003a5e: 687b ldr r3, [r7, #4] /* System interrupt init*/ /* PendSV_IRQn interrupt configuration */ HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0); 8003a60: 2200 movs r2, #0 8003a62: 210f movs r1, #15 8003a64: f06f 0001 mvn.w r0, #1 8003a68: f001 fff0 bl 8005a4c /* Peripheral interrupt init */ /* RCC_IRQn interrupt configuration */ HAL_NVIC_SetPriority(RCC_IRQn, 5, 0); 8003a6c: 2200 movs r2, #0 8003a6e: 2105 movs r1, #5 8003a70: 2005 movs r0, #5 8003a72: f001 ffeb bl 8005a4c HAL_NVIC_EnableIRQ(RCC_IRQn); 8003a76: 2005 movs r0, #5 8003a78: f002 f802 bl 8005a80 /** AVD Configuration */ sConfigAVD.AVDLevel = PWR_AVDLEVEL_3; 8003a7c: f44f 23c0 mov.w r3, #393216 @ 0x60000 8003a80: 613b str r3, [r7, #16] sConfigAVD.Mode = PWR_AVD_MODE_NORMAL; 8003a82: 2300 movs r3, #0 8003a84: 617b str r3, [r7, #20] HAL_PWREx_ConfigAVD(&sConfigAVD); 8003a86: f107 0310 add.w r3, r7, #16 8003a8a: 4618 mov r0, r3 8003a8c: f006 fd0a bl 800a4a4 /** Enable the AVD Output */ HAL_PWREx_EnableAVD(); 8003a90: f006 fd7e bl 800a590 /** PVD Configuration */ sConfigPVD.PVDLevel = PWR_PVDLEVEL_6; 8003a94: 23c0 movs r3, #192 @ 0xc0 8003a96: 60bb str r3, [r7, #8] sConfigPVD.Mode = PWR_PVD_MODE_NORMAL; 8003a98: 2300 movs r3, #0 8003a9a: 60fb str r3, [r7, #12] HAL_PWR_ConfigPVD(&sConfigPVD); 8003a9c: f107 0308 add.w r3, r7, #8 8003aa0: 4618 mov r0, r3 8003aa2: f006 fc3b bl 800a31c /** Enable the PVD Output */ HAL_PWR_EnablePVD(); 8003aa6: f006 fcb3 bl 800a410 /* USER CODE BEGIN MspInit 1 */ /* USER CODE END MspInit 1 */ } 8003aaa: bf00 nop 8003aac: 3718 adds r7, #24 8003aae: 46bd mov sp, r7 8003ab0: bd80 pop {r7, pc} 8003ab2: bf00 nop 8003ab4: 58024400 .word 0x58024400 08003ab8 : * This function configures the hardware resources used in this example * @param hcrc: CRC handle pointer * @retval None */ void HAL_CRC_MspInit(CRC_HandleTypeDef* hcrc) { 8003ab8: b480 push {r7} 8003aba: b085 sub sp, #20 8003abc: af00 add r7, sp, #0 8003abe: 6078 str r0, [r7, #4] if(hcrc->Instance==CRC) 8003ac0: 687b ldr r3, [r7, #4] 8003ac2: 681b ldr r3, [r3, #0] 8003ac4: 4a0b ldr r2, [pc, #44] @ (8003af4 ) 8003ac6: 4293 cmp r3, r2 8003ac8: d10e bne.n 8003ae8 { /* USER CODE BEGIN CRC_MspInit 0 */ /* USER CODE END CRC_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_CRC_CLK_ENABLE(); 8003aca: 4b0b ldr r3, [pc, #44] @ (8003af8 ) 8003acc: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003ad0: 4a09 ldr r2, [pc, #36] @ (8003af8 ) 8003ad2: f443 2300 orr.w r3, r3, #524288 @ 0x80000 8003ad6: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003ada: 4b07 ldr r3, [pc, #28] @ (8003af8 ) 8003adc: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003ae0: f403 2300 and.w r3, r3, #524288 @ 0x80000 8003ae4: 60fb str r3, [r7, #12] 8003ae6: 68fb ldr r3, [r7, #12] /* USER CODE BEGIN CRC_MspInit 1 */ /* USER CODE END CRC_MspInit 1 */ } } 8003ae8: bf00 nop 8003aea: 3714 adds r7, #20 8003aec: 46bd mov sp, r7 8003aee: f85d 7b04 ldr.w r7, [sp], #4 8003af2: 4770 bx lr 8003af4: 58024c00 .word 0x58024c00 8003af8: 58024400 .word 0x58024400 08003afc : * This function configures the hardware resources used in this example * @param hrng: RNG handle pointer * @retval None */ void HAL_RNG_MspInit(RNG_HandleTypeDef* hrng) { 8003afc: b580 push {r7, lr} 8003afe: b0b4 sub sp, #208 @ 0xd0 8003b00: af00 add r7, sp, #0 8003b02: 6078 str r0, [r7, #4] RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; 8003b04: f107 0310 add.w r3, r7, #16 8003b08: 22c0 movs r2, #192 @ 0xc0 8003b0a: 2100 movs r1, #0 8003b0c: 4618 mov r0, r3 8003b0e: f027 f857 bl 802abc0 if(hrng->Instance==RNG) 8003b12: 687b ldr r3, [r7, #4] 8003b14: 681b ldr r3, [r3, #0] 8003b16: 4a14 ldr r2, [pc, #80] @ (8003b68 ) 8003b18: 4293 cmp r3, r2 8003b1a: d121 bne.n 8003b60 /* USER CODE END RNG_MspInit 0 */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RNG; 8003b1c: f44f 3200 mov.w r2, #131072 @ 0x20000 8003b20: f04f 0300 mov.w r3, #0 8003b24: e9c7 2304 strd r2, r3, [r7, #16] PeriphClkInitStruct.RngClockSelection = RCC_RNGCLKSOURCE_HSI48; 8003b28: 2300 movs r3, #0 8003b2a: f8c7 3090 str.w r3, [r7, #144] @ 0x90 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003b2e: f107 0310 add.w r3, r7, #16 8003b32: 4618 mov r0, r3 8003b34: f007 fd64 bl 800b600 8003b38: 4603 mov r3, r0 8003b3a: 2b00 cmp r3, #0 8003b3c: d001 beq.n 8003b42 { Error_Handler(); 8003b3e: f7fe fe07 bl 8002750 } /* Peripheral clock enable */ __HAL_RCC_RNG_CLK_ENABLE(); 8003b42: 4b0a ldr r3, [pc, #40] @ (8003b6c ) 8003b44: f8d3 30dc ldr.w r3, [r3, #220] @ 0xdc 8003b48: 4a08 ldr r2, [pc, #32] @ (8003b6c ) 8003b4a: f043 0340 orr.w r3, r3, #64 @ 0x40 8003b4e: f8c2 30dc str.w r3, [r2, #220] @ 0xdc 8003b52: 4b06 ldr r3, [pc, #24] @ (8003b6c ) 8003b54: f8d3 30dc ldr.w r3, [r3, #220] @ 0xdc 8003b58: f003 0340 and.w r3, r3, #64 @ 0x40 8003b5c: 60fb str r3, [r7, #12] 8003b5e: 68fb ldr r3, [r7, #12] /* USER CODE BEGIN RNG_MspInit 1 */ /* USER CODE END RNG_MspInit 1 */ } } 8003b60: bf00 nop 8003b62: 37d0 adds r7, #208 @ 0xd0 8003b64: 46bd mov sp, r7 8003b66: bd80 pop {r7, pc} 8003b68: 48021800 .word 0x48021800 8003b6c: 58024400 .word 0x58024400 08003b70 : * This function configures the hardware resources used in this example * @param huart: UART handle pointer * @retval None */ void HAL_UART_MspInit(UART_HandleTypeDef* huart) { 8003b70: b580 push {r7, lr} 8003b72: b0c2 sub sp, #264 @ 0x108 8003b74: af00 add r7, sp, #0 8003b76: f507 7384 add.w r3, r7, #264 @ 0x108 8003b7a: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003b7e: 6018 str r0, [r3, #0] GPIO_InitTypeDef GPIO_InitStruct = {0}; 8003b80: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003b84: 2200 movs r2, #0 8003b86: 601a str r2, [r3, #0] 8003b88: 605a str r2, [r3, #4] 8003b8a: 609a str r2, [r3, #8] 8003b8c: 60da str r2, [r3, #12] 8003b8e: 611a str r2, [r3, #16] RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; 8003b90: f107 0330 add.w r3, r7, #48 @ 0x30 8003b94: 22c0 movs r2, #192 @ 0xc0 8003b96: 2100 movs r1, #0 8003b98: 4618 mov r0, r3 8003b9a: f027 f811 bl 802abc0 if(huart->Instance==UART8) 8003b9e: f507 7384 add.w r3, r7, #264 @ 0x108 8003ba2: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003ba6: 681b ldr r3, [r3, #0] 8003ba8: 681b ldr r3, [r3, #0] 8003baa: 4ab8 ldr r2, [pc, #736] @ (8003e8c ) 8003bac: 4293 cmp r3, r2 8003bae: f040 80bc bne.w 8003d2a /* USER CODE END UART8_MspInit 0 */ /** Initializes the peripherals clock */ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_UART8; 8003bb2: f04f 0202 mov.w r2, #2 8003bb6: f04f 0300 mov.w r3, #0 8003bba: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 8003bbe: 2300 movs r3, #0 8003bc0: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003bc4: f107 0330 add.w r3, r7, #48 @ 0x30 8003bc8: 4618 mov r0, r3 8003bca: f007 fd19 bl 800b600 8003bce: 4603 mov r3, r0 8003bd0: 2b00 cmp r3, #0 8003bd2: d001 beq.n 8003bd8 { Error_Handler(); 8003bd4: f7fe fdbc bl 8002750 } /* Peripheral clock enable */ __HAL_RCC_UART8_CLK_ENABLE(); 8003bd8: 4bad ldr r3, [pc, #692] @ (8003e90 ) 8003bda: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003bde: 4aac ldr r2, [pc, #688] @ (8003e90 ) 8003be0: f043 4300 orr.w r3, r3, #2147483648 @ 0x80000000 8003be4: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003be8: 4ba9 ldr r3, [pc, #676] @ (8003e90 ) 8003bea: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003bee: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8003bf2: 62fb str r3, [r7, #44] @ 0x2c 8003bf4: 6afb ldr r3, [r7, #44] @ 0x2c __HAL_RCC_GPIOE_CLK_ENABLE(); 8003bf6: 4ba6 ldr r3, [pc, #664] @ (8003e90 ) 8003bf8: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003bfc: 4aa4 ldr r2, [pc, #656] @ (8003e90 ) 8003bfe: f043 0310 orr.w r3, r3, #16 8003c02: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003c06: 4ba2 ldr r3, [pc, #648] @ (8003e90 ) 8003c08: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003c0c: f003 0310 and.w r3, r3, #16 8003c10: 62bb str r3, [r7, #40] @ 0x28 8003c12: 6abb ldr r3, [r7, #40] @ 0x28 /**UART8 GPIO Configuration PE0 ------> UART8_RX PE1 ------> UART8_TX */ GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1; 8003c14: 2303 movs r3, #3 8003c16: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003c1a: 2302 movs r3, #2 8003c1c: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003c20: 2300 movs r3, #0 8003c22: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 8003c26: 2300 movs r3, #0 8003c28: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF8_UART8; 8003c2c: 2308 movs r3, #8 8003c2e: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct); 8003c32: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003c36: 4619 mov r1, r3 8003c38: 4896 ldr r0, [pc, #600] @ (8003e94 ) 8003c3a: f006 f92f bl 8009e9c /* UART8 DMA Init */ /* UART8_RX Init */ hdma_uart8_rx.Instance = DMA2_Stream7; 8003c3e: 4b96 ldr r3, [pc, #600] @ (8003e98 ) 8003c40: 4a96 ldr r2, [pc, #600] @ (8003e9c ) 8003c42: 601a str r2, [r3, #0] hdma_uart8_rx.Init.Request = DMA_REQUEST_UART8_RX; 8003c44: 4b94 ldr r3, [pc, #592] @ (8003e98 ) 8003c46: 2251 movs r2, #81 @ 0x51 8003c48: 605a str r2, [r3, #4] hdma_uart8_rx.Init.Direction = DMA_PERIPH_TO_MEMORY; 8003c4a: 4b93 ldr r3, [pc, #588] @ (8003e98 ) 8003c4c: 2200 movs r2, #0 8003c4e: 609a str r2, [r3, #8] hdma_uart8_rx.Init.PeriphInc = DMA_PINC_DISABLE; 8003c50: 4b91 ldr r3, [pc, #580] @ (8003e98 ) 8003c52: 2200 movs r2, #0 8003c54: 60da str r2, [r3, #12] hdma_uart8_rx.Init.MemInc = DMA_MINC_ENABLE; 8003c56: 4b90 ldr r3, [pc, #576] @ (8003e98 ) 8003c58: f44f 6280 mov.w r2, #1024 @ 0x400 8003c5c: 611a str r2, [r3, #16] hdma_uart8_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; 8003c5e: 4b8e ldr r3, [pc, #568] @ (8003e98 ) 8003c60: 2200 movs r2, #0 8003c62: 615a str r2, [r3, #20] hdma_uart8_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; 8003c64: 4b8c ldr r3, [pc, #560] @ (8003e98 ) 8003c66: 2200 movs r2, #0 8003c68: 619a str r2, [r3, #24] hdma_uart8_rx.Init.Mode = DMA_NORMAL; 8003c6a: 4b8b ldr r3, [pc, #556] @ (8003e98 ) 8003c6c: 2200 movs r2, #0 8003c6e: 61da str r2, [r3, #28] hdma_uart8_rx.Init.Priority = DMA_PRIORITY_VERY_HIGH; 8003c70: 4b89 ldr r3, [pc, #548] @ (8003e98 ) 8003c72: f44f 3240 mov.w r2, #196608 @ 0x30000 8003c76: 621a str r2, [r3, #32] hdma_uart8_rx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; 8003c78: 4b87 ldr r3, [pc, #540] @ (8003e98 ) 8003c7a: 2200 movs r2, #0 8003c7c: 625a str r2, [r3, #36] @ 0x24 if (HAL_DMA_Init(&hdma_uart8_rx) != HAL_OK) 8003c7e: 4886 ldr r0, [pc, #536] @ (8003e98 ) 8003c80: f002 f98a bl 8005f98 8003c84: 4603 mov r3, r0 8003c86: 2b00 cmp r3, #0 8003c88: d001 beq.n 8003c8e { Error_Handler(); 8003c8a: f7fe fd61 bl 8002750 } __HAL_LINKDMA(huart,hdmarx,hdma_uart8_rx); 8003c8e: f507 7384 add.w r3, r7, #264 @ 0x108 8003c92: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003c96: 681b ldr r3, [r3, #0] 8003c98: 4a7f ldr r2, [pc, #508] @ (8003e98 ) 8003c9a: f8c3 2080 str.w r2, [r3, #128] @ 0x80 8003c9e: 4a7e ldr r2, [pc, #504] @ (8003e98 ) 8003ca0: f507 7384 add.w r3, r7, #264 @ 0x108 8003ca4: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003ca8: 681b ldr r3, [r3, #0] 8003caa: 6393 str r3, [r2, #56] @ 0x38 /* UART8_TX Init */ hdma_uart8_tx.Instance = DMA2_Stream6; 8003cac: 4b7c ldr r3, [pc, #496] @ (8003ea0 ) 8003cae: 4a7d ldr r2, [pc, #500] @ (8003ea4 ) 8003cb0: 601a str r2, [r3, #0] hdma_uart8_tx.Init.Request = DMA_REQUEST_UART8_TX; 8003cb2: 4b7b ldr r3, [pc, #492] @ (8003ea0 ) 8003cb4: 2252 movs r2, #82 @ 0x52 8003cb6: 605a str r2, [r3, #4] hdma_uart8_tx.Init.Direction = DMA_MEMORY_TO_PERIPH; 8003cb8: 4b79 ldr r3, [pc, #484] @ (8003ea0 ) 8003cba: 2240 movs r2, #64 @ 0x40 8003cbc: 609a str r2, [r3, #8] hdma_uart8_tx.Init.PeriphInc = DMA_PINC_DISABLE; 8003cbe: 4b78 ldr r3, [pc, #480] @ (8003ea0 ) 8003cc0: 2200 movs r2, #0 8003cc2: 60da str r2, [r3, #12] hdma_uart8_tx.Init.MemInc = DMA_MINC_ENABLE; 8003cc4: 4b76 ldr r3, [pc, #472] @ (8003ea0 ) 8003cc6: f44f 6280 mov.w r2, #1024 @ 0x400 8003cca: 611a str r2, [r3, #16] hdma_uart8_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; 8003ccc: 4b74 ldr r3, [pc, #464] @ (8003ea0 ) 8003cce: 2200 movs r2, #0 8003cd0: 615a str r2, [r3, #20] hdma_uart8_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; 8003cd2: 4b73 ldr r3, [pc, #460] @ (8003ea0 ) 8003cd4: 2200 movs r2, #0 8003cd6: 619a str r2, [r3, #24] hdma_uart8_tx.Init.Mode = DMA_NORMAL; 8003cd8: 4b71 ldr r3, [pc, #452] @ (8003ea0 ) 8003cda: 2200 movs r2, #0 8003cdc: 61da str r2, [r3, #28] hdma_uart8_tx.Init.Priority = DMA_PRIORITY_VERY_HIGH; 8003cde: 4b70 ldr r3, [pc, #448] @ (8003ea0 ) 8003ce0: f44f 3240 mov.w r2, #196608 @ 0x30000 8003ce4: 621a str r2, [r3, #32] hdma_uart8_tx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; 8003ce6: 4b6e ldr r3, [pc, #440] @ (8003ea0 ) 8003ce8: 2200 movs r2, #0 8003cea: 625a str r2, [r3, #36] @ 0x24 if (HAL_DMA_Init(&hdma_uart8_tx) != HAL_OK) 8003cec: 486c ldr r0, [pc, #432] @ (8003ea0 ) 8003cee: f002 f953 bl 8005f98 8003cf2: 4603 mov r3, r0 8003cf4: 2b00 cmp r3, #0 8003cf6: d001 beq.n 8003cfc { Error_Handler(); 8003cf8: f7fe fd2a bl 8002750 } __HAL_LINKDMA(huart,hdmatx,hdma_uart8_tx); 8003cfc: f507 7384 add.w r3, r7, #264 @ 0x108 8003d00: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003d04: 681b ldr r3, [r3, #0] 8003d06: 4a66 ldr r2, [pc, #408] @ (8003ea0 ) 8003d08: 67da str r2, [r3, #124] @ 0x7c 8003d0a: 4a65 ldr r2, [pc, #404] @ (8003ea0 ) 8003d0c: f507 7384 add.w r3, r7, #264 @ 0x108 8003d10: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003d14: 681b ldr r3, [r3, #0] 8003d16: 6393 str r3, [r2, #56] @ 0x38 /* UART8 interrupt Init */ HAL_NVIC_SetPriority(UART8_IRQn, 5, 0); 8003d18: 2200 movs r2, #0 8003d1a: 2105 movs r1, #5 8003d1c: 2053 movs r0, #83 @ 0x53 8003d1e: f001 fe95 bl 8005a4c HAL_NVIC_EnableIRQ(UART8_IRQn); 8003d22: 2053 movs r0, #83 @ 0x53 8003d24: f001 feac bl 8005a80 /* USER CODE BEGIN USART6_MspInit 1 */ /* USER CODE END USART6_MspInit 1 */ } } 8003d28: e17e b.n 8004028 else if(huart->Instance==USART1) 8003d2a: f507 7384 add.w r3, r7, #264 @ 0x108 8003d2e: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003d32: 681b ldr r3, [r3, #0] 8003d34: 681b ldr r3, [r3, #0] 8003d36: 4a5c ldr r2, [pc, #368] @ (8003ea8 ) 8003d38: 4293 cmp r3, r2 8003d3a: d14f bne.n 8003ddc PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART1; 8003d3c: f04f 0201 mov.w r2, #1 8003d40: f04f 0300 mov.w r3, #0 8003d44: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2; 8003d48: 2300 movs r3, #0 8003d4a: f8c7 30ac str.w r3, [r7, #172] @ 0xac if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003d4e: f107 0330 add.w r3, r7, #48 @ 0x30 8003d52: 4618 mov r0, r3 8003d54: f007 fc54 bl 800b600 8003d58: 4603 mov r3, r0 8003d5a: 2b00 cmp r3, #0 8003d5c: d001 beq.n 8003d62 Error_Handler(); 8003d5e: f7fe fcf7 bl 8002750 __HAL_RCC_USART1_CLK_ENABLE(); 8003d62: 4b4b ldr r3, [pc, #300] @ (8003e90 ) 8003d64: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003d68: 4a49 ldr r2, [pc, #292] @ (8003e90 ) 8003d6a: f043 0310 orr.w r3, r3, #16 8003d6e: f8c2 30f0 str.w r3, [r2, #240] @ 0xf0 8003d72: 4b47 ldr r3, [pc, #284] @ (8003e90 ) 8003d74: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003d78: f003 0310 and.w r3, r3, #16 8003d7c: 627b str r3, [r7, #36] @ 0x24 8003d7e: 6a7b ldr r3, [r7, #36] @ 0x24 __HAL_RCC_GPIOB_CLK_ENABLE(); 8003d80: 4b43 ldr r3, [pc, #268] @ (8003e90 ) 8003d82: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003d86: 4a42 ldr r2, [pc, #264] @ (8003e90 ) 8003d88: f043 0302 orr.w r3, r3, #2 8003d8c: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003d90: 4b3f ldr r3, [pc, #252] @ (8003e90 ) 8003d92: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003d96: f003 0302 and.w r3, r3, #2 8003d9a: 623b str r3, [r7, #32] 8003d9c: 6a3b ldr r3, [r7, #32] GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15; 8003d9e: f44f 4340 mov.w r3, #49152 @ 0xc000 8003da2: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003da6: 2302 movs r3, #2 8003da8: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003dac: 2300 movs r3, #0 8003dae: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003db2: 2302 movs r3, #2 8003db4: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF4_USART1; 8003db8: 2304 movs r3, #4 8003dba: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8003dbe: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003dc2: 4619 mov r1, r3 8003dc4: 4839 ldr r0, [pc, #228] @ (8003eac ) 8003dc6: f006 f869 bl 8009e9c HAL_NVIC_SetPriority(USART1_IRQn, 5, 0); 8003dca: 2200 movs r2, #0 8003dcc: 2105 movs r1, #5 8003dce: 2025 movs r0, #37 @ 0x25 8003dd0: f001 fe3c bl 8005a4c HAL_NVIC_EnableIRQ(USART1_IRQn); 8003dd4: 2025 movs r0, #37 @ 0x25 8003dd6: f001 fe53 bl 8005a80 } 8003dda: e125 b.n 8004028 else if(huart->Instance==USART2) 8003ddc: f507 7384 add.w r3, r7, #264 @ 0x108 8003de0: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003de4: 681b ldr r3, [r3, #0] 8003de6: 681b ldr r3, [r3, #0] 8003de8: 4a31 ldr r2, [pc, #196] @ (8003eb0 ) 8003dea: 4293 cmp r3, r2 8003dec: d164 bne.n 8003eb8 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART2; 8003dee: f04f 0202 mov.w r2, #2 8003df2: f04f 0300 mov.w r3, #0 8003df6: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 8003dfa: 2300 movs r3, #0 8003dfc: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003e00: f107 0330 add.w r3, r7, #48 @ 0x30 8003e04: 4618 mov r0, r3 8003e06: f007 fbfb bl 800b600 8003e0a: 4603 mov r3, r0 8003e0c: 2b00 cmp r3, #0 8003e0e: d001 beq.n 8003e14 Error_Handler(); 8003e10: f7fe fc9e bl 8002750 __HAL_RCC_USART2_CLK_ENABLE(); 8003e14: 4b1e ldr r3, [pc, #120] @ (8003e90 ) 8003e16: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003e1a: 4a1d ldr r2, [pc, #116] @ (8003e90 ) 8003e1c: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8003e20: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003e24: 4b1a ldr r3, [pc, #104] @ (8003e90 ) 8003e26: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003e2a: f403 3300 and.w r3, r3, #131072 @ 0x20000 8003e2e: 61fb str r3, [r7, #28] 8003e30: 69fb ldr r3, [r7, #28] __HAL_RCC_GPIOD_CLK_ENABLE(); 8003e32: 4b17 ldr r3, [pc, #92] @ (8003e90 ) 8003e34: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003e38: 4a15 ldr r2, [pc, #84] @ (8003e90 ) 8003e3a: f043 0308 orr.w r3, r3, #8 8003e3e: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003e42: 4b13 ldr r3, [pc, #76] @ (8003e90 ) 8003e44: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003e48: f003 0308 and.w r3, r3, #8 8003e4c: 61bb str r3, [r7, #24] 8003e4e: 69bb ldr r3, [r7, #24] GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6; 8003e50: 2360 movs r3, #96 @ 0x60 8003e52: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003e56: 2302 movs r3, #2 8003e58: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003e5c: 2300 movs r3, #0 8003e5e: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003e62: 2302 movs r3, #2 8003e64: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART2; 8003e68: 2307 movs r3, #7 8003e6a: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 8003e6e: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003e72: 4619 mov r1, r3 8003e74: 480f ldr r0, [pc, #60] @ (8003eb4 ) 8003e76: f006 f811 bl 8009e9c HAL_NVIC_SetPriority(USART2_IRQn, 5, 0); 8003e7a: 2200 movs r2, #0 8003e7c: 2105 movs r1, #5 8003e7e: 2026 movs r0, #38 @ 0x26 8003e80: f001 fde4 bl 8005a4c HAL_NVIC_EnableIRQ(USART2_IRQn); 8003e84: 2026 movs r0, #38 @ 0x26 8003e86: f001 fdfb bl 8005a80 } 8003e8a: e0cd b.n 8004028 8003e8c: 40007c00 .word 0x40007c00 8003e90: 58024400 .word 0x58024400 8003e94: 58021000 .word 0x58021000 8003e98: 24000574 .word 0x24000574 8003e9c: 400204b8 .word 0x400204b8 8003ea0: 240005ec .word 0x240005ec 8003ea4: 400204a0 .word 0x400204a0 8003ea8: 40011000 .word 0x40011000 8003eac: 58020400 .word 0x58020400 8003eb0: 40004400 .word 0x40004400 8003eb4: 58020c00 .word 0x58020c00 else if(huart->Instance==USART3) 8003eb8: f507 7384 add.w r3, r7, #264 @ 0x108 8003ebc: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003ec0: 681b ldr r3, [r3, #0] 8003ec2: 681b ldr r3, [r3, #0] 8003ec4: 4a5b ldr r2, [pc, #364] @ (8004034 ) 8003ec6: 4293 cmp r3, r2 8003ec8: d14f bne.n 8003f6a PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART3; 8003eca: f04f 0202 mov.w r2, #2 8003ece: f04f 0300 mov.w r3, #0 8003ed2: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart234578ClockSelection = RCC_USART234578CLKSOURCE_D2PCLK1; 8003ed6: 2300 movs r3, #0 8003ed8: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003edc: f107 0330 add.w r3, r7, #48 @ 0x30 8003ee0: 4618 mov r0, r3 8003ee2: f007 fb8d bl 800b600 8003ee6: 4603 mov r3, r0 8003ee8: 2b00 cmp r3, #0 8003eea: d001 beq.n 8003ef0 Error_Handler(); 8003eec: f7fe fc30 bl 8002750 __HAL_RCC_USART3_CLK_ENABLE(); 8003ef0: 4b51 ldr r3, [pc, #324] @ (8004038 ) 8003ef2: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003ef6: 4a50 ldr r2, [pc, #320] @ (8004038 ) 8003ef8: f443 2380 orr.w r3, r3, #262144 @ 0x40000 8003efc: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 8003f00: 4b4d ldr r3, [pc, #308] @ (8004038 ) 8003f02: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8003f06: f403 2380 and.w r3, r3, #262144 @ 0x40000 8003f0a: 617b str r3, [r7, #20] 8003f0c: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOD_CLK_ENABLE(); 8003f0e: 4b4a ldr r3, [pc, #296] @ (8004038 ) 8003f10: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003f14: 4a48 ldr r2, [pc, #288] @ (8004038 ) 8003f16: f043 0308 orr.w r3, r3, #8 8003f1a: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003f1e: 4b46 ldr r3, [pc, #280] @ (8004038 ) 8003f20: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003f24: f003 0308 and.w r3, r3, #8 8003f28: 613b str r3, [r7, #16] 8003f2a: 693b ldr r3, [r7, #16] GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; 8003f2c: f44f 7340 mov.w r3, #768 @ 0x300 8003f30: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003f34: 2302 movs r3, #2 8003f36: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003f3a: 2300 movs r3, #0 8003f3c: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8003f40: 2302 movs r3, #2 8003f42: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART3; 8003f46: 2307 movs r3, #7 8003f48: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 8003f4c: f107 03f4 add.w r3, r7, #244 @ 0xf4 8003f50: 4619 mov r1, r3 8003f52: 483a ldr r0, [pc, #232] @ (800403c ) 8003f54: f005 ffa2 bl 8009e9c HAL_NVIC_SetPriority(USART3_IRQn, 5, 0); 8003f58: 2200 movs r2, #0 8003f5a: 2105 movs r1, #5 8003f5c: 2027 movs r0, #39 @ 0x27 8003f5e: f001 fd75 bl 8005a4c HAL_NVIC_EnableIRQ(USART3_IRQn); 8003f62: 2027 movs r0, #39 @ 0x27 8003f64: f001 fd8c bl 8005a80 } 8003f68: e05e b.n 8004028 else if(huart->Instance==USART6) 8003f6a: f507 7384 add.w r3, r7, #264 @ 0x108 8003f6e: f5a3 7382 sub.w r3, r3, #260 @ 0x104 8003f72: 681b ldr r3, [r3, #0] 8003f74: 681b ldr r3, [r3, #0] 8003f76: 4a32 ldr r2, [pc, #200] @ (8004040 ) 8003f78: 4293 cmp r3, r2 8003f7a: d155 bne.n 8004028 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART6; 8003f7c: f04f 0201 mov.w r2, #1 8003f80: f04f 0300 mov.w r3, #0 8003f84: e9c7 230c strd r2, r3, [r7, #48] @ 0x30 PeriphClkInitStruct.Usart16ClockSelection = RCC_USART16CLKSOURCE_D2PCLK2; 8003f88: 2300 movs r3, #0 8003f8a: f8c7 30ac str.w r3, [r7, #172] @ 0xac if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 8003f8e: f107 0330 add.w r3, r7, #48 @ 0x30 8003f92: 4618 mov r0, r3 8003f94: f007 fb34 bl 800b600 8003f98: 4603 mov r3, r0 8003f9a: 2b00 cmp r3, #0 8003f9c: d001 beq.n 8003fa2 Error_Handler(); 8003f9e: f7fe fbd7 bl 8002750 __HAL_RCC_USART6_CLK_ENABLE(); 8003fa2: 4b25 ldr r3, [pc, #148] @ (8004038 ) 8003fa4: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003fa8: 4a23 ldr r2, [pc, #140] @ (8004038 ) 8003faa: f043 0320 orr.w r3, r3, #32 8003fae: f8c2 30f0 str.w r3, [r2, #240] @ 0xf0 8003fb2: 4b21 ldr r3, [pc, #132] @ (8004038 ) 8003fb4: f8d3 30f0 ldr.w r3, [r3, #240] @ 0xf0 8003fb8: f003 0320 and.w r3, r3, #32 8003fbc: 60fb str r3, [r7, #12] 8003fbe: 68fb ldr r3, [r7, #12] __HAL_RCC_GPIOC_CLK_ENABLE(); 8003fc0: 4b1d ldr r3, [pc, #116] @ (8004038 ) 8003fc2: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003fc6: 4a1c ldr r2, [pc, #112] @ (8004038 ) 8003fc8: f043 0304 orr.w r3, r3, #4 8003fcc: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8003fd0: 4b19 ldr r3, [pc, #100] @ (8004038 ) 8003fd2: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8003fd6: f003 0204 and.w r2, r3, #4 8003fda: f507 7384 add.w r3, r7, #264 @ 0x108 8003fde: f5a3 7380 sub.w r3, r3, #256 @ 0x100 8003fe2: 601a str r2, [r3, #0] 8003fe4: f507 7384 add.w r3, r7, #264 @ 0x108 8003fe8: f5a3 7380 sub.w r3, r3, #256 @ 0x100 8003fec: 681b ldr r3, [r3, #0] GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; 8003fee: 23c0 movs r3, #192 @ 0xc0 8003ff0: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8003ff4: 2302 movs r3, #2 8003ff6: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 GPIO_InitStruct.Pull = GPIO_NOPULL; 8003ffa: 2300 movs r3, #0 8003ffc: f8c7 30fc str.w r3, [r7, #252] @ 0xfc GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; 8004000: 2302 movs r3, #2 8004002: f8c7 3100 str.w r3, [r7, #256] @ 0x100 GPIO_InitStruct.Alternate = GPIO_AF7_USART6; 8004006: 2307 movs r3, #7 8004008: f8c7 3104 str.w r3, [r7, #260] @ 0x104 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 800400c: f107 03f4 add.w r3, r7, #244 @ 0xf4 8004010: 4619 mov r1, r3 8004012: 480c ldr r0, [pc, #48] @ (8004044 ) 8004014: f005 ff42 bl 8009e9c HAL_NVIC_SetPriority(USART6_IRQn, 5, 0); 8004018: 2200 movs r2, #0 800401a: 2105 movs r1, #5 800401c: 2047 movs r0, #71 @ 0x47 800401e: f001 fd15 bl 8005a4c HAL_NVIC_EnableIRQ(USART6_IRQn); 8004022: 2047 movs r0, #71 @ 0x47 8004024: f001 fd2c bl 8005a80 } 8004028: bf00 nop 800402a: f507 7784 add.w r7, r7, #264 @ 0x108 800402e: 46bd mov sp, r7 8004030: bd80 pop {r7, pc} 8004032: bf00 nop 8004034: 40004800 .word 0x40004800 8004038: 58024400 .word 0x58024400 800403c: 58020c00 .word 0x58020c00 8004040: 40011400 .word 0x40011400 8004044: 58020800 .word 0x58020800 08004048 : * 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) { 8004048: b580 push {r7, lr} 800404a: b090 sub sp, #64 @ 0x40 800404c: af00 add r7, sp, #0 800404e: 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)) 8004050: 687b ldr r3, [r7, #4] 8004052: 2b0f cmp r3, #15 8004054: d827 bhi.n 80040a6 { HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U); 8004056: 2200 movs r2, #0 8004058: 6879 ldr r1, [r7, #4] 800405a: 2036 movs r0, #54 @ 0x36 800405c: f001 fcf6 bl 8005a4c /* Enable the TIM6 global Interrupt */ HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); 8004060: 2036 movs r0, #54 @ 0x36 8004062: f001 fd0d bl 8005a80 uwTickPrio = TickPriority; 8004066: 4a29 ldr r2, [pc, #164] @ (800410c ) 8004068: 687b ldr r3, [r7, #4] 800406a: 6013 str r3, [r2, #0] { return HAL_ERROR; } /* Enable TIM6 clock */ __HAL_RCC_TIM6_CLK_ENABLE(); 800406c: 4b28 ldr r3, [pc, #160] @ (8004110 ) 800406e: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8004072: 4a27 ldr r2, [pc, #156] @ (8004110 ) 8004074: f043 0310 orr.w r3, r3, #16 8004078: f8c2 30e8 str.w r3, [r2, #232] @ 0xe8 800407c: 4b24 ldr r3, [pc, #144] @ (8004110 ) 800407e: f8d3 30e8 ldr.w r3, [r3, #232] @ 0xe8 8004082: f003 0310 and.w r3, r3, #16 8004086: 60fb str r3, [r7, #12] 8004088: 68fb ldr r3, [r7, #12] /* Get clock configuration */ HAL_RCC_GetClockConfig(&clkconfig, &pFLatency); 800408a: f107 0210 add.w r2, r7, #16 800408e: f107 0314 add.w r3, r7, #20 8004092: 4611 mov r1, r2 8004094: 4618 mov r0, r3 8004096: f007 fa71 bl 800b57c /* Get APB1 prescaler */ uwAPB1Prescaler = clkconfig.APB1CLKDivider; 800409a: 6abb ldr r3, [r7, #40] @ 0x28 800409c: 63bb str r3, [r7, #56] @ 0x38 /* Compute TIM6 clock */ if (uwAPB1Prescaler == RCC_HCLK_DIV1) 800409e: 6bbb ldr r3, [r7, #56] @ 0x38 80040a0: 2b00 cmp r3, #0 80040a2: d106 bne.n 80040b2 80040a4: e001 b.n 80040aa return HAL_ERROR; 80040a6: 2301 movs r3, #1 80040a8: e02b b.n 8004102 { uwTimclock = HAL_RCC_GetPCLK1Freq(); 80040aa: f007 fa3b bl 800b524 80040ae: 63f8 str r0, [r7, #60] @ 0x3c 80040b0: e004 b.n 80040bc } else { uwTimclock = 2UL * HAL_RCC_GetPCLK1Freq(); 80040b2: f007 fa37 bl 800b524 80040b6: 4603 mov r3, r0 80040b8: 005b lsls r3, r3, #1 80040ba: 63fb str r3, [r7, #60] @ 0x3c } /* Compute the prescaler value to have TIM6 counter clock equal to 1MHz */ uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U); 80040bc: 6bfb ldr r3, [r7, #60] @ 0x3c 80040be: 4a15 ldr r2, [pc, #84] @ (8004114 ) 80040c0: fba2 2303 umull r2, r3, r2, r3 80040c4: 0c9b lsrs r3, r3, #18 80040c6: 3b01 subs r3, #1 80040c8: 637b str r3, [r7, #52] @ 0x34 /* Initialize TIM6 */ htim6.Instance = TIM6; 80040ca: 4b13 ldr r3, [pc, #76] @ (8004118 ) 80040cc: 4a13 ldr r2, [pc, #76] @ (800411c ) 80040ce: 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; 80040d0: 4b11 ldr r3, [pc, #68] @ (8004118 ) 80040d2: f240 32e7 movw r2, #999 @ 0x3e7 80040d6: 60da str r2, [r3, #12] htim6.Init.Prescaler = uwPrescalerValue; 80040d8: 4a0f ldr r2, [pc, #60] @ (8004118 ) 80040da: 6b7b ldr r3, [r7, #52] @ 0x34 80040dc: 6053 str r3, [r2, #4] htim6.Init.ClockDivision = 0; 80040de: 4b0e ldr r3, [pc, #56] @ (8004118 ) 80040e0: 2200 movs r2, #0 80040e2: 611a str r2, [r3, #16] htim6.Init.CounterMode = TIM_COUNTERMODE_UP; 80040e4: 4b0c ldr r3, [pc, #48] @ (8004118 ) 80040e6: 2200 movs r2, #0 80040e8: 609a str r2, [r3, #8] if(HAL_TIM_Base_Init(&htim6) == HAL_OK) 80040ea: 480b ldr r0, [pc, #44] @ (8004118 ) 80040ec: f009 f950 bl 800d390 80040f0: 4603 mov r3, r0 80040f2: 2b00 cmp r3, #0 80040f4: d104 bne.n 8004100 { /* Start the TIM time Base generation in interrupt mode */ return HAL_TIM_Base_Start_IT(&htim6); 80040f6: 4808 ldr r0, [pc, #32] @ (8004118 ) 80040f8: f009 f9ac bl 800d454 80040fc: 4603 mov r3, r0 80040fe: e000 b.n 8004102 } /* Return function status */ return HAL_ERROR; 8004100: 2301 movs r3, #1 } 8004102: 4618 mov r0, r3 8004104: 3740 adds r7, #64 @ 0x40 8004106: 46bd mov sp, r7 8004108: bd80 pop {r7, pc} 800410a: bf00 nop 800410c: 2400002c .word 0x2400002c 8004110: 58024400 .word 0x58024400 8004114: 431bde83 .word 0x431bde83 8004118: 24000fac .word 0x24000fac 800411c: 40001000 .word 0x40001000 08004120 : /******************************************************************************/ /** * @brief This function handles Non maskable interrupt. */ void NMI_Handler(void) { 8004120: b480 push {r7} 8004122: 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) 8004124: bf00 nop 8004126: e7fd b.n 8004124 08004128 : /** * @brief This function handles Hard fault interrupt. */ void HardFault_Handler(void) { 8004128: b480 push {r7} 800412a: af00 add r7, sp, #0 /* USER CODE BEGIN HardFault_IRQn 0 */ /* USER CODE END HardFault_IRQn 0 */ while (1) 800412c: bf00 nop 800412e: e7fd b.n 800412c 08004130 : /** * @brief This function handles Memory management fault. */ void MemManage_Handler(void) { 8004130: b480 push {r7} 8004132: af00 add r7, sp, #0 /* USER CODE BEGIN MemoryManagement_IRQn 0 */ /* USER CODE END MemoryManagement_IRQn 0 */ while (1) 8004134: bf00 nop 8004136: e7fd b.n 8004134 08004138 : /** * @brief This function handles Pre-fetch fault, memory access fault. */ void BusFault_Handler(void) { 8004138: b480 push {r7} 800413a: af00 add r7, sp, #0 /* USER CODE BEGIN BusFault_IRQn 0 */ /* USER CODE END BusFault_IRQn 0 */ while (1) 800413c: bf00 nop 800413e: e7fd b.n 800413c 08004140 : /** * @brief This function handles Undefined instruction or illegal state. */ void UsageFault_Handler(void) { 8004140: b480 push {r7} 8004142: af00 add r7, sp, #0 /* USER CODE BEGIN UsageFault_IRQn 0 */ /* USER CODE END UsageFault_IRQn 0 */ while (1) 8004144: bf00 nop 8004146: e7fd b.n 8004144 08004148 : /** * @brief This function handles Debug monitor. */ void DebugMon_Handler(void) { 8004148: b480 push {r7} 800414a: af00 add r7, sp, #0 /* USER CODE END DebugMonitor_IRQn 0 */ /* USER CODE BEGIN DebugMonitor_IRQn 1 */ /* USER CODE END DebugMonitor_IRQn 1 */ } 800414c: bf00 nop 800414e: 46bd mov sp, r7 8004150: f85d 7b04 ldr.w r7, [sp], #4 8004154: 4770 bx lr 08004156 : /** * @brief This function handles RCC global interrupt. */ void RCC_IRQHandler(void) { 8004156: b480 push {r7} 8004158: af00 add r7, sp, #0 /* USER CODE END RCC_IRQn 0 */ /* USER CODE BEGIN RCC_IRQn 1 */ /* USER CODE END RCC_IRQn 1 */ } 800415a: bf00 nop 800415c: 46bd mov sp, r7 800415e: f85d 7b04 ldr.w r7, [sp], #4 8004162: 4770 bx lr 08004164 : /** * @brief This function handles USART1 global interrupt. */ void USART1_IRQHandler(void) { 8004164: b580 push {r7, lr} 8004166: af00 add r7, sp, #0 /* USER CODE BEGIN USART1_IRQn 0 */ /* USER CODE END USART1_IRQn 0 */ HAL_UART_IRQHandler(&huart1); 8004168: 4802 ldr r0, [pc, #8] @ (8004174 ) 800416a: f009 fcc3 bl 800daf4 /* USER CODE BEGIN USART1_IRQn 1 */ /* USER CODE END USART1_IRQn 1 */ } 800416e: bf00 nop 8004170: bd80 pop {r7, pc} 8004172: bf00 nop 8004174: 24000324 .word 0x24000324 08004178 : /** * @brief This function handles USART2 global interrupt. */ void USART2_IRQHandler(void) { 8004178: b580 push {r7, lr} 800417a: af00 add r7, sp, #0 /* USER CODE BEGIN USART2_IRQn 0 */ /* USER CODE END USART2_IRQn 0 */ HAL_UART_IRQHandler(&huart2); 800417c: 4802 ldr r0, [pc, #8] @ (8004188 ) 800417e: f009 fcb9 bl 800daf4 /* USER CODE BEGIN USART2_IRQn 1 */ /* USER CODE END USART2_IRQn 1 */ } 8004182: bf00 nop 8004184: bd80 pop {r7, pc} 8004186: bf00 nop 8004188: 240003b8 .word 0x240003b8 0800418c : /** * @brief This function handles USART3 global interrupt. */ void USART3_IRQHandler(void) { 800418c: b580 push {r7, lr} 800418e: af00 add r7, sp, #0 /* USER CODE BEGIN USART3_IRQn 0 */ /* USER CODE END USART3_IRQn 0 */ HAL_UART_IRQHandler(&huart3); 8004190: 4802 ldr r0, [pc, #8] @ (800419c ) 8004192: f009 fcaf bl 800daf4 /* USER CODE BEGIN USART3_IRQn 1 */ /* USER CODE END USART3_IRQn 1 */ } 8004196: bf00 nop 8004198: bd80 pop {r7, pc} 800419a: bf00 nop 800419c: 2400044c .word 0x2400044c 080041a0 : /** * @brief This function handles TIM6 global interrupt, DAC1_CH1 and DAC1_CH2 underrun error interrupts. */ void TIM6_DAC_IRQHandler(void) { 80041a0: b580 push {r7, lr} 80041a2: af00 add r7, sp, #0 /* USER CODE BEGIN TIM6_DAC_IRQn 0 */ /* USER CODE END TIM6_DAC_IRQn 0 */ HAL_TIM_IRQHandler(&htim6); 80041a4: 4802 ldr r0, [pc, #8] @ (80041b0 ) 80041a6: f009 f9cd bl 800d544 /* USER CODE BEGIN TIM6_DAC_IRQn 1 */ /* USER CODE END TIM6_DAC_IRQn 1 */ } 80041aa: bf00 nop 80041ac: bd80 pop {r7, pc} 80041ae: bf00 nop 80041b0: 24000fac .word 0x24000fac 080041b4 : /** * @brief This function handles Ethernet global interrupt. */ void ETH_IRQHandler(void) { 80041b4: b580 push {r7, lr} 80041b6: af00 add r7, sp, #0 /* USER CODE BEGIN ETH_IRQn 0 */ /* USER CODE END ETH_IRQn 0 */ HAL_ETH_IRQHandler(&heth); 80041b8: 4802 ldr r0, [pc, #8] @ (80041c4 ) 80041ba: f004 fce7 bl 8008b8c /* USER CODE BEGIN ETH_IRQn 1 */ /* USER CODE END ETH_IRQn 1 */ } 80041be: bf00 nop 80041c0: bd80 pop {r7, pc} 80041c2: bf00 nop 80041c4: 240022dc .word 0x240022dc 080041c8 : /** * @brief This function handles DMA2 stream6 global interrupt. */ void DMA2_Stream6_IRQHandler(void) { 80041c8: b580 push {r7, lr} 80041ca: 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); 80041cc: 4802 ldr r0, [pc, #8] @ (80041d8 ) 80041ce: f002 ffa3 bl 8007118 /* USER CODE BEGIN DMA2_Stream6_IRQn 1 */ /* USER CODE END DMA2_Stream6_IRQn 1 */ } 80041d2: bf00 nop 80041d4: bd80 pop {r7, pc} 80041d6: bf00 nop 80041d8: 240005ec .word 0x240005ec 080041dc : /** * @brief This function handles DMA2 stream7 global interrupt. */ void DMA2_Stream7_IRQHandler(void) { 80041dc: b580 push {r7, lr} 80041de: 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); 80041e0: 4802 ldr r0, [pc, #8] @ (80041ec ) 80041e2: f002 ff99 bl 8007118 /* USER CODE BEGIN DMA2_Stream7_IRQn 1 */ /* USER CODE END DMA2_Stream7_IRQn 1 */ } 80041e6: bf00 nop 80041e8: bd80 pop {r7, pc} 80041ea: bf00 nop 80041ec: 24000574 .word 0x24000574 080041f0 : /** * @brief This function handles USART6 global interrupt. */ void USART6_IRQHandler(void) { 80041f0: b580 push {r7, lr} 80041f2: af00 add r7, sp, #0 /* USER CODE BEGIN USART6_IRQn 0 */ /* USER CODE END USART6_IRQn 0 */ HAL_UART_IRQHandler(&huart6); 80041f4: 4802 ldr r0, [pc, #8] @ (8004200 ) 80041f6: f009 fc7d bl 800daf4 /* USER CODE BEGIN USART6_IRQn 1 */ /* USER CODE END USART6_IRQn 1 */ } 80041fa: bf00 nop 80041fc: bd80 pop {r7, pc} 80041fe: bf00 nop 8004200: 240004e0 .word 0x240004e0 08004204 : /** * @brief This function handles UART8 global interrupt. */ void UART8_IRQHandler(void) { 8004204: b580 push {r7, lr} 8004206: af00 add r7, sp, #0 /* USER CODE BEGIN UART8_IRQn 0 */ /* USER CODE END UART8_IRQn 0 */ HAL_UART_IRQHandler(&huart8); 8004208: 4802 ldr r0, [pc, #8] @ (8004214 ) 800420a: f009 fc73 bl 800daf4 /* USER CODE BEGIN UART8_IRQn 1 */ /* USER CODE END UART8_IRQn 1 */ } 800420e: bf00 nop 8004210: bd80 pop {r7, pc} 8004212: bf00 nop 8004214: 24000290 .word 0x24000290 08004218 <_getpid>: void initialise_monitor_handles() { } int _getpid(void) { 8004218: b480 push {r7} 800421a: af00 add r7, sp, #0 return 1; 800421c: 2301 movs r3, #1 } 800421e: 4618 mov r0, r3 8004220: 46bd mov sp, r7 8004222: f85d 7b04 ldr.w r7, [sp], #4 8004226: 4770 bx lr 08004228 <_kill>: int _kill(int pid, int sig) { 8004228: b480 push {r7} 800422a: b083 sub sp, #12 800422c: af00 add r7, sp, #0 800422e: 6078 str r0, [r7, #4] 8004230: 6039 str r1, [r7, #0] (void)pid; (void)sig; errno = EINVAL; 8004232: 4b05 ldr r3, [pc, #20] @ (8004248 <_kill+0x20>) 8004234: 2216 movs r2, #22 8004236: 601a str r2, [r3, #0] return -1; 8004238: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 800423c: 4618 mov r0, r3 800423e: 370c adds r7, #12 8004240: 46bd mov sp, r7 8004242: f85d 7b04 ldr.w r7, [sp], #4 8004246: 4770 bx lr 8004248: 2402b270 .word 0x2402b270 0800424c <_exit>: void _exit (int status) { 800424c: b580 push {r7, lr} 800424e: b082 sub sp, #8 8004250: af00 add r7, sp, #0 8004252: 6078 str r0, [r7, #4] _kill(status, -1); 8004254: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004258: 6878 ldr r0, [r7, #4] 800425a: f7ff ffe5 bl 8004228 <_kill> while (1) {} /* Make sure we hang here */ 800425e: bf00 nop 8004260: e7fd b.n 800425e <_exit+0x12> 08004262 <_read>: } __attribute__((weak)) int _read(int file, char *ptr, int len) { 8004262: b580 push {r7, lr} 8004264: b086 sub sp, #24 8004266: af00 add r7, sp, #0 8004268: 60f8 str r0, [r7, #12] 800426a: 60b9 str r1, [r7, #8] 800426c: 607a str r2, [r7, #4] (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 800426e: 2300 movs r3, #0 8004270: 617b str r3, [r7, #20] 8004272: e00a b.n 800428a <_read+0x28> { *ptr++ = __io_getchar(); 8004274: f3af 8000 nop.w 8004278: 4601 mov r1, r0 800427a: 68bb ldr r3, [r7, #8] 800427c: 1c5a adds r2, r3, #1 800427e: 60ba str r2, [r7, #8] 8004280: b2ca uxtb r2, r1 8004282: 701a strb r2, [r3, #0] for (DataIdx = 0; DataIdx < len; DataIdx++) 8004284: 697b ldr r3, [r7, #20] 8004286: 3301 adds r3, #1 8004288: 617b str r3, [r7, #20] 800428a: 697a ldr r2, [r7, #20] 800428c: 687b ldr r3, [r7, #4] 800428e: 429a cmp r2, r3 8004290: dbf0 blt.n 8004274 <_read+0x12> } return len; 8004292: 687b ldr r3, [r7, #4] } 8004294: 4618 mov r0, r3 8004296: 3718 adds r7, #24 8004298: 46bd mov sp, r7 800429a: bd80 pop {r7, pc} 0800429c <_write>: __attribute__((weak)) int _write(int file, char *ptr, int len) { 800429c: b580 push {r7, lr} 800429e: b086 sub sp, #24 80042a0: af00 add r7, sp, #0 80042a2: 60f8 str r0, [r7, #12] 80042a4: 60b9 str r1, [r7, #8] 80042a6: 607a str r2, [r7, #4] (void)file; int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++) 80042a8: 2300 movs r3, #0 80042aa: 617b str r3, [r7, #20] 80042ac: e009 b.n 80042c2 <_write+0x26> { __io_putchar(*ptr++); 80042ae: 68bb ldr r3, [r7, #8] 80042b0: 1c5a adds r2, r3, #1 80042b2: 60ba str r2, [r7, #8] 80042b4: 781b ldrb r3, [r3, #0] 80042b6: 4618 mov r0, r3 80042b8: f7fd fd3b bl 8001d32 <__io_putchar> for (DataIdx = 0; DataIdx < len; DataIdx++) 80042bc: 697b ldr r3, [r7, #20] 80042be: 3301 adds r3, #1 80042c0: 617b str r3, [r7, #20] 80042c2: 697a ldr r2, [r7, #20] 80042c4: 687b ldr r3, [r7, #4] 80042c6: 429a cmp r2, r3 80042c8: dbf1 blt.n 80042ae <_write+0x12> // ITM_SendChar(*ptr++); } return len; 80042ca: 687b ldr r3, [r7, #4] } 80042cc: 4618 mov r0, r3 80042ce: 3718 adds r7, #24 80042d0: 46bd mov sp, r7 80042d2: bd80 pop {r7, pc} 080042d4 <_close>: int _close(int file) { 80042d4: b480 push {r7} 80042d6: b083 sub sp, #12 80042d8: af00 add r7, sp, #0 80042da: 6078 str r0, [r7, #4] (void)file; return -1; 80042dc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 80042e0: 4618 mov r0, r3 80042e2: 370c adds r7, #12 80042e4: 46bd mov sp, r7 80042e6: f85d 7b04 ldr.w r7, [sp], #4 80042ea: 4770 bx lr 080042ec <_fstat>: int _fstat(int file, struct stat *st) { 80042ec: b480 push {r7} 80042ee: b083 sub sp, #12 80042f0: af00 add r7, sp, #0 80042f2: 6078 str r0, [r7, #4] 80042f4: 6039 str r1, [r7, #0] (void)file; st->st_mode = S_IFCHR; 80042f6: 683b ldr r3, [r7, #0] 80042f8: f44f 5200 mov.w r2, #8192 @ 0x2000 80042fc: 605a str r2, [r3, #4] return 0; 80042fe: 2300 movs r3, #0 } 8004300: 4618 mov r0, r3 8004302: 370c adds r7, #12 8004304: 46bd mov sp, r7 8004306: f85d 7b04 ldr.w r7, [sp], #4 800430a: 4770 bx lr 0800430c <_isatty>: int _isatty(int file) { 800430c: b480 push {r7} 800430e: b083 sub sp, #12 8004310: af00 add r7, sp, #0 8004312: 6078 str r0, [r7, #4] (void)file; return 1; 8004314: 2301 movs r3, #1 } 8004316: 4618 mov r0, r3 8004318: 370c adds r7, #12 800431a: 46bd mov sp, r7 800431c: f85d 7b04 ldr.w r7, [sp], #4 8004320: 4770 bx lr 08004322 <_lseek>: int _lseek(int file, int ptr, int dir) { 8004322: b480 push {r7} 8004324: b085 sub sp, #20 8004326: af00 add r7, sp, #0 8004328: 60f8 str r0, [r7, #12] 800432a: 60b9 str r1, [r7, #8] 800432c: 607a str r2, [r7, #4] (void)file; (void)ptr; (void)dir; return 0; 800432e: 2300 movs r3, #0 } 8004330: 4618 mov r0, r3 8004332: 3714 adds r7, #20 8004334: 46bd mov sp, r7 8004336: f85d 7b04 ldr.w r7, [sp], #4 800433a: 4770 bx lr 0800433c <_sbrk>: * * @param incr Memory size * @return Pointer to allocated memory */ void *_sbrk(ptrdiff_t incr) { 800433c: b480 push {r7} 800433e: b087 sub sp, #28 8004340: af00 add r7, sp, #0 8004342: 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; 8004344: 4a14 ldr r2, [pc, #80] @ (8004398 <_sbrk+0x5c>) 8004346: 4b15 ldr r3, [pc, #84] @ (800439c <_sbrk+0x60>) 8004348: 1ad3 subs r3, r2, r3 800434a: 617b str r3, [r7, #20] const uint8_t *max_heap = (uint8_t *)stack_limit; 800434c: 697b ldr r3, [r7, #20] 800434e: 613b str r3, [r7, #16] uint8_t *prev_heap_end; /* Initialize heap end at first call */ if (NULL == __sbrk_heap_end) 8004350: 4b13 ldr r3, [pc, #76] @ (80043a0 <_sbrk+0x64>) 8004352: 681b ldr r3, [r3, #0] 8004354: 2b00 cmp r3, #0 8004356: d102 bne.n 800435e <_sbrk+0x22> { __sbrk_heap_end = &_end; 8004358: 4b11 ldr r3, [pc, #68] @ (80043a0 <_sbrk+0x64>) 800435a: 4a12 ldr r2, [pc, #72] @ (80043a4 <_sbrk+0x68>) 800435c: 601a str r2, [r3, #0] } /* Protect heap from growing into the reserved MSP stack */ if (__sbrk_heap_end + incr > max_heap) 800435e: 4b10 ldr r3, [pc, #64] @ (80043a0 <_sbrk+0x64>) 8004360: 681a ldr r2, [r3, #0] 8004362: 687b ldr r3, [r7, #4] 8004364: 4413 add r3, r2 8004366: 693a ldr r2, [r7, #16] 8004368: 429a cmp r2, r3 800436a: d205 bcs.n 8004378 <_sbrk+0x3c> { errno = ENOMEM; 800436c: 4b0e ldr r3, [pc, #56] @ (80043a8 <_sbrk+0x6c>) 800436e: 220c movs r2, #12 8004370: 601a str r2, [r3, #0] return (void *)-1; 8004372: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004376: e009 b.n 800438c <_sbrk+0x50> } prev_heap_end = __sbrk_heap_end; 8004378: 4b09 ldr r3, [pc, #36] @ (80043a0 <_sbrk+0x64>) 800437a: 681b ldr r3, [r3, #0] 800437c: 60fb str r3, [r7, #12] __sbrk_heap_end += incr; 800437e: 4b08 ldr r3, [pc, #32] @ (80043a0 <_sbrk+0x64>) 8004380: 681a ldr r2, [r3, #0] 8004382: 687b ldr r3, [r7, #4] 8004384: 4413 add r3, r2 8004386: 4a06 ldr r2, [pc, #24] @ (80043a0 <_sbrk+0x64>) 8004388: 6013 str r3, [r2, #0] return (void *)prev_heap_end; 800438a: 68fb ldr r3, [r7, #12] } 800438c: 4618 mov r0, r3 800438e: 371c adds r7, #28 8004390: 46bd mov sp, r7 8004392: f85d 7b04 ldr.w r7, [sp], #4 8004396: 4770 bx lr 8004398: 24060000 .word 0x24060000 800439c: 00000400 .word 0x00000400 80043a0: 24000ff8 .word 0x24000ff8 80043a4: 2402b278 .word 0x2402b278 80043a8: 2402b270 .word 0x2402b270 080043ac : * configuration. * @param None * @retval None */ void SystemInit (void) { 80043ac: b480 push {r7} 80043ae: 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 */ 80043b0: 4b37 ldr r3, [pc, #220] @ (8004490 ) 80043b2: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 80043b6: 4a36 ldr r2, [pc, #216] @ (8004490 ) 80043b8: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 80043bc: 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))) 80043c0: 4b34 ldr r3, [pc, #208] @ (8004494 ) 80043c2: 681b ldr r3, [r3, #0] 80043c4: f003 030f and.w r3, r3, #15 80043c8: 2b06 cmp r3, #6 80043ca: d807 bhi.n 80043dc { /* 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)); 80043cc: 4b31 ldr r3, [pc, #196] @ (8004494 ) 80043ce: 681b ldr r3, [r3, #0] 80043d0: f023 030f bic.w r3, r3, #15 80043d4: 4a2f ldr r2, [pc, #188] @ (8004494 ) 80043d6: f043 0307 orr.w r3, r3, #7 80043da: 6013 str r3, [r2, #0] } /* Set HSION bit */ RCC->CR |= RCC_CR_HSION; 80043dc: 4b2e ldr r3, [pc, #184] @ (8004498 ) 80043de: 681b ldr r3, [r3, #0] 80043e0: 4a2d ldr r2, [pc, #180] @ (8004498 ) 80043e2: f043 0301 orr.w r3, r3, #1 80043e6: 6013 str r3, [r2, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 80043e8: 4b2b ldr r3, [pc, #172] @ (8004498 ) 80043ea: 2200 movs r2, #0 80043ec: 611a str r2, [r3, #16] /* Reset HSEON, HSECSSON, CSION, HSI48ON, CSIKERON, PLL1ON, PLL2ON and PLL3ON bits */ RCC->CR &= 0xEAF6ED7FU; 80043ee: 4b2a ldr r3, [pc, #168] @ (8004498 ) 80043f0: 681a ldr r2, [r3, #0] 80043f2: 4929 ldr r1, [pc, #164] @ (8004498 ) 80043f4: 4b29 ldr r3, [pc, #164] @ (800449c ) 80043f6: 4013 ands r3, r2 80043f8: 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))) 80043fa: 4b26 ldr r3, [pc, #152] @ (8004494 ) 80043fc: 681b ldr r3, [r3, #0] 80043fe: f003 0308 and.w r3, r3, #8 8004402: 2b00 cmp r3, #0 8004404: d007 beq.n 8004416 { /* 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)); 8004406: 4b23 ldr r3, [pc, #140] @ (8004494 ) 8004408: 681b ldr r3, [r3, #0] 800440a: f023 030f bic.w r3, r3, #15 800440e: 4a21 ldr r2, [pc, #132] @ (8004494 ) 8004410: f043 0307 orr.w r3, r3, #7 8004414: 6013 str r3, [r2, #0] } #if defined(D3_SRAM_BASE) /* Reset D1CFGR register */ RCC->D1CFGR = 0x00000000; 8004416: 4b20 ldr r3, [pc, #128] @ (8004498 ) 8004418: 2200 movs r2, #0 800441a: 619a str r2, [r3, #24] /* Reset D2CFGR register */ RCC->D2CFGR = 0x00000000; 800441c: 4b1e ldr r3, [pc, #120] @ (8004498 ) 800441e: 2200 movs r2, #0 8004420: 61da str r2, [r3, #28] /* Reset D3CFGR register */ RCC->D3CFGR = 0x00000000; 8004422: 4b1d ldr r3, [pc, #116] @ (8004498 ) 8004424: 2200 movs r2, #0 8004426: 621a str r2, [r3, #32] /* Reset SRDCFGR register */ RCC->SRDCFGR = 0x00000000; #endif /* Reset PLLCKSELR register */ RCC->PLLCKSELR = 0x02020200; 8004428: 4b1b ldr r3, [pc, #108] @ (8004498 ) 800442a: 4a1d ldr r2, [pc, #116] @ (80044a0 ) 800442c: 629a str r2, [r3, #40] @ 0x28 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x01FF0000; 800442e: 4b1a ldr r3, [pc, #104] @ (8004498 ) 8004430: 4a1c ldr r2, [pc, #112] @ (80044a4 ) 8004432: 62da str r2, [r3, #44] @ 0x2c /* Reset PLL1DIVR register */ RCC->PLL1DIVR = 0x01010280; 8004434: 4b18 ldr r3, [pc, #96] @ (8004498 ) 8004436: 4a1c ldr r2, [pc, #112] @ (80044a8 ) 8004438: 631a str r2, [r3, #48] @ 0x30 /* Reset PLL1FRACR register */ RCC->PLL1FRACR = 0x00000000; 800443a: 4b17 ldr r3, [pc, #92] @ (8004498 ) 800443c: 2200 movs r2, #0 800443e: 635a str r2, [r3, #52] @ 0x34 /* Reset PLL2DIVR register */ RCC->PLL2DIVR = 0x01010280; 8004440: 4b15 ldr r3, [pc, #84] @ (8004498 ) 8004442: 4a19 ldr r2, [pc, #100] @ (80044a8 ) 8004444: 639a str r2, [r3, #56] @ 0x38 /* Reset PLL2FRACR register */ RCC->PLL2FRACR = 0x00000000; 8004446: 4b14 ldr r3, [pc, #80] @ (8004498 ) 8004448: 2200 movs r2, #0 800444a: 63da str r2, [r3, #60] @ 0x3c /* Reset PLL3DIVR register */ RCC->PLL3DIVR = 0x01010280; 800444c: 4b12 ldr r3, [pc, #72] @ (8004498 ) 800444e: 4a16 ldr r2, [pc, #88] @ (80044a8 ) 8004450: 641a str r2, [r3, #64] @ 0x40 /* Reset PLL3FRACR register */ RCC->PLL3FRACR = 0x00000000; 8004452: 4b11 ldr r3, [pc, #68] @ (8004498 ) 8004454: 2200 movs r2, #0 8004456: 645a str r2, [r3, #68] @ 0x44 /* Reset HSEBYP bit */ RCC->CR &= 0xFFFBFFFFU; 8004458: 4b0f ldr r3, [pc, #60] @ (8004498 ) 800445a: 681b ldr r3, [r3, #0] 800445c: 4a0e ldr r2, [pc, #56] @ (8004498 ) 800445e: f423 2380 bic.w r3, r3, #262144 @ 0x40000 8004462: 6013 str r3, [r2, #0] /* Disable all interrupts */ RCC->CIER = 0x00000000; 8004464: 4b0c ldr r3, [pc, #48] @ (8004498 ) 8004466: 2200 movs r2, #0 8004468: 661a str r2, [r3, #96] @ 0x60 #if (STM32H7_DEV_ID == 0x450UL) /* dual core CM7 or single core line */ if((DBGMCU->IDCODE & 0xFFFF0000U) < 0x20000000U) 800446a: 4b10 ldr r3, [pc, #64] @ (80044ac ) 800446c: 681a ldr r2, [r3, #0] 800446e: 4b10 ldr r3, [pc, #64] @ (80044b0 ) 8004470: 4013 ands r3, r2 8004472: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 8004476: d202 bcs.n 800447e { /* if stm32h7 revY*/ /* Change the switch matrix read issuing capability to 1 for the AXI SRAM target (Target 7) */ *((__IO uint32_t*)0x51008108) = 0x000000001U; 8004478: 4b0e ldr r3, [pc, #56] @ (80044b4 ) 800447a: 2201 movs r2, #1 800447c: 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; 800447e: 4b0e ldr r3, [pc, #56] @ (80044b8 ) 8004480: f243 02d2 movw r2, #12498 @ 0x30d2 8004484: 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*/ } 8004486: bf00 nop 8004488: 46bd mov sp, r7 800448a: f85d 7b04 ldr.w r7, [sp], #4 800448e: 4770 bx lr 8004490: e000ed00 .word 0xe000ed00 8004494: 52002000 .word 0x52002000 8004498: 58024400 .word 0x58024400 800449c: eaf6ed7f .word 0xeaf6ed7f 80044a0: 02020200 .word 0x02020200 80044a4: 01ff0000 .word 0x01ff0000 80044a8: 01010280 .word 0x01010280 80044ac: 5c001000 .word 0x5c001000 80044b0: ffff0000 .word 0xffff0000 80044b4: 51008108 .word 0x51008108 80044b8: 52004000 .word 0x52004000 080044bc : osMutexId_t resMeasurementsMutex; osMutexId_t sensorsInfoMutex; extern RNG_HandleTypeDef hrng; void UartTasksInit (void) { 80044bc: b580 push {r7, lr} 80044be: af00 add r7, sp, #0 uart1TaskData.uartRxBuffer = uart1RxBuffer; 80044c0: 4b4e ldr r3, [pc, #312] @ (80045fc ) 80044c2: 4a4f ldr r2, [pc, #316] @ (8004600 ) 80044c4: 601a str r2, [r3, #0] uart1TaskData.uartRxBufferLen = UART1_RX_BUFF_SIZE; 80044c6: 4b4d ldr r3, [pc, #308] @ (80045fc ) 80044c8: f44f 7280 mov.w r2, #256 @ 0x100 80044cc: 809a strh r2, [r3, #4] uart1TaskData.uartTxBuffer = uart1TxBuffer; 80044ce: 4b4b ldr r3, [pc, #300] @ (80045fc ) 80044d0: 4a4c ldr r2, [pc, #304] @ (8004604 ) 80044d2: 609a str r2, [r3, #8] uart1TaskData.uartRxBufferLen = UART1_TX_BUFF_SIZE; 80044d4: 4b49 ldr r3, [pc, #292] @ (80045fc ) 80044d6: f44f 7280 mov.w r2, #256 @ 0x100 80044da: 809a strh r2, [r3, #4] uart1TaskData.frameData = uart1TaskFrameData; 80044dc: 4b47 ldr r3, [pc, #284] @ (80045fc ) 80044de: 4a4a ldr r2, [pc, #296] @ (8004608 ) 80044e0: 611a str r2, [r3, #16] uart1TaskData.frameDataLen = UART1_RX_BUFF_SIZE; 80044e2: 4b46 ldr r3, [pc, #280] @ (80045fc ) 80044e4: f44f 7280 mov.w r2, #256 @ 0x100 80044e8: 829a strh r2, [r3, #20] uart1TaskData.huart = &huart1; 80044ea: 4b44 ldr r3, [pc, #272] @ (80045fc ) 80044ec: 4a47 ldr r2, [pc, #284] @ (800460c ) 80044ee: 631a str r2, [r3, #48] @ 0x30 uart1TaskData.uartNumber = 1; 80044f0: 4b42 ldr r3, [pc, #264] @ (80045fc ) 80044f2: 2201 movs r2, #1 80044f4: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart2TaskData.uartRxBuffer = uart2RxBuffer; 80044f8: 4b45 ldr r3, [pc, #276] @ (8004610 ) 80044fa: 4a46 ldr r2, [pc, #280] @ (8004614 ) 80044fc: 601a str r2, [r3, #0] uart2TaskData.uartRxBufferLen = UART2_RX_BUFF_SIZE; 80044fe: 4b44 ldr r3, [pc, #272] @ (8004610 ) 8004500: f44f 7280 mov.w r2, #256 @ 0x100 8004504: 809a strh r2, [r3, #4] uart2TaskData.uartTxBuffer = uart2TxBuffer; 8004506: 4b42 ldr r3, [pc, #264] @ (8004610 ) 8004508: 4a43 ldr r2, [pc, #268] @ (8004618 ) 800450a: 609a str r2, [r3, #8] uart2TaskData.uartRxBufferLen = UART2_TX_BUFF_SIZE; 800450c: 4b40 ldr r3, [pc, #256] @ (8004610 ) 800450e: f44f 7280 mov.w r2, #256 @ 0x100 8004512: 809a strh r2, [r3, #4] uart2TaskData.frameData = uart2TaskFrameData; 8004514: 4b3e ldr r3, [pc, #248] @ (8004610 ) 8004516: 4a41 ldr r2, [pc, #260] @ (800461c ) 8004518: 611a str r2, [r3, #16] uart2TaskData.frameDataLen = UART2_RX_BUFF_SIZE; 800451a: 4b3d ldr r3, [pc, #244] @ (8004610 ) 800451c: f44f 7280 mov.w r2, #256 @ 0x100 8004520: 829a strh r2, [r3, #20] uart2TaskData.huart = &huart2; 8004522: 4b3b ldr r3, [pc, #236] @ (8004610 ) 8004524: 4a3e ldr r2, [pc, #248] @ (8004620 ) 8004526: 631a str r2, [r3, #48] @ 0x30 uart2TaskData.uartNumber = 2; 8004528: 4b39 ldr r3, [pc, #228] @ (8004610 ) 800452a: 2202 movs r2, #2 800452c: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart3TaskData.uartRxBuffer = uart3RxBuffer; 8004530: 4b3c ldr r3, [pc, #240] @ (8004624 ) 8004532: 4a3d ldr r2, [pc, #244] @ (8004628 ) 8004534: 601a str r2, [r3, #0] uart3TaskData.uartRxBufferLen = UART3_RX_BUFF_SIZE; 8004536: 4b3b ldr r3, [pc, #236] @ (8004624 ) 8004538: f44f 7280 mov.w r2, #256 @ 0x100 800453c: 809a strh r2, [r3, #4] uart3TaskData.uartTxBuffer = uart3TxBuffer; 800453e: 4b39 ldr r3, [pc, #228] @ (8004624 ) 8004540: 4a3a ldr r2, [pc, #232] @ (800462c ) 8004542: 609a str r2, [r3, #8] uart3TaskData.uartRxBufferLen = UART3_TX_BUFF_SIZE; 8004544: 4b37 ldr r3, [pc, #220] @ (8004624 ) 8004546: f44f 7280 mov.w r2, #256 @ 0x100 800454a: 809a strh r2, [r3, #4] uart3TaskData.frameData = uart3TaskFrameData; 800454c: 4b35 ldr r3, [pc, #212] @ (8004624 ) 800454e: 4a38 ldr r2, [pc, #224] @ (8004630 ) 8004550: 611a str r2, [r3, #16] uart3TaskData.frameDataLen = UART3_RX_BUFF_SIZE; 8004552: 4b34 ldr r3, [pc, #208] @ (8004624 ) 8004554: f44f 7280 mov.w r2, #256 @ 0x100 8004558: 829a strh r2, [r3, #20] uart3TaskData.huart = &huart3; 800455a: 4b32 ldr r3, [pc, #200] @ (8004624 ) 800455c: 4a35 ldr r2, [pc, #212] @ (8004634 ) 800455e: 631a str r2, [r3, #48] @ 0x30 uart3TaskData.uartNumber = 3; 8004560: 4b30 ldr r3, [pc, #192] @ (8004624 ) 8004562: 2203 movs r2, #3 8004564: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart6TaskData.uartRxBuffer = uart6RxBuffer; 8004568: 4b33 ldr r3, [pc, #204] @ (8004638 ) 800456a: 4a34 ldr r2, [pc, #208] @ (800463c ) 800456c: 601a str r2, [r3, #0] uart6TaskData.uartRxBufferLen = UART6_RX_BUFF_SIZE; 800456e: 4b32 ldr r3, [pc, #200] @ (8004638 ) 8004570: f44f 7280 mov.w r2, #256 @ 0x100 8004574: 809a strh r2, [r3, #4] uart6TaskData.uartTxBuffer = uart6TxBuffer; 8004576: 4b30 ldr r3, [pc, #192] @ (8004638 ) 8004578: 4a31 ldr r2, [pc, #196] @ (8004640 ) 800457a: 609a str r2, [r3, #8] uart6TaskData.uartRxBufferLen = UART6_TX_BUFF_SIZE; 800457c: 4b2e ldr r3, [pc, #184] @ (8004638 ) 800457e: f44f 7280 mov.w r2, #256 @ 0x100 8004582: 809a strh r2, [r3, #4] uart6TaskData.frameData = uart6TaskFrameData; 8004584: 4b2c ldr r3, [pc, #176] @ (8004638 ) 8004586: 4a2f ldr r2, [pc, #188] @ (8004644 ) 8004588: 611a str r2, [r3, #16] uart6TaskData.frameDataLen = UART6_RX_BUFF_SIZE; 800458a: 4b2b ldr r3, [pc, #172] @ (8004638 ) 800458c: f44f 7280 mov.w r2, #256 @ 0x100 8004590: 829a strh r2, [r3, #20] uart6TaskData.huart = &huart6; 8004592: 4b29 ldr r3, [pc, #164] @ (8004638 ) 8004594: 4a2c ldr r2, [pc, #176] @ (8004648 ) 8004596: 631a str r2, [r3, #48] @ 0x30 uart6TaskData.uartNumber = 6; 8004598: 4b27 ldr r3, [pc, #156] @ (8004638 ) 800459a: 2206 movs r2, #6 800459c: f883 2034 strb.w r2, [r3, #52] @ 0x34 uart8TaskData.uartRxBuffer = uart8RxBuffer; 80045a0: 4b2a ldr r3, [pc, #168] @ (800464c ) 80045a2: 4a2b ldr r2, [pc, #172] @ (8004650 ) 80045a4: 601a str r2, [r3, #0] uart8TaskData.uartRxBufferLen = UART8_RX_BUFF_SIZE; 80045a6: 4b29 ldr r3, [pc, #164] @ (800464c ) 80045a8: f44f 7280 mov.w r2, #256 @ 0x100 80045ac: 809a strh r2, [r3, #4] uart8TaskData.uartTxBuffer = uart8TxBuffer; 80045ae: 4b27 ldr r3, [pc, #156] @ (800464c ) 80045b0: 4a28 ldr r2, [pc, #160] @ (8004654 ) 80045b2: 609a str r2, [r3, #8] uart8TaskData.uartRxBufferLen = UART8_TX_BUFF_SIZE; 80045b4: 4b25 ldr r3, [pc, #148] @ (800464c ) 80045b6: f44f 7280 mov.w r2, #256 @ 0x100 80045ba: 809a strh r2, [r3, #4] uart8TaskData.frameData = uart8TaskFrameData; 80045bc: 4b23 ldr r3, [pc, #140] @ (800464c ) 80045be: 4a26 ldr r2, [pc, #152] @ (8004658 ) 80045c0: 611a str r2, [r3, #16] uart8TaskData.frameDataLen = UART8_RX_BUFF_SIZE; 80045c2: 4b22 ldr r3, [pc, #136] @ (800464c ) 80045c4: f44f 7280 mov.w r2, #256 @ 0x100 80045c8: 829a strh r2, [r3, #20] uart8TaskData.huart = &huart8; 80045ca: 4b20 ldr r3, [pc, #128] @ (800464c ) 80045cc: 4a23 ldr r2, [pc, #140] @ (800465c ) 80045ce: 631a str r2, [r3, #48] @ 0x30 uart8TaskData.uartNumber = 8; 80045d0: 4b1e ldr r3, [pc, #120] @ (800464c ) 80045d2: 2208 movs r2, #8 80045d4: f883 2034 strb.w r2, [r3, #52] @ 0x34 UartTaskCreate (&uart1TaskData); 80045d8: 4808 ldr r0, [pc, #32] @ (80045fc ) 80045da: f000 f841 bl 8004660 UartTaskCreate (&uart2TaskData); 80045de: 480c ldr r0, [pc, #48] @ (8004610 ) 80045e0: f000 f83e bl 8004660 UartTaskCreate (&uart3TaskData); 80045e4: 480f ldr r0, [pc, #60] @ (8004624 ) 80045e6: f000 f83b bl 8004660 UartTaskCreate (&uart6TaskData); 80045ea: 4813 ldr r0, [pc, #76] @ (8004638 ) 80045ec: f000 f838 bl 8004660 UartTaskCreate (&uart8TaskData); 80045f0: 4816 ldr r0, [pc, #88] @ (800464c ) 80045f2: f000 f835 bl 8004660 } 80045f6: bf00 nop 80045f8: bd80 pop {r7, pc} 80045fa: bf00 nop 80045fc: 24001efc .word 0x24001efc 8004600: 24000ffc .word 0x24000ffc 8004604: 240010fc .word 0x240010fc 8004608: 240011fc .word 0x240011fc 800460c: 24000324 .word 0x24000324 8004610: 24001fa4 .word 0x24001fa4 8004614: 240012fc .word 0x240012fc 8004618: 240013fc .word 0x240013fc 800461c: 240014fc .word 0x240014fc 8004620: 240003b8 .word 0x240003b8 8004624: 24001f34 .word 0x24001f34 8004628: 240015fc .word 0x240015fc 800462c: 240016fc .word 0x240016fc 8004630: 240017fc .word 0x240017fc 8004634: 2400044c .word 0x2400044c 8004638: 24001f6c .word 0x24001f6c 800463c: 240018fc .word 0x240018fc 8004640: 240019fc .word 0x240019fc 8004644: 24001afc .word 0x24001afc 8004648: 240004e0 .word 0x240004e0 800464c: 24001fdc .word 0x24001fdc 8004650: 24001bfc .word 0x24001bfc 8004654: 24001cfc .word 0x24001cfc 8004658: 24001dfc .word 0x24001dfc 800465c: 24000290 .word 0x24000290 08004660 : void UartTaskCreate (UartTaskData* uartTaskData) { 8004660: b580 push {r7, lr} 8004662: b09a sub sp, #104 @ 0x68 8004664: af00 add r7, sp, #0 8004666: 6078 str r0, [r7, #4] osThreadAttr_t osThreadAttrRxUart = { 0 }; 8004668: f107 0344 add.w r3, r7, #68 @ 0x44 800466c: 2224 movs r2, #36 @ 0x24 800466e: 2100 movs r1, #0 8004670: 4618 mov r0, r3 8004672: f026 faa5 bl 802abc0 osThreadAttr_t osThreadAttrTxUart = { 0 }; 8004676: f107 0320 add.w r3, r7, #32 800467a: 2224 movs r2, #36 @ 0x24 800467c: 2100 movs r1, #0 800467e: 4618 mov r0, r3 8004680: f026 fa9e bl 802abc0 uartTaskData->processRxDataMsgBuffer = xMessageBufferCreate (INPUT_DATA_BUFF_SIZE); 8004684: 2201 movs r2, #1 8004686: 2100 movs r1, #0 8004688: f44f 7080 mov.w r0, #256 @ 0x100 800468c: f00e fde8 bl 8013260 8004690: 4602 mov r2, r0 8004692: 687b ldr r3, [r7, #4] 8004694: 625a str r2, [r3, #36] @ 0x24 uartTaskData->processDataCb = NULL; 8004696: 687b ldr r3, [r7, #4] 8004698: 2200 movs r2, #0 800469a: 629a str r2, [r3, #40] @ 0x28 // osThreadAttrRxUart.name = "os_thread_uart1_rx"; osThreadAttrRxUart.stack_size = configMINIMAL_STACK_SIZE * 2; 800469c: f44f 6380 mov.w r3, #1024 @ 0x400 80046a0: 65bb str r3, [r7, #88] @ 0x58 osThreadAttrRxUart.priority = (osPriority_t)osPriorityHigh; 80046a2: 2328 movs r3, #40 @ 0x28 80046a4: 65fb str r3, [r7, #92] @ 0x5c uartTaskData->uartRecieveTaskHandle = osThreadNew (UartRxTask, uartTaskData, &osThreadAttrRxUart); 80046a6: f107 0344 add.w r3, r7, #68 @ 0x44 80046aa: 461a mov r2, r3 80046ac: 6879 ldr r1, [r7, #4] 80046ae: 4816 ldr r0, [pc, #88] @ (8004708 ) 80046b0: f00c fe55 bl 801135e 80046b4: 4602 mov r2, r0 80046b6: 687b ldr r3, [r7, #4] 80046b8: 619a str r2, [r3, #24] osMessageQueueAttr_t uartTxMsgQueueAttr = { 0 }; 80046ba: f107 0308 add.w r3, r7, #8 80046be: 2200 movs r2, #0 80046c0: 601a str r2, [r3, #0] 80046c2: 605a str r2, [r3, #4] 80046c4: 609a str r2, [r3, #8] 80046c6: 60da str r2, [r3, #12] 80046c8: 611a str r2, [r3, #16] 80046ca: 615a str r2, [r3, #20] // uartTxMsgQueueAttr.name = "uart1TxMsgQueue"; uartTaskData->sendCmdToSlaveQueue = osMessageQueueNew (16, sizeof (InterProcessData), &uartTxMsgQueueAttr); 80046cc: f107 0308 add.w r3, r7, #8 80046d0: 461a mov r2, r3 80046d2: 2110 movs r1, #16 80046d4: 2010 movs r0, #16 80046d6: f00d fa43 bl 8011b60 80046da: 4602 mov r2, r0 80046dc: 687b ldr r3, [r7, #4] 80046de: 62da str r2, [r3, #44] @ 0x2c // osThreadAttrTxUart.name = "os_thread_uart1_tx"; osThreadAttrTxUart.stack_size = configMINIMAL_STACK_SIZE * 4; 80046e0: f44f 6300 mov.w r3, #2048 @ 0x800 80046e4: 637b str r3, [r7, #52] @ 0x34 osThreadAttrTxUart.priority = (osPriority_t)osPriorityNormal; 80046e6: 2318 movs r3, #24 80046e8: 63bb str r3, [r7, #56] @ 0x38 uartTaskData->uartTransmitTaskHandle = osThreadNew (UartTxTask, uartTaskData, &osThreadAttrTxUart); 80046ea: f107 0320 add.w r3, r7, #32 80046ee: 461a mov r2, r3 80046f0: 6879 ldr r1, [r7, #4] 80046f2: 4806 ldr r0, [pc, #24] @ (800470c ) 80046f4: f00c fe33 bl 801135e 80046f8: 4602 mov r2, r0 80046fa: 687b ldr r3, [r7, #4] 80046fc: 61da str r2, [r3, #28] } 80046fe: bf00 nop 8004700: 3768 adds r7, #104 @ 0x68 8004702: 46bd mov sp, r7 8004704: bd80 pop {r7, pc} 8004706: bf00 nop 8004708: 08004885 .word 0x08004885 800470c: 08004e71 .word 0x08004e71 08004710 : void HAL_UART_RxCpltCallback (UART_HandleTypeDef* huart) { 8004710: b480 push {r7} 8004712: b083 sub sp, #12 8004714: af00 add r7, sp, #0 8004716: 6078 str r0, [r7, #4] // osSemaphoreRelease(uart8RxSemaphore); } 8004718: bf00 nop 800471a: 370c adds r7, #12 800471c: 46bd mov sp, r7 800471e: f85d 7b04 ldr.w r7, [sp], #4 8004722: 4770 bx lr 08004724 : void HAL_UARTEx_RxEventCallback (UART_HandleTypeDef* huart, uint16_t Size) { 8004724: b580 push {r7, lr} 8004726: b082 sub sp, #8 8004728: af00 add r7, sp, #0 800472a: 6078 str r0, [r7, #4] 800472c: 460b mov r3, r1 800472e: 807b strh r3, [r7, #2] if (huart->Instance == USART1) { 8004730: 687b ldr r3, [r7, #4] 8004732: 681b ldr r3, [r3, #0] 8004734: 4a1e ldr r2, [pc, #120] @ (80047b0 ) 8004736: 4293 cmp r3, r2 8004738: d106 bne.n 8004748 HandleUartRxCallback (&uart1TaskData, huart, Size); 800473a: 887b ldrh r3, [r7, #2] 800473c: 461a mov r2, r3 800473e: 6879 ldr r1, [r7, #4] 8004740: 481c ldr r0, [pc, #112] @ (80047b4 ) 8004742: f000 f853 bl 80047ec } else if (huart->Instance == USART6) { HandleUartRxCallback (&uart6TaskData, huart, Size); } else if (huart->Instance == UART8) { HandleUartRxCallback (&uart8TaskData, huart, Size); } } 8004746: e02e b.n 80047a6 } else if (huart->Instance == USART2) { 8004748: 687b ldr r3, [r7, #4] 800474a: 681b ldr r3, [r3, #0] 800474c: 4a1a ldr r2, [pc, #104] @ (80047b8 ) 800474e: 4293 cmp r3, r2 8004750: d106 bne.n 8004760 HandleUartRxCallback (&uart2TaskData, huart, Size); 8004752: 887b ldrh r3, [r7, #2] 8004754: 461a mov r2, r3 8004756: 6879 ldr r1, [r7, #4] 8004758: 4818 ldr r0, [pc, #96] @ (80047bc ) 800475a: f000 f847 bl 80047ec } 800475e: e022 b.n 80047a6 } else if (huart->Instance == USART3) { 8004760: 687b ldr r3, [r7, #4] 8004762: 681b ldr r3, [r3, #0] 8004764: 4a16 ldr r2, [pc, #88] @ (80047c0 ) 8004766: 4293 cmp r3, r2 8004768: d106 bne.n 8004778 HandleUartRxCallback (&uart3TaskData, huart, Size); 800476a: 887b ldrh r3, [r7, #2] 800476c: 461a mov r2, r3 800476e: 6879 ldr r1, [r7, #4] 8004770: 4814 ldr r0, [pc, #80] @ (80047c4 ) 8004772: f000 f83b bl 80047ec } 8004776: e016 b.n 80047a6 } else if (huart->Instance == USART6) { 8004778: 687b ldr r3, [r7, #4] 800477a: 681b ldr r3, [r3, #0] 800477c: 4a12 ldr r2, [pc, #72] @ (80047c8 ) 800477e: 4293 cmp r3, r2 8004780: d106 bne.n 8004790 HandleUartRxCallback (&uart6TaskData, huart, Size); 8004782: 887b ldrh r3, [r7, #2] 8004784: 461a mov r2, r3 8004786: 6879 ldr r1, [r7, #4] 8004788: 4810 ldr r0, [pc, #64] @ (80047cc ) 800478a: f000 f82f bl 80047ec } 800478e: e00a b.n 80047a6 } else if (huart->Instance == UART8) { 8004790: 687b ldr r3, [r7, #4] 8004792: 681b ldr r3, [r3, #0] 8004794: 4a0e ldr r2, [pc, #56] @ (80047d0 ) 8004796: 4293 cmp r3, r2 8004798: d105 bne.n 80047a6 HandleUartRxCallback (&uart8TaskData, huart, Size); 800479a: 887b ldrh r3, [r7, #2] 800479c: 461a mov r2, r3 800479e: 6879 ldr r1, [r7, #4] 80047a0: 480c ldr r0, [pc, #48] @ (80047d4 ) 80047a2: f000 f823 bl 80047ec } 80047a6: bf00 nop 80047a8: 3708 adds r7, #8 80047aa: 46bd mov sp, r7 80047ac: bd80 pop {r7, pc} 80047ae: bf00 nop 80047b0: 40011000 .word 0x40011000 80047b4: 24001efc .word 0x24001efc 80047b8: 40004400 .word 0x40004400 80047bc: 24001fa4 .word 0x24001fa4 80047c0: 40004800 .word 0x40004800 80047c4: 24001f34 .word 0x24001f34 80047c8: 40011400 .word 0x40011400 80047cc: 24001f6c .word 0x24001f6c 80047d0: 40007c00 .word 0x40007c00 80047d4: 24001fdc .word 0x24001fdc 080047d8 : void HAL_UART_TxCpltCallback (UART_HandleTypeDef* huart) { 80047d8: b480 push {r7} 80047da: b083 sub sp, #12 80047dc: af00 add r7, sp, #0 80047de: 6078 str r0, [r7, #4] if (huart->Instance == UART8) { } } 80047e0: bf00 nop 80047e2: 370c adds r7, #12 80047e4: 46bd mov sp, r7 80047e6: f85d 7b04 ldr.w r7, [sp], #4 80047ea: 4770 bx lr 080047ec : void HandleUartRxCallback (UartTaskData* uartTaskData, UART_HandleTypeDef* huart, uint16_t Size) { 80047ec: b580 push {r7, lr} 80047ee: b088 sub sp, #32 80047f0: af02 add r7, sp, #8 80047f2: 60f8 str r0, [r7, #12] 80047f4: 60b9 str r1, [r7, #8] 80047f6: 4613 mov r3, r2 80047f8: 80fb strh r3, [r7, #6] BaseType_t pxHigherPriorityTaskWoken = pdFALSE; 80047fa: 2300 movs r3, #0 80047fc: 617b str r3, [r7, #20] osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 80047fe: 68fb ldr r3, [r7, #12] 8004800: 6a1b ldr r3, [r3, #32] 8004802: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004806: 4618 mov r0, r3 8004808: f00c ffdf bl 80117ca memcpy (&(uartTaskData->frameData[uartTaskData->frameBytesCount]), uartTaskData->uartRxBuffer, Size); 800480c: 68fb ldr r3, [r7, #12] 800480e: 691b ldr r3, [r3, #16] 8004810: 68fa ldr r2, [r7, #12] 8004812: 8ad2 ldrh r2, [r2, #22] 8004814: 1898 adds r0, r3, r2 8004816: 68fb ldr r3, [r7, #12] 8004818: 681b ldr r3, [r3, #0] 800481a: 88fa ldrh r2, [r7, #6] 800481c: 4619 mov r1, r3 800481e: f026 fac6 bl 802adae uartTaskData->frameBytesCount += Size; 8004822: 68fb ldr r3, [r7, #12] 8004824: 8ada ldrh r2, [r3, #22] 8004826: 88fb ldrh r3, [r7, #6] 8004828: 4413 add r3, r2 800482a: b29a uxth r2, r3 800482c: 68fb ldr r3, [r7, #12] 800482e: 82da strh r2, [r3, #22] osMutexRelease (uartTaskData->rxDataBufferMutex); 8004830: 68fb ldr r3, [r7, #12] 8004832: 6a1b ldr r3, [r3, #32] 8004834: 4618 mov r0, r3 8004836: f00d f813 bl 8011860 xTaskNotifyFromISR (uartTaskData->uartRecieveTaskHandle, Size, eSetValueWithOverwrite, &pxHigherPriorityTaskWoken); 800483a: 68fb ldr r3, [r7, #12] 800483c: 6998 ldr r0, [r3, #24] 800483e: 88f9 ldrh r1, [r7, #6] 8004840: f107 0314 add.w r3, r7, #20 8004844: 9300 str r3, [sp, #0] 8004846: 2300 movs r3, #0 8004848: 2203 movs r2, #3 800484a: f010 fa01 bl 8014c50 // 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); 800484e: 68fb ldr r3, [r7, #12] 8004850: 6b18 ldr r0, [r3, #48] @ 0x30 8004852: 68fb ldr r3, [r7, #12] 8004854: 6819 ldr r1, [r3, #0] 8004856: 68fb ldr r3, [r7, #12] 8004858: 889b ldrh r3, [r3, #4] 800485a: 461a mov r2, r3 800485c: f00b fd8b bl 8010376 portEND_SWITCHING_ISR (pxHigherPriorityTaskWoken); 8004860: 697b ldr r3, [r7, #20] 8004862: 2b00 cmp r3, #0 8004864: d007 beq.n 8004876 8004866: 4b06 ldr r3, [pc, #24] @ (8004880 ) 8004868: f04f 5280 mov.w r2, #268435456 @ 0x10000000 800486c: 601a str r2, [r3, #0] 800486e: f3bf 8f4f dsb sy 8004872: f3bf 8f6f isb sy } 8004876: bf00 nop 8004878: 3718 adds r7, #24 800487a: 46bd mov sp, r7 800487c: bd80 pop {r7, pc} 800487e: bf00 nop 8004880: e000ed04 .word 0xe000ed04 08004884 : void UartRxTask (void* argument) { 8004884: b580 push {r7, lr} 8004886: b0d2 sub sp, #328 @ 0x148 8004888: af02 add r7, sp, #8 800488a: f507 73a0 add.w r3, r7, #320 @ 0x140 800488e: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004892: 6018 str r0, [r3, #0] UartTaskData* uartTaskData = (UartTaskData*)argument; 8004894: f507 73a0 add.w r3, r7, #320 @ 0x140 8004898: f5a3 739e sub.w r3, r3, #316 @ 0x13c 800489c: 681b ldr r3, [r3, #0] 800489e: f8c7 312c str.w r3, [r7, #300] @ 0x12c SerialProtocolFrameData spFrameData = { 0 }; 80048a2: f507 73a0 add.w r3, r7, #320 @ 0x140 80048a6: f5a3 7398 sub.w r3, r3, #304 @ 0x130 80048aa: 4618 mov r0, r3 80048ac: f44f 7386 mov.w r3, #268 @ 0x10c 80048b0: 461a mov r2, r3 80048b2: 2100 movs r1, #0 80048b4: f026 f984 bl 802abc0 uint32_t bytesRec = 0; 80048b8: f507 73a0 add.w r3, r7, #320 @ 0x140 80048bc: f5a3 739a sub.w r3, r3, #308 @ 0x134 80048c0: 2200 movs r2, #0 80048c2: 601a str r2, [r3, #0] uint32_t crc = 0; 80048c4: 2300 movs r3, #0 80048c6: f8c7 3128 str.w r3, [r7, #296] @ 0x128 uint16_t frameCommandRaw = 0x0000; 80048ca: 2300 movs r3, #0 80048cc: f8a7 3126 strh.w r3, [r7, #294] @ 0x126 uint16_t frameBytesCount = 0; 80048d0: 2300 movs r3, #0 80048d2: f8a7 3124 strh.w r3, [r7, #292] @ 0x124 uint16_t frameCrc = 0; 80048d6: 2300 movs r3, #0 80048d8: f8a7 3122 strh.w r3, [r7, #290] @ 0x122 uint16_t frameTotalLength = 0; 80048dc: 2300 movs r3, #0 80048de: f8a7 313e strh.w r3, [r7, #318] @ 0x13e uint16_t dataToSend = 0; 80048e2: 2300 movs r3, #0 80048e4: f8a7 313c strh.w r3, [r7, #316] @ 0x13c portBASE_TYPE crcPass = pdFAIL; 80048e8: 2300 movs r3, #0 80048ea: f8c7 3138 str.w r3, [r7, #312] @ 0x138 portBASE_TYPE proceed = pdFALSE; 80048ee: 2300 movs r3, #0 80048f0: f8c7 3134 str.w r3, [r7, #308] @ 0x134 portBASE_TYPE frameTimeout = pdFAIL; 80048f4: 2300 movs r3, #0 80048f6: f8c7 311c str.w r3, [r7, #284] @ 0x11c enum SerialReceiverStates receverState = srWaitForHeader; 80048fa: 2300 movs r3, #0 80048fc: f887 3133 strb.w r3, [r7, #307] @ 0x133 uartTaskData->rxDataBufferMutex = osMutexNew (NULL); 8004900: 2000 movs r0, #0 8004902: f00c fedc bl 80116be 8004906: 4602 mov r2, r0 8004908: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800490c: 621a str r2, [r3, #32] HAL_UARTEx_ReceiveToIdle_IT (uartTaskData->huart, uartTaskData->uartRxBuffer, uartTaskData->uartRxBufferLen); 800490e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004912: 6b18 ldr r0, [r3, #48] @ 0x30 8004914: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004918: 6819 ldr r1, [r3, #0] 800491a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800491e: 889b ldrh r3, [r3, #4] 8004920: 461a mov r2, r3 8004922: f00b fd28 bl 8010376 while (pdTRUE) { frameTimeout = !(xTaskNotifyWait (0, 0, &bytesRec, pdMS_TO_TICKS (FRAME_TIMEOUT_MS))); 8004926: f107 020c add.w r2, r7, #12 800492a: f44f 63fa mov.w r3, #2000 @ 0x7d0 800492e: 2100 movs r1, #0 8004930: 2000 movs r0, #0 8004932: f010 f86b bl 8014a0c 8004936: 4603 mov r3, r0 8004938: 2b00 cmp r3, #0 800493a: bf0c ite eq 800493c: 2301 moveq r3, #1 800493e: 2300 movne r3, #0 8004940: b2db uxtb r3, r3 8004942: f8c7 311c str.w r3, [r7, #284] @ 0x11c osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004946: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800494a: 6a1b ldr r3, [r3, #32] 800494c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004950: 4618 mov r0, r3 8004952: f00c ff3a bl 80117ca frameBytesCount = uartTaskData->frameBytesCount; 8004956: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800495a: 8adb ldrh r3, [r3, #22] 800495c: f8a7 3124 strh.w r3, [r7, #292] @ 0x124 osMutexRelease (uartTaskData->rxDataBufferMutex); 8004960: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004964: 6a1b ldr r3, [r3, #32] 8004966: 4618 mov r0, r3 8004968: f00c ff7a bl 8011860 if ((frameTimeout == pdTRUE) && (frameBytesCount > 0)) { 800496c: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 8004970: 2b01 cmp r3, #1 8004972: d10a bne.n 800498a 8004974: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004978: 2b00 cmp r3, #0 800497a: d006 beq.n 800498a receverState = srFail; 800497c: 2304 movs r3, #4 800497e: f887 3133 strb.w r3, [r7, #307] @ 0x133 proceed = pdTRUE; 8004982: 2301 movs r3, #1 8004984: f8c7 3134 str.w r3, [r7, #308] @ 0x134 8004988: e029 b.n 80049de } else { if (frameTimeout == pdFALSE) { 800498a: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 800498e: 2b00 cmp r3, #0 8004990: d111 bne.n 80049b6 proceed = pdTRUE; 8004992: 2301 movs r3, #1 8004994: f8c7 3134 str.w r3, [r7, #308] @ 0x134 printf ("Uart%d: RX bytes received: %ld\n", uartTaskData->uartNumber, bytesRec); 8004998: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800499c: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80049a0: 4619 mov r1, r3 80049a2: f507 73a0 add.w r3, r7, #320 @ 0x140 80049a6: f5a3 739a sub.w r3, r3, #308 @ 0x134 80049aa: 681b ldr r3, [r3, #0] 80049ac: 461a mov r2, r3 80049ae: 48c1 ldr r0, [pc, #772] @ (8004cb4 ) 80049b0: f025 ff74 bl 802a89c 80049b4: e22f b.n 8004e16 } else { if (uartTaskData->huart->RxState == HAL_UART_STATE_READY) { 80049b6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049ba: 6b1b ldr r3, [r3, #48] @ 0x30 80049bc: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 80049c0: 2b20 cmp r3, #32 80049c2: f040 8228 bne.w 8004e16 HAL_UARTEx_ReceiveToIdle_IT (uartTaskData->huart, uartTaskData->uartRxBuffer, uartTaskData->uartRxBufferLen); 80049c6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049ca: 6b18 ldr r0, [r3, #48] @ 0x30 80049cc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049d0: 6819 ldr r1, [r3, #0] 80049d2: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80049d6: 889b ldrh r3, [r3, #4] 80049d8: 461a mov r2, r3 80049da: f00b fccc bl 8010376 } } } while (proceed) { 80049de: e21a b.n 8004e16 switch (receverState) { 80049e0: f897 3133 ldrb.w r3, [r7, #307] @ 0x133 80049e4: 2b04 cmp r3, #4 80049e6: f200 81f1 bhi.w 8004dcc 80049ea: a201 add r2, pc, #4 @ (adr r2, 80049f0 ) 80049ec: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80049f0: 08004a05 .word 0x08004a05 80049f4: 08004b67 .word 0x08004b67 80049f8: 08004b4b .word 0x08004b4b 80049fc: 08004c07 .word 0x08004c07 8004a00: 08004cc1 .word 0x08004cc1 case srWaitForHeader: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004a04: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a08: 6a1b ldr r3, [r3, #32] 8004a0a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004a0e: 4618 mov r0, r3 8004a10: f00c fedb bl 80117ca if (uartTaskData->frameData[0] == FRAME_INDICATOR) { 8004a14: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a18: 691b ldr r3, [r3, #16] 8004a1a: 781b ldrb r3, [r3, #0] 8004a1c: 2baa cmp r3, #170 @ 0xaa 8004a1e: f040 8082 bne.w 8004b26 if (frameBytesCount > FRAME_ID_LENGTH) { 8004a22: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004a26: 2b02 cmp r3, #2 8004a28: d914 bls.n 8004a54 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])); 8004a2a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a2e: 691b ldr r3, [r3, #16] 8004a30: 3302 adds r3, #2 8004a32: 781b ldrb r3, [r3, #0] 8004a34: 021b lsls r3, r3, #8 8004a36: b21a sxth r2, r3 8004a38: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a3c: 691b ldr r3, [r3, #16] 8004a3e: 3301 adds r3, #1 8004a40: 781b ldrb r3, [r3, #0] 8004a42: b21b sxth r3, r3 8004a44: 4313 orrs r3, r2 8004a46: b21b sxth r3, r3 8004a48: b29a uxth r2, r3 spFrameData.frameHeader.frameId = 8004a4a: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a4e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a52: 801a strh r2, [r3, #0] } if (frameBytesCount > FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH) { 8004a54: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004a58: 2b04 cmp r3, #4 8004a5a: d923 bls.n 8004aa4 frameCommandRaw = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[FRAME_HEADER_LENGTH - FRAME_RESP_STAT_LENGTH - FRAME_DATALEN_LENGTH - FRAME_COMMAND_LENGTH])); 8004a5c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a60: 691b ldr r3, [r3, #16] 8004a62: 3304 adds r3, #4 8004a64: 781b ldrb r3, [r3, #0] 8004a66: 021b lsls r3, r3, #8 8004a68: b21a sxth r2, r3 8004a6a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004a6e: 691b ldr r3, [r3, #16] 8004a70: 3303 adds r3, #3 8004a72: 781b ldrb r3, [r3, #0] 8004a74: b21b sxth r3, r3 8004a76: 4313 orrs r3, r2 8004a78: b21b sxth r3, r3 8004a7a: f8a7 3126 strh.w r3, [r7, #294] @ 0x126 spFrameData.frameHeader.frameCommand = (SerialProtocolCommands)(frameCommandRaw & 0x7FFF); 8004a7e: f8b7 3126 ldrh.w r3, [r7, #294] @ 0x126 8004a82: b2da uxtb r2, r3 8004a84: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a88: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004a8c: 709a strb r2, [r3, #2] spFrameData.frameHeader.isResponseFrame = (frameCommandRaw & 0x8000) != 0 ? pdTRUE : pdFALSE; 8004a8e: f9b7 3126 ldrsh.w r3, [r7, #294] @ 0x126 8004a92: 13db asrs r3, r3, #15 8004a94: b21b sxth r3, r3 8004a96: f003 0201 and.w r2, r3, #1 8004a9a: f507 73a0 add.w r3, r7, #320 @ 0x140 8004a9e: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004aa2: 609a str r2, [r3, #8] } if ((frameBytesCount > FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH + FRAME_RESP_STAT_LENGTH) && ((spFrameData.frameHeader.frameCommand & 0x8000) != 0)) { 8004aa4: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004aa8: 2b05 cmp r3, #5 8004aaa: d913 bls.n 8004ad4 8004aac: f507 73a0 add.w r3, r7, #320 @ 0x140 8004ab0: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004ab4: 789b ldrb r3, [r3, #2] 8004ab6: f403 4300 and.w r3, r3, #32768 @ 0x8000 8004aba: 2b00 cmp r3, #0 8004abc: d00a beq.n 8004ad4 spFrameData.frameHeader.respStatus = (SerialProtocolRespStatus)(uartTaskData->frameData[FRAME_ID_LENGTH + FRAME_COMMAND_LENGTH + FRAME_RESP_STAT_LENGTH]); 8004abe: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004ac2: 691b ldr r3, [r3, #16] 8004ac4: 3305 adds r3, #5 8004ac6: 781b ldrb r3, [r3, #0] 8004ac8: b25a sxtb r2, r3 8004aca: f507 73a0 add.w r3, r7, #320 @ 0x140 8004ace: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004ad2: 70da strb r2, [r3, #3] } if (frameBytesCount >= FRAME_HEADER_LENGTH) { 8004ad4: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004ad8: 2b07 cmp r3, #7 8004ada: d920 bls.n 8004b1e spFrameData.frameHeader.frameDataLength = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[FRAME_HEADER_LENGTH - FRAME_RESP_STAT_LENGTH - FRAME_DATALEN_LENGTH])); 8004adc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004ae0: 691b ldr r3, [r3, #16] 8004ae2: 3306 adds r3, #6 8004ae4: 781b ldrb r3, [r3, #0] 8004ae6: 021b lsls r3, r3, #8 8004ae8: b21a sxth r2, r3 8004aea: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004aee: 691b ldr r3, [r3, #16] 8004af0: 3305 adds r3, #5 8004af2: 781b ldrb r3, [r3, #0] 8004af4: b21b sxth r3, r3 8004af6: 4313 orrs r3, r2 8004af8: b21b sxth r3, r3 8004afa: b29a uxth r2, r3 8004afc: f507 73a0 add.w r3, r7, #320 @ 0x140 8004b00: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004b04: 809a strh r2, [r3, #4] frameTotalLength = FRAME_HEADER_LENGTH + spFrameData.frameHeader.frameDataLength + FRAME_CRC_LENGTH; 8004b06: f507 73a0 add.w r3, r7, #320 @ 0x140 8004b0a: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004b0e: 889b ldrh r3, [r3, #4] 8004b10: 330a adds r3, #10 8004b12: f8a7 313e strh.w r3, [r7, #318] @ 0x13e receverState = srRecieveData; 8004b16: 2302 movs r3, #2 8004b18: f887 3133 strb.w r3, [r7, #307] @ 0x133 8004b1c: e00e b.n 8004b3c } else { proceed = pdFALSE; 8004b1e: 2300 movs r3, #0 8004b20: f8c7 3134 str.w r3, [r7, #308] @ 0x134 8004b24: e00a b.n 8004b3c } } else { if (frameBytesCount > 0) { 8004b26: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004b2a: 2b00 cmp r3, #0 8004b2c: d003 beq.n 8004b36 receverState = srFail; 8004b2e: 2304 movs r3, #4 8004b30: f887 3133 strb.w r3, [r7, #307] @ 0x133 8004b34: e002 b.n 8004b3c } else { proceed = pdFALSE; 8004b36: 2300 movs r3, #0 8004b38: f8c7 3134 str.w r3, [r7, #308] @ 0x134 } } osMutexRelease (uartTaskData->rxDataBufferMutex); 8004b3c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b40: 6a1b ldr r3, [r3, #32] 8004b42: 4618 mov r0, r3 8004b44: f00c fe8c bl 8011860 break; 8004b48: e165 b.n 8004e16 case srRecieveData: if (frameBytesCount >= frameTotalLength) { 8004b4a: f8b7 2124 ldrh.w r2, [r7, #292] @ 0x124 8004b4e: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004b52: 429a cmp r2, r3 8004b54: d303 bcc.n 8004b5e receverState = srCheckCrc; 8004b56: 2301 movs r3, #1 8004b58: f887 3133 strb.w r3, [r7, #307] @ 0x133 } else { proceed = pdFALSE; } break; 8004b5c: e15b b.n 8004e16 proceed = pdFALSE; 8004b5e: 2300 movs r3, #0 8004b60: f8c7 3134 str.w r3, [r7, #308] @ 0x134 break; 8004b64: e157 b.n 8004e16 case srCheckCrc: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004b66: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b6a: 6a1b ldr r3, [r3, #32] 8004b6c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004b70: 4618 mov r0, r3 8004b72: f00c fe2a bl 80117ca frameCrc = CONVERT_BYTES_TO_SHORT_WORD (&(uartTaskData->frameData[frameTotalLength - FRAME_CRC_LENGTH])); 8004b76: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b7a: 691a ldr r2, [r3, #16] 8004b7c: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004b80: 3b01 subs r3, #1 8004b82: 4413 add r3, r2 8004b84: 781b ldrb r3, [r3, #0] 8004b86: 021b lsls r3, r3, #8 8004b88: b21a sxth r2, r3 8004b8a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004b8e: 6919 ldr r1, [r3, #16] 8004b90: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004b94: 3b02 subs r3, #2 8004b96: 440b add r3, r1 8004b98: 781b ldrb r3, [r3, #0] 8004b9a: b21b sxth r3, r3 8004b9c: 4313 orrs r3, r2 8004b9e: b21b sxth r3, r3 8004ba0: f8a7 3122 strh.w r3, [r7, #290] @ 0x122 crc = HAL_CRC_Calculate (&hcrc, (uint32_t*)(uartTaskData->frameData), frameTotalLength - FRAME_CRC_LENGTH); 8004ba4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004ba8: 6919 ldr r1, [r3, #16] 8004baa: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8004bae: 3b02 subs r3, #2 8004bb0: 461a mov r2, r3 8004bb2: 4841 ldr r0, [pc, #260] @ (8004cb8 ) 8004bb4: f001 f84e bl 8005c54 8004bb8: f8c7 0128 str.w r0, [r7, #296] @ 0x128 osMutexRelease (uartTaskData->rxDataBufferMutex); 8004bbc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004bc0: 6a1b ldr r3, [r3, #32] 8004bc2: 4618 mov r0, r3 8004bc4: f00c fe4c bl 8011860 crcPass = frameCrc == crc; 8004bc8: f8b7 3122 ldrh.w r3, [r7, #290] @ 0x122 8004bcc: f8d7 2128 ldr.w r2, [r7, #296] @ 0x128 8004bd0: 429a cmp r2, r3 8004bd2: bf0c ite eq 8004bd4: 2301 moveq r3, #1 8004bd6: 2300 movne r3, #0 8004bd8: b2db uxtb r3, r3 8004bda: f8c7 3138 str.w r3, [r7, #312] @ 0x138 if (crcPass) { 8004bde: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 8004be2: 2b00 cmp r3, #0 8004be4: d00b beq.n 8004bfe printf ("Uart%d: Frame CRC PASS\n", uartTaskData->uartNumber); 8004be6: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004bea: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004bee: 4619 mov r1, r3 8004bf0: 4832 ldr r0, [pc, #200] @ (8004cbc ) 8004bf2: f025 fe53 bl 802a89c receverState = srExecuteCmd; 8004bf6: 2303 movs r3, #3 8004bf8: f887 3133 strb.w r3, [r7, #307] @ 0x133 } else { receverState = srFail; } break; 8004bfc: e10b b.n 8004e16 receverState = srFail; 8004bfe: 2304 movs r3, #4 8004c00: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004c04: e107 b.n 8004e16 case srExecuteCmd: if ((uartTaskData->processDataCb != NULL) || (uartTaskData->processRxDataMsgBuffer != NULL)) { 8004c06: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c0a: 6a9b ldr r3, [r3, #40] @ 0x28 8004c0c: 2b00 cmp r3, #0 8004c0e: d104 bne.n 8004c1a 8004c10: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c14: 6a5b ldr r3, [r3, #36] @ 0x24 8004c16: 2b00 cmp r3, #0 8004c18: d01e beq.n 8004c58 osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004c1a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c1e: 6a1b ldr r3, [r3, #32] 8004c20: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004c24: 4618 mov r0, r3 8004c26: f00c fdd0 bl 80117ca memcpy (spFrameData.dataBuffer, &(uartTaskData->frameData[FRAME_HEADER_LENGTH]), spFrameData.frameHeader.frameDataLength); 8004c2a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c2e: 691b ldr r3, [r3, #16] 8004c30: f103 0108 add.w r1, r3, #8 8004c34: f507 73a0 add.w r3, r7, #320 @ 0x140 8004c38: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004c3c: 889b ldrh r3, [r3, #4] 8004c3e: 461a mov r2, r3 8004c40: f107 0310 add.w r3, r7, #16 8004c44: 330c adds r3, #12 8004c46: 4618 mov r0, r3 8004c48: f026 f8b1 bl 802adae osMutexRelease (uartTaskData->rxDataBufferMutex); 8004c4c: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c50: 6a1b ldr r3, [r3, #32] 8004c52: 4618 mov r0, r3 8004c54: f00c fe04 bl 8011860 } if (uartTaskData->processRxDataMsgBuffer != NULL) { 8004c58: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c5c: 6a5b ldr r3, [r3, #36] @ 0x24 8004c5e: 2b00 cmp r3, #0 8004c60: d015 beq.n 8004c8e if(xMessageBufferSend (uartTaskData->processRxDataMsgBuffer, &spFrameData, sizeof (SerialProtocolFrameHeader) + spFrameData.frameHeader.frameDataLength, pdMS_TO_TICKS (200)) == pdFALSE) 8004c62: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c66: 6a58 ldr r0, [r3, #36] @ 0x24 8004c68: f507 73a0 add.w r3, r7, #320 @ 0x140 8004c6c: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004c70: 889b ldrh r3, [r3, #4] 8004c72: f103 020c add.w r2, r3, #12 8004c76: f107 0110 add.w r1, r7, #16 8004c7a: 23c8 movs r3, #200 @ 0xc8 8004c7c: f00e fb82 bl 8013384 8004c80: 4603 mov r3, r0 8004c82: 2b00 cmp r3, #0 8004c84: d103 bne.n 8004c8e { receverState = srFail; 8004c86: 2304 movs r3, #4 8004c88: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004c8c: e0c3 b.n 8004e16 } } if (uartTaskData->processDataCb != NULL) { 8004c8e: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c92: 6a9b ldr r3, [r3, #40] @ 0x28 8004c94: 2b00 cmp r3, #0 8004c96: d008 beq.n 8004caa uartTaskData->processDataCb (uartTaskData, &spFrameData); 8004c98: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004c9c: 6a9b ldr r3, [r3, #40] @ 0x28 8004c9e: f107 0210 add.w r2, r7, #16 8004ca2: 4611 mov r1, r2 8004ca4: f8d7 012c ldr.w r0, [r7, #300] @ 0x12c 8004ca8: 4798 blx r3 } receverState = srFinish; 8004caa: 2305 movs r3, #5 8004cac: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004cb0: e0b1 b.n 8004e16 8004cb2: bf00 nop 8004cb4: 0802d914 .word 0x0802d914 8004cb8: 24000248 .word 0x24000248 8004cbc: 0802d934 .word 0x0802d934 case srFail: dataToSend = 0; 8004cc0: 2300 movs r3, #0 8004cc2: f8a7 313c strh.w r3, [r7, #316] @ 0x13c if ((frameTimeout == pdTRUE) && (frameBytesCount > 2)) { 8004cc6: f8d7 311c ldr.w r3, [r7, #284] @ 0x11c 8004cca: 2b01 cmp r3, #1 8004ccc: d124 bne.n 8004d18 8004cce: f8b7 3124 ldrh.w r3, [r7, #292] @ 0x124 8004cd2: 2b02 cmp r3, #2 8004cd4: d920 bls.n 8004d18 dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spTimeout, 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: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004cfc: f7fe fdf6 bl 80038ec 8004d00: 4603 mov r3, r0 8004d02: f8a7 313c strh.w r3, [r7, #316] @ 0x13c printf ("Uart%d: RX data receiver timeout!\n", uartTaskData->uartNumber); 8004d06: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d0a: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004d0e: 4619 mov r1, r3 8004d10: 4844 ldr r0, [pc, #272] @ (8004e24 ) 8004d12: f025 fdc3 bl 802a89c 8004d16: e03c b.n 8004d92 } else if (!crcPass) { 8004d18: f8d7 3138 ldr.w r3, [r7, #312] @ 0x138 8004d1c: 2b00 cmp r3, #0 8004d1e: d120 bne.n 8004d62 dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spCrcFail, NULL, 0); 8004d20: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d24: 6898 ldr r0, [r3, #8] 8004d26: f507 73a0 add.w r3, r7, #320 @ 0x140 8004d2a: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004d2e: 8819 ldrh r1, [r3, #0] 8004d30: f507 73a0 add.w r3, r7, #320 @ 0x140 8004d34: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004d38: 789a ldrb r2, [r3, #2] 8004d3a: 2300 movs r3, #0 8004d3c: 9301 str r3, [sp, #4] 8004d3e: 2300 movs r3, #0 8004d40: 9300 str r3, [sp, #0] 8004d42: f06f 0301 mvn.w r3, #1 8004d46: f7fe fdd1 bl 80038ec 8004d4a: 4603 mov r3, r0 8004d4c: f8a7 313c strh.w r3, [r7, #316] @ 0x13c printf ("Uart%d: Frame CRC FAIL\n", uartTaskData->uartNumber); 8004d50: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d54: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004d58: 4619 mov r1, r3 8004d5a: 4833 ldr r0, [pc, #204] @ (8004e28 ) 8004d5c: f025 fd9e bl 802a89c 8004d60: e017 b.n 8004d92 } else { dataToSend = PrepareRespFrame (uartTaskData->uartTxBuffer, spFrameData.frameHeader.frameId, spFrameData.frameHeader.frameCommand, spInternalError, NULL, 0); 8004d62: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d66: 6898 ldr r0, [r3, #8] 8004d68: f507 73a0 add.w r3, r7, #320 @ 0x140 8004d6c: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004d70: 8819 ldrh r1, [r3, #0] 8004d72: f507 73a0 add.w r3, r7, #320 @ 0x140 8004d76: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004d7a: 789a ldrb r2, [r3, #2] 8004d7c: 2300 movs r3, #0 8004d7e: 9301 str r3, [sp, #4] 8004d80: 2300 movs r3, #0 8004d82: 9300 str r3, [sp, #0] 8004d84: f06f 0303 mvn.w r3, #3 8004d88: f7fe fdb0 bl 80038ec 8004d8c: 4603 mov r3, r0 8004d8e: f8a7 313c strh.w r3, [r7, #316] @ 0x13c } if (dataToSend > 0) { 8004d92: f8b7 313c ldrh.w r3, [r7, #316] @ 0x13c 8004d96: 2b00 cmp r3, #0 8004d98: d00a beq.n 8004db0 HAL_UART_Transmit_IT (uartTaskData->huart, uartTaskData->uartTxBuffer, dataToSend); 8004d9a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004d9e: 6b18 ldr r0, [r3, #48] @ 0x30 8004da0: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004da4: 689b ldr r3, [r3, #8] 8004da6: f8b7 213c ldrh.w r2, [r7, #316] @ 0x13c 8004daa: 4619 mov r1, r3 8004dac: f008 fe0e bl 800d9cc } printf ("Uart%d: TX bytes sent: %d\n", dataToSend, uartTaskData->uartNumber); 8004db0: f8b7 113c ldrh.w r1, [r7, #316] @ 0x13c 8004db4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004db8: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8004dbc: 461a mov r2, r3 8004dbe: 481b ldr r0, [pc, #108] @ (8004e2c ) 8004dc0: f025 fd6c bl 802a89c receverState = srFinish; 8004dc4: 2305 movs r3, #5 8004dc6: f887 3133 strb.w r3, [r7, #307] @ 0x133 break; 8004dca: e024 b.n 8004e16 case srFinish: default: osMutexAcquire (uartTaskData->rxDataBufferMutex, osWaitForever); 8004dcc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004dd0: 6a1b ldr r3, [r3, #32] 8004dd2: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8004dd6: 4618 mov r0, r3 8004dd8: f00c fcf7 bl 80117ca uartTaskData->frameBytesCount = 0; 8004ddc: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004de0: 2200 movs r2, #0 8004de2: 82da strh r2, [r3, #22] osMutexRelease (uartTaskData->rxDataBufferMutex); 8004de4: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 8004de8: 6a1b ldr r3, [r3, #32] 8004dea: 4618 mov r0, r3 8004dec: f00c fd38 bl 8011860 spFrameData.frameHeader.frameCommand = spUnknown; 8004df0: f507 73a0 add.w r3, r7, #320 @ 0x140 8004df4: f5a3 7398 sub.w r3, r3, #304 @ 0x130 8004df8: 2210 movs r2, #16 8004dfa: 709a strb r2, [r3, #2] frameTotalLength = 0; 8004dfc: 2300 movs r3, #0 8004dfe: f8a7 313e strh.w r3, [r7, #318] @ 0x13e outputDataBufferPos = 0; 8004e02: 4b0b ldr r3, [pc, #44] @ (8004e30 ) 8004e04: 2200 movs r2, #0 8004e06: 801a strh r2, [r3, #0] receverState = srWaitForHeader; 8004e08: 2300 movs r3, #0 8004e0a: f887 3133 strb.w r3, [r7, #307] @ 0x133 proceed = pdFALSE; 8004e0e: 2300 movs r3, #0 8004e10: f8c7 3134 str.w r3, [r7, #308] @ 0x134 break; 8004e14: bf00 nop while (proceed) { 8004e16: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 8004e1a: 2b00 cmp r3, #0 8004e1c: f47f ade0 bne.w 80049e0 frameTimeout = !(xTaskNotifyWait (0, 0, &bytesRec, pdMS_TO_TICKS (FRAME_TIMEOUT_MS))); 8004e20: e581 b.n 8004926 8004e22: bf00 nop 8004e24: 0802d94c .word 0x0802d94c 8004e28: 0802d970 .word 0x0802d970 8004e2c: 0802d988 .word 0x0802d988 8004e30: 24002094 .word 0x24002094 08004e34 : } } } void ReadMeasSetFromBuffer(uint8_t* buff, uint16_t* buffPos, float* dataSet) { 8004e34: b580 push {r7, lr} 8004e36: b086 sub sp, #24 8004e38: af00 add r7, sp, #0 8004e3a: 60f8 str r0, [r7, #12] 8004e3c: 60b9 str r1, [r7, #8] 8004e3e: 607a str r2, [r7, #4] for(uint8_t i = 0; i < 3; i++) 8004e40: 2300 movs r3, #0 8004e42: 75fb strb r3, [r7, #23] 8004e44: e00b b.n 8004e5e { ReadFloatFromBuffer(buff, buffPos, &dataSet[i]); 8004e46: 7dfb ldrb r3, [r7, #23] 8004e48: 009b lsls r3, r3, #2 8004e4a: 687a ldr r2, [r7, #4] 8004e4c: 4413 add r3, r2 8004e4e: 461a mov r2, r3 8004e50: 68b9 ldr r1, [r7, #8] 8004e52: 68f8 ldr r0, [r7, #12] 8004e54: f7fe fc5b bl 800370e for(uint8_t i = 0; i < 3; i++) 8004e58: 7dfb ldrb r3, [r7, #23] 8004e5a: 3301 adds r3, #1 8004e5c: 75fb strb r3, [r7, #23] 8004e5e: 7dfb ldrb r3, [r7, #23] 8004e60: 2b02 cmp r3, #2 8004e62: d9f0 bls.n 8004e46 } } 8004e64: bf00 nop 8004e66: bf00 nop 8004e68: 3718 adds r7, #24 8004e6a: 46bd mov sp, r7 8004e6c: bd80 pop {r7, pc} ... 08004e70 : void UartTxTask (void* argument) { 8004e70: b580 push {r7, lr} 8004e72: b0d4 sub sp, #336 @ 0x150 8004e74: af02 add r7, sp, #8 8004e76: f507 73a4 add.w r3, r7, #328 @ 0x148 8004e7a: f5a3 73a2 sub.w r3, r3, #324 @ 0x144 8004e7e: 6018 str r0, [r3, #0] UartTaskData* const uartTaskData = (UartTaskData*)argument; 8004e80: f507 73a4 add.w r3, r7, #328 @ 0x148 8004e84: f5a3 73a2 sub.w r3, r3, #324 @ 0x144 8004e88: 681b ldr r3, [r3, #0] 8004e8a: f8c7 3140 str.w r3, [r7, #320] @ 0x140 InterProcessData data = { 0 }; 8004e8e: f507 738e add.w r3, r7, #284 @ 0x11c 8004e92: 2200 movs r2, #0 8004e94: 601a str r2, [r3, #0] 8004e96: 605a str r2, [r3, #4] 8004e98: 609a str r2, [r3, #8] 8004e9a: 60da str r2, [r3, #12] SerialProtocolFrameData frameData = { 0 }; 8004e9c: f507 73a4 add.w r3, r7, #328 @ 0x148 8004ea0: f5a3 739c sub.w r3, r3, #312 @ 0x138 8004ea4: 4618 mov r0, r3 8004ea6: f44f 7386 mov.w r3, #268 @ 0x10c 8004eaa: 461a mov r2, r3 8004eac: 2100 movs r1, #0 8004eae: f025 fe87 bl 802abc0 size_t bytesInMsg; uint16_t frameId = 0; 8004eb2: 2300 movs r3, #0 8004eb4: f8a7 313e strh.w r3, [r7, #318] @ 0x13e uint32_t rndVal = 0; 8004eb8: f507 73a4 add.w r3, r7, #328 @ 0x148 8004ebc: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004ec0: 2200 movs r2, #0 8004ec2: 601a str r2, [r3, #0] uint16_t bytesToSend = 0; 8004ec4: 2300 movs r3, #0 8004ec6: f8a7 313c strh.w r3, [r7, #316] @ 0x13c SerialProtocolCommands frameCommand = spUnknown; 8004eca: 2310 movs r3, #16 8004ecc: f887 313b strb.w r3, [r7, #315] @ 0x13b uint16_t inputDataBufferPos = 0; 8004ed0: f507 73a4 add.w r3, r7, #328 @ 0x148 8004ed4: f5a3 739f sub.w r3, r3, #318 @ 0x13e 8004ed8: 2200 movs r2, #0 8004eda: 801a strh r2, [r3, #0] uint8_t boardNumber = 0; 8004edc: 2300 movs r3, #0 8004ede: f887 3147 strb.w r3, [r7, #327] @ 0x147 while (pdTRUE) { if (uartTaskData->sendCmdToSlaveQueue != NULL) { 8004ee2: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004ee6: 6adb ldr r3, [r3, #44] @ 0x2c 8004ee8: 2b00 cmp r3, #0 8004eea: f000 8291 beq.w 8005410 osMessageQueueGet (uartTaskData->sendCmdToSlaveQueue, &data, 0, osWaitForever); 8004eee: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8004ef2: 6ad8 ldr r0, [r3, #44] @ 0x2c 8004ef4: f507 718e add.w r1, r7, #284 @ 0x11c 8004ef8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8004efc: 2200 movs r2, #0 8004efe: f00c ff03 bl 8011d08 HAL_RNG_GenerateRandomNumber (&hrng, &rndVal); 8004f02: f107 030c add.w r3, r7, #12 8004f06: 4619 mov r1, r3 8004f08: 48bf ldr r0, [pc, #764] @ (8005208 ) 8004f0a: f008 f9eb bl 800d2e4 frameId = (uint16_t)(rndVal & 0xFFFF); 8004f0e: f507 73a4 add.w r3, r7, #328 @ 0x148 8004f12: f5a3 739e sub.w r3, r3, #316 @ 0x13c 8004f16: 681b ldr r3, [r3, #0] 8004f18: f8a7 313e strh.w r3, [r7, #318] @ 0x13e frameCommand = data.spCommand; 8004f1c: f897 311c ldrb.w r3, [r7, #284] @ 0x11c 8004f20: f887 313b strb.w r3, [r7, #315] @ 0x13b outputDataBufferPos = 0; 8004f24: 4bb9 ldr r3, [pc, #740] @ (800520c ) 8004f26: 2200 movs r2, #0 8004f28: 801a strh r2, [r3, #0] memset (outputDataBuffer, 0x00, OUTPUT_DATA_BUFF_SIZE); 8004f2a: 2280 movs r2, #128 @ 0x80 8004f2c: 2100 movs r1, #0 8004f2e: 48b8 ldr r0, [pc, #736] @ (8005210 ) 8004f30: f025 fe46 bl 802abc0 switch (frameCommand) { 8004f34: f897 313b ldrb.w r3, [r7, #315] @ 0x13b 8004f38: 2b0f cmp r3, #15 8004f3a: f200 826e bhi.w 800541a 8004f3e: a201 add r2, pc, #4 @ (adr r2, 8004f44 ) 8004f40: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8004f44: 08005027 .word 0x08005027 8004f48: 08005027 .word 0x08005027 8004f4c: 08004f85 .word 0x08004f85 8004f50: 08004f85 .word 0x08004f85 8004f54: 08004f85 .word 0x08004f85 8004f58: 08004fbb .word 0x08004fbb 8004f5c: 08004fbb .word 0x08004fbb 8004f60: 08004fa9 .word 0x08004fa9 8004f64: 08005027 .word 0x08005027 8004f68: 08004fcd .word 0x08004fcd 8004f6c: 08004fdf .word 0x08004fdf 8004f70: 08004ff1 .word 0x08004ff1 8004f74: 08004ff1 .word 0x08004ff1 8004f78: 08004ff1 .word 0x08004ff1 8004f7c: 08004ff1 .word 0x08004ff1 8004f80: 08005027 .word 0x08005027 case spSetFanSpeed: case spSetMotorXOn: case spSetMotorYOn: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[0], sizeof (uint32_t)); 8004f84: f507 738e add.w r3, r7, #284 @ 0x11c 8004f88: 1d1a adds r2, r3, #4 8004f8a: 2304 movs r3, #4 8004f8c: 499f ldr r1, [pc, #636] @ (800520c ) 8004f8e: 48a0 ldr r0, [pc, #640] @ (8005210 ) 8004f90: f7fe fb8c bl 80036ac WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[1], sizeof (uint32_t)); 8004f94: f507 738e add.w r3, r7, #284 @ 0x11c 8004f98: f103 0208 add.w r2, r3, #8 8004f9c: 2304 movs r3, #4 8004f9e: 499b ldr r1, [pc, #620] @ (800520c ) 8004fa0: 489b ldr r0, [pc, #620] @ (8005210 ) 8004fa2: f7fe fb83 bl 80036ac break; 8004fa6: e03f b.n 8005028 case spSetDiodeOn: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.integerValues.value[0], sizeof (uint32_t)); break; 8004fa8: f507 738e add.w r3, r7, #284 @ 0x11c 8004fac: 1d1a adds r2, r3, #4 8004fae: 2304 movs r3, #4 8004fb0: 4996 ldr r1, [pc, #600] @ (800520c ) 8004fb2: 4897 ldr r0, [pc, #604] @ (8005210 ) 8004fb4: f7fe fb7a bl 80036ac 8004fb8: e036 b.n 8005028 case spSetmotorXMaxCurrent: case spSetmotorYMaxCurrent: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); break; 8004fba: f507 738e add.w r3, r7, #284 @ 0x11c 8004fbe: 1d1a adds r2, r3, #4 8004fc0: 2304 movs r3, #4 8004fc2: 4992 ldr r1, [pc, #584] @ (800520c ) 8004fc4: 4892 ldr r0, [pc, #584] @ (8005210 ) 8004fc6: f7fe fb71 bl 80036ac 8004fca: e02d b.n 8005028 case spGetElectricalMeasurments: case spGetSensorMeasurments: break; case spClearPeakMeasurments: break; case spSetEncoderXValue: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); break; 8004fcc: f507 738e add.w r3, r7, #284 @ 0x11c 8004fd0: 1d1a adds r2, r3, #4 8004fd2: 2304 movs r3, #4 8004fd4: 498d ldr r1, [pc, #564] @ (800520c ) 8004fd6: 488e ldr r0, [pc, #568] @ (8005210 ) 8004fd8: f7fe fb68 bl 80036ac 8004fdc: e024 b.n 8005028 case spSetEncoderYValue: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); break; 8004fde: f507 738e add.w r3, r7, #284 @ 0x11c 8004fe2: 1d1a adds r2, r3, #4 8004fe4: 2304 movs r3, #4 8004fe6: 4989 ldr r1, [pc, #548] @ (800520c ) 8004fe8: 4889 ldr r0, [pc, #548] @ (8005210 ) 8004fea: f7fe fb5f bl 80036ac 8004fee: e01b b.n 8005028 case spSetVoltageMeasGains: case spSetVoltageMeasOffsets: case spSetCurrentMeasGains: case spSetCurrentMeasOffsets: WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[0], sizeof (float)); 8004ff0: f507 738e add.w r3, r7, #284 @ 0x11c 8004ff4: 1d1a adds r2, r3, #4 8004ff6: 2304 movs r3, #4 8004ff8: 4984 ldr r1, [pc, #528] @ (800520c ) 8004ffa: 4885 ldr r0, [pc, #532] @ (8005210 ) 8004ffc: f7fe fb56 bl 80036ac WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[1], sizeof (float)); 8005000: f507 738e add.w r3, r7, #284 @ 0x11c 8005004: f103 0208 add.w r2, r3, #8 8005008: 2304 movs r3, #4 800500a: 4980 ldr r1, [pc, #512] @ (800520c ) 800500c: 4880 ldr r0, [pc, #512] @ (8005210 ) 800500e: f7fe fb4d bl 80036ac WriteDataToBuffer (outputDataBuffer, &outputDataBufferPos, &data.values.flaotValues.value[2], sizeof (float)); 8005012: f507 738e add.w r3, r7, #284 @ 0x11c 8005016: f103 020c add.w r2, r3, #12 800501a: 2304 movs r3, #4 800501c: 497b ldr r1, [pc, #492] @ (800520c ) 800501e: 487c ldr r0, [pc, #496] @ (8005210 ) 8005020: f7fe fb44 bl 80036ac break; 8005024: e000 b.n 8005028 case spGetSensorMeasurments: break; 8005026: bf00 nop case spResetSystem: break; default: continue; break; } bytesToSend = PrepareReqFrame (uartTaskData->uartTxBuffer, frameId, frameCommand, outputDataBuffer, outputDataBufferPos); 8005028: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 800502c: 6898 ldr r0, [r3, #8] 800502e: 4b77 ldr r3, [pc, #476] @ (800520c ) 8005030: 881b ldrh r3, [r3, #0] 8005032: f897 213b ldrb.w r2, [r7, #315] @ 0x13b 8005036: f8b7 113e ldrh.w r1, [r7, #318] @ 0x13e 800503a: 9300 str r3, [sp, #0] 800503c: 4b74 ldr r3, [pc, #464] @ (8005210 ) 800503e: f7fe fbc1 bl 80037c4 8005042: 4603 mov r3, r0 8005044: f8a7 313c strh.w r3, [r7, #316] @ 0x13c HAL_UART_Transmit_IT (uartTaskData->huart, uartTaskData->uartTxBuffer, bytesToSend); 8005048: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 800504c: 6b18 ldr r0, [r3, #48] @ 0x30 800504e: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8005052: 689b ldr r3, [r3, #8] 8005054: f8b7 213c ldrh.w r2, [r7, #316] @ 0x13c 8005058: 4619 mov r1, r3 800505a: f008 fcb7 bl 800d9cc bytesInMsg = xMessageBufferReceive (uartTaskData->processRxDataMsgBuffer, &frameData, INPUT_DATA_BUFF_SIZE, pdMS_TO_TICKS (1000)); 800505e: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8005062: 6a58 ldr r0, [r3, #36] @ 0x24 8005064: f107 0110 add.w r1, r7, #16 8005068: f44f 737a mov.w r3, #1000 @ 0x3e8 800506c: f44f 7280 mov.w r2, #256 @ 0x100 8005070: f00e fa7e bl 8013570 8005074: f8c7 0134 str.w r0, [r7, #308] @ 0x134 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8005078: 2300 movs r3, #0 800507a: f887 3147 strb.w r3, [r7, #327] @ 0x147 800507e: e00e b.n 800509e if (boardToUartNumberMap[boardNumber] == uartTaskData->uartNumber) { 8005080: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 8005084: 4a63 ldr r2, [pc, #396] @ (8005214 ) 8005086: 5cd2 ldrb r2, [r2, r3] 8005088: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 800508c: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8005090: 429a cmp r2, r3 8005092: d009 beq.n 80050a8 for (boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) { 8005094: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 8005098: 3301 adds r3, #1 800509a: f887 3147 strb.w r3, [r7, #327] @ 0x147 800509e: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 80050a2: 2b03 cmp r3, #3 80050a4: d9ec bls.n 8005080 80050a6: e000 b.n 80050aa break; 80050a8: bf00 nop } } if (bytesInMsg == 0) { 80050aa: f8d7 3134 ldr.w r3, [r7, #308] @ 0x134 80050ae: 2b00 cmp r3, #0 80050b0: d124 bne.n 80050fc if (frameCommand == spGetElectricalMeasurments) { 80050b2: f897 313b ldrb.w r3, [r7, #315] @ 0x13b 80050b6: 2b00 cmp r3, #0 80050b8: d114 bne.n 80050e4 osMutexAcquire (resMeasurementsMutex, osWaitForever); 80050ba: 4b57 ldr r3, [pc, #348] @ (8005218 ) 80050bc: 681b ldr r3, [r3, #0] 80050be: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80050c2: 4618 mov r0, r3 80050c4: f00c fb81 bl 80117ca slaveLastSeen[boardNumber]++; 80050c8: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 80050cc: 4a53 ldr r2, [pc, #332] @ (800521c ) 80050ce: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80050d2: 3201 adds r2, #1 80050d4: 4951 ldr r1, [pc, #324] @ (800521c ) 80050d6: f841 2023 str.w r2, [r1, r3, lsl #2] osMutexRelease (resMeasurementsMutex); 80050da: 4b4f ldr r3, [pc, #316] @ (8005218 ) 80050dc: 681b ldr r3, [r3, #0] 80050de: 4618 mov r0, r3 80050e0: f00c fbbe bl 8011860 } printf ("Uart%d: Response timeout for frameId 0x%x\n", uartTaskData->uartNumber, frameId); 80050e4: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 80050e8: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80050ec: 4619 mov r1, r3 80050ee: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 80050f2: 461a mov r2, r3 80050f4: 484a ldr r0, [pc, #296] @ (8005220 ) 80050f6: f025 fbd1 bl 802a89c 80050fa: e6f2 b.n 8004ee2 } else { if ((frameId == frameData.frameHeader.frameId) && (frameData.frameHeader.respStatus == spOK)) { 80050fc: f507 73a4 add.w r3, r7, #328 @ 0x148 8005100: f5a3 739c sub.w r3, r3, #312 @ 0x138 8005104: 881b ldrh r3, [r3, #0] 8005106: f8b7 213e ldrh.w r2, [r7, #318] @ 0x13e 800510a: 429a cmp r2, r3 800510c: f47f aee9 bne.w 8004ee2 8005110: f507 73a4 add.w r3, r7, #328 @ 0x148 8005114: f5a3 739c sub.w r3, r3, #312 @ 0x138 8005118: f993 3003 ldrsb.w r3, [r3, #3] 800511c: 2b00 cmp r3, #0 800511e: f47f aee0 bne.w 8004ee2 printf ("Uart%d: Response for frameId 0x%x OK\n", uartTaskData->uartNumber, frameId); 8005122: f8d7 3140 ldr.w r3, [r7, #320] @ 0x140 8005126: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 800512a: 4619 mov r1, r3 800512c: f8b7 313e ldrh.w r3, [r7, #318] @ 0x13e 8005130: 461a mov r2, r3 8005132: 483c ldr r0, [pc, #240] @ (8005224 ) 8005134: f025 fbb2 bl 802a89c slaveLastSeen[boardNumber] = 0; 8005138: f897 3147 ldrb.w r3, [r7, #327] @ 0x147 800513c: 4a37 ldr r2, [pc, #220] @ (800521c ) 800513e: 2100 movs r1, #0 8005140: f842 1023 str.w r1, [r2, r3, lsl #2] switch (frameData.frameHeader.frameCommand) { 8005144: f507 73a4 add.w r3, r7, #328 @ 0x148 8005148: f5a3 739c sub.w r3, r3, #312 @ 0x138 800514c: 789b ldrb r3, [r3, #2] 800514e: 2b00 cmp r3, #0 8005150: d002 beq.n 8005158 8005152: 2b01 cmp r3, #1 8005154: d06a beq.n 800522c ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchDown); ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchCenter); ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->powerSupplyFailMask); osMutexRelease (sensorsInfoMutex); break; default: break; 8005156: e161 b.n 800541c osMutexAcquire (resMeasurementsMutex, osWaitForever); 8005158: 4b2f ldr r3, [pc, #188] @ (8005218 ) 800515a: 681b ldr r3, [r3, #0] 800515c: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8005160: 4618 mov r0, r3 8005162: f00c fb32 bl 80117ca RESMeasurements* resMeas = &resMeasurements[boardNumber]; 8005166: f897 2147 ldrb.w r2, [r7, #327] @ 0x147 800516a: 4613 mov r3, r2 800516c: 011b lsls r3, r3, #4 800516e: 1a9b subs r3, r3, r2 8005170: 009b lsls r3, r3, #2 8005172: 4a2d ldr r2, [pc, #180] @ (8005228 ) 8005174: 4413 add r3, r2 8005176: f8c7 312c str.w r3, [r7, #300] @ 0x12c inputDataBufferPos = 0; 800517a: f507 73a4 add.w r3, r7, #328 @ 0x148 800517e: f5a3 739f sub.w r3, r3, #318 @ 0x13e 8005182: 2200 movs r2, #0 8005184: 801a strh r2, [r3, #0] ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->voltageRMS); 8005186: f8d7 212c ldr.w r2, [r7, #300] @ 0x12c 800518a: f107 010a add.w r1, r7, #10 800518e: f107 0310 add.w r3, r7, #16 8005192: 330c adds r3, #12 8005194: 4618 mov r0, r3 8005196: f7ff fe4d bl 8004e34 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->voltagePeak); 800519a: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 800519e: f103 020c add.w r2, r3, #12 80051a2: f107 010a add.w r1, r7, #10 80051a6: f107 0310 add.w r3, r7, #16 80051aa: 330c adds r3, #12 80051ac: 4618 mov r0, r3 80051ae: f7ff fe41 bl 8004e34 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->currentRMS); 80051b2: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80051b6: f103 0218 add.w r2, r3, #24 80051ba: f107 010a add.w r1, r7, #10 80051be: f107 0310 add.w r3, r7, #16 80051c2: 330c adds r3, #12 80051c4: 4618 mov r0, r3 80051c6: f7ff fe35 bl 8004e34 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->currentPeak); 80051ca: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80051ce: f103 0224 add.w r2, r3, #36 @ 0x24 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: f7ff fe29 bl 8004e34 ReadMeasSetFromBuffer (frameData.dataBuffer, &inputDataBufferPos, resMeas->power); 80051e2: f8d7 312c ldr.w r3, [r7, #300] @ 0x12c 80051e6: f103 0230 add.w r2, r3, #48 @ 0x30 80051ea: f107 010a add.w r1, r7, #10 80051ee: f107 0310 add.w r3, r7, #16 80051f2: 330c adds r3, #12 80051f4: 4618 mov r0, r3 80051f6: f7ff fe1d bl 8004e34 osMutexRelease (resMeasurementsMutex); 80051fa: 4b07 ldr r3, [pc, #28] @ (8005218 ) 80051fc: 681b ldr r3, [r3, #0] 80051fe: 4618 mov r0, r3 8005200: f00c fb2e bl 8011860 break; 8005204: e10a b.n 800541c 8005206: bf00 nop 8005208: 2400027c .word 0x2400027c 800520c: 24002094 .word 0x24002094 8005210: 24002014 .word 0x24002014 8005214: 24000014 .word 0x24000014 8005218: 24002258 .word 0x24002258 800521c: 24002248 .word 0x24002248 8005220: 0802d9a4 .word 0x0802d9a4 8005224: 0802d9d0 .word 0x0802d9d0 8005228: 24002098 .word 0x24002098 osMutexAcquire (sensorsInfoMutex, osWaitForever); 800522c: 4b7c ldr r3, [pc, #496] @ (8005420 ) 800522e: 681b ldr r3, [r3, #0] 8005230: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8005234: 4618 mov r0, r3 8005236: f00c fac8 bl 80117ca inputDataBufferPos = 0; 800523a: f507 73a4 add.w r3, r7, #328 @ 0x148 800523e: f5a3 739f sub.w r3, r3, #318 @ 0x13e 8005242: 2200 movs r2, #0 8005244: 801a strh r2, [r3, #0] SesnorsInfo* sensors = &sensorsInfo[boardNumber]; 8005246: f897 2147 ldrb.w r2, [r7, #327] @ 0x147 800524a: 4613 mov r3, r2 800524c: 005b lsls r3, r3, #1 800524e: 4413 add r3, r2 8005250: 011b lsls r3, r3, #4 8005252: 4a74 ldr r2, [pc, #464] @ (8005424 ) 8005254: 4413 add r3, r2 8005256: f8c7 3130 str.w r3, [r7, #304] @ 0x130 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvTemperature[0]); 800525a: f8d7 2130 ldr.w r2, [r7, #304] @ 0x130 800525e: f107 010a add.w r1, r7, #10 8005262: f107 0310 add.w r3, r7, #16 8005266: 330c adds r3, #12 8005268: 4618 mov r0, r3 800526a: f7fe fa50 bl 800370e ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvTemperature[1]); 800526e: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005272: 1d1a adds r2, r3, #4 8005274: f107 010a add.w r1, r7, #10 8005278: f107 0310 add.w r3, r7, #16 800527c: 330c adds r3, #12 800527e: 4618 mov r0, r3 8005280: f7fe fa45 bl 800370e ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->fanVoltage); 8005284: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005288: f103 0208 add.w r2, r3, #8 800528c: f107 010a add.w r1, r7, #10 8005290: f107 0310 add.w r3, r7, #16 8005294: 330c adds r3, #12 8005296: 4618 mov r0, r3 8005298: f7fe fa39 bl 800370e ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvEncoderX); 800529c: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052a0: f103 020c add.w r2, r3, #12 80052a4: f107 010a add.w r1, r7, #10 80052a8: f107 0310 add.w r3, r7, #16 80052ac: 330c adds r3, #12 80052ae: 4618 mov r0, r3 80052b0: f7fe fa2d bl 800370e ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->pvEncoderY); 80052b4: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052b8: f103 0210 add.w r2, r3, #16 80052bc: f107 010a add.w r1, r7, #10 80052c0: f107 0310 add.w r3, r7, #16 80052c4: 330c adds r3, #12 80052c6: 4618 mov r0, r3 80052c8: f7fe fa21 bl 800370e ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXStatus); 80052cc: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052d0: f103 0214 add.w r2, r3, #20 80052d4: f107 010a add.w r1, r7, #10 80052d8: f107 0310 add.w r3, r7, #16 80052dc: 330c adds r3, #12 80052de: 4618 mov r0, r3 80052e0: f7fe fa4a bl 8003778 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYStatus); 80052e4: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80052e8: f103 0215 add.w r2, r3, #21 80052ec: f107 010a add.w r1, r7, #10 80052f0: f107 0310 add.w r3, r7, #16 80052f4: 330c adds r3, #12 80052f6: 4618 mov r0, r3 80052f8: f7fe fa3e bl 8003778 ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXAveCurrent); 80052fc: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005300: f103 0218 add.w r2, r3, #24 8005304: f107 010a add.w r1, r7, #10 8005308: f107 0310 add.w r3, r7, #16 800530c: 330c adds r3, #12 800530e: 4618 mov r0, r3 8005310: f7fe f9fd bl 800370e ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYAveCurrent); 8005314: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005318: f103 021c add.w r2, r3, #28 800531c: f107 010a add.w r1, r7, #10 8005320: f107 0310 add.w r3, r7, #16 8005324: 330c adds r3, #12 8005326: 4618 mov r0, r3 8005328: f7fe f9f1 bl 800370e ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorXPeakCurrent); 800532c: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005330: f103 0220 add.w r2, r3, #32 8005334: f107 010a add.w r1, r7, #10 8005338: f107 0310 add.w r3, r7, #16 800533c: 330c adds r3, #12 800533e: 4618 mov r0, r3 8005340: f7fe f9e5 bl 800370e ReadFloatFromBuffer (frameData.dataBuffer, &inputDataBufferPos, &sensors->motorYPeakCurrent); 8005344: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005348: f103 0224 add.w r2, r3, #36 @ 0x24 800534c: f107 010a add.w r1, r7, #10 8005350: f107 0310 add.w r3, r7, #16 8005354: 330c adds r3, #12 8005356: 4618 mov r0, r3 8005358: f7fe f9d9 bl 800370e ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitXSwitchUp); 800535c: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005360: f103 0228 add.w r2, r3, #40 @ 0x28 8005364: f107 010a add.w r1, r7, #10 8005368: f107 0310 add.w r3, r7, #16 800536c: 330c adds r3, #12 800536e: 4618 mov r0, r3 8005370: f7fe fa02 bl 8003778 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitXSwitchDown); 8005374: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005378: f103 0229 add.w r2, r3, #41 @ 0x29 800537c: f107 010a add.w r1, r7, #10 8005380: f107 0310 add.w r3, r7, #16 8005384: 330c adds r3, #12 8005386: 4618 mov r0, r3 8005388: f7fe f9f6 bl 8003778 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitXSwitchCenter); 800538c: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 8005390: f103 022a add.w r2, r3, #42 @ 0x2a 8005394: f107 010a add.w r1, r7, #10 8005398: f107 0310 add.w r3, r7, #16 800539c: 330c adds r3, #12 800539e: 4618 mov r0, r3 80053a0: f7fe f9ea bl 8003778 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchUp); 80053a4: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80053a8: f103 022b add.w r2, r3, #43 @ 0x2b 80053ac: f107 010a add.w r1, r7, #10 80053b0: f107 0310 add.w r3, r7, #16 80053b4: 330c adds r3, #12 80053b6: 4618 mov r0, r3 80053b8: f7fe f9de bl 8003778 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchDown); 80053bc: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80053c0: f103 022c add.w r2, r3, #44 @ 0x2c 80053c4: f107 010a add.w r1, r7, #10 80053c8: f107 0310 add.w r3, r7, #16 80053cc: 330c adds r3, #12 80053ce: 4618 mov r0, r3 80053d0: f7fe f9d2 bl 8003778 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->limitYSwitchCenter); 80053d4: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80053d8: f103 022d add.w r2, r3, #45 @ 0x2d 80053dc: f107 010a add.w r1, r7, #10 80053e0: f107 0310 add.w r3, r7, #16 80053e4: 330c adds r3, #12 80053e6: 4618 mov r0, r3 80053e8: f7fe f9c6 bl 8003778 ReadByteFromBufer (frameData.dataBuffer, &inputDataBufferPos, &sensors->powerSupplyFailMask); 80053ec: f8d7 3130 ldr.w r3, [r7, #304] @ 0x130 80053f0: f103 022e add.w r2, r3, #46 @ 0x2e 80053f4: f107 010a add.w r1, r7, #10 80053f8: f107 0310 add.w r3, r7, #16 80053fc: 330c adds r3, #12 80053fe: 4618 mov r0, r3 8005400: f7fe f9ba bl 8003778 osMutexRelease (sensorsInfoMutex); 8005404: 4b06 ldr r3, [pc, #24] @ (8005420 ) 8005406: 681b ldr r3, [r3, #0] 8005408: 4618 mov r0, r3 800540a: f00c fa29 bl 8011860 break; 800540e: e005 b.n 800541c } } } } else { osDelay (pdMS_TO_TICKS (1000)); 8005410: f44f 707a mov.w r0, #1000 @ 0x3e8 8005414: f00c f841 bl 801149a 8005418: e563 b.n 8004ee2 default: continue; break; 800541a: bf00 nop if (uartTaskData->sendCmdToSlaveQueue != NULL) { 800541c: e561 b.n 8004ee2 800541e: bf00 nop 8005420: 2400225c .word 0x2400225c 8005424: 24002188 .word 0x24002188 08005428 : } } } void MeasurmentsReqSchedulerTaskInit (void) { 8005428: b580 push {r7, lr} 800542a: b08a sub sp, #40 @ 0x28 800542c: af00 add r7, sp, #0 osThreadAttr_t osThreadAttrMeasurmentsReqSchedulerTask = { 0 }; 800542e: 1d3b adds r3, r7, #4 8005430: 2224 movs r2, #36 @ 0x24 8005432: 2100 movs r1, #0 8005434: 4618 mov r0, r3 8005436: f025 fbc3 bl 802abc0 osThreadAttrMeasurmentsReqSchedulerTask.name = "os_thread_XXX"; 800543a: 4b08 ldr r3, [pc, #32] @ (800545c ) 800543c: 607b str r3, [r7, #4] osThreadAttrMeasurmentsReqSchedulerTask.stack_size = configMINIMAL_STACK_SIZE * 2; 800543e: f44f 6380 mov.w r3, #1024 @ 0x400 8005442: 61bb str r3, [r7, #24] osThreadAttrMeasurmentsReqSchedulerTask.priority = (osPriority_t)osPriorityNormal; 8005444: 2318 movs r3, #24 8005446: 61fb str r3, [r7, #28] osThreadNew (MeasurmentsReqSchedulerTask, uartTasks, &osThreadAttrMeasurmentsReqSchedulerTask); 8005448: 1d3b adds r3, r7, #4 800544a: 461a mov r2, r3 800544c: 4904 ldr r1, [pc, #16] @ (8005460 ) 800544e: 4805 ldr r0, [pc, #20] @ (8005464 ) 8005450: f00b ff85 bl 801135e } 8005454: bf00 nop 8005456: 3728 adds r7, #40 @ 0x28 8005458: 46bd mov sp, r7 800545a: bd80 pop {r7, pc} 800545c: 0802d9f8 .word 0x0802d9f8 8005460: 24000018 .word 0x24000018 8005464: 08005469 .word 0x08005469 08005468 : void MeasurmentsReqSchedulerTask (void* argument) { 8005468: b580 push {r7, lr} 800546a: b08a sub sp, #40 @ 0x28 800546c: af00 add r7, sp, #0 800546e: 6078 str r0, [r7, #4] while (pdTRUE) { __uintptr_t* ptr = (__uintptr_t*)argument; 8005470: 687b ldr r3, [r7, #4] 8005472: 627b str r3, [r7, #36] @ 0x24 while (*ptr != 0) { 8005474: e052 b.n 800551c UartTaskData* uartTask = (UartTaskData*)*ptr; 8005476: 6a7b ldr r3, [r7, #36] @ 0x24 8005478: 681b ldr r3, [r3, #0] 800547a: 61fb str r3, [r7, #28] if (uartTask->sendCmdToSlaveQueue != NULL) { 800547c: 69fb ldr r3, [r7, #28] 800547e: 6adb ldr r3, [r3, #44] @ 0x2c 8005480: 2b00 cmp r3, #0 8005482: d048 beq.n 8005516 InterProcessData data = { 0 }; 8005484: f107 030c add.w r3, r7, #12 8005488: 2200 movs r2, #0 800548a: 601a str r2, [r3, #0] 800548c: 605a str r2, [r3, #4] 800548e: 609a str r2, [r3, #8] 8005490: 60da str r2, [r3, #12] uint8_t boardNumber = 0; 8005492: 2300 movs r3, #0 8005494: f887 3023 strb.w r3, [r7, #35] @ 0x23 for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 8005498: 2300 movs r3, #0 800549a: f887 3023 strb.w r3, [r7, #35] @ 0x23 800549e: e00d b.n 80054bc { if(boardToUartNumberMap[boardNumber] == uartTask->uartNumber) 80054a0: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80054a4: 4a22 ldr r2, [pc, #136] @ (8005530 ) 80054a6: 5cd2 ldrb r2, [r2, r3] 80054a8: 69fb ldr r3, [r7, #28] 80054aa: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 80054ae: 429a cmp r2, r3 80054b0: d009 beq.n 80054c6 for(boardNumber = 0; boardNumber < SLAVES_COUNT; boardNumber++) 80054b2: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80054b6: 3301 adds r3, #1 80054b8: f887 3023 strb.w r3, [r7, #35] @ 0x23 80054bc: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80054c0: 2b03 cmp r3, #3 80054c2: d9ed bls.n 80054a0 80054c4: e000 b.n 80054c8 { break; 80054c6: bf00 nop } } data.spCommand = spGetElectricalMeasurments; 80054c8: 2300 movs r3, #0 80054ca: 733b strb r3, [r7, #12] osMessageQueuePut (uartTask->sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 80054cc: 69fb ldr r3, [r7, #28] 80054ce: 6ad8 ldr r0, [r3, #44] @ 0x2c 80054d0: f107 010c add.w r1, r7, #12 80054d4: 2364 movs r3, #100 @ 0x64 80054d6: 2200 movs r2, #0 80054d8: f00c fbb6 bl 8011c48 osMutexAcquire (resMeasurementsMutex, osWaitForever); 80054dc: 4b15 ldr r3, [pc, #84] @ (8005534 ) 80054de: 681b ldr r3, [r3, #0] 80054e0: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80054e4: 4618 mov r0, r3 80054e6: f00c f970 bl 80117ca if(slaveLastSeen[boardNumber] == 0) 80054ea: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80054ee: 4a12 ldr r2, [pc, #72] @ (8005538 ) 80054f0: f852 3023 ldr.w r3, [r2, r3, lsl #2] 80054f4: 2b00 cmp r3, #0 80054f6: d109 bne.n 800550c { data.spCommand = spGetSensorMeasurments; 80054f8: 2301 movs r3, #1 80054fa: 733b strb r3, [r7, #12] osMessageQueuePut (uartTask->sendCmdToSlaveQueue, &data, 0, (TickType_t)100); 80054fc: 69fb ldr r3, [r7, #28] 80054fe: 6ad8 ldr r0, [r3, #44] @ 0x2c 8005500: f107 010c add.w r1, r7, #12 8005504: 2364 movs r3, #100 @ 0x64 8005506: 2200 movs r2, #0 8005508: f00c fb9e bl 8011c48 } osMutexRelease(resMeasurementsMutex); 800550c: 4b09 ldr r3, [pc, #36] @ (8005534 ) 800550e: 681b ldr r3, [r3, #0] 8005510: 4618 mov r0, r3 8005512: f00c f9a5 bl 8011860 } ptr++; 8005516: 6a7b ldr r3, [r7, #36] @ 0x24 8005518: 3304 adds r3, #4 800551a: 627b str r3, [r7, #36] @ 0x24 while (*ptr != 0) { 800551c: 6a7b ldr r3, [r7, #36] @ 0x24 800551e: 681b ldr r3, [r3, #0] 8005520: 2b00 cmp r3, #0 8005522: d1a8 bne.n 8005476 } osDelay (pdMS_TO_TICKS (MEASURMENTS_SCHEDULER_INTERVAL_MS)); 8005524: f44f 707a mov.w r0, #1000 @ 0x3e8 8005528: f00b ffb7 bl 801149a while (pdTRUE) { 800552c: e7a0 b.n 8005470 800552e: bf00 nop 8005530: 24000014 .word 0x24000014 8005534: 24002258 .word 0x24002258 8005538: 24002248 .word 0x24002248 0800553c : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr sp, =_estack /* set stack pointer */ 800553c: f8df d034 ldr.w sp, [pc, #52] @ 8005574 /* Call the clock system initialization function.*/ bl SystemInit 8005540: f7fe ff34 bl 80043ac /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata 8005544: 480c ldr r0, [pc, #48] @ (8005578 ) ldr r1, =_edata 8005546: 490d ldr r1, [pc, #52] @ (800557c ) ldr r2, =_sidata 8005548: 4a0d ldr r2, [pc, #52] @ (8005580 ) movs r3, #0 800554a: 2300 movs r3, #0 b LoopCopyDataInit 800554c: e002 b.n 8005554 0800554e : CopyDataInit: ldr r4, [r2, r3] 800554e: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] 8005550: 50c4 str r4, [r0, r3] adds r3, r3, #4 8005552: 3304 adds r3, #4 08005554 : LoopCopyDataInit: adds r4, r0, r3 8005554: 18c4 adds r4, r0, r3 cmp r4, r1 8005556: 428c cmp r4, r1 bcc CopyDataInit 8005558: d3f9 bcc.n 800554e /* Zero fill the bss segment. */ ldr r2, =_sbss 800555a: 4a0a ldr r2, [pc, #40] @ (8005584 ) ldr r4, =_ebss 800555c: 4c0a ldr r4, [pc, #40] @ (8005588 ) movs r3, #0 800555e: 2300 movs r3, #0 b LoopFillZerobss 8005560: e001 b.n 8005566 08005562 : FillZerobss: str r3, [r2] 8005562: 6013 str r3, [r2, #0] adds r2, r2, #4 8005564: 3204 adds r2, #4 08005566 : LoopFillZerobss: cmp r2, r4 8005566: 42a2 cmp r2, r4 bcc FillZerobss 8005568: d3fb bcc.n 8005562 /* Call static constructors */ bl __libc_init_array 800556a: f025 fbf9 bl 802ad60 <__libc_init_array> /* Call the application's entry point.*/ bl main 800556e: f7fc fbed bl 8001d4c
bx lr 8005572: 4770 bx lr ldr sp, =_estack /* set stack pointer */ 8005574: 24060000 .word 0x24060000 ldr r0, =_sdata 8005578: 24000000 .word 0x24000000 ldr r1, =_edata 800557c: 24000224 .word 0x24000224 ldr r2, =_sidata 8005580: 0803214c .word 0x0803214c ldr r2, =_sbss 8005584: 24000224 .word 0x24000224 ldr r4, =_ebss 8005588: 2402b278 .word 0x2402b278 0800558c : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 800558c: e7fe b.n 800558c 0800558e : * @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) { 800558e: b480 push {r7} 8005590: b083 sub sp, #12 8005592: af00 add r7, sp, #0 8005594: 6078 str r0, [r7, #4] 8005596: 6039 str r1, [r7, #0] if(!pObj || !ioctx->ReadReg || !ioctx->WriteReg || !ioctx->GetTick) 8005598: 687b ldr r3, [r7, #4] 800559a: 2b00 cmp r3, #0 800559c: d00b beq.n 80055b6 800559e: 683b ldr r3, [r7, #0] 80055a0: 68db ldr r3, [r3, #12] 80055a2: 2b00 cmp r3, #0 80055a4: d007 beq.n 80055b6 80055a6: 683b ldr r3, [r7, #0] 80055a8: 689b ldr r3, [r3, #8] 80055aa: 2b00 cmp r3, #0 80055ac: d003 beq.n 80055b6 80055ae: 683b ldr r3, [r7, #0] 80055b0: 691b ldr r3, [r3, #16] 80055b2: 2b00 cmp r3, #0 80055b4: d102 bne.n 80055bc { return DP83848_STATUS_ERROR; 80055b6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80055ba: e014 b.n 80055e6 } pObj->IO.Init = ioctx->Init; 80055bc: 683b ldr r3, [r7, #0] 80055be: 681a ldr r2, [r3, #0] 80055c0: 687b ldr r3, [r7, #4] 80055c2: 609a str r2, [r3, #8] pObj->IO.DeInit = ioctx->DeInit; 80055c4: 683b ldr r3, [r7, #0] 80055c6: 685a ldr r2, [r3, #4] 80055c8: 687b ldr r3, [r7, #4] 80055ca: 60da str r2, [r3, #12] pObj->IO.ReadReg = ioctx->ReadReg; 80055cc: 683b ldr r3, [r7, #0] 80055ce: 68da ldr r2, [r3, #12] 80055d0: 687b ldr r3, [r7, #4] 80055d2: 615a str r2, [r3, #20] pObj->IO.WriteReg = ioctx->WriteReg; 80055d4: 683b ldr r3, [r7, #0] 80055d6: 689a ldr r2, [r3, #8] 80055d8: 687b ldr r3, [r7, #4] 80055da: 611a str r2, [r3, #16] pObj->IO.GetTick = ioctx->GetTick; 80055dc: 683b ldr r3, [r7, #0] 80055de: 691a ldr r2, [r3, #16] 80055e0: 687b ldr r3, [r7, #4] 80055e2: 619a str r2, [r3, #24] return DP83848_STATUS_OK; 80055e4: 2300 movs r3, #0 } 80055e6: 4618 mov r0, r3 80055e8: 370c adds r7, #12 80055ea: 46bd mov sp, r7 80055ec: f85d 7b04 ldr.w r7, [sp], #4 80055f0: 4770 bx lr 080055f2 : * @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) { 80055f2: b580 push {r7, lr} 80055f4: b086 sub sp, #24 80055f6: af00 add r7, sp, #0 80055f8: 6078 str r0, [r7, #4] uint32_t regvalue = 0, addr = 0; 80055fa: 2300 movs r3, #0 80055fc: 60fb str r3, [r7, #12] 80055fe: 2300 movs r3, #0 8005600: 617b str r3, [r7, #20] int32_t status = DP83848_STATUS_OK; 8005602: 2300 movs r3, #0 8005604: 613b str r3, [r7, #16] if(pObj->Is_Initialized == 0) 8005606: 687b ldr r3, [r7, #4] 8005608: 685b ldr r3, [r3, #4] 800560a: 2b00 cmp r3, #0 800560c: d139 bne.n 8005682 { if(pObj->IO.Init != 0) 800560e: 687b ldr r3, [r7, #4] 8005610: 689b ldr r3, [r3, #8] 8005612: 2b00 cmp r3, #0 8005614: d002 beq.n 800561c { /* GPIO and Clocks initialization */ pObj->IO.Init(); 8005616: 687b ldr r3, [r7, #4] 8005618: 689b ldr r3, [r3, #8] 800561a: 4798 blx r3 } /* for later check */ pObj->DevAddr = DP83848_MAX_DEV_ADDR + 1; 800561c: 687b ldr r3, [r7, #4] 800561e: 2220 movs r2, #32 8005620: 601a str r2, [r3, #0] /* Get the device address from special mode register */ for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++) 8005622: 2300 movs r3, #0 8005624: 617b str r3, [r7, #20] 8005626: e01c b.n 8005662 { if(pObj->IO.ReadReg(addr, DP83848_SMR, ®value) < 0) 8005628: 687b ldr r3, [r7, #4] 800562a: 695b ldr r3, [r3, #20] 800562c: f107 020c add.w r2, r7, #12 8005630: 2119 movs r1, #25 8005632: 6978 ldr r0, [r7, #20] 8005634: 4798 blx r3 8005636: 4603 mov r3, r0 8005638: 2b00 cmp r3, #0 800563a: da03 bge.n 8005644 { status = DP83848_STATUS_READ_ERROR; 800563c: f06f 0304 mvn.w r3, #4 8005640: 613b str r3, [r7, #16] /* Can't read from this device address continue with next address */ continue; 8005642: e00b b.n 800565c } if((regvalue & DP83848_SMR_PHY_ADDR) == addr) 8005644: 68fb ldr r3, [r7, #12] 8005646: f003 031f and.w r3, r3, #31 800564a: 697a ldr r2, [r7, #20] 800564c: 429a cmp r2, r3 800564e: d105 bne.n 800565c { pObj->DevAddr = addr; 8005650: 687b ldr r3, [r7, #4] 8005652: 697a ldr r2, [r7, #20] 8005654: 601a str r2, [r3, #0] status = DP83848_STATUS_OK; 8005656: 2300 movs r3, #0 8005658: 613b str r3, [r7, #16] break; 800565a: e005 b.n 8005668 for(addr = 0; addr <= DP83848_MAX_DEV_ADDR; addr ++) 800565c: 697b ldr r3, [r7, #20] 800565e: 3301 adds r3, #1 8005660: 617b str r3, [r7, #20] 8005662: 697b ldr r3, [r7, #20] 8005664: 2b1f cmp r3, #31 8005666: d9df bls.n 8005628 } } if(pObj->DevAddr > DP83848_MAX_DEV_ADDR) 8005668: 687b ldr r3, [r7, #4] 800566a: 681b ldr r3, [r3, #0] 800566c: 2b1f cmp r3, #31 800566e: d902 bls.n 8005676 { status = DP83848_STATUS_ADDRESS_ERROR; 8005670: f06f 0302 mvn.w r3, #2 8005674: 613b str r3, [r7, #16] } /* if device address is matched */ if(status == DP83848_STATUS_OK) 8005676: 693b ldr r3, [r7, #16] 8005678: 2b00 cmp r3, #0 800567a: d102 bne.n 8005682 { pObj->Is_Initialized = 1; 800567c: 687b ldr r3, [r7, #4] 800567e: 2201 movs r2, #1 8005680: 605a str r2, [r3, #4] } } return status; 8005682: 693b ldr r3, [r7, #16] } 8005684: 4618 mov r0, r3 8005686: 3718 adds r7, #24 8005688: 46bd mov sp, r7 800568a: bd80 pop {r7, pc} 0800568c : * 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) { 800568c: b580 push {r7, lr} 800568e: b084 sub sp, #16 8005690: af00 add r7, sp, #0 8005692: 6078 str r0, [r7, #4] uint32_t readval = 0; 8005694: 2300 movs r3, #0 8005696: 60fb str r3, [r7, #12] /* Read Status register */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0) 8005698: 687b ldr r3, [r7, #4] 800569a: 695b ldr r3, [r3, #20] 800569c: 687a ldr r2, [r7, #4] 800569e: 6810 ldr r0, [r2, #0] 80056a0: f107 020c add.w r2, r7, #12 80056a4: 2101 movs r1, #1 80056a6: 4798 blx r3 80056a8: 4603 mov r3, r0 80056aa: 2b00 cmp r3, #0 80056ac: da02 bge.n 80056b4 { return DP83848_STATUS_READ_ERROR; 80056ae: f06f 0304 mvn.w r3, #4 80056b2: e06e b.n 8005792 } /* Read Status register again */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BSR, &readval) < 0) 80056b4: 687b ldr r3, [r7, #4] 80056b6: 695b ldr r3, [r3, #20] 80056b8: 687a ldr r2, [r7, #4] 80056ba: 6810 ldr r0, [r2, #0] 80056bc: f107 020c add.w r2, r7, #12 80056c0: 2101 movs r1, #1 80056c2: 4798 blx r3 80056c4: 4603 mov r3, r0 80056c6: 2b00 cmp r3, #0 80056c8: da02 bge.n 80056d0 { return DP83848_STATUS_READ_ERROR; 80056ca: f06f 0304 mvn.w r3, #4 80056ce: e060 b.n 8005792 } if((readval & DP83848_BSR_LINK_STATUS) == 0) 80056d0: 68fb ldr r3, [r7, #12] 80056d2: f003 0304 and.w r3, r3, #4 80056d6: 2b00 cmp r3, #0 80056d8: d101 bne.n 80056de { /* Return Link Down status */ return DP83848_STATUS_LINK_DOWN; 80056da: 2301 movs r3, #1 80056dc: e059 b.n 8005792 } /* Check Auto negotiaition */ if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_BCR, &readval) < 0) 80056de: 687b ldr r3, [r7, #4] 80056e0: 695b ldr r3, [r3, #20] 80056e2: 687a ldr r2, [r7, #4] 80056e4: 6810 ldr r0, [r2, #0] 80056e6: f107 020c add.w r2, r7, #12 80056ea: 2100 movs r1, #0 80056ec: 4798 blx r3 80056ee: 4603 mov r3, r0 80056f0: 2b00 cmp r3, #0 80056f2: da02 bge.n 80056fa { return DP83848_STATUS_READ_ERROR; 80056f4: f06f 0304 mvn.w r3, #4 80056f8: e04b b.n 8005792 } if((readval & DP83848_BCR_AUTONEGO_EN) != DP83848_BCR_AUTONEGO_EN) 80056fa: 68fb ldr r3, [r7, #12] 80056fc: f403 5380 and.w r3, r3, #4096 @ 0x1000 8005700: 2b00 cmp r3, #0 8005702: d11b bne.n 800573c { if(((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) && ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE)) 8005704: 68fb ldr r3, [r7, #12] 8005706: f403 5300 and.w r3, r3, #8192 @ 0x2000 800570a: 2b00 cmp r3, #0 800570c: d006 beq.n 800571c 800570e: 68fb ldr r3, [r7, #12] 8005710: f403 7380 and.w r3, r3, #256 @ 0x100 8005714: 2b00 cmp r3, #0 8005716: d001 beq.n 800571c { return DP83848_STATUS_100MBITS_FULLDUPLEX; 8005718: 2302 movs r3, #2 800571a: e03a b.n 8005792 } else if ((readval & DP83848_BCR_SPEED_SELECT) == DP83848_BCR_SPEED_SELECT) 800571c: 68fb ldr r3, [r7, #12] 800571e: f403 5300 and.w r3, r3, #8192 @ 0x2000 8005722: 2b00 cmp r3, #0 8005724: d001 beq.n 800572a { return DP83848_STATUS_100MBITS_HALFDUPLEX; 8005726: 2303 movs r3, #3 8005728: e033 b.n 8005792 } else if ((readval & DP83848_BCR_DUPLEX_MODE) == DP83848_BCR_DUPLEX_MODE) 800572a: 68fb ldr r3, [r7, #12] 800572c: f403 7380 and.w r3, r3, #256 @ 0x100 8005730: 2b00 cmp r3, #0 8005732: d001 beq.n 8005738 { return DP83848_STATUS_10MBITS_FULLDUPLEX; 8005734: 2304 movs r3, #4 8005736: e02c b.n 8005792 } else { return DP83848_STATUS_10MBITS_HALFDUPLEX; 8005738: 2305 movs r3, #5 800573a: e02a b.n 8005792 } } else /* Auto Nego enabled */ { if(pObj->IO.ReadReg(pObj->DevAddr, DP83848_PHYSCSR, &readval) < 0) 800573c: 687b ldr r3, [r7, #4] 800573e: 695b ldr r3, [r3, #20] 8005740: 687a ldr r2, [r7, #4] 8005742: 6810 ldr r0, [r2, #0] 8005744: f107 020c add.w r2, r7, #12 8005748: 2110 movs r1, #16 800574a: 4798 blx r3 800574c: 4603 mov r3, r0 800574e: 2b00 cmp r3, #0 8005750: da02 bge.n 8005758 { return DP83848_STATUS_READ_ERROR; 8005752: f06f 0304 mvn.w r3, #4 8005756: e01c b.n 8005792 } /* Check if auto nego not done */ if((readval & DP83848_PHYSCSR_AUTONEGO_DONE) == 0) 8005758: 68fb ldr r3, [r7, #12] 800575a: f003 0310 and.w r3, r3, #16 800575e: 2b00 cmp r3, #0 8005760: d101 bne.n 8005766 { return DP83848_STATUS_AUTONEGO_NOTDONE; 8005762: 2306 movs r3, #6 8005764: e015 b.n 8005792 } if((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_FD) 8005766: 68fb ldr r3, [r7, #12] 8005768: f003 0306 and.w r3, r3, #6 800576c: 2b04 cmp r3, #4 800576e: d101 bne.n 8005774 { return DP83848_STATUS_100MBITS_FULLDUPLEX; 8005770: 2302 movs r3, #2 8005772: e00e b.n 8005792 } else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_100BTX_HD) 8005774: 68fb ldr r3, [r7, #12] 8005776: f003 0306 and.w r3, r3, #6 800577a: 2b00 cmp r3, #0 800577c: d101 bne.n 8005782 { return DP83848_STATUS_100MBITS_HALFDUPLEX; 800577e: 2303 movs r3, #3 8005780: e007 b.n 8005792 } else if ((readval & DP83848_PHYSCSR_HCDSPEEDMASK) == DP83848_PHYSCSR_10BT_FD) 8005782: 68fb ldr r3, [r7, #12] 8005784: f003 0306 and.w r3, r3, #6 8005788: 2b06 cmp r3, #6 800578a: d101 bne.n 8005790 { return DP83848_STATUS_10MBITS_FULLDUPLEX; 800578c: 2304 movs r3, #4 800578e: e000 b.n 8005792 } else { return DP83848_STATUS_10MBITS_HALFDUPLEX; 8005790: 2305 movs r3, #5 } } } 8005792: 4618 mov r0, r3 8005794: 3710 adds r7, #16 8005796: 46bd mov sp, r7 8005798: bd80 pop {r7, pc} ... 0800579c : * 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) { 800579c: b580 push {r7, lr} 800579e: b082 sub sp, #8 80057a0: 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); 80057a2: 2003 movs r0, #3 80057a4: f000 f947 bl 8005a36 /* 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); 80057a8: f005 fd12 bl 800b1d0 80057ac: 4602 mov r2, r0 80057ae: 4b15 ldr r3, [pc, #84] @ (8005804 ) 80057b0: 699b ldr r3, [r3, #24] 80057b2: 0a1b lsrs r3, r3, #8 80057b4: f003 030f and.w r3, r3, #15 80057b8: 4913 ldr r1, [pc, #76] @ (8005808 ) 80057ba: 5ccb ldrb r3, [r1, r3] 80057bc: f003 031f and.w r3, r3, #31 80057c0: fa22 f303 lsr.w r3, r2, r3 80057c4: 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)); 80057c6: 4b0f ldr r3, [pc, #60] @ (8005804 ) 80057c8: 699b ldr r3, [r3, #24] 80057ca: f003 030f and.w r3, r3, #15 80057ce: 4a0e ldr r2, [pc, #56] @ (8005808 ) 80057d0: 5cd3 ldrb r3, [r2, r3] 80057d2: f003 031f and.w r3, r3, #31 80057d6: 687a ldr r2, [r7, #4] 80057d8: fa22 f303 lsr.w r3, r2, r3 80057dc: 4a0b ldr r2, [pc, #44] @ (800580c ) 80057de: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 80057e0: 4a0b ldr r2, [pc, #44] @ (8005810 ) 80057e2: 687b ldr r3, [r7, #4] 80057e4: 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) 80057e6: 200f movs r0, #15 80057e8: f7fe fc2e bl 8004048 80057ec: 4603 mov r3, r0 80057ee: 2b00 cmp r3, #0 80057f0: d001 beq.n 80057f6 { return HAL_ERROR; 80057f2: 2301 movs r3, #1 80057f4: e002 b.n 80057fc } /* Init the low level hardware */ HAL_MspInit(); 80057f6: f7fe f917 bl 8003a28 /* Return function status */ return HAL_OK; 80057fa: 2300 movs r3, #0 } 80057fc: 4618 mov r0, r3 80057fe: 3708 adds r7, #8 8005800: 46bd mov sp, r7 8005802: bd80 pop {r7, pc} 8005804: 58024400 .word 0x58024400 8005808: 08031abc .word 0x08031abc 800580c: 24000010 .word 0x24000010 8005810: 2400000c .word 0x2400000c 08005814 : * @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) { 8005814: b480 push {r7} 8005816: af00 add r7, sp, #0 uwTick += (uint32_t)uwTickFreq; 8005818: 4b06 ldr r3, [pc, #24] @ (8005834 ) 800581a: 781b ldrb r3, [r3, #0] 800581c: 461a mov r2, r3 800581e: 4b06 ldr r3, [pc, #24] @ (8005838 ) 8005820: 681b ldr r3, [r3, #0] 8005822: 4413 add r3, r2 8005824: 4a04 ldr r2, [pc, #16] @ (8005838 ) 8005826: 6013 str r3, [r2, #0] } 8005828: bf00 nop 800582a: 46bd mov sp, r7 800582c: f85d 7b04 ldr.w r7, [sp], #4 8005830: 4770 bx lr 8005832: bf00 nop 8005834: 24000030 .word 0x24000030 8005838: 24002260 .word 0x24002260 0800583c : * @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) { 800583c: b480 push {r7} 800583e: af00 add r7, sp, #0 return uwTick; 8005840: 4b03 ldr r3, [pc, #12] @ (8005850 ) 8005842: 681b ldr r3, [r3, #0] } 8005844: 4618 mov r0, r3 8005846: 46bd mov sp, r7 8005848: f85d 7b04 ldr.w r7, [sp], #4 800584c: 4770 bx lr 800584e: bf00 nop 8005850: 24002260 .word 0x24002260 08005854 : * implementations in user file. * @param Delay specifies the delay time length, in milliseconds. * @retval None */ __weak void HAL_Delay(uint32_t Delay) { 8005854: b580 push {r7, lr} 8005856: b084 sub sp, #16 8005858: af00 add r7, sp, #0 800585a: 6078 str r0, [r7, #4] uint32_t tickstart = HAL_GetTick(); 800585c: f7ff ffee bl 800583c 8005860: 60b8 str r0, [r7, #8] uint32_t wait = Delay; 8005862: 687b ldr r3, [r7, #4] 8005864: 60fb str r3, [r7, #12] /* Add a freq to guarantee minimum wait */ if (wait < HAL_MAX_DELAY) 8005866: 68fb ldr r3, [r7, #12] 8005868: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 800586c: d005 beq.n 800587a { wait += (uint32_t)(uwTickFreq); 800586e: 4b0a ldr r3, [pc, #40] @ (8005898 ) 8005870: 781b ldrb r3, [r3, #0] 8005872: 461a mov r2, r3 8005874: 68fb ldr r3, [r7, #12] 8005876: 4413 add r3, r2 8005878: 60fb str r3, [r7, #12] } while ((HAL_GetTick() - tickstart) < wait) 800587a: bf00 nop 800587c: f7ff ffde bl 800583c 8005880: 4602 mov r2, r0 8005882: 68bb ldr r3, [r7, #8] 8005884: 1ad3 subs r3, r2, r3 8005886: 68fa ldr r2, [r7, #12] 8005888: 429a cmp r2, r3 800588a: d8f7 bhi.n 800587c { } } 800588c: bf00 nop 800588e: bf00 nop 8005890: 3710 adds r7, #16 8005892: 46bd mov sp, r7 8005894: bd80 pop {r7, pc} 8005896: bf00 nop 8005898: 24000030 .word 0x24000030 0800589c : /** * @brief Returns the device revision identifier. * @retval Device revision identifier */ uint32_t HAL_GetREVID(void) { 800589c: b480 push {r7} 800589e: af00 add r7, sp, #0 return((DBGMCU->IDCODE) >> 16); 80058a0: 4b03 ldr r3, [pc, #12] @ (80058b0 ) 80058a2: 681b ldr r3, [r3, #0] 80058a4: 0c1b lsrs r3, r3, #16 } 80058a6: 4618 mov r0, r3 80058a8: 46bd mov sp, r7 80058aa: f85d 7b04 ldr.w r7, [sp], #4 80058ae: 4770 bx lr 80058b0: 5c001000 .word 0x5c001000 080058b4 : * @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) { 80058b4: b480 push {r7} 80058b6: b083 sub sp, #12 80058b8: af00 add r7, sp, #0 80058ba: 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)); 80058bc: 4b06 ldr r3, [pc, #24] @ (80058d8 ) 80058be: 685b ldr r3, [r3, #4] 80058c0: f423 0260 bic.w r2, r3, #14680064 @ 0xe00000 80058c4: 4904 ldr r1, [pc, #16] @ (80058d8 ) 80058c6: 687b ldr r3, [r7, #4] 80058c8: 4313 orrs r3, r2 80058ca: 604b str r3, [r1, #4] } 80058cc: bf00 nop 80058ce: 370c adds r7, #12 80058d0: 46bd mov sp, r7 80058d2: f85d 7b04 ldr.w r7, [sp], #4 80058d6: 4770 bx lr 80058d8: 58000400 .word 0x58000400 080058dc <__NVIC_SetPriorityGrouping>: { 80058dc: b480 push {r7} 80058de: b085 sub sp, #20 80058e0: af00 add r7, sp, #0 80058e2: 6078 str r0, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 80058e4: 687b ldr r3, [r7, #4] 80058e6: f003 0307 and.w r3, r3, #7 80058ea: 60fb str r3, [r7, #12] reg_value = SCB->AIRCR; /* read old register configuration */ 80058ec: 4b0b ldr r3, [pc, #44] @ (800591c <__NVIC_SetPriorityGrouping+0x40>) 80058ee: 68db ldr r3, [r3, #12] 80058f0: 60bb str r3, [r7, #8] reg_value &= ~((uint32_t)(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk)); /* clear bits to change */ 80058f2: 68ba ldr r2, [r7, #8] 80058f4: f64f 03ff movw r3, #63743 @ 0xf8ff 80058f8: 4013 ands r3, r2 80058fa: 60bb str r3, [r7, #8] (PriorityGroupTmp << SCB_AIRCR_PRIGROUP_Pos) ); /* Insert write key and priority group */ 80058fc: 68fb ldr r3, [r7, #12] 80058fe: 021a lsls r2, r3, #8 ((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos) | 8005900: 68bb ldr r3, [r7, #8] 8005902: 431a orrs r2, r3 reg_value = (reg_value | 8005904: 4b06 ldr r3, [pc, #24] @ (8005920 <__NVIC_SetPriorityGrouping+0x44>) 8005906: 4313 orrs r3, r2 8005908: 60bb str r3, [r7, #8] SCB->AIRCR = reg_value; 800590a: 4a04 ldr r2, [pc, #16] @ (800591c <__NVIC_SetPriorityGrouping+0x40>) 800590c: 68bb ldr r3, [r7, #8] 800590e: 60d3 str r3, [r2, #12] } 8005910: bf00 nop 8005912: 3714 adds r7, #20 8005914: 46bd mov sp, r7 8005916: f85d 7b04 ldr.w r7, [sp], #4 800591a: 4770 bx lr 800591c: e000ed00 .word 0xe000ed00 8005920: 05fa0000 .word 0x05fa0000 08005924 <__NVIC_GetPriorityGrouping>: { 8005924: b480 push {r7} 8005926: af00 add r7, sp, #0 return ((uint32_t)((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos)); 8005928: 4b04 ldr r3, [pc, #16] @ (800593c <__NVIC_GetPriorityGrouping+0x18>) 800592a: 68db ldr r3, [r3, #12] 800592c: 0a1b lsrs r3, r3, #8 800592e: f003 0307 and.w r3, r3, #7 } 8005932: 4618 mov r0, r3 8005934: 46bd mov sp, r7 8005936: f85d 7b04 ldr.w r7, [sp], #4 800593a: 4770 bx lr 800593c: e000ed00 .word 0xe000ed00 08005940 <__NVIC_EnableIRQ>: { 8005940: b480 push {r7} 8005942: b083 sub sp, #12 8005944: af00 add r7, sp, #0 8005946: 4603 mov r3, r0 8005948: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 800594a: f9b7 3006 ldrsh.w r3, [r7, #6] 800594e: 2b00 cmp r3, #0 8005950: db0b blt.n 800596a <__NVIC_EnableIRQ+0x2a> NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)IRQn) & 0x1FUL)); 8005952: 88fb ldrh r3, [r7, #6] 8005954: f003 021f and.w r2, r3, #31 8005958: 4907 ldr r1, [pc, #28] @ (8005978 <__NVIC_EnableIRQ+0x38>) 800595a: f9b7 3006 ldrsh.w r3, [r7, #6] 800595e: 095b lsrs r3, r3, #5 8005960: 2001 movs r0, #1 8005962: fa00 f202 lsl.w r2, r0, r2 8005966: f841 2023 str.w r2, [r1, r3, lsl #2] } 800596a: bf00 nop 800596c: 370c adds r7, #12 800596e: 46bd mov sp, r7 8005970: f85d 7b04 ldr.w r7, [sp], #4 8005974: 4770 bx lr 8005976: bf00 nop 8005978: e000e100 .word 0xe000e100 0800597c <__NVIC_SetPriority>: { 800597c: b480 push {r7} 800597e: b083 sub sp, #12 8005980: af00 add r7, sp, #0 8005982: 4603 mov r3, r0 8005984: 6039 str r1, [r7, #0] 8005986: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 8005988: f9b7 3006 ldrsh.w r3, [r7, #6] 800598c: 2b00 cmp r3, #0 800598e: db0a blt.n 80059a6 <__NVIC_SetPriority+0x2a> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8005990: 683b ldr r3, [r7, #0] 8005992: b2da uxtb r2, r3 8005994: 490c ldr r1, [pc, #48] @ (80059c8 <__NVIC_SetPriority+0x4c>) 8005996: f9b7 3006 ldrsh.w r3, [r7, #6] 800599a: 0112 lsls r2, r2, #4 800599c: b2d2 uxtb r2, r2 800599e: 440b add r3, r1 80059a0: f883 2300 strb.w r2, [r3, #768] @ 0x300 } 80059a4: e00a b.n 80059bc <__NVIC_SetPriority+0x40> SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 80059a6: 683b ldr r3, [r7, #0] 80059a8: b2da uxtb r2, r3 80059aa: 4908 ldr r1, [pc, #32] @ (80059cc <__NVIC_SetPriority+0x50>) 80059ac: 88fb ldrh r3, [r7, #6] 80059ae: f003 030f and.w r3, r3, #15 80059b2: 3b04 subs r3, #4 80059b4: 0112 lsls r2, r2, #4 80059b6: b2d2 uxtb r2, r2 80059b8: 440b add r3, r1 80059ba: 761a strb r2, [r3, #24] } 80059bc: bf00 nop 80059be: 370c adds r7, #12 80059c0: 46bd mov sp, r7 80059c2: f85d 7b04 ldr.w r7, [sp], #4 80059c6: 4770 bx lr 80059c8: e000e100 .word 0xe000e100 80059cc: e000ed00 .word 0xe000ed00 080059d0 : { 80059d0: b480 push {r7} 80059d2: b089 sub sp, #36 @ 0x24 80059d4: af00 add r7, sp, #0 80059d6: 60f8 str r0, [r7, #12] 80059d8: 60b9 str r1, [r7, #8] 80059da: 607a str r2, [r7, #4] uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07UL); /* only values 0..7 are used */ 80059dc: 68fb ldr r3, [r7, #12] 80059de: f003 0307 and.w r3, r3, #7 80059e2: 61fb str r3, [r7, #28] PreemptPriorityBits = ((7UL - PriorityGroupTmp) > (uint32_t)(__NVIC_PRIO_BITS)) ? (uint32_t)(__NVIC_PRIO_BITS) : (uint32_t)(7UL - PriorityGroupTmp); 80059e4: 69fb ldr r3, [r7, #28] 80059e6: f1c3 0307 rsb r3, r3, #7 80059ea: 2b04 cmp r3, #4 80059ec: bf28 it cs 80059ee: 2304 movcs r3, #4 80059f0: 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)); 80059f2: 69fb ldr r3, [r7, #28] 80059f4: 3304 adds r3, #4 80059f6: 2b06 cmp r3, #6 80059f8: d902 bls.n 8005a00 80059fa: 69fb ldr r3, [r7, #28] 80059fc: 3b03 subs r3, #3 80059fe: e000 b.n 8005a02 8005a00: 2300 movs r3, #0 8005a02: 617b str r3, [r7, #20] ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8005a04: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8005a08: 69bb ldr r3, [r7, #24] 8005a0a: fa02 f303 lsl.w r3, r2, r3 8005a0e: 43da mvns r2, r3 8005a10: 68bb ldr r3, [r7, #8] 8005a12: 401a ands r2, r3 8005a14: 697b ldr r3, [r7, #20] 8005a16: 409a lsls r2, r3 ((SubPriority & (uint32_t)((1UL << (SubPriorityBits )) - 1UL))) 8005a18: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8005a1c: 697b ldr r3, [r7, #20] 8005a1e: fa01 f303 lsl.w r3, r1, r3 8005a22: 43d9 mvns r1, r3 8005a24: 687b ldr r3, [r7, #4] 8005a26: 400b ands r3, r1 ((PreemptPriority & (uint32_t)((1UL << (PreemptPriorityBits)) - 1UL)) << SubPriorityBits) | 8005a28: 4313 orrs r3, r2 } 8005a2a: 4618 mov r0, r3 8005a2c: 3724 adds r7, #36 @ 0x24 8005a2e: 46bd mov sp, r7 8005a30: f85d 7b04 ldr.w r7, [sp], #4 8005a34: 4770 bx lr 08005a36 : * @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) { 8005a36: b580 push {r7, lr} 8005a38: b082 sub sp, #8 8005a3a: af00 add r7, sp, #0 8005a3c: 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); 8005a3e: 6878 ldr r0, [r7, #4] 8005a40: f7ff ff4c bl 80058dc <__NVIC_SetPriorityGrouping> } 8005a44: bf00 nop 8005a46: 3708 adds r7, #8 8005a48: 46bd mov sp, r7 8005a4a: bd80 pop {r7, pc} 08005a4c : * 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) { 8005a4c: b580 push {r7, lr} 8005a4e: b086 sub sp, #24 8005a50: af00 add r7, sp, #0 8005a52: 4603 mov r3, r0 8005a54: 60b9 str r1, [r7, #8] 8005a56: 607a str r2, [r7, #4] 8005a58: 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(); 8005a5a: f7ff ff63 bl 8005924 <__NVIC_GetPriorityGrouping> 8005a5e: 6178 str r0, [r7, #20] NVIC_SetPriority(IRQn, NVIC_EncodePriority(prioritygroup, PreemptPriority, SubPriority)); 8005a60: 687a ldr r2, [r7, #4] 8005a62: 68b9 ldr r1, [r7, #8] 8005a64: 6978 ldr r0, [r7, #20] 8005a66: f7ff ffb3 bl 80059d0 8005a6a: 4602 mov r2, r0 8005a6c: f9b7 300e ldrsh.w r3, [r7, #14] 8005a70: 4611 mov r1, r2 8005a72: 4618 mov r0, r3 8005a74: f7ff ff82 bl 800597c <__NVIC_SetPriority> } 8005a78: bf00 nop 8005a7a: 3718 adds r7, #24 8005a7c: 46bd mov sp, r7 8005a7e: bd80 pop {r7, pc} 08005a80 : * 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) { 8005a80: b580 push {r7, lr} 8005a82: b082 sub sp, #8 8005a84: af00 add r7, sp, #0 8005a86: 4603 mov r3, r0 8005a88: 80fb strh r3, [r7, #6] /* Check the parameters */ assert_param(IS_NVIC_DEVICE_IRQ(IRQn)); /* Enable interrupt */ NVIC_EnableIRQ(IRQn); 8005a8a: f9b7 3006 ldrsh.w r3, [r7, #6] 8005a8e: 4618 mov r0, r3 8005a90: f7ff ff56 bl 8005940 <__NVIC_EnableIRQ> } 8005a94: bf00 nop 8005a96: 3708 adds r7, #8 8005a98: 46bd mov sp, r7 8005a9a: bd80 pop {r7, pc} 08005a9c : /** * @brief Disables the MPU * @retval None */ void HAL_MPU_Disable(void) { 8005a9c: b480 push {r7} 8005a9e: 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"); 8005aa0: f3bf 8f5f dmb sy } 8005aa4: bf00 nop /* Make sure outstanding transfers are done */ __DMB(); /* Disable fault exceptions */ SCB->SHCSR &= ~SCB_SHCSR_MEMFAULTENA_Msk; 8005aa6: 4b07 ldr r3, [pc, #28] @ (8005ac4 ) 8005aa8: 6a5b ldr r3, [r3, #36] @ 0x24 8005aaa: 4a06 ldr r2, [pc, #24] @ (8005ac4 ) 8005aac: f423 3380 bic.w r3, r3, #65536 @ 0x10000 8005ab0: 6253 str r3, [r2, #36] @ 0x24 /* Disable the MPU and clear the control register*/ MPU->CTRL = 0; 8005ab2: 4b05 ldr r3, [pc, #20] @ (8005ac8 ) 8005ab4: 2200 movs r2, #0 8005ab6: 605a str r2, [r3, #4] } 8005ab8: bf00 nop 8005aba: 46bd mov sp, r7 8005abc: f85d 7b04 ldr.w r7, [sp], #4 8005ac0: 4770 bx lr 8005ac2: bf00 nop 8005ac4: e000ed00 .word 0xe000ed00 8005ac8: e000ed90 .word 0xe000ed90 08005acc : * @arg MPU_PRIVILEGED_DEFAULT * @arg MPU_HFNMI_PRIVDEF * @retval None */ void HAL_MPU_Enable(uint32_t MPU_Control) { 8005acc: b480 push {r7} 8005ace: b083 sub sp, #12 8005ad0: af00 add r7, sp, #0 8005ad2: 6078 str r0, [r7, #4] /* Enable the MPU */ MPU->CTRL = MPU_Control | MPU_CTRL_ENABLE_Msk; 8005ad4: 4a0b ldr r2, [pc, #44] @ (8005b04 ) 8005ad6: 687b ldr r3, [r7, #4] 8005ad8: f043 0301 orr.w r3, r3, #1 8005adc: 6053 str r3, [r2, #4] /* Enable fault exceptions */ SCB->SHCSR |= SCB_SHCSR_MEMFAULTENA_Msk; 8005ade: 4b0a ldr r3, [pc, #40] @ (8005b08 ) 8005ae0: 6a5b ldr r3, [r3, #36] @ 0x24 8005ae2: 4a09 ldr r2, [pc, #36] @ (8005b08 ) 8005ae4: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8005ae8: 6253 str r3, [r2, #36] @ 0x24 __ASM volatile ("dsb 0xF":::"memory"); 8005aea: f3bf 8f4f dsb sy } 8005aee: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8005af0: f3bf 8f6f isb sy } 8005af4: bf00 nop /* Ensure MPU setting take effects */ __DSB(); __ISB(); } 8005af6: bf00 nop 8005af8: 370c adds r7, #12 8005afa: 46bd mov sp, r7 8005afc: f85d 7b04 ldr.w r7, [sp], #4 8005b00: 4770 bx lr 8005b02: bf00 nop 8005b04: e000ed90 .word 0xe000ed90 8005b08: e000ed00 .word 0xe000ed00 08005b0c : * @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) { 8005b0c: b480 push {r7} 8005b0e: b083 sub sp, #12 8005b10: af00 add r7, sp, #0 8005b12: 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; 8005b14: 687b ldr r3, [r7, #4] 8005b16: 785a ldrb r2, [r3, #1] 8005b18: 4b1b ldr r3, [pc, #108] @ (8005b88 ) 8005b1a: 609a str r2, [r3, #8] /* Disable the Region */ CLEAR_BIT(MPU->RASR, MPU_RASR_ENABLE_Msk); 8005b1c: 4b1a ldr r3, [pc, #104] @ (8005b88 ) 8005b1e: 691b ldr r3, [r3, #16] 8005b20: 4a19 ldr r2, [pc, #100] @ (8005b88 ) 8005b22: f023 0301 bic.w r3, r3, #1 8005b26: 6113 str r3, [r2, #16] /* Apply configuration */ MPU->RBAR = MPU_Init->BaseAddress; 8005b28: 4a17 ldr r2, [pc, #92] @ (8005b88 ) 8005b2a: 687b ldr r3, [r7, #4] 8005b2c: 685b ldr r3, [r3, #4] 8005b2e: 60d3 str r3, [r2, #12] MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005b30: 687b ldr r3, [r7, #4] 8005b32: 7b1b ldrb r3, [r3, #12] 8005b34: 071a lsls r2, r3, #28 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8005b36: 687b ldr r3, [r7, #4] 8005b38: 7adb ldrb r3, [r3, #11] 8005b3a: 061b lsls r3, r3, #24 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005b3c: 431a orrs r2, r3 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8005b3e: 687b ldr r3, [r7, #4] 8005b40: 7a9b ldrb r3, [r3, #10] 8005b42: 04db lsls r3, r3, #19 ((uint32_t)MPU_Init->AccessPermission << MPU_RASR_AP_Pos) | 8005b44: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8005b46: 687b ldr r3, [r7, #4] 8005b48: 7b5b ldrb r3, [r3, #13] 8005b4a: 049b lsls r3, r3, #18 ((uint32_t)MPU_Init->TypeExtField << MPU_RASR_TEX_Pos) | 8005b4c: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8005b4e: 687b ldr r3, [r7, #4] 8005b50: 7b9b ldrb r3, [r3, #14] 8005b52: 045b lsls r3, r3, #17 ((uint32_t)MPU_Init->IsShareable << MPU_RASR_S_Pos) | 8005b54: 431a orrs r2, r3 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8005b56: 687b ldr r3, [r7, #4] 8005b58: 7bdb ldrb r3, [r3, #15] 8005b5a: 041b lsls r3, r3, #16 ((uint32_t)MPU_Init->IsCacheable << MPU_RASR_C_Pos) | 8005b5c: 431a orrs r2, r3 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8005b5e: 687b ldr r3, [r7, #4] 8005b60: 7a5b ldrb r3, [r3, #9] 8005b62: 021b lsls r3, r3, #8 ((uint32_t)MPU_Init->IsBufferable << MPU_RASR_B_Pos) | 8005b64: 431a orrs r2, r3 ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8005b66: 687b ldr r3, [r7, #4] 8005b68: 7a1b ldrb r3, [r3, #8] 8005b6a: 005b lsls r3, r3, #1 ((uint32_t)MPU_Init->SubRegionDisable << MPU_RASR_SRD_Pos) | 8005b6c: 4313 orrs r3, r2 ((uint32_t)MPU_Init->Enable << MPU_RASR_ENABLE_Pos); 8005b6e: 687a ldr r2, [r7, #4] 8005b70: 7812 ldrb r2, [r2, #0] 8005b72: 4611 mov r1, r2 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005b74: 4a04 ldr r2, [pc, #16] @ (8005b88 ) ((uint32_t)MPU_Init->Size << MPU_RASR_SIZE_Pos) | 8005b76: 430b orrs r3, r1 MPU->RASR = ((uint32_t)MPU_Init->DisableExec << MPU_RASR_XN_Pos) | 8005b78: 6113 str r3, [r2, #16] } 8005b7a: bf00 nop 8005b7c: 370c adds r7, #12 8005b7e: 46bd mov sp, r7 8005b80: f85d 7b04 ldr.w r7, [sp], #4 8005b84: 4770 bx lr 8005b86: bf00 nop 8005b88: e000ed90 .word 0xe000ed90 08005b8c : * 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) { 8005b8c: b580 push {r7, lr} 8005b8e: b082 sub sp, #8 8005b90: af00 add r7, sp, #0 8005b92: 6078 str r0, [r7, #4] /* Check the CRC handle allocation */ if (hcrc == NULL) 8005b94: 687b ldr r3, [r7, #4] 8005b96: 2b00 cmp r3, #0 8005b98: d101 bne.n 8005b9e { return HAL_ERROR; 8005b9a: 2301 movs r3, #1 8005b9c: e054 b.n 8005c48 } /* Check the parameters */ assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance)); if (hcrc->State == HAL_CRC_STATE_RESET) 8005b9e: 687b ldr r3, [r7, #4] 8005ba0: 7f5b ldrb r3, [r3, #29] 8005ba2: b2db uxtb r3, r3 8005ba4: 2b00 cmp r3, #0 8005ba6: d105 bne.n 8005bb4 { /* Allocate lock resource and initialize it */ hcrc->Lock = HAL_UNLOCKED; 8005ba8: 687b ldr r3, [r7, #4] 8005baa: 2200 movs r2, #0 8005bac: 771a strb r2, [r3, #28] /* Init the low level hardware */ HAL_CRC_MspInit(hcrc); 8005bae: 6878 ldr r0, [r7, #4] 8005bb0: f7fd ff82 bl 8003ab8 } hcrc->State = HAL_CRC_STATE_BUSY; 8005bb4: 687b ldr r3, [r7, #4] 8005bb6: 2202 movs r2, #2 8005bb8: 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) 8005bba: 687b ldr r3, [r7, #4] 8005bbc: 791b ldrb r3, [r3, #4] 8005bbe: 2b00 cmp r3, #0 8005bc0: d10c bne.n 8005bdc { /* initialize peripheral with default generating polynomial */ WRITE_REG(hcrc->Instance->POL, DEFAULT_CRC32_POLY); 8005bc2: 687b ldr r3, [r7, #4] 8005bc4: 681b ldr r3, [r3, #0] 8005bc6: 4a22 ldr r2, [pc, #136] @ (8005c50 ) 8005bc8: 615a str r2, [r3, #20] MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, CRC_POLYLENGTH_32B); 8005bca: 687b ldr r3, [r7, #4] 8005bcc: 681b ldr r3, [r3, #0] 8005bce: 689a ldr r2, [r3, #8] 8005bd0: 687b ldr r3, [r7, #4] 8005bd2: 681b ldr r3, [r3, #0] 8005bd4: f022 0218 bic.w r2, r2, #24 8005bd8: 609a str r2, [r3, #8] 8005bda: e00c b.n 8005bf6 } else { /* initialize CRC peripheral with generating polynomial defined by user */ if (HAL_CRCEx_Polynomial_Set(hcrc, hcrc->Init.GeneratingPolynomial, hcrc->Init.CRCLength) != HAL_OK) 8005bdc: 687b ldr r3, [r7, #4] 8005bde: 6899 ldr r1, [r3, #8] 8005be0: 687b ldr r3, [r7, #4] 8005be2: 68db ldr r3, [r3, #12] 8005be4: 461a mov r2, r3 8005be6: 6878 ldr r0, [r7, #4] 8005be8: f000 f948 bl 8005e7c 8005bec: 4603 mov r3, r0 8005bee: 2b00 cmp r3, #0 8005bf0: d001 beq.n 8005bf6 { return HAL_ERROR; 8005bf2: 2301 movs r3, #1 8005bf4: e028 b.n 8005c48 } /* 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) 8005bf6: 687b ldr r3, [r7, #4] 8005bf8: 795b ldrb r3, [r3, #5] 8005bfa: 2b00 cmp r3, #0 8005bfc: d105 bne.n 8005c0a { WRITE_REG(hcrc->Instance->INIT, DEFAULT_CRC_INITVALUE); 8005bfe: 687b ldr r3, [r7, #4] 8005c00: 681b ldr r3, [r3, #0] 8005c02: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8005c06: 611a str r2, [r3, #16] 8005c08: e004 b.n 8005c14 } else { WRITE_REG(hcrc->Instance->INIT, hcrc->Init.InitValue); 8005c0a: 687b ldr r3, [r7, #4] 8005c0c: 681b ldr r3, [r3, #0] 8005c0e: 687a ldr r2, [r7, #4] 8005c10: 6912 ldr r2, [r2, #16] 8005c12: 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); 8005c14: 687b ldr r3, [r7, #4] 8005c16: 681b ldr r3, [r3, #0] 8005c18: 689b ldr r3, [r3, #8] 8005c1a: f023 0160 bic.w r1, r3, #96 @ 0x60 8005c1e: 687b ldr r3, [r7, #4] 8005c20: 695a ldr r2, [r3, #20] 8005c22: 687b ldr r3, [r7, #4] 8005c24: 681b ldr r3, [r3, #0] 8005c26: 430a orrs r2, r1 8005c28: 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); 8005c2a: 687b ldr r3, [r7, #4] 8005c2c: 681b ldr r3, [r3, #0] 8005c2e: 689b ldr r3, [r3, #8] 8005c30: f023 0180 bic.w r1, r3, #128 @ 0x80 8005c34: 687b ldr r3, [r7, #4] 8005c36: 699a ldr r2, [r3, #24] 8005c38: 687b ldr r3, [r7, #4] 8005c3a: 681b ldr r3, [r3, #0] 8005c3c: 430a orrs r2, r1 8005c3e: 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; 8005c40: 687b ldr r3, [r7, #4] 8005c42: 2201 movs r2, #1 8005c44: 775a strb r2, [r3, #29] /* Return function status */ return HAL_OK; 8005c46: 2300 movs r3, #0 } 8005c48: 4618 mov r0, r3 8005c4a: 3708 adds r7, #8 8005c4c: 46bd mov sp, r7 8005c4e: bd80 pop {r7, pc} 8005c50: 04c11db7 .word 0x04c11db7 08005c54 : * 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) { 8005c54: b580 push {r7, lr} 8005c56: b086 sub sp, #24 8005c58: af00 add r7, sp, #0 8005c5a: 60f8 str r0, [r7, #12] 8005c5c: 60b9 str r1, [r7, #8] 8005c5e: 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) */ 8005c60: 2300 movs r3, #0 8005c62: 613b str r3, [r7, #16] /* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_BUSY; 8005c64: 68fb ldr r3, [r7, #12] 8005c66: 2202 movs r2, #2 8005c68: 775a strb r2, [r3, #29] /* Reset CRC Calculation Unit (hcrc->Instance->INIT is * written in hcrc->Instance->DR) */ __HAL_CRC_DR_RESET(hcrc); 8005c6a: 68fb ldr r3, [r7, #12] 8005c6c: 681b ldr r3, [r3, #0] 8005c6e: 689a ldr r2, [r3, #8] 8005c70: 68fb ldr r3, [r7, #12] 8005c72: 681b ldr r3, [r3, #0] 8005c74: f042 0201 orr.w r2, r2, #1 8005c78: 609a str r2, [r3, #8] switch (hcrc->InputDataFormat) 8005c7a: 68fb ldr r3, [r7, #12] 8005c7c: 6a1b ldr r3, [r3, #32] 8005c7e: 2b03 cmp r3, #3 8005c80: d006 beq.n 8005c90 8005c82: 2b03 cmp r3, #3 8005c84: d829 bhi.n 8005cda 8005c86: 2b01 cmp r3, #1 8005c88: d019 beq.n 8005cbe 8005c8a: 2b02 cmp r3, #2 8005c8c: d01e beq.n 8005ccc /* Specific 16-bit input data handling */ temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */ break; default: break; 8005c8e: e024 b.n 8005cda for (index = 0U; index < BufferLength; index++) 8005c90: 2300 movs r3, #0 8005c92: 617b str r3, [r7, #20] 8005c94: e00a b.n 8005cac hcrc->Instance->DR = pBuffer[index]; 8005c96: 697b ldr r3, [r7, #20] 8005c98: 009b lsls r3, r3, #2 8005c9a: 68ba ldr r2, [r7, #8] 8005c9c: 441a add r2, r3 8005c9e: 68fb ldr r3, [r7, #12] 8005ca0: 681b ldr r3, [r3, #0] 8005ca2: 6812 ldr r2, [r2, #0] 8005ca4: 601a str r2, [r3, #0] for (index = 0U; index < BufferLength; index++) 8005ca6: 697b ldr r3, [r7, #20] 8005ca8: 3301 adds r3, #1 8005caa: 617b str r3, [r7, #20] 8005cac: 697a ldr r2, [r7, #20] 8005cae: 687b ldr r3, [r7, #4] 8005cb0: 429a cmp r2, r3 8005cb2: d3f0 bcc.n 8005c96 temp = hcrc->Instance->DR; 8005cb4: 68fb ldr r3, [r7, #12] 8005cb6: 681b ldr r3, [r3, #0] 8005cb8: 681b ldr r3, [r3, #0] 8005cba: 613b str r3, [r7, #16] break; 8005cbc: e00e b.n 8005cdc temp = CRC_Handle_8(hcrc, (uint8_t *)pBuffer, BufferLength); 8005cbe: 687a ldr r2, [r7, #4] 8005cc0: 68b9 ldr r1, [r7, #8] 8005cc2: 68f8 ldr r0, [r7, #12] 8005cc4: f000 f812 bl 8005cec 8005cc8: 6138 str r0, [r7, #16] break; 8005cca: e007 b.n 8005cdc temp = CRC_Handle_16(hcrc, (uint16_t *)(void *)pBuffer, BufferLength); /* Derogation MisraC2012 R.11.5 */ 8005ccc: 687a ldr r2, [r7, #4] 8005cce: 68b9 ldr r1, [r7, #8] 8005cd0: 68f8 ldr r0, [r7, #12] 8005cd2: f000 f899 bl 8005e08 8005cd6: 6138 str r0, [r7, #16] break; 8005cd8: e000 b.n 8005cdc break; 8005cda: bf00 nop } /* Change CRC peripheral state */ hcrc->State = HAL_CRC_STATE_READY; 8005cdc: 68fb ldr r3, [r7, #12] 8005cde: 2201 movs r2, #1 8005ce0: 775a strb r2, [r3, #29] /* Return the CRC computed value */ return temp; 8005ce2: 693b ldr r3, [r7, #16] } 8005ce4: 4618 mov r0, r3 8005ce6: 3718 adds r7, #24 8005ce8: 46bd mov sp, r7 8005cea: bd80 pop {r7, pc} 08005cec : * @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) { 8005cec: b480 push {r7} 8005cee: b089 sub sp, #36 @ 0x24 8005cf0: af00 add r7, sp, #0 8005cf2: 60f8 str r0, [r7, #12] 8005cf4: 60b9 str r1, [r7, #8] 8005cf6: 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++) 8005cf8: 2300 movs r3, #0 8005cfa: 61fb str r3, [r7, #28] 8005cfc: e023 b.n 8005d46 { hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005cfe: 69fb ldr r3, [r7, #28] 8005d00: 009b lsls r3, r3, #2 8005d02: 68ba ldr r2, [r7, #8] 8005d04: 4413 add r3, r2 8005d06: 781b ldrb r3, [r3, #0] 8005d08: 061a lsls r2, r3, #24 ((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \ 8005d0a: 69fb ldr r3, [r7, #28] 8005d0c: 009b lsls r3, r3, #2 8005d0e: 3301 adds r3, #1 8005d10: 68b9 ldr r1, [r7, #8] 8005d12: 440b add r3, r1 8005d14: 781b ldrb r3, [r3, #0] 8005d16: 041b lsls r3, r3, #16 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005d18: 431a orrs r2, r3 ((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \ 8005d1a: 69fb ldr r3, [r7, #28] 8005d1c: 009b lsls r3, r3, #2 8005d1e: 3302 adds r3, #2 8005d20: 68b9 ldr r1, [r7, #8] 8005d22: 440b add r3, r1 8005d24: 781b ldrb r3, [r3, #0] 8005d26: 021b lsls r3, r3, #8 ((uint32_t)pBuffer[(4U * i) + 1U] << 16U) | \ 8005d28: 431a orrs r2, r3 (uint32_t)pBuffer[(4U * i) + 3U]; 8005d2a: 69fb ldr r3, [r7, #28] 8005d2c: 009b lsls r3, r3, #2 8005d2e: 3303 adds r3, #3 8005d30: 68b9 ldr r1, [r7, #8] 8005d32: 440b add r3, r1 8005d34: 781b ldrb r3, [r3, #0] 8005d36: 4619 mov r1, r3 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005d38: 68fb ldr r3, [r7, #12] 8005d3a: 681b ldr r3, [r3, #0] ((uint32_t)pBuffer[(4U * i) + 2U] << 8U) | \ 8005d3c: 430a orrs r2, r1 hcrc->Instance->DR = ((uint32_t)pBuffer[4U * i] << 24U) | \ 8005d3e: 601a str r2, [r3, #0] for (i = 0U; i < (BufferLength / 4U); i++) 8005d40: 69fb ldr r3, [r7, #28] 8005d42: 3301 adds r3, #1 8005d44: 61fb str r3, [r7, #28] 8005d46: 687b ldr r3, [r7, #4] 8005d48: 089b lsrs r3, r3, #2 8005d4a: 69fa ldr r2, [r7, #28] 8005d4c: 429a cmp r2, r3 8005d4e: d3d6 bcc.n 8005cfe } /* last bytes specific handling */ if ((BufferLength % 4U) != 0U) 8005d50: 687b ldr r3, [r7, #4] 8005d52: f003 0303 and.w r3, r3, #3 8005d56: 2b00 cmp r3, #0 8005d58: d04d beq.n 8005df6 { if ((BufferLength % 4U) == 1U) 8005d5a: 687b ldr r3, [r7, #4] 8005d5c: f003 0303 and.w r3, r3, #3 8005d60: 2b01 cmp r3, #1 8005d62: d107 bne.n 8005d74 { *(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[4U * i]; /* Derogation MisraC2012 R.11.5 */ 8005d64: 69fb ldr r3, [r7, #28] 8005d66: 009b lsls r3, r3, #2 8005d68: 68ba ldr r2, [r7, #8] 8005d6a: 4413 add r3, r2 8005d6c: 68fa ldr r2, [r7, #12] 8005d6e: 6812 ldr r2, [r2, #0] 8005d70: 781b ldrb r3, [r3, #0] 8005d72: 7013 strb r3, [r2, #0] } if ((BufferLength % 4U) == 2U) 8005d74: 687b ldr r3, [r7, #4] 8005d76: f003 0303 and.w r3, r3, #3 8005d7a: 2b02 cmp r3, #2 8005d7c: d116 bne.n 8005dac { data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U]; 8005d7e: 69fb ldr r3, [r7, #28] 8005d80: 009b lsls r3, r3, #2 8005d82: 68ba ldr r2, [r7, #8] 8005d84: 4413 add r3, r2 8005d86: 781b ldrb r3, [r3, #0] 8005d88: 021b lsls r3, r3, #8 8005d8a: b21a sxth r2, r3 8005d8c: 69fb ldr r3, [r7, #28] 8005d8e: 009b lsls r3, r3, #2 8005d90: 3301 adds r3, #1 8005d92: 68b9 ldr r1, [r7, #8] 8005d94: 440b add r3, r1 8005d96: 781b ldrb r3, [r3, #0] 8005d98: b21b sxth r3, r3 8005d9a: 4313 orrs r3, r2 8005d9c: b21b sxth r3, r3 8005d9e: 837b strh r3, [r7, #26] pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 8005da0: 68fb ldr r3, [r7, #12] 8005da2: 681b ldr r3, [r3, #0] 8005da4: 617b str r3, [r7, #20] *pReg = data; 8005da6: 697b ldr r3, [r7, #20] 8005da8: 8b7a ldrh r2, [r7, #26] 8005daa: 801a strh r2, [r3, #0] } if ((BufferLength % 4U) == 3U) 8005dac: 687b ldr r3, [r7, #4] 8005dae: f003 0303 and.w r3, r3, #3 8005db2: 2b03 cmp r3, #3 8005db4: d11f bne.n 8005df6 { data = ((uint16_t)(pBuffer[4U * i]) << 8U) | (uint16_t)pBuffer[(4U * i) + 1U]; 8005db6: 69fb ldr r3, [r7, #28] 8005db8: 009b lsls r3, r3, #2 8005dba: 68ba ldr r2, [r7, #8] 8005dbc: 4413 add r3, r2 8005dbe: 781b ldrb r3, [r3, #0] 8005dc0: 021b lsls r3, r3, #8 8005dc2: b21a sxth r2, r3 8005dc4: 69fb ldr r3, [r7, #28] 8005dc6: 009b lsls r3, r3, #2 8005dc8: 3301 adds r3, #1 8005dca: 68b9 ldr r1, [r7, #8] 8005dcc: 440b add r3, r1 8005dce: 781b ldrb r3, [r3, #0] 8005dd0: b21b sxth r3, r3 8005dd2: 4313 orrs r3, r2 8005dd4: b21b sxth r3, r3 8005dd6: 837b strh r3, [r7, #26] pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 8005dd8: 68fb ldr r3, [r7, #12] 8005dda: 681b ldr r3, [r3, #0] 8005ddc: 617b str r3, [r7, #20] *pReg = data; 8005dde: 697b ldr r3, [r7, #20] 8005de0: 8b7a ldrh r2, [r7, #26] 8005de2: 801a strh r2, [r3, #0] *(__IO uint8_t *)(__IO void *)(&hcrc->Instance->DR) = pBuffer[(4U * i) + 2U]; /* Derogation MisraC2012 R.11.5 */ 8005de4: 69fb ldr r3, [r7, #28] 8005de6: 009b lsls r3, r3, #2 8005de8: 3302 adds r3, #2 8005dea: 68ba ldr r2, [r7, #8] 8005dec: 4413 add r3, r2 8005dee: 68fa ldr r2, [r7, #12] 8005df0: 6812 ldr r2, [r2, #0] 8005df2: 781b ldrb r3, [r3, #0] 8005df4: 7013 strb r3, [r2, #0] } } /* Return the CRC computed value */ return hcrc->Instance->DR; 8005df6: 68fb ldr r3, [r7, #12] 8005df8: 681b ldr r3, [r3, #0] 8005dfa: 681b ldr r3, [r3, #0] } 8005dfc: 4618 mov r0, r3 8005dfe: 3724 adds r7, #36 @ 0x24 8005e00: 46bd mov sp, r7 8005e02: f85d 7b04 ldr.w r7, [sp], #4 8005e06: 4770 bx lr 08005e08 : * @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) { 8005e08: b480 push {r7} 8005e0a: b087 sub sp, #28 8005e0c: af00 add r7, sp, #0 8005e0e: 60f8 str r0, [r7, #12] 8005e10: 60b9 str r1, [r7, #8] 8005e12: 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++) 8005e14: 2300 movs r3, #0 8005e16: 617b str r3, [r7, #20] 8005e18: e013 b.n 8005e42 { hcrc->Instance->DR = ((uint32_t)pBuffer[2U * i] << 16U) | (uint32_t)pBuffer[(2U * i) + 1U]; 8005e1a: 697b ldr r3, [r7, #20] 8005e1c: 009b lsls r3, r3, #2 8005e1e: 68ba ldr r2, [r7, #8] 8005e20: 4413 add r3, r2 8005e22: 881b ldrh r3, [r3, #0] 8005e24: 041a lsls r2, r3, #16 8005e26: 697b ldr r3, [r7, #20] 8005e28: 009b lsls r3, r3, #2 8005e2a: 3302 adds r3, #2 8005e2c: 68b9 ldr r1, [r7, #8] 8005e2e: 440b add r3, r1 8005e30: 881b ldrh r3, [r3, #0] 8005e32: 4619 mov r1, r3 8005e34: 68fb ldr r3, [r7, #12] 8005e36: 681b ldr r3, [r3, #0] 8005e38: 430a orrs r2, r1 8005e3a: 601a str r2, [r3, #0] for (i = 0U; i < (BufferLength / 2U); i++) 8005e3c: 697b ldr r3, [r7, #20] 8005e3e: 3301 adds r3, #1 8005e40: 617b str r3, [r7, #20] 8005e42: 687b ldr r3, [r7, #4] 8005e44: 085b lsrs r3, r3, #1 8005e46: 697a ldr r2, [r7, #20] 8005e48: 429a cmp r2, r3 8005e4a: d3e6 bcc.n 8005e1a } if ((BufferLength % 2U) != 0U) 8005e4c: 687b ldr r3, [r7, #4] 8005e4e: f003 0301 and.w r3, r3, #1 8005e52: 2b00 cmp r3, #0 8005e54: d009 beq.n 8005e6a { pReg = (__IO uint16_t *)(__IO void *)(&hcrc->Instance->DR); /* Derogation MisraC2012 R.11.5 */ 8005e56: 68fb ldr r3, [r7, #12] 8005e58: 681b ldr r3, [r3, #0] 8005e5a: 613b str r3, [r7, #16] *pReg = pBuffer[2U * i]; 8005e5c: 697b ldr r3, [r7, #20] 8005e5e: 009b lsls r3, r3, #2 8005e60: 68ba ldr r2, [r7, #8] 8005e62: 4413 add r3, r2 8005e64: 881a ldrh r2, [r3, #0] 8005e66: 693b ldr r3, [r7, #16] 8005e68: 801a strh r2, [r3, #0] } /* Return the CRC computed value */ return hcrc->Instance->DR; 8005e6a: 68fb ldr r3, [r7, #12] 8005e6c: 681b ldr r3, [r3, #0] 8005e6e: 681b ldr r3, [r3, #0] } 8005e70: 4618 mov r0, r3 8005e72: 371c adds r7, #28 8005e74: 46bd mov sp, r7 8005e76: f85d 7b04 ldr.w r7, [sp], #4 8005e7a: 4770 bx lr 08005e7c : * @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) { 8005e7c: b480 push {r7} 8005e7e: b087 sub sp, #28 8005e80: af00 add r7, sp, #0 8005e82: 60f8 str r0, [r7, #12] 8005e84: 60b9 str r1, [r7, #8] 8005e86: 607a str r2, [r7, #4] HAL_StatusTypeDef status = HAL_OK; 8005e88: 2300 movs r3, #0 8005e8a: 75fb strb r3, [r7, #23] uint32_t msb = 31U; /* polynomial degree is 32 at most, so msb is initialized to max value */ 8005e8c: 231f movs r3, #31 8005e8e: 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) 8005e90: 68bb ldr r3, [r7, #8] 8005e92: f003 0301 and.w r3, r3, #1 8005e96: 2b00 cmp r3, #0 8005e98: d102 bne.n 8005ea0 { status = HAL_ERROR; 8005e9a: 2301 movs r3, #1 8005e9c: 75fb strb r3, [r7, #23] 8005e9e: e063 b.n 8005f68 * 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)) 8005ea0: bf00 nop 8005ea2: 693b ldr r3, [r7, #16] 8005ea4: 1e5a subs r2, r3, #1 8005ea6: 613a str r2, [r7, #16] 8005ea8: 2b00 cmp r3, #0 8005eaa: d009 beq.n 8005ec0 8005eac: 693b ldr r3, [r7, #16] 8005eae: f003 031f and.w r3, r3, #31 8005eb2: 68ba ldr r2, [r7, #8] 8005eb4: fa22 f303 lsr.w r3, r2, r3 8005eb8: f003 0301 and.w r3, r3, #1 8005ebc: 2b00 cmp r3, #0 8005ebe: d0f0 beq.n 8005ea2 { } switch (PolyLength) 8005ec0: 687b ldr r3, [r7, #4] 8005ec2: 2b18 cmp r3, #24 8005ec4: d846 bhi.n 8005f54 8005ec6: a201 add r2, pc, #4 @ (adr r2, 8005ecc ) 8005ec8: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8005ecc: 08005f5b .word 0x08005f5b 8005ed0: 08005f55 .word 0x08005f55 8005ed4: 08005f55 .word 0x08005f55 8005ed8: 08005f55 .word 0x08005f55 8005edc: 08005f55 .word 0x08005f55 8005ee0: 08005f55 .word 0x08005f55 8005ee4: 08005f55 .word 0x08005f55 8005ee8: 08005f55 .word 0x08005f55 8005eec: 08005f49 .word 0x08005f49 8005ef0: 08005f55 .word 0x08005f55 8005ef4: 08005f55 .word 0x08005f55 8005ef8: 08005f55 .word 0x08005f55 8005efc: 08005f55 .word 0x08005f55 8005f00: 08005f55 .word 0x08005f55 8005f04: 08005f55 .word 0x08005f55 8005f08: 08005f55 .word 0x08005f55 8005f0c: 08005f3d .word 0x08005f3d 8005f10: 08005f55 .word 0x08005f55 8005f14: 08005f55 .word 0x08005f55 8005f18: 08005f55 .word 0x08005f55 8005f1c: 08005f55 .word 0x08005f55 8005f20: 08005f55 .word 0x08005f55 8005f24: 08005f55 .word 0x08005f55 8005f28: 08005f55 .word 0x08005f55 8005f2c: 08005f31 .word 0x08005f31 { case CRC_POLYLENGTH_7B: if (msb >= HAL_CRC_LENGTH_7B) 8005f30: 693b ldr r3, [r7, #16] 8005f32: 2b06 cmp r3, #6 8005f34: d913 bls.n 8005f5e { status = HAL_ERROR; 8005f36: 2301 movs r3, #1 8005f38: 75fb strb r3, [r7, #23] } break; 8005f3a: e010 b.n 8005f5e case CRC_POLYLENGTH_8B: if (msb >= HAL_CRC_LENGTH_8B) 8005f3c: 693b ldr r3, [r7, #16] 8005f3e: 2b07 cmp r3, #7 8005f40: d90f bls.n 8005f62 { status = HAL_ERROR; 8005f42: 2301 movs r3, #1 8005f44: 75fb strb r3, [r7, #23] } break; 8005f46: e00c b.n 8005f62 case CRC_POLYLENGTH_16B: if (msb >= HAL_CRC_LENGTH_16B) 8005f48: 693b ldr r3, [r7, #16] 8005f4a: 2b0f cmp r3, #15 8005f4c: d90b bls.n 8005f66 { status = HAL_ERROR; 8005f4e: 2301 movs r3, #1 8005f50: 75fb strb r3, [r7, #23] } break; 8005f52: e008 b.n 8005f66 case CRC_POLYLENGTH_32B: /* no polynomial definition vs. polynomial length issue possible */ break; default: status = HAL_ERROR; 8005f54: 2301 movs r3, #1 8005f56: 75fb strb r3, [r7, #23] break; 8005f58: e006 b.n 8005f68 break; 8005f5a: bf00 nop 8005f5c: e004 b.n 8005f68 break; 8005f5e: bf00 nop 8005f60: e002 b.n 8005f68 break; 8005f62: bf00 nop 8005f64: e000 b.n 8005f68 break; 8005f66: bf00 nop } } if (status == HAL_OK) 8005f68: 7dfb ldrb r3, [r7, #23] 8005f6a: 2b00 cmp r3, #0 8005f6c: d10d bne.n 8005f8a { /* set generating polynomial */ WRITE_REG(hcrc->Instance->POL, Pol); 8005f6e: 68fb ldr r3, [r7, #12] 8005f70: 681b ldr r3, [r3, #0] 8005f72: 68ba ldr r2, [r7, #8] 8005f74: 615a str r2, [r3, #20] /* set generating polynomial size */ MODIFY_REG(hcrc->Instance->CR, CRC_CR_POLYSIZE, PolyLength); 8005f76: 68fb ldr r3, [r7, #12] 8005f78: 681b ldr r3, [r3, #0] 8005f7a: 689b ldr r3, [r3, #8] 8005f7c: f023 0118 bic.w r1, r3, #24 8005f80: 68fb ldr r3, [r7, #12] 8005f82: 681b ldr r3, [r3, #0] 8005f84: 687a ldr r2, [r7, #4] 8005f86: 430a orrs r2, r1 8005f88: 609a str r2, [r3, #8] } /* Return function status */ return status; 8005f8a: 7dfb ldrb r3, [r7, #23] } 8005f8c: 4618 mov r0, r3 8005f8e: 371c adds r7, #28 8005f90: 46bd mov sp, r7 8005f92: f85d 7b04 ldr.w r7, [sp], #4 8005f96: 4770 bx lr 08005f98 : * @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) { 8005f98: b580 push {r7, lr} 8005f9a: b086 sub sp, #24 8005f9c: af00 add r7, sp, #0 8005f9e: 6078 str r0, [r7, #4] uint32_t registerValue; uint32_t tickstart = HAL_GetTick(); 8005fa0: f7ff fc4c bl 800583c 8005fa4: 6138 str r0, [r7, #16] DMA_Base_Registers *regs_dma; BDMA_Base_Registers *regs_bdma; /* Check the DMA peripheral handle */ if(hdma == NULL) 8005fa6: 687b ldr r3, [r7, #4] 8005fa8: 2b00 cmp r3, #0 8005faa: d101 bne.n 8005fb0 { return HAL_ERROR; 8005fac: 2301 movs r3, #1 8005fae: e316 b.n 80065de 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 */ 8005fb0: 687b ldr r3, [r7, #4] 8005fb2: 681b ldr r3, [r3, #0] 8005fb4: 4a66 ldr r2, [pc, #408] @ (8006150 ) 8005fb6: 4293 cmp r3, r2 8005fb8: d04a beq.n 8006050 8005fba: 687b ldr r3, [r7, #4] 8005fbc: 681b ldr r3, [r3, #0] 8005fbe: 4a65 ldr r2, [pc, #404] @ (8006154 ) 8005fc0: 4293 cmp r3, r2 8005fc2: d045 beq.n 8006050 8005fc4: 687b ldr r3, [r7, #4] 8005fc6: 681b ldr r3, [r3, #0] 8005fc8: 4a63 ldr r2, [pc, #396] @ (8006158 ) 8005fca: 4293 cmp r3, r2 8005fcc: d040 beq.n 8006050 8005fce: 687b ldr r3, [r7, #4] 8005fd0: 681b ldr r3, [r3, #0] 8005fd2: 4a62 ldr r2, [pc, #392] @ (800615c ) 8005fd4: 4293 cmp r3, r2 8005fd6: d03b beq.n 8006050 8005fd8: 687b ldr r3, [r7, #4] 8005fda: 681b ldr r3, [r3, #0] 8005fdc: 4a60 ldr r2, [pc, #384] @ (8006160 ) 8005fde: 4293 cmp r3, r2 8005fe0: d036 beq.n 8006050 8005fe2: 687b ldr r3, [r7, #4] 8005fe4: 681b ldr r3, [r3, #0] 8005fe6: 4a5f ldr r2, [pc, #380] @ (8006164 ) 8005fe8: 4293 cmp r3, r2 8005fea: d031 beq.n 8006050 8005fec: 687b ldr r3, [r7, #4] 8005fee: 681b ldr r3, [r3, #0] 8005ff0: 4a5d ldr r2, [pc, #372] @ (8006168 ) 8005ff2: 4293 cmp r3, r2 8005ff4: d02c beq.n 8006050 8005ff6: 687b ldr r3, [r7, #4] 8005ff8: 681b ldr r3, [r3, #0] 8005ffa: 4a5c ldr r2, [pc, #368] @ (800616c ) 8005ffc: 4293 cmp r3, r2 8005ffe: d027 beq.n 8006050 8006000: 687b ldr r3, [r7, #4] 8006002: 681b ldr r3, [r3, #0] 8006004: 4a5a ldr r2, [pc, #360] @ (8006170 ) 8006006: 4293 cmp r3, r2 8006008: d022 beq.n 8006050 800600a: 687b ldr r3, [r7, #4] 800600c: 681b ldr r3, [r3, #0] 800600e: 4a59 ldr r2, [pc, #356] @ (8006174 ) 8006010: 4293 cmp r3, r2 8006012: d01d beq.n 8006050 8006014: 687b ldr r3, [r7, #4] 8006016: 681b ldr r3, [r3, #0] 8006018: 4a57 ldr r2, [pc, #348] @ (8006178 ) 800601a: 4293 cmp r3, r2 800601c: d018 beq.n 8006050 800601e: 687b ldr r3, [r7, #4] 8006020: 681b ldr r3, [r3, #0] 8006022: 4a56 ldr r2, [pc, #344] @ (800617c ) 8006024: 4293 cmp r3, r2 8006026: d013 beq.n 8006050 8006028: 687b ldr r3, [r7, #4] 800602a: 681b ldr r3, [r3, #0] 800602c: 4a54 ldr r2, [pc, #336] @ (8006180 ) 800602e: 4293 cmp r3, r2 8006030: d00e beq.n 8006050 8006032: 687b ldr r3, [r7, #4] 8006034: 681b ldr r3, [r3, #0] 8006036: 4a53 ldr r2, [pc, #332] @ (8006184 ) 8006038: 4293 cmp r3, r2 800603a: d009 beq.n 8006050 800603c: 687b ldr r3, [r7, #4] 800603e: 681b ldr r3, [r3, #0] 8006040: 4a51 ldr r2, [pc, #324] @ (8006188 ) 8006042: 4293 cmp r3, r2 8006044: d004 beq.n 8006050 8006046: 687b ldr r3, [r7, #4] 8006048: 681b ldr r3, [r3, #0] 800604a: 4a50 ldr r2, [pc, #320] @ (800618c ) 800604c: 4293 cmp r3, r2 800604e: d101 bne.n 8006054 8006050: 2301 movs r3, #1 8006052: e000 b.n 8006056 8006054: 2300 movs r3, #0 8006056: 2b00 cmp r3, #0 8006058: f000 813b beq.w 80062d2 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; 800605c: 687b ldr r3, [r7, #4] 800605e: 2202 movs r2, #2 8006060: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Allocate lock resource */ __HAL_UNLOCK(hdma); 8006064: 687b ldr r3, [r7, #4] 8006066: 2200 movs r2, #0 8006068: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Disable the peripheral */ __HAL_DMA_DISABLE(hdma); 800606c: 687b ldr r3, [r7, #4] 800606e: 681b ldr r3, [r3, #0] 8006070: 4a37 ldr r2, [pc, #220] @ (8006150 ) 8006072: 4293 cmp r3, r2 8006074: d04a beq.n 800610c 8006076: 687b ldr r3, [r7, #4] 8006078: 681b ldr r3, [r3, #0] 800607a: 4a36 ldr r2, [pc, #216] @ (8006154 ) 800607c: 4293 cmp r3, r2 800607e: d045 beq.n 800610c 8006080: 687b ldr r3, [r7, #4] 8006082: 681b ldr r3, [r3, #0] 8006084: 4a34 ldr r2, [pc, #208] @ (8006158 ) 8006086: 4293 cmp r3, r2 8006088: d040 beq.n 800610c 800608a: 687b ldr r3, [r7, #4] 800608c: 681b ldr r3, [r3, #0] 800608e: 4a33 ldr r2, [pc, #204] @ (800615c ) 8006090: 4293 cmp r3, r2 8006092: d03b beq.n 800610c 8006094: 687b ldr r3, [r7, #4] 8006096: 681b ldr r3, [r3, #0] 8006098: 4a31 ldr r2, [pc, #196] @ (8006160 ) 800609a: 4293 cmp r3, r2 800609c: d036 beq.n 800610c 800609e: 687b ldr r3, [r7, #4] 80060a0: 681b ldr r3, [r3, #0] 80060a2: 4a30 ldr r2, [pc, #192] @ (8006164 ) 80060a4: 4293 cmp r3, r2 80060a6: d031 beq.n 800610c 80060a8: 687b ldr r3, [r7, #4] 80060aa: 681b ldr r3, [r3, #0] 80060ac: 4a2e ldr r2, [pc, #184] @ (8006168 ) 80060ae: 4293 cmp r3, r2 80060b0: d02c beq.n 800610c 80060b2: 687b ldr r3, [r7, #4] 80060b4: 681b ldr r3, [r3, #0] 80060b6: 4a2d ldr r2, [pc, #180] @ (800616c ) 80060b8: 4293 cmp r3, r2 80060ba: d027 beq.n 800610c 80060bc: 687b ldr r3, [r7, #4] 80060be: 681b ldr r3, [r3, #0] 80060c0: 4a2b ldr r2, [pc, #172] @ (8006170 ) 80060c2: 4293 cmp r3, r2 80060c4: d022 beq.n 800610c 80060c6: 687b ldr r3, [r7, #4] 80060c8: 681b ldr r3, [r3, #0] 80060ca: 4a2a ldr r2, [pc, #168] @ (8006174 ) 80060cc: 4293 cmp r3, r2 80060ce: d01d beq.n 800610c 80060d0: 687b ldr r3, [r7, #4] 80060d2: 681b ldr r3, [r3, #0] 80060d4: 4a28 ldr r2, [pc, #160] @ (8006178 ) 80060d6: 4293 cmp r3, r2 80060d8: d018 beq.n 800610c 80060da: 687b ldr r3, [r7, #4] 80060dc: 681b ldr r3, [r3, #0] 80060de: 4a27 ldr r2, [pc, #156] @ (800617c ) 80060e0: 4293 cmp r3, r2 80060e2: d013 beq.n 800610c 80060e4: 687b ldr r3, [r7, #4] 80060e6: 681b ldr r3, [r3, #0] 80060e8: 4a25 ldr r2, [pc, #148] @ (8006180 ) 80060ea: 4293 cmp r3, r2 80060ec: d00e beq.n 800610c 80060ee: 687b ldr r3, [r7, #4] 80060f0: 681b ldr r3, [r3, #0] 80060f2: 4a24 ldr r2, [pc, #144] @ (8006184 ) 80060f4: 4293 cmp r3, r2 80060f6: d009 beq.n 800610c 80060f8: 687b ldr r3, [r7, #4] 80060fa: 681b ldr r3, [r3, #0] 80060fc: 4a22 ldr r2, [pc, #136] @ (8006188 ) 80060fe: 4293 cmp r3, r2 8006100: d004 beq.n 800610c 8006102: 687b ldr r3, [r7, #4] 8006104: 681b ldr r3, [r3, #0] 8006106: 4a21 ldr r2, [pc, #132] @ (800618c ) 8006108: 4293 cmp r3, r2 800610a: d108 bne.n 800611e 800610c: 687b ldr r3, [r7, #4] 800610e: 681b ldr r3, [r3, #0] 8006110: 681a ldr r2, [r3, #0] 8006112: 687b ldr r3, [r7, #4] 8006114: 681b ldr r3, [r3, #0] 8006116: f022 0201 bic.w r2, r2, #1 800611a: 601a str r2, [r3, #0] 800611c: e007 b.n 800612e 800611e: 687b ldr r3, [r7, #4] 8006120: 681b ldr r3, [r3, #0] 8006122: 681a ldr r2, [r3, #0] 8006124: 687b ldr r3, [r7, #4] 8006126: 681b ldr r3, [r3, #0] 8006128: f022 0201 bic.w r2, r2, #1 800612c: 601a str r2, [r3, #0] /* Check if the DMA Stream is effectively disabled */ while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 800612e: e02f b.n 8006190 { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT) 8006130: f7ff fb84 bl 800583c 8006134: 4602 mov r2, r0 8006136: 693b ldr r3, [r7, #16] 8006138: 1ad3 subs r3, r2, r3 800613a: 2b05 cmp r3, #5 800613c: d928 bls.n 8006190 { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; 800613e: 687b ldr r3, [r7, #4] 8006140: 2220 movs r2, #32 8006142: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_ERROR; 8006144: 687b ldr r3, [r7, #4] 8006146: 2203 movs r2, #3 8006148: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 800614c: 2301 movs r3, #1 800614e: e246 b.n 80065de 8006150: 40020010 .word 0x40020010 8006154: 40020028 .word 0x40020028 8006158: 40020040 .word 0x40020040 800615c: 40020058 .word 0x40020058 8006160: 40020070 .word 0x40020070 8006164: 40020088 .word 0x40020088 8006168: 400200a0 .word 0x400200a0 800616c: 400200b8 .word 0x400200b8 8006170: 40020410 .word 0x40020410 8006174: 40020428 .word 0x40020428 8006178: 40020440 .word 0x40020440 800617c: 40020458 .word 0x40020458 8006180: 40020470 .word 0x40020470 8006184: 40020488 .word 0x40020488 8006188: 400204a0 .word 0x400204a0 800618c: 400204b8 .word 0x400204b8 while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 8006190: 687b ldr r3, [r7, #4] 8006192: 681b ldr r3, [r3, #0] 8006194: 681b ldr r3, [r3, #0] 8006196: f003 0301 and.w r3, r3, #1 800619a: 2b00 cmp r3, #0 800619c: d1c8 bne.n 8006130 } } /* Get the CR register value */ registerValue = ((DMA_Stream_TypeDef *)hdma->Instance)->CR; 800619e: 687b ldr r3, [r7, #4] 80061a0: 681b ldr r3, [r3, #0] 80061a2: 681b ldr r3, [r3, #0] 80061a4: 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 | \ 80061a6: 697a ldr r2, [r7, #20] 80061a8: 4b83 ldr r3, [pc, #524] @ (80063b8 ) 80061aa: 4013 ands r3, r2 80061ac: 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 | 80061ae: 687b ldr r3, [r7, #4] 80061b0: 689a ldr r2, [r3, #8] hdma->Init.PeriphInc | hdma->Init.MemInc | 80061b2: 687b ldr r3, [r7, #4] 80061b4: 68db ldr r3, [r3, #12] registerValue |= hdma->Init.Direction | 80061b6: 431a orrs r2, r3 hdma->Init.PeriphInc | hdma->Init.MemInc | 80061b8: 687b ldr r3, [r7, #4] 80061ba: 691b ldr r3, [r3, #16] 80061bc: 431a orrs r2, r3 hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 80061be: 687b ldr r3, [r7, #4] 80061c0: 695b ldr r3, [r3, #20] hdma->Init.PeriphInc | hdma->Init.MemInc | 80061c2: 431a orrs r2, r3 hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 80061c4: 687b ldr r3, [r7, #4] 80061c6: 699b ldr r3, [r3, #24] 80061c8: 431a orrs r2, r3 hdma->Init.Mode | hdma->Init.Priority; 80061ca: 687b ldr r3, [r7, #4] 80061cc: 69db ldr r3, [r3, #28] hdma->Init.PeriphDataAlignment | hdma->Init.MemDataAlignment | 80061ce: 431a orrs r2, r3 hdma->Init.Mode | hdma->Init.Priority; 80061d0: 687b ldr r3, [r7, #4] 80061d2: 6a1b ldr r3, [r3, #32] 80061d4: 4313 orrs r3, r2 registerValue |= hdma->Init.Direction | 80061d6: 697a ldr r2, [r7, #20] 80061d8: 4313 orrs r3, r2 80061da: 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) 80061dc: 687b ldr r3, [r7, #4] 80061de: 6a5b ldr r3, [r3, #36] @ 0x24 80061e0: 2b04 cmp r3, #4 80061e2: d107 bne.n 80061f4 { /* Get memory burst and peripheral burst */ registerValue |= hdma->Init.MemBurst | hdma->Init.PeriphBurst; 80061e4: 687b ldr r3, [r7, #4] 80061e6: 6ada ldr r2, [r3, #44] @ 0x2c 80061e8: 687b ldr r3, [r7, #4] 80061ea: 6b1b ldr r3, [r3, #48] @ 0x30 80061ec: 4313 orrs r3, r2 80061ee: 697a ldr r2, [r7, #20] 80061f0: 4313 orrs r3, r2 80061f2: 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) 80061f4: 4b71 ldr r3, [pc, #452] @ (80063bc ) 80061f6: 681a ldr r2, [r3, #0] 80061f8: 4b71 ldr r3, [pc, #452] @ (80063c0 ) 80061fa: 4013 ands r3, r2 80061fc: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 8006200: d328 bcc.n 8006254 { #endif /* STM32H7_DEV_ID == 0x450UL */ if(IS_DMA_UART_USART_REQUEST(hdma->Init.Request) != 0U) 8006202: 687b ldr r3, [r7, #4] 8006204: 685b ldr r3, [r3, #4] 8006206: 2b28 cmp r3, #40 @ 0x28 8006208: d903 bls.n 8006212 800620a: 687b ldr r3, [r7, #4] 800620c: 685b ldr r3, [r3, #4] 800620e: 2b2e cmp r3, #46 @ 0x2e 8006210: d917 bls.n 8006242 8006212: 687b ldr r3, [r7, #4] 8006214: 685b ldr r3, [r3, #4] 8006216: 2b3e cmp r3, #62 @ 0x3e 8006218: d903 bls.n 8006222 800621a: 687b ldr r3, [r7, #4] 800621c: 685b ldr r3, [r3, #4] 800621e: 2b42 cmp r3, #66 @ 0x42 8006220: d90f bls.n 8006242 8006222: 687b ldr r3, [r7, #4] 8006224: 685b ldr r3, [r3, #4] 8006226: 2b46 cmp r3, #70 @ 0x46 8006228: d903 bls.n 8006232 800622a: 687b ldr r3, [r7, #4] 800622c: 685b ldr r3, [r3, #4] 800622e: 2b48 cmp r3, #72 @ 0x48 8006230: d907 bls.n 8006242 8006232: 687b ldr r3, [r7, #4] 8006234: 685b ldr r3, [r3, #4] 8006236: 2b4e cmp r3, #78 @ 0x4e 8006238: d905 bls.n 8006246 800623a: 687b ldr r3, [r7, #4] 800623c: 685b ldr r3, [r3, #4] 800623e: 2b52 cmp r3, #82 @ 0x52 8006240: d801 bhi.n 8006246 8006242: 2301 movs r3, #1 8006244: e000 b.n 8006248 8006246: 2300 movs r3, #0 8006248: 2b00 cmp r3, #0 800624a: d003 beq.n 8006254 { registerValue |= DMA_SxCR_TRBUFF; 800624c: 697b ldr r3, [r7, #20] 800624e: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 8006252: 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; 8006254: 687b ldr r3, [r7, #4] 8006256: 681b ldr r3, [r3, #0] 8006258: 697a ldr r2, [r7, #20] 800625a: 601a str r2, [r3, #0] /* Get the FCR register value */ registerValue = ((DMA_Stream_TypeDef *)hdma->Instance)->FCR; 800625c: 687b ldr r3, [r7, #4] 800625e: 681b ldr r3, [r3, #0] 8006260: 695b ldr r3, [r3, #20] 8006262: 617b str r3, [r7, #20] /* Clear Direct mode and FIFO threshold bits */ registerValue &= (uint32_t)~(DMA_SxFCR_DMDIS | DMA_SxFCR_FTH); 8006264: 697b ldr r3, [r7, #20] 8006266: f023 0307 bic.w r3, r3, #7 800626a: 617b str r3, [r7, #20] /* Prepare the DMA Stream FIFO configuration */ registerValue |= hdma->Init.FIFOMode; 800626c: 687b ldr r3, [r7, #4] 800626e: 6a5b ldr r3, [r3, #36] @ 0x24 8006270: 697a ldr r2, [r7, #20] 8006272: 4313 orrs r3, r2 8006274: 617b str r3, [r7, #20] /* the FIFO threshold is not used when the FIFO mode is disabled */ if(hdma->Init.FIFOMode == DMA_FIFOMODE_ENABLE) 8006276: 687b ldr r3, [r7, #4] 8006278: 6a5b ldr r3, [r3, #36] @ 0x24 800627a: 2b04 cmp r3, #4 800627c: d117 bne.n 80062ae { /* Get the FIFO threshold */ registerValue |= hdma->Init.FIFOThreshold; 800627e: 687b ldr r3, [r7, #4] 8006280: 6a9b ldr r3, [r3, #40] @ 0x28 8006282: 697a ldr r2, [r7, #20] 8006284: 4313 orrs r3, r2 8006286: 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) 8006288: 687b ldr r3, [r7, #4] 800628a: 6adb ldr r3, [r3, #44] @ 0x2c 800628c: 2b00 cmp r3, #0 800628e: d00e beq.n 80062ae { if (DMA_CheckFifoParam(hdma) != HAL_OK) 8006290: 6878 ldr r0, [r7, #4] 8006292: f001 ff1d bl 80080d0 8006296: 4603 mov r3, r0 8006298: 2b00 cmp r3, #0 800629a: d008 beq.n 80062ae { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_PARAM; 800629c: 687b ldr r3, [r7, #4] 800629e: 2240 movs r2, #64 @ 0x40 80062a0: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80062a2: 687b ldr r3, [r7, #4] 80062a4: 2201 movs r2, #1 80062a6: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 80062aa: 2301 movs r3, #1 80062ac: e197 b.n 80065de } } } /* Write to DMA Stream FCR */ ((DMA_Stream_TypeDef *)hdma->Instance)->FCR = registerValue; 80062ae: 687b ldr r3, [r7, #4] 80062b0: 681b ldr r3, [r3, #0] 80062b2: 697a ldr r2, [r7, #20] 80062b4: 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); 80062b6: 6878 ldr r0, [r7, #4] 80062b8: f001 fe58 bl 8007f6c 80062bc: 4603 mov r3, r0 80062be: 60bb str r3, [r7, #8] /* Clear all interrupt flags */ regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 80062c0: 687b ldr r3, [r7, #4] 80062c2: 6ddb ldr r3, [r3, #92] @ 0x5c 80062c4: f003 031f and.w r3, r3, #31 80062c8: 223f movs r2, #63 @ 0x3f 80062ca: 409a lsls r2, r3 80062cc: 68bb ldr r3, [r7, #8] 80062ce: 609a str r2, [r3, #8] 80062d0: e0cd b.n 800646e } else if(IS_BDMA_CHANNEL_INSTANCE(hdma->Instance) != 0U) /* BDMA instance(s) */ 80062d2: 687b ldr r3, [r7, #4] 80062d4: 681b ldr r3, [r3, #0] 80062d6: 4a3b ldr r2, [pc, #236] @ (80063c4 ) 80062d8: 4293 cmp r3, r2 80062da: d022 beq.n 8006322 80062dc: 687b ldr r3, [r7, #4] 80062de: 681b ldr r3, [r3, #0] 80062e0: 4a39 ldr r2, [pc, #228] @ (80063c8 ) 80062e2: 4293 cmp r3, r2 80062e4: d01d beq.n 8006322 80062e6: 687b ldr r3, [r7, #4] 80062e8: 681b ldr r3, [r3, #0] 80062ea: 4a38 ldr r2, [pc, #224] @ (80063cc ) 80062ec: 4293 cmp r3, r2 80062ee: d018 beq.n 8006322 80062f0: 687b ldr r3, [r7, #4] 80062f2: 681b ldr r3, [r3, #0] 80062f4: 4a36 ldr r2, [pc, #216] @ (80063d0 ) 80062f6: 4293 cmp r3, r2 80062f8: d013 beq.n 8006322 80062fa: 687b ldr r3, [r7, #4] 80062fc: 681b ldr r3, [r3, #0] 80062fe: 4a35 ldr r2, [pc, #212] @ (80063d4 ) 8006300: 4293 cmp r3, r2 8006302: d00e beq.n 8006322 8006304: 687b ldr r3, [r7, #4] 8006306: 681b ldr r3, [r3, #0] 8006308: 4a33 ldr r2, [pc, #204] @ (80063d8 ) 800630a: 4293 cmp r3, r2 800630c: d009 beq.n 8006322 800630e: 687b ldr r3, [r7, #4] 8006310: 681b ldr r3, [r3, #0] 8006312: 4a32 ldr r2, [pc, #200] @ (80063dc ) 8006314: 4293 cmp r3, r2 8006316: d004 beq.n 8006322 8006318: 687b ldr r3, [r7, #4] 800631a: 681b ldr r3, [r3, #0] 800631c: 4a30 ldr r2, [pc, #192] @ (80063e0 ) 800631e: 4293 cmp r3, r2 8006320: d101 bne.n 8006326 8006322: 2301 movs r3, #1 8006324: e000 b.n 8006328 8006326: 2300 movs r3, #0 8006328: 2b00 cmp r3, #0 800632a: f000 8097 beq.w 800645c { if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 800632e: 687b ldr r3, [r7, #4] 8006330: 681b ldr r3, [r3, #0] 8006332: 4a24 ldr r2, [pc, #144] @ (80063c4 ) 8006334: 4293 cmp r3, r2 8006336: d021 beq.n 800637c 8006338: 687b ldr r3, [r7, #4] 800633a: 681b ldr r3, [r3, #0] 800633c: 4a22 ldr r2, [pc, #136] @ (80063c8 ) 800633e: 4293 cmp r3, r2 8006340: d01c beq.n 800637c 8006342: 687b ldr r3, [r7, #4] 8006344: 681b ldr r3, [r3, #0] 8006346: 4a21 ldr r2, [pc, #132] @ (80063cc ) 8006348: 4293 cmp r3, r2 800634a: d017 beq.n 800637c 800634c: 687b ldr r3, [r7, #4] 800634e: 681b ldr r3, [r3, #0] 8006350: 4a1f ldr r2, [pc, #124] @ (80063d0 ) 8006352: 4293 cmp r3, r2 8006354: d012 beq.n 800637c 8006356: 687b ldr r3, [r7, #4] 8006358: 681b ldr r3, [r3, #0] 800635a: 4a1e ldr r2, [pc, #120] @ (80063d4 ) 800635c: 4293 cmp r3, r2 800635e: d00d beq.n 800637c 8006360: 687b ldr r3, [r7, #4] 8006362: 681b ldr r3, [r3, #0] 8006364: 4a1c ldr r2, [pc, #112] @ (80063d8 ) 8006366: 4293 cmp r3, r2 8006368: d008 beq.n 800637c 800636a: 687b ldr r3, [r7, #4] 800636c: 681b ldr r3, [r3, #0] 800636e: 4a1b ldr r2, [pc, #108] @ (80063dc ) 8006370: 4293 cmp r3, r2 8006372: d003 beq.n 800637c 8006374: 687b ldr r3, [r7, #4] 8006376: 681b ldr r3, [r3, #0] 8006378: 4a19 ldr r2, [pc, #100] @ (80063e0 ) 800637a: 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; 800637c: 687b ldr r3, [r7, #4] 800637e: 2202 movs r2, #2 8006380: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Allocate lock resource */ __HAL_UNLOCK(hdma); 8006384: 687b ldr r3, [r7, #4] 8006386: 2200 movs r2, #0 8006388: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Get the CR register value */ registerValue = ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR; 800638c: 687b ldr r3, [r7, #4] 800638e: 681b ldr r3, [r3, #0] 8006390: 681b ldr r3, [r3, #0] 8006392: 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 | \ 8006394: 697a ldr r2, [r7, #20] 8006396: 4b13 ldr r3, [pc, #76] @ (80063e4 ) 8006398: 4013 ands r3, r2 800639a: 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) | 800639c: 687b ldr r3, [r7, #4] 800639e: 689b ldr r3, [r3, #8] 80063a0: 2b40 cmp r3, #64 @ 0x40 80063a2: d021 beq.n 80063e8 80063a4: 687b ldr r3, [r7, #4] 80063a6: 689b ldr r3, [r3, #8] 80063a8: 2b80 cmp r3, #128 @ 0x80 80063aa: d102 bne.n 80063b2 80063ac: f44f 4380 mov.w r3, #16384 @ 0x4000 80063b0: e01b b.n 80063ea 80063b2: 2300 movs r3, #0 80063b4: e019 b.n 80063ea 80063b6: bf00 nop 80063b8: fe10803f .word 0xfe10803f 80063bc: 5c001000 .word 0x5c001000 80063c0: ffff0000 .word 0xffff0000 80063c4: 58025408 .word 0x58025408 80063c8: 5802541c .word 0x5802541c 80063cc: 58025430 .word 0x58025430 80063d0: 58025444 .word 0x58025444 80063d4: 58025458 .word 0x58025458 80063d8: 5802546c .word 0x5802546c 80063dc: 58025480 .word 0x58025480 80063e0: 58025494 .word 0x58025494 80063e4: fffe000f .word 0xfffe000f 80063e8: 2310 movs r3, #16 DMA_TO_BDMA_PERIPHERAL_INC(hdma->Init.PeriphInc) | 80063ea: 687a ldr r2, [r7, #4] 80063ec: 68d2 ldr r2, [r2, #12] 80063ee: 08d2 lsrs r2, r2, #3 registerValue |= DMA_TO_BDMA_DIRECTION(hdma->Init.Direction) | 80063f0: 431a orrs r2, r3 DMA_TO_BDMA_MEMORY_INC(hdma->Init.MemInc) | 80063f2: 687b ldr r3, [r7, #4] 80063f4: 691b ldr r3, [r3, #16] 80063f6: 08db lsrs r3, r3, #3 DMA_TO_BDMA_PERIPHERAL_INC(hdma->Init.PeriphInc) | 80063f8: 431a orrs r2, r3 DMA_TO_BDMA_PDATA_SIZE(hdma->Init.PeriphDataAlignment) | 80063fa: 687b ldr r3, [r7, #4] 80063fc: 695b ldr r3, [r3, #20] 80063fe: 08db lsrs r3, r3, #3 DMA_TO_BDMA_MEMORY_INC(hdma->Init.MemInc) | 8006400: 431a orrs r2, r3 DMA_TO_BDMA_MDATA_SIZE(hdma->Init.MemDataAlignment) | 8006402: 687b ldr r3, [r7, #4] 8006404: 699b ldr r3, [r3, #24] 8006406: 08db lsrs r3, r3, #3 DMA_TO_BDMA_PDATA_SIZE(hdma->Init.PeriphDataAlignment) | 8006408: 431a orrs r2, r3 DMA_TO_BDMA_MODE(hdma->Init.Mode) | 800640a: 687b ldr r3, [r7, #4] 800640c: 69db ldr r3, [r3, #28] 800640e: 08db lsrs r3, r3, #3 DMA_TO_BDMA_MDATA_SIZE(hdma->Init.MemDataAlignment) | 8006410: 431a orrs r2, r3 DMA_TO_BDMA_PRIORITY(hdma->Init.Priority); 8006412: 687b ldr r3, [r7, #4] 8006414: 6a1b ldr r3, [r3, #32] 8006416: 091b lsrs r3, r3, #4 DMA_TO_BDMA_MODE(hdma->Init.Mode) | 8006418: 4313 orrs r3, r2 registerValue |= DMA_TO_BDMA_DIRECTION(hdma->Init.Direction) | 800641a: 697a ldr r2, [r7, #20] 800641c: 4313 orrs r3, r2 800641e: 617b str r3, [r7, #20] /* Write to DMA Channel CR register */ ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR = registerValue; 8006420: 687b ldr r3, [r7, #4] 8006422: 681b ldr r3, [r3, #0] 8006424: 697a ldr r2, [r7, #20] 8006426: 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; 8006428: 687b ldr r3, [r7, #4] 800642a: 681b ldr r3, [r3, #0] 800642c: 461a mov r2, r3 800642e: 4b6e ldr r3, [pc, #440] @ (80065e8 ) 8006430: 4413 add r3, r2 8006432: 4a6e ldr r2, [pc, #440] @ (80065ec ) 8006434: fba2 2303 umull r2, r3, r2, r3 8006438: 091b lsrs r3, r3, #4 800643a: 009a lsls r2, r3, #2 800643c: 687b ldr r3, [r7, #4] 800643e: 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); 8006440: 6878 ldr r0, [r7, #4] 8006442: f001 fd93 bl 8007f6c 8006446: 4603 mov r3, r0 8006448: 60fb str r3, [r7, #12] /* Clear all interrupt flags */ regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 800644a: 687b ldr r3, [r7, #4] 800644c: 6ddb ldr r3, [r3, #92] @ 0x5c 800644e: f003 031f and.w r3, r3, #31 8006452: 2201 movs r2, #1 8006454: 409a lsls r2, r3 8006456: 68fb ldr r3, [r7, #12] 8006458: 605a str r2, [r3, #4] 800645a: e008 b.n 800646e } else { hdma->ErrorCode = HAL_DMA_ERROR_PARAM; 800645c: 687b ldr r3, [r7, #4] 800645e: 2240 movs r2, #64 @ 0x40 8006460: 655a str r2, [r3, #84] @ 0x54 hdma->State = HAL_DMA_STATE_ERROR; 8006462: 687b ldr r3, [r7, #4] 8006464: 2203 movs r2, #3 8006466: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_ERROR; 800646a: 2301 movs r3, #1 800646c: e0b7 b.n 80065de } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 800646e: 687b ldr r3, [r7, #4] 8006470: 681b ldr r3, [r3, #0] 8006472: 4a5f ldr r2, [pc, #380] @ (80065f0 ) 8006474: 4293 cmp r3, r2 8006476: d072 beq.n 800655e 8006478: 687b ldr r3, [r7, #4] 800647a: 681b ldr r3, [r3, #0] 800647c: 4a5d ldr r2, [pc, #372] @ (80065f4 ) 800647e: 4293 cmp r3, r2 8006480: d06d beq.n 800655e 8006482: 687b ldr r3, [r7, #4] 8006484: 681b ldr r3, [r3, #0] 8006486: 4a5c ldr r2, [pc, #368] @ (80065f8 ) 8006488: 4293 cmp r3, r2 800648a: d068 beq.n 800655e 800648c: 687b ldr r3, [r7, #4] 800648e: 681b ldr r3, [r3, #0] 8006490: 4a5a ldr r2, [pc, #360] @ (80065fc ) 8006492: 4293 cmp r3, r2 8006494: d063 beq.n 800655e 8006496: 687b ldr r3, [r7, #4] 8006498: 681b ldr r3, [r3, #0] 800649a: 4a59 ldr r2, [pc, #356] @ (8006600 ) 800649c: 4293 cmp r3, r2 800649e: d05e beq.n 800655e 80064a0: 687b ldr r3, [r7, #4] 80064a2: 681b ldr r3, [r3, #0] 80064a4: 4a57 ldr r2, [pc, #348] @ (8006604 ) 80064a6: 4293 cmp r3, r2 80064a8: d059 beq.n 800655e 80064aa: 687b ldr r3, [r7, #4] 80064ac: 681b ldr r3, [r3, #0] 80064ae: 4a56 ldr r2, [pc, #344] @ (8006608 ) 80064b0: 4293 cmp r3, r2 80064b2: d054 beq.n 800655e 80064b4: 687b ldr r3, [r7, #4] 80064b6: 681b ldr r3, [r3, #0] 80064b8: 4a54 ldr r2, [pc, #336] @ (800660c ) 80064ba: 4293 cmp r3, r2 80064bc: d04f beq.n 800655e 80064be: 687b ldr r3, [r7, #4] 80064c0: 681b ldr r3, [r3, #0] 80064c2: 4a53 ldr r2, [pc, #332] @ (8006610 ) 80064c4: 4293 cmp r3, r2 80064c6: d04a beq.n 800655e 80064c8: 687b ldr r3, [r7, #4] 80064ca: 681b ldr r3, [r3, #0] 80064cc: 4a51 ldr r2, [pc, #324] @ (8006614 ) 80064ce: 4293 cmp r3, r2 80064d0: d045 beq.n 800655e 80064d2: 687b ldr r3, [r7, #4] 80064d4: 681b ldr r3, [r3, #0] 80064d6: 4a50 ldr r2, [pc, #320] @ (8006618 ) 80064d8: 4293 cmp r3, r2 80064da: d040 beq.n 800655e 80064dc: 687b ldr r3, [r7, #4] 80064de: 681b ldr r3, [r3, #0] 80064e0: 4a4e ldr r2, [pc, #312] @ (800661c ) 80064e2: 4293 cmp r3, r2 80064e4: d03b beq.n 800655e 80064e6: 687b ldr r3, [r7, #4] 80064e8: 681b ldr r3, [r3, #0] 80064ea: 4a4d ldr r2, [pc, #308] @ (8006620 ) 80064ec: 4293 cmp r3, r2 80064ee: d036 beq.n 800655e 80064f0: 687b ldr r3, [r7, #4] 80064f2: 681b ldr r3, [r3, #0] 80064f4: 4a4b ldr r2, [pc, #300] @ (8006624 ) 80064f6: 4293 cmp r3, r2 80064f8: d031 beq.n 800655e 80064fa: 687b ldr r3, [r7, #4] 80064fc: 681b ldr r3, [r3, #0] 80064fe: 4a4a ldr r2, [pc, #296] @ (8006628 ) 8006500: 4293 cmp r3, r2 8006502: d02c beq.n 800655e 8006504: 687b ldr r3, [r7, #4] 8006506: 681b ldr r3, [r3, #0] 8006508: 4a48 ldr r2, [pc, #288] @ (800662c ) 800650a: 4293 cmp r3, r2 800650c: d027 beq.n 800655e 800650e: 687b ldr r3, [r7, #4] 8006510: 681b ldr r3, [r3, #0] 8006512: 4a47 ldr r2, [pc, #284] @ (8006630 ) 8006514: 4293 cmp r3, r2 8006516: d022 beq.n 800655e 8006518: 687b ldr r3, [r7, #4] 800651a: 681b ldr r3, [r3, #0] 800651c: 4a45 ldr r2, [pc, #276] @ (8006634 ) 800651e: 4293 cmp r3, r2 8006520: d01d beq.n 800655e 8006522: 687b ldr r3, [r7, #4] 8006524: 681b ldr r3, [r3, #0] 8006526: 4a44 ldr r2, [pc, #272] @ (8006638 ) 8006528: 4293 cmp r3, r2 800652a: d018 beq.n 800655e 800652c: 687b ldr r3, [r7, #4] 800652e: 681b ldr r3, [r3, #0] 8006530: 4a42 ldr r2, [pc, #264] @ (800663c ) 8006532: 4293 cmp r3, r2 8006534: d013 beq.n 800655e 8006536: 687b ldr r3, [r7, #4] 8006538: 681b ldr r3, [r3, #0] 800653a: 4a41 ldr r2, [pc, #260] @ (8006640 ) 800653c: 4293 cmp r3, r2 800653e: d00e beq.n 800655e 8006540: 687b ldr r3, [r7, #4] 8006542: 681b ldr r3, [r3, #0] 8006544: 4a3f ldr r2, [pc, #252] @ (8006644 ) 8006546: 4293 cmp r3, r2 8006548: d009 beq.n 800655e 800654a: 687b ldr r3, [r7, #4] 800654c: 681b ldr r3, [r3, #0] 800654e: 4a3e ldr r2, [pc, #248] @ (8006648 ) 8006550: 4293 cmp r3, r2 8006552: d004 beq.n 800655e 8006554: 687b ldr r3, [r7, #4] 8006556: 681b ldr r3, [r3, #0] 8006558: 4a3c ldr r2, [pc, #240] @ (800664c ) 800655a: 4293 cmp r3, r2 800655c: d101 bne.n 8006562 800655e: 2301 movs r3, #1 8006560: e000 b.n 8006564 8006562: 2300 movs r3, #0 8006564: 2b00 cmp r3, #0 8006566: d032 beq.n 80065ce { /* Initialize parameters for DMAMUX channel : DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask */ DMA_CalcDMAMUXChannelBaseAndMask(hdma); 8006568: 6878 ldr r0, [r7, #4] 800656a: f001 fe2d bl 80081c8 if(hdma->Init.Direction == DMA_MEMORY_TO_MEMORY) 800656e: 687b ldr r3, [r7, #4] 8006570: 689b ldr r3, [r3, #8] 8006572: 2b80 cmp r3, #128 @ 0x80 8006574: d102 bne.n 800657c { /* if memory to memory force the request to 0*/ hdma->Init.Request = DMA_REQUEST_MEM2MEM; 8006576: 687b ldr r3, [r7, #4] 8006578: 2200 movs r2, #0 800657a: 605a str r2, [r3, #4] } /* Set peripheral request to DMAMUX channel */ hdma->DMAmuxChannel->CCR = (hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID); 800657c: 687b ldr r3, [r7, #4] 800657e: 685a ldr r2, [r3, #4] 8006580: 687b ldr r3, [r7, #4] 8006582: 6e1b ldr r3, [r3, #96] @ 0x60 8006584: b2d2 uxtb r2, r2 8006586: 601a str r2, [r3, #0] /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 8006588: 687b ldr r3, [r7, #4] 800658a: 6e5b ldr r3, [r3, #100] @ 0x64 800658c: 687a ldr r2, [r7, #4] 800658e: 6e92 ldr r2, [r2, #104] @ 0x68 8006590: 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)) 8006592: 687b ldr r3, [r7, #4] 8006594: 685b ldr r3, [r3, #4] 8006596: 2b00 cmp r3, #0 8006598: d010 beq.n 80065bc 800659a: 687b ldr r3, [r7, #4] 800659c: 685b ldr r3, [r3, #4] 800659e: 2b08 cmp r3, #8 80065a0: d80c bhi.n 80065bc { /* Initialize parameters for DMAMUX request generator : DMAmuxRequestGen, DMAmuxRequestGenStatus and DMAmuxRequestGenStatusMask */ DMA_CalcDMAMUXRequestGenBaseAndMask(hdma); 80065a2: 6878 ldr r0, [r7, #4] 80065a4: f001 feaa bl 80082fc /* Reset the DMAMUX request generator register */ hdma->DMAmuxRequestGen->RGCR = 0U; 80065a8: 687b ldr r3, [r7, #4] 80065aa: 6edb ldr r3, [r3, #108] @ 0x6c 80065ac: 2200 movs r2, #0 80065ae: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 80065b0: 687b ldr r3, [r7, #4] 80065b2: 6f1b ldr r3, [r3, #112] @ 0x70 80065b4: 687a ldr r2, [r7, #4] 80065b6: 6f52 ldr r2, [r2, #116] @ 0x74 80065b8: 605a str r2, [r3, #4] 80065ba: e008 b.n 80065ce } else { hdma->DMAmuxRequestGen = 0U; 80065bc: 687b ldr r3, [r7, #4] 80065be: 2200 movs r2, #0 80065c0: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = 0U; 80065c2: 687b ldr r3, [r7, #4] 80065c4: 2200 movs r2, #0 80065c6: 671a str r2, [r3, #112] @ 0x70 hdma->DMAmuxRequestGenStatusMask = 0U; 80065c8: 687b ldr r3, [r7, #4] 80065ca: 2200 movs r2, #0 80065cc: 675a str r2, [r3, #116] @ 0x74 } } /* Initialize the error code */ hdma->ErrorCode = HAL_DMA_ERROR_NONE; 80065ce: 687b ldr r3, [r7, #4] 80065d0: 2200 movs r2, #0 80065d2: 655a str r2, [r3, #84] @ 0x54 /* Initialize the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80065d4: 687b ldr r3, [r7, #4] 80065d6: 2201 movs r2, #1 80065d8: f883 2035 strb.w r2, [r3, #53] @ 0x35 return HAL_OK; 80065dc: 2300 movs r3, #0 } 80065de: 4618 mov r0, r3 80065e0: 3718 adds r7, #24 80065e2: 46bd mov sp, r7 80065e4: bd80 pop {r7, pc} 80065e6: bf00 nop 80065e8: a7fdabf8 .word 0xa7fdabf8 80065ec: cccccccd .word 0xcccccccd 80065f0: 40020010 .word 0x40020010 80065f4: 40020028 .word 0x40020028 80065f8: 40020040 .word 0x40020040 80065fc: 40020058 .word 0x40020058 8006600: 40020070 .word 0x40020070 8006604: 40020088 .word 0x40020088 8006608: 400200a0 .word 0x400200a0 800660c: 400200b8 .word 0x400200b8 8006610: 40020410 .word 0x40020410 8006614: 40020428 .word 0x40020428 8006618: 40020440 .word 0x40020440 800661c: 40020458 .word 0x40020458 8006620: 40020470 .word 0x40020470 8006624: 40020488 .word 0x40020488 8006628: 400204a0 .word 0x400204a0 800662c: 400204b8 .word 0x400204b8 8006630: 58025408 .word 0x58025408 8006634: 5802541c .word 0x5802541c 8006638: 58025430 .word 0x58025430 800663c: 58025444 .word 0x58025444 8006640: 58025458 .word 0x58025458 8006644: 5802546c .word 0x5802546c 8006648: 58025480 .word 0x58025480 800664c: 58025494 .word 0x58025494 08006650 : * 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) { 8006650: b580 push {r7, lr} 8006652: b086 sub sp, #24 8006654: af00 add r7, sp, #0 8006656: 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(); 8006658: f7ff f8f0 bl 800583c 800665c: 6138 str r0, [r7, #16] /* Check the DMA peripheral handle */ if(hdma == NULL) 800665e: 687b ldr r3, [r7, #4] 8006660: 2b00 cmp r3, #0 8006662: d101 bne.n 8006668 { return HAL_ERROR; 8006664: 2301 movs r3, #1 8006666: e2dc b.n 8006c22 } /* Check the DMA peripheral state */ if(hdma->State != HAL_DMA_STATE_BUSY) 8006668: 687b ldr r3, [r7, #4] 800666a: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 800666e: b2db uxtb r3, r3 8006670: 2b02 cmp r3, #2 8006672: d008 beq.n 8006686 { hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; 8006674: 687b ldr r3, [r7, #4] 8006676: 2280 movs r2, #128 @ 0x80 8006678: 655a str r2, [r3, #84] @ 0x54 /* Process Unlocked */ __HAL_UNLOCK(hdma); 800667a: 687b ldr r3, [r7, #4] 800667c: 2200 movs r2, #0 800667e: f883 2034 strb.w r2, [r3, #52] @ 0x34 return HAL_ERROR; 8006682: 2301 movs r3, #1 8006684: e2cd b.n 8006c22 } else { /* Disable all the transfer interrupts */ if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8006686: 687b ldr r3, [r7, #4] 8006688: 681b ldr r3, [r3, #0] 800668a: 4a76 ldr r2, [pc, #472] @ (8006864 ) 800668c: 4293 cmp r3, r2 800668e: d04a beq.n 8006726 8006690: 687b ldr r3, [r7, #4] 8006692: 681b ldr r3, [r3, #0] 8006694: 4a74 ldr r2, [pc, #464] @ (8006868 ) 8006696: 4293 cmp r3, r2 8006698: d045 beq.n 8006726 800669a: 687b ldr r3, [r7, #4] 800669c: 681b ldr r3, [r3, #0] 800669e: 4a73 ldr r2, [pc, #460] @ (800686c ) 80066a0: 4293 cmp r3, r2 80066a2: d040 beq.n 8006726 80066a4: 687b ldr r3, [r7, #4] 80066a6: 681b ldr r3, [r3, #0] 80066a8: 4a71 ldr r2, [pc, #452] @ (8006870 ) 80066aa: 4293 cmp r3, r2 80066ac: d03b beq.n 8006726 80066ae: 687b ldr r3, [r7, #4] 80066b0: 681b ldr r3, [r3, #0] 80066b2: 4a70 ldr r2, [pc, #448] @ (8006874 ) 80066b4: 4293 cmp r3, r2 80066b6: d036 beq.n 8006726 80066b8: 687b ldr r3, [r7, #4] 80066ba: 681b ldr r3, [r3, #0] 80066bc: 4a6e ldr r2, [pc, #440] @ (8006878 ) 80066be: 4293 cmp r3, r2 80066c0: d031 beq.n 8006726 80066c2: 687b ldr r3, [r7, #4] 80066c4: 681b ldr r3, [r3, #0] 80066c6: 4a6d ldr r2, [pc, #436] @ (800687c ) 80066c8: 4293 cmp r3, r2 80066ca: d02c beq.n 8006726 80066cc: 687b ldr r3, [r7, #4] 80066ce: 681b ldr r3, [r3, #0] 80066d0: 4a6b ldr r2, [pc, #428] @ (8006880 ) 80066d2: 4293 cmp r3, r2 80066d4: d027 beq.n 8006726 80066d6: 687b ldr r3, [r7, #4] 80066d8: 681b ldr r3, [r3, #0] 80066da: 4a6a ldr r2, [pc, #424] @ (8006884 ) 80066dc: 4293 cmp r3, r2 80066de: d022 beq.n 8006726 80066e0: 687b ldr r3, [r7, #4] 80066e2: 681b ldr r3, [r3, #0] 80066e4: 4a68 ldr r2, [pc, #416] @ (8006888 ) 80066e6: 4293 cmp r3, r2 80066e8: d01d beq.n 8006726 80066ea: 687b ldr r3, [r7, #4] 80066ec: 681b ldr r3, [r3, #0] 80066ee: 4a67 ldr r2, [pc, #412] @ (800688c ) 80066f0: 4293 cmp r3, r2 80066f2: d018 beq.n 8006726 80066f4: 687b ldr r3, [r7, #4] 80066f6: 681b ldr r3, [r3, #0] 80066f8: 4a65 ldr r2, [pc, #404] @ (8006890 ) 80066fa: 4293 cmp r3, r2 80066fc: d013 beq.n 8006726 80066fe: 687b ldr r3, [r7, #4] 8006700: 681b ldr r3, [r3, #0] 8006702: 4a64 ldr r2, [pc, #400] @ (8006894 ) 8006704: 4293 cmp r3, r2 8006706: d00e beq.n 8006726 8006708: 687b ldr r3, [r7, #4] 800670a: 681b ldr r3, [r3, #0] 800670c: 4a62 ldr r2, [pc, #392] @ (8006898 ) 800670e: 4293 cmp r3, r2 8006710: d009 beq.n 8006726 8006712: 687b ldr r3, [r7, #4] 8006714: 681b ldr r3, [r3, #0] 8006716: 4a61 ldr r2, [pc, #388] @ (800689c ) 8006718: 4293 cmp r3, r2 800671a: d004 beq.n 8006726 800671c: 687b ldr r3, [r7, #4] 800671e: 681b ldr r3, [r3, #0] 8006720: 4a5f ldr r2, [pc, #380] @ (80068a0 ) 8006722: 4293 cmp r3, r2 8006724: d101 bne.n 800672a 8006726: 2301 movs r3, #1 8006728: e000 b.n 800672c 800672a: 2300 movs r3, #0 800672c: 2b00 cmp r3, #0 800672e: d013 beq.n 8006758 { /* Disable DMA All Interrupts */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC | DMA_IT_TE | DMA_IT_DME | DMA_IT_HT); 8006730: 687b ldr r3, [r7, #4] 8006732: 681b ldr r3, [r3, #0] 8006734: 681a ldr r2, [r3, #0] 8006736: 687b ldr r3, [r7, #4] 8006738: 681b ldr r3, [r3, #0] 800673a: f022 021e bic.w r2, r2, #30 800673e: 601a str r2, [r3, #0] ((DMA_Stream_TypeDef *)hdma->Instance)->FCR &= ~(DMA_IT_FE); 8006740: 687b ldr r3, [r7, #4] 8006742: 681b ldr r3, [r3, #0] 8006744: 695a ldr r2, [r3, #20] 8006746: 687b ldr r3, [r7, #4] 8006748: 681b ldr r3, [r3, #0] 800674a: f022 0280 bic.w r2, r2, #128 @ 0x80 800674e: 615a str r2, [r3, #20] enableRegister = (__IO uint32_t *)(&(((DMA_Stream_TypeDef *)hdma->Instance)->CR)); 8006750: 687b ldr r3, [r7, #4] 8006752: 681b ldr r3, [r3, #0] 8006754: 617b str r3, [r7, #20] 8006756: e00a b.n 800676e } else /* BDMA channel */ { /* Disable DMA All Interrupts */ ((BDMA_Channel_TypeDef *)hdma->Instance)->CCR &= ~(BDMA_CCR_TCIE | BDMA_CCR_HTIE | BDMA_CCR_TEIE); 8006758: 687b ldr r3, [r7, #4] 800675a: 681b ldr r3, [r3, #0] 800675c: 681a ldr r2, [r3, #0] 800675e: 687b ldr r3, [r7, #4] 8006760: 681b ldr r3, [r3, #0] 8006762: f022 020e bic.w r2, r2, #14 8006766: 601a str r2, [r3, #0] enableRegister = (__IO uint32_t *)(&(((BDMA_Channel_TypeDef *)hdma->Instance)->CCR)); 8006768: 687b ldr r3, [r7, #4] 800676a: 681b ldr r3, [r3, #0] 800676c: 617b str r3, [r7, #20] } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 800676e: 687b ldr r3, [r7, #4] 8006770: 681b ldr r3, [r3, #0] 8006772: 4a3c ldr r2, [pc, #240] @ (8006864 ) 8006774: 4293 cmp r3, r2 8006776: d072 beq.n 800685e 8006778: 687b ldr r3, [r7, #4] 800677a: 681b ldr r3, [r3, #0] 800677c: 4a3a ldr r2, [pc, #232] @ (8006868 ) 800677e: 4293 cmp r3, r2 8006780: d06d beq.n 800685e 8006782: 687b ldr r3, [r7, #4] 8006784: 681b ldr r3, [r3, #0] 8006786: 4a39 ldr r2, [pc, #228] @ (800686c ) 8006788: 4293 cmp r3, r2 800678a: d068 beq.n 800685e 800678c: 687b ldr r3, [r7, #4] 800678e: 681b ldr r3, [r3, #0] 8006790: 4a37 ldr r2, [pc, #220] @ (8006870 ) 8006792: 4293 cmp r3, r2 8006794: d063 beq.n 800685e 8006796: 687b ldr r3, [r7, #4] 8006798: 681b ldr r3, [r3, #0] 800679a: 4a36 ldr r2, [pc, #216] @ (8006874 ) 800679c: 4293 cmp r3, r2 800679e: d05e beq.n 800685e 80067a0: 687b ldr r3, [r7, #4] 80067a2: 681b ldr r3, [r3, #0] 80067a4: 4a34 ldr r2, [pc, #208] @ (8006878 ) 80067a6: 4293 cmp r3, r2 80067a8: d059 beq.n 800685e 80067aa: 687b ldr r3, [r7, #4] 80067ac: 681b ldr r3, [r3, #0] 80067ae: 4a33 ldr r2, [pc, #204] @ (800687c ) 80067b0: 4293 cmp r3, r2 80067b2: d054 beq.n 800685e 80067b4: 687b ldr r3, [r7, #4] 80067b6: 681b ldr r3, [r3, #0] 80067b8: 4a31 ldr r2, [pc, #196] @ (8006880 ) 80067ba: 4293 cmp r3, r2 80067bc: d04f beq.n 800685e 80067be: 687b ldr r3, [r7, #4] 80067c0: 681b ldr r3, [r3, #0] 80067c2: 4a30 ldr r2, [pc, #192] @ (8006884 ) 80067c4: 4293 cmp r3, r2 80067c6: d04a beq.n 800685e 80067c8: 687b ldr r3, [r7, #4] 80067ca: 681b ldr r3, [r3, #0] 80067cc: 4a2e ldr r2, [pc, #184] @ (8006888 ) 80067ce: 4293 cmp r3, r2 80067d0: d045 beq.n 800685e 80067d2: 687b ldr r3, [r7, #4] 80067d4: 681b ldr r3, [r3, #0] 80067d6: 4a2d ldr r2, [pc, #180] @ (800688c ) 80067d8: 4293 cmp r3, r2 80067da: d040 beq.n 800685e 80067dc: 687b ldr r3, [r7, #4] 80067de: 681b ldr r3, [r3, #0] 80067e0: 4a2b ldr r2, [pc, #172] @ (8006890 ) 80067e2: 4293 cmp r3, r2 80067e4: d03b beq.n 800685e 80067e6: 687b ldr r3, [r7, #4] 80067e8: 681b ldr r3, [r3, #0] 80067ea: 4a2a ldr r2, [pc, #168] @ (8006894 ) 80067ec: 4293 cmp r3, r2 80067ee: d036 beq.n 800685e 80067f0: 687b ldr r3, [r7, #4] 80067f2: 681b ldr r3, [r3, #0] 80067f4: 4a28 ldr r2, [pc, #160] @ (8006898 ) 80067f6: 4293 cmp r3, r2 80067f8: d031 beq.n 800685e 80067fa: 687b ldr r3, [r7, #4] 80067fc: 681b ldr r3, [r3, #0] 80067fe: 4a27 ldr r2, [pc, #156] @ (800689c ) 8006800: 4293 cmp r3, r2 8006802: d02c beq.n 800685e 8006804: 687b ldr r3, [r7, #4] 8006806: 681b ldr r3, [r3, #0] 8006808: 4a25 ldr r2, [pc, #148] @ (80068a0 ) 800680a: 4293 cmp r3, r2 800680c: d027 beq.n 800685e 800680e: 687b ldr r3, [r7, #4] 8006810: 681b ldr r3, [r3, #0] 8006812: 4a24 ldr r2, [pc, #144] @ (80068a4 ) 8006814: 4293 cmp r3, r2 8006816: d022 beq.n 800685e 8006818: 687b ldr r3, [r7, #4] 800681a: 681b ldr r3, [r3, #0] 800681c: 4a22 ldr r2, [pc, #136] @ (80068a8 ) 800681e: 4293 cmp r3, r2 8006820: d01d beq.n 800685e 8006822: 687b ldr r3, [r7, #4] 8006824: 681b ldr r3, [r3, #0] 8006826: 4a21 ldr r2, [pc, #132] @ (80068ac ) 8006828: 4293 cmp r3, r2 800682a: d018 beq.n 800685e 800682c: 687b ldr r3, [r7, #4] 800682e: 681b ldr r3, [r3, #0] 8006830: 4a1f ldr r2, [pc, #124] @ (80068b0 ) 8006832: 4293 cmp r3, r2 8006834: d013 beq.n 800685e 8006836: 687b ldr r3, [r7, #4] 8006838: 681b ldr r3, [r3, #0] 800683a: 4a1e ldr r2, [pc, #120] @ (80068b4 ) 800683c: 4293 cmp r3, r2 800683e: d00e beq.n 800685e 8006840: 687b ldr r3, [r7, #4] 8006842: 681b ldr r3, [r3, #0] 8006844: 4a1c ldr r2, [pc, #112] @ (80068b8 ) 8006846: 4293 cmp r3, r2 8006848: d009 beq.n 800685e 800684a: 687b ldr r3, [r7, #4] 800684c: 681b ldr r3, [r3, #0] 800684e: 4a1b ldr r2, [pc, #108] @ (80068bc ) 8006850: 4293 cmp r3, r2 8006852: d004 beq.n 800685e 8006854: 687b ldr r3, [r7, #4] 8006856: 681b ldr r3, [r3, #0] 8006858: 4a19 ldr r2, [pc, #100] @ (80068c0 ) 800685a: 4293 cmp r3, r2 800685c: d132 bne.n 80068c4 800685e: 2301 movs r3, #1 8006860: e031 b.n 80068c6 8006862: bf00 nop 8006864: 40020010 .word 0x40020010 8006868: 40020028 .word 0x40020028 800686c: 40020040 .word 0x40020040 8006870: 40020058 .word 0x40020058 8006874: 40020070 .word 0x40020070 8006878: 40020088 .word 0x40020088 800687c: 400200a0 .word 0x400200a0 8006880: 400200b8 .word 0x400200b8 8006884: 40020410 .word 0x40020410 8006888: 40020428 .word 0x40020428 800688c: 40020440 .word 0x40020440 8006890: 40020458 .word 0x40020458 8006894: 40020470 .word 0x40020470 8006898: 40020488 .word 0x40020488 800689c: 400204a0 .word 0x400204a0 80068a0: 400204b8 .word 0x400204b8 80068a4: 58025408 .word 0x58025408 80068a8: 5802541c .word 0x5802541c 80068ac: 58025430 .word 0x58025430 80068b0: 58025444 .word 0x58025444 80068b4: 58025458 .word 0x58025458 80068b8: 5802546c .word 0x5802546c 80068bc: 58025480 .word 0x58025480 80068c0: 58025494 .word 0x58025494 80068c4: 2300 movs r3, #0 80068c6: 2b00 cmp r3, #0 80068c8: d007 beq.n 80068da { /* disable the DMAMUX sync overrun IT */ hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; 80068ca: 687b ldr r3, [r7, #4] 80068cc: 6e1b ldr r3, [r3, #96] @ 0x60 80068ce: 681a ldr r2, [r3, #0] 80068d0: 687b ldr r3, [r7, #4] 80068d2: 6e1b ldr r3, [r3, #96] @ 0x60 80068d4: f422 7280 bic.w r2, r2, #256 @ 0x100 80068d8: 601a str r2, [r3, #0] } /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 80068da: 687b ldr r3, [r7, #4] 80068dc: 681b ldr r3, [r3, #0] 80068de: 4a6d ldr r2, [pc, #436] @ (8006a94 ) 80068e0: 4293 cmp r3, r2 80068e2: d04a beq.n 800697a 80068e4: 687b ldr r3, [r7, #4] 80068e6: 681b ldr r3, [r3, #0] 80068e8: 4a6b ldr r2, [pc, #428] @ (8006a98 ) 80068ea: 4293 cmp r3, r2 80068ec: d045 beq.n 800697a 80068ee: 687b ldr r3, [r7, #4] 80068f0: 681b ldr r3, [r3, #0] 80068f2: 4a6a ldr r2, [pc, #424] @ (8006a9c ) 80068f4: 4293 cmp r3, r2 80068f6: d040 beq.n 800697a 80068f8: 687b ldr r3, [r7, #4] 80068fa: 681b ldr r3, [r3, #0] 80068fc: 4a68 ldr r2, [pc, #416] @ (8006aa0 ) 80068fe: 4293 cmp r3, r2 8006900: d03b beq.n 800697a 8006902: 687b ldr r3, [r7, #4] 8006904: 681b ldr r3, [r3, #0] 8006906: 4a67 ldr r2, [pc, #412] @ (8006aa4 ) 8006908: 4293 cmp r3, r2 800690a: d036 beq.n 800697a 800690c: 687b ldr r3, [r7, #4] 800690e: 681b ldr r3, [r3, #0] 8006910: 4a65 ldr r2, [pc, #404] @ (8006aa8 ) 8006912: 4293 cmp r3, r2 8006914: d031 beq.n 800697a 8006916: 687b ldr r3, [r7, #4] 8006918: 681b ldr r3, [r3, #0] 800691a: 4a64 ldr r2, [pc, #400] @ (8006aac ) 800691c: 4293 cmp r3, r2 800691e: d02c beq.n 800697a 8006920: 687b ldr r3, [r7, #4] 8006922: 681b ldr r3, [r3, #0] 8006924: 4a62 ldr r2, [pc, #392] @ (8006ab0 ) 8006926: 4293 cmp r3, r2 8006928: d027 beq.n 800697a 800692a: 687b ldr r3, [r7, #4] 800692c: 681b ldr r3, [r3, #0] 800692e: 4a61 ldr r2, [pc, #388] @ (8006ab4 ) 8006930: 4293 cmp r3, r2 8006932: d022 beq.n 800697a 8006934: 687b ldr r3, [r7, #4] 8006936: 681b ldr r3, [r3, #0] 8006938: 4a5f ldr r2, [pc, #380] @ (8006ab8 ) 800693a: 4293 cmp r3, r2 800693c: d01d beq.n 800697a 800693e: 687b ldr r3, [r7, #4] 8006940: 681b ldr r3, [r3, #0] 8006942: 4a5e ldr r2, [pc, #376] @ (8006abc ) 8006944: 4293 cmp r3, r2 8006946: d018 beq.n 800697a 8006948: 687b ldr r3, [r7, #4] 800694a: 681b ldr r3, [r3, #0] 800694c: 4a5c ldr r2, [pc, #368] @ (8006ac0 ) 800694e: 4293 cmp r3, r2 8006950: d013 beq.n 800697a 8006952: 687b ldr r3, [r7, #4] 8006954: 681b ldr r3, [r3, #0] 8006956: 4a5b ldr r2, [pc, #364] @ (8006ac4 ) 8006958: 4293 cmp r3, r2 800695a: d00e beq.n 800697a 800695c: 687b ldr r3, [r7, #4] 800695e: 681b ldr r3, [r3, #0] 8006960: 4a59 ldr r2, [pc, #356] @ (8006ac8 ) 8006962: 4293 cmp r3, r2 8006964: d009 beq.n 800697a 8006966: 687b ldr r3, [r7, #4] 8006968: 681b ldr r3, [r3, #0] 800696a: 4a58 ldr r2, [pc, #352] @ (8006acc ) 800696c: 4293 cmp r3, r2 800696e: d004 beq.n 800697a 8006970: 687b ldr r3, [r7, #4] 8006972: 681b ldr r3, [r3, #0] 8006974: 4a56 ldr r2, [pc, #344] @ (8006ad0 ) 8006976: 4293 cmp r3, r2 8006978: d108 bne.n 800698c 800697a: 687b ldr r3, [r7, #4] 800697c: 681b ldr r3, [r3, #0] 800697e: 681a ldr r2, [r3, #0] 8006980: 687b ldr r3, [r7, #4] 8006982: 681b ldr r3, [r3, #0] 8006984: f022 0201 bic.w r2, r2, #1 8006988: 601a str r2, [r3, #0] 800698a: e007 b.n 800699c 800698c: 687b ldr r3, [r7, #4] 800698e: 681b ldr r3, [r3, #0] 8006990: 681a ldr r2, [r3, #0] 8006992: 687b ldr r3, [r7, #4] 8006994: 681b ldr r3, [r3, #0] 8006996: f022 0201 bic.w r2, r2, #1 800699a: 601a str r2, [r3, #0] /* Check if the DMA Stream is effectively disabled */ while(((*enableRegister) & DMA_SxCR_EN) != 0U) 800699c: e013 b.n 80069c6 { /* Check for the Timeout */ if((HAL_GetTick() - tickstart ) > HAL_TIMEOUT_DMA_ABORT) 800699e: f7fe ff4d bl 800583c 80069a2: 4602 mov r2, r0 80069a4: 693b ldr r3, [r7, #16] 80069a6: 1ad3 subs r3, r2, r3 80069a8: 2b05 cmp r3, #5 80069aa: d90c bls.n 80069c6 { /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; 80069ac: 687b ldr r3, [r7, #4] 80069ae: 2220 movs r2, #32 80069b0: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_ERROR; 80069b2: 687b ldr r3, [r7, #4] 80069b4: 2203 movs r2, #3 80069b6: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80069ba: 687b ldr r3, [r7, #4] 80069bc: 2200 movs r2, #0 80069be: f883 2034 strb.w r2, [r3, #52] @ 0x34 return HAL_ERROR; 80069c2: 2301 movs r3, #1 80069c4: e12d b.n 8006c22 while(((*enableRegister) & DMA_SxCR_EN) != 0U) 80069c6: 697b ldr r3, [r7, #20] 80069c8: 681b ldr r3, [r3, #0] 80069ca: f003 0301 and.w r3, r3, #1 80069ce: 2b00 cmp r3, #0 80069d0: d1e5 bne.n 800699e } } /* Clear all interrupt flags at correct offset within the register */ if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 80069d2: 687b ldr r3, [r7, #4] 80069d4: 681b ldr r3, [r3, #0] 80069d6: 4a2f ldr r2, [pc, #188] @ (8006a94 ) 80069d8: 4293 cmp r3, r2 80069da: d04a beq.n 8006a72 80069dc: 687b ldr r3, [r7, #4] 80069de: 681b ldr r3, [r3, #0] 80069e0: 4a2d ldr r2, [pc, #180] @ (8006a98 ) 80069e2: 4293 cmp r3, r2 80069e4: d045 beq.n 8006a72 80069e6: 687b ldr r3, [r7, #4] 80069e8: 681b ldr r3, [r3, #0] 80069ea: 4a2c ldr r2, [pc, #176] @ (8006a9c ) 80069ec: 4293 cmp r3, r2 80069ee: d040 beq.n 8006a72 80069f0: 687b ldr r3, [r7, #4] 80069f2: 681b ldr r3, [r3, #0] 80069f4: 4a2a ldr r2, [pc, #168] @ (8006aa0 ) 80069f6: 4293 cmp r3, r2 80069f8: d03b beq.n 8006a72 80069fa: 687b ldr r3, [r7, #4] 80069fc: 681b ldr r3, [r3, #0] 80069fe: 4a29 ldr r2, [pc, #164] @ (8006aa4 ) 8006a00: 4293 cmp r3, r2 8006a02: d036 beq.n 8006a72 8006a04: 687b ldr r3, [r7, #4] 8006a06: 681b ldr r3, [r3, #0] 8006a08: 4a27 ldr r2, [pc, #156] @ (8006aa8 ) 8006a0a: 4293 cmp r3, r2 8006a0c: d031 beq.n 8006a72 8006a0e: 687b ldr r3, [r7, #4] 8006a10: 681b ldr r3, [r3, #0] 8006a12: 4a26 ldr r2, [pc, #152] @ (8006aac ) 8006a14: 4293 cmp r3, r2 8006a16: d02c beq.n 8006a72 8006a18: 687b ldr r3, [r7, #4] 8006a1a: 681b ldr r3, [r3, #0] 8006a1c: 4a24 ldr r2, [pc, #144] @ (8006ab0 ) 8006a1e: 4293 cmp r3, r2 8006a20: d027 beq.n 8006a72 8006a22: 687b ldr r3, [r7, #4] 8006a24: 681b ldr r3, [r3, #0] 8006a26: 4a23 ldr r2, [pc, #140] @ (8006ab4 ) 8006a28: 4293 cmp r3, r2 8006a2a: d022 beq.n 8006a72 8006a2c: 687b ldr r3, [r7, #4] 8006a2e: 681b ldr r3, [r3, #0] 8006a30: 4a21 ldr r2, [pc, #132] @ (8006ab8 ) 8006a32: 4293 cmp r3, r2 8006a34: d01d beq.n 8006a72 8006a36: 687b ldr r3, [r7, #4] 8006a38: 681b ldr r3, [r3, #0] 8006a3a: 4a20 ldr r2, [pc, #128] @ (8006abc ) 8006a3c: 4293 cmp r3, r2 8006a3e: d018 beq.n 8006a72 8006a40: 687b ldr r3, [r7, #4] 8006a42: 681b ldr r3, [r3, #0] 8006a44: 4a1e ldr r2, [pc, #120] @ (8006ac0 ) 8006a46: 4293 cmp r3, r2 8006a48: d013 beq.n 8006a72 8006a4a: 687b ldr r3, [r7, #4] 8006a4c: 681b ldr r3, [r3, #0] 8006a4e: 4a1d ldr r2, [pc, #116] @ (8006ac4 ) 8006a50: 4293 cmp r3, r2 8006a52: d00e beq.n 8006a72 8006a54: 687b ldr r3, [r7, #4] 8006a56: 681b ldr r3, [r3, #0] 8006a58: 4a1b ldr r2, [pc, #108] @ (8006ac8 ) 8006a5a: 4293 cmp r3, r2 8006a5c: d009 beq.n 8006a72 8006a5e: 687b ldr r3, [r7, #4] 8006a60: 681b ldr r3, [r3, #0] 8006a62: 4a1a ldr r2, [pc, #104] @ (8006acc ) 8006a64: 4293 cmp r3, r2 8006a66: d004 beq.n 8006a72 8006a68: 687b ldr r3, [r7, #4] 8006a6a: 681b ldr r3, [r3, #0] 8006a6c: 4a18 ldr r2, [pc, #96] @ (8006ad0 ) 8006a6e: 4293 cmp r3, r2 8006a70: d101 bne.n 8006a76 8006a72: 2301 movs r3, #1 8006a74: e000 b.n 8006a78 8006a76: 2300 movs r3, #0 8006a78: 2b00 cmp r3, #0 8006a7a: d02b beq.n 8006ad4 { regs_dma = (DMA_Base_Registers *)hdma->StreamBaseAddress; 8006a7c: 687b ldr r3, [r7, #4] 8006a7e: 6d9b ldr r3, [r3, #88] @ 0x58 8006a80: 60bb str r3, [r7, #8] regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 8006a82: 687b ldr r3, [r7, #4] 8006a84: 6ddb ldr r3, [r3, #92] @ 0x5c 8006a86: f003 031f and.w r3, r3, #31 8006a8a: 223f movs r2, #63 @ 0x3f 8006a8c: 409a lsls r2, r3 8006a8e: 68bb ldr r3, [r7, #8] 8006a90: 609a str r2, [r3, #8] 8006a92: e02a b.n 8006aea 8006a94: 40020010 .word 0x40020010 8006a98: 40020028 .word 0x40020028 8006a9c: 40020040 .word 0x40020040 8006aa0: 40020058 .word 0x40020058 8006aa4: 40020070 .word 0x40020070 8006aa8: 40020088 .word 0x40020088 8006aac: 400200a0 .word 0x400200a0 8006ab0: 400200b8 .word 0x400200b8 8006ab4: 40020410 .word 0x40020410 8006ab8: 40020428 .word 0x40020428 8006abc: 40020440 .word 0x40020440 8006ac0: 40020458 .word 0x40020458 8006ac4: 40020470 .word 0x40020470 8006ac8: 40020488 .word 0x40020488 8006acc: 400204a0 .word 0x400204a0 8006ad0: 400204b8 .word 0x400204b8 } else /* BDMA channel */ { regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 8006ad4: 687b ldr r3, [r7, #4] 8006ad6: 6d9b ldr r3, [r3, #88] @ 0x58 8006ad8: 60fb str r3, [r7, #12] regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 8006ada: 687b ldr r3, [r7, #4] 8006adc: 6ddb ldr r3, [r3, #92] @ 0x5c 8006ade: f003 031f and.w r3, r3, #31 8006ae2: 2201 movs r2, #1 8006ae4: 409a lsls r2, r3 8006ae6: 68fb ldr r3, [r7, #12] 8006ae8: 605a str r2, [r3, #4] } if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 8006aea: 687b ldr r3, [r7, #4] 8006aec: 681b ldr r3, [r3, #0] 8006aee: 4a4f ldr r2, [pc, #316] @ (8006c2c ) 8006af0: 4293 cmp r3, r2 8006af2: d072 beq.n 8006bda 8006af4: 687b ldr r3, [r7, #4] 8006af6: 681b ldr r3, [r3, #0] 8006af8: 4a4d ldr r2, [pc, #308] @ (8006c30 ) 8006afa: 4293 cmp r3, r2 8006afc: d06d beq.n 8006bda 8006afe: 687b ldr r3, [r7, #4] 8006b00: 681b ldr r3, [r3, #0] 8006b02: 4a4c ldr r2, [pc, #304] @ (8006c34 ) 8006b04: 4293 cmp r3, r2 8006b06: d068 beq.n 8006bda 8006b08: 687b ldr r3, [r7, #4] 8006b0a: 681b ldr r3, [r3, #0] 8006b0c: 4a4a ldr r2, [pc, #296] @ (8006c38 ) 8006b0e: 4293 cmp r3, r2 8006b10: d063 beq.n 8006bda 8006b12: 687b ldr r3, [r7, #4] 8006b14: 681b ldr r3, [r3, #0] 8006b16: 4a49 ldr r2, [pc, #292] @ (8006c3c ) 8006b18: 4293 cmp r3, r2 8006b1a: d05e beq.n 8006bda 8006b1c: 687b ldr r3, [r7, #4] 8006b1e: 681b ldr r3, [r3, #0] 8006b20: 4a47 ldr r2, [pc, #284] @ (8006c40 ) 8006b22: 4293 cmp r3, r2 8006b24: d059 beq.n 8006bda 8006b26: 687b ldr r3, [r7, #4] 8006b28: 681b ldr r3, [r3, #0] 8006b2a: 4a46 ldr r2, [pc, #280] @ (8006c44 ) 8006b2c: 4293 cmp r3, r2 8006b2e: d054 beq.n 8006bda 8006b30: 687b ldr r3, [r7, #4] 8006b32: 681b ldr r3, [r3, #0] 8006b34: 4a44 ldr r2, [pc, #272] @ (8006c48 ) 8006b36: 4293 cmp r3, r2 8006b38: d04f beq.n 8006bda 8006b3a: 687b ldr r3, [r7, #4] 8006b3c: 681b ldr r3, [r3, #0] 8006b3e: 4a43 ldr r2, [pc, #268] @ (8006c4c ) 8006b40: 4293 cmp r3, r2 8006b42: d04a beq.n 8006bda 8006b44: 687b ldr r3, [r7, #4] 8006b46: 681b ldr r3, [r3, #0] 8006b48: 4a41 ldr r2, [pc, #260] @ (8006c50 ) 8006b4a: 4293 cmp r3, r2 8006b4c: d045 beq.n 8006bda 8006b4e: 687b ldr r3, [r7, #4] 8006b50: 681b ldr r3, [r3, #0] 8006b52: 4a40 ldr r2, [pc, #256] @ (8006c54 ) 8006b54: 4293 cmp r3, r2 8006b56: d040 beq.n 8006bda 8006b58: 687b ldr r3, [r7, #4] 8006b5a: 681b ldr r3, [r3, #0] 8006b5c: 4a3e ldr r2, [pc, #248] @ (8006c58 ) 8006b5e: 4293 cmp r3, r2 8006b60: d03b beq.n 8006bda 8006b62: 687b ldr r3, [r7, #4] 8006b64: 681b ldr r3, [r3, #0] 8006b66: 4a3d ldr r2, [pc, #244] @ (8006c5c ) 8006b68: 4293 cmp r3, r2 8006b6a: d036 beq.n 8006bda 8006b6c: 687b ldr r3, [r7, #4] 8006b6e: 681b ldr r3, [r3, #0] 8006b70: 4a3b ldr r2, [pc, #236] @ (8006c60 ) 8006b72: 4293 cmp r3, r2 8006b74: d031 beq.n 8006bda 8006b76: 687b ldr r3, [r7, #4] 8006b78: 681b ldr r3, [r3, #0] 8006b7a: 4a3a ldr r2, [pc, #232] @ (8006c64 ) 8006b7c: 4293 cmp r3, r2 8006b7e: d02c beq.n 8006bda 8006b80: 687b ldr r3, [r7, #4] 8006b82: 681b ldr r3, [r3, #0] 8006b84: 4a38 ldr r2, [pc, #224] @ (8006c68 ) 8006b86: 4293 cmp r3, r2 8006b88: d027 beq.n 8006bda 8006b8a: 687b ldr r3, [r7, #4] 8006b8c: 681b ldr r3, [r3, #0] 8006b8e: 4a37 ldr r2, [pc, #220] @ (8006c6c ) 8006b90: 4293 cmp r3, r2 8006b92: d022 beq.n 8006bda 8006b94: 687b ldr r3, [r7, #4] 8006b96: 681b ldr r3, [r3, #0] 8006b98: 4a35 ldr r2, [pc, #212] @ (8006c70 ) 8006b9a: 4293 cmp r3, r2 8006b9c: d01d beq.n 8006bda 8006b9e: 687b ldr r3, [r7, #4] 8006ba0: 681b ldr r3, [r3, #0] 8006ba2: 4a34 ldr r2, [pc, #208] @ (8006c74 ) 8006ba4: 4293 cmp r3, r2 8006ba6: d018 beq.n 8006bda 8006ba8: 687b ldr r3, [r7, #4] 8006baa: 681b ldr r3, [r3, #0] 8006bac: 4a32 ldr r2, [pc, #200] @ (8006c78 ) 8006bae: 4293 cmp r3, r2 8006bb0: d013 beq.n 8006bda 8006bb2: 687b ldr r3, [r7, #4] 8006bb4: 681b ldr r3, [r3, #0] 8006bb6: 4a31 ldr r2, [pc, #196] @ (8006c7c ) 8006bb8: 4293 cmp r3, r2 8006bba: d00e beq.n 8006bda 8006bbc: 687b ldr r3, [r7, #4] 8006bbe: 681b ldr r3, [r3, #0] 8006bc0: 4a2f ldr r2, [pc, #188] @ (8006c80 ) 8006bc2: 4293 cmp r3, r2 8006bc4: d009 beq.n 8006bda 8006bc6: 687b ldr r3, [r7, #4] 8006bc8: 681b ldr r3, [r3, #0] 8006bca: 4a2e ldr r2, [pc, #184] @ (8006c84 ) 8006bcc: 4293 cmp r3, r2 8006bce: d004 beq.n 8006bda 8006bd0: 687b ldr r3, [r7, #4] 8006bd2: 681b ldr r3, [r3, #0] 8006bd4: 4a2c ldr r2, [pc, #176] @ (8006c88 ) 8006bd6: 4293 cmp r3, r2 8006bd8: d101 bne.n 8006bde 8006bda: 2301 movs r3, #1 8006bdc: e000 b.n 8006be0 8006bde: 2300 movs r3, #0 8006be0: 2b00 cmp r3, #0 8006be2: d015 beq.n 8006c10 { /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 8006be4: 687b ldr r3, [r7, #4] 8006be6: 6e5b ldr r3, [r3, #100] @ 0x64 8006be8: 687a ldr r2, [r7, #4] 8006bea: 6e92 ldr r2, [r2, #104] @ 0x68 8006bec: 605a str r2, [r3, #4] if(hdma->DMAmuxRequestGen != 0U) 8006bee: 687b ldr r3, [r7, #4] 8006bf0: 6edb ldr r3, [r3, #108] @ 0x6c 8006bf2: 2b00 cmp r3, #0 8006bf4: d00c beq.n 8006c10 { /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT */ /* disable the request gen overrun IT */ hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; 8006bf6: 687b ldr r3, [r7, #4] 8006bf8: 6edb ldr r3, [r3, #108] @ 0x6c 8006bfa: 681a ldr r2, [r3, #0] 8006bfc: 687b ldr r3, [r7, #4] 8006bfe: 6edb ldr r3, [r3, #108] @ 0x6c 8006c00: f422 7280 bic.w r2, r2, #256 @ 0x100 8006c04: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 8006c06: 687b ldr r3, [r7, #4] 8006c08: 6f1b ldr r3, [r3, #112] @ 0x70 8006c0a: 687a ldr r2, [r7, #4] 8006c0c: 6f52 ldr r2, [r2, #116] @ 0x74 8006c0e: 605a str r2, [r3, #4] } } /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8006c10: 687b ldr r3, [r7, #4] 8006c12: 2201 movs r2, #1 8006c14: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8006c18: 687b ldr r3, [r7, #4] 8006c1a: 2200 movs r2, #0 8006c1c: f883 2034 strb.w r2, [r3, #52] @ 0x34 } return HAL_OK; 8006c20: 2300 movs r3, #0 } 8006c22: 4618 mov r0, r3 8006c24: 3718 adds r7, #24 8006c26: 46bd mov sp, r7 8006c28: bd80 pop {r7, pc} 8006c2a: bf00 nop 8006c2c: 40020010 .word 0x40020010 8006c30: 40020028 .word 0x40020028 8006c34: 40020040 .word 0x40020040 8006c38: 40020058 .word 0x40020058 8006c3c: 40020070 .word 0x40020070 8006c40: 40020088 .word 0x40020088 8006c44: 400200a0 .word 0x400200a0 8006c48: 400200b8 .word 0x400200b8 8006c4c: 40020410 .word 0x40020410 8006c50: 40020428 .word 0x40020428 8006c54: 40020440 .word 0x40020440 8006c58: 40020458 .word 0x40020458 8006c5c: 40020470 .word 0x40020470 8006c60: 40020488 .word 0x40020488 8006c64: 400204a0 .word 0x400204a0 8006c68: 400204b8 .word 0x400204b8 8006c6c: 58025408 .word 0x58025408 8006c70: 5802541c .word 0x5802541c 8006c74: 58025430 .word 0x58025430 8006c78: 58025444 .word 0x58025444 8006c7c: 58025458 .word 0x58025458 8006c80: 5802546c .word 0x5802546c 8006c84: 58025480 .word 0x58025480 8006c88: 58025494 .word 0x58025494 08006c8c : * @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) { 8006c8c: b580 push {r7, lr} 8006c8e: b084 sub sp, #16 8006c90: af00 add r7, sp, #0 8006c92: 6078 str r0, [r7, #4] BDMA_Base_Registers *regs_bdma; /* Check the DMA peripheral handle */ if(hdma == NULL) 8006c94: 687b ldr r3, [r7, #4] 8006c96: 2b00 cmp r3, #0 8006c98: d101 bne.n 8006c9e { return HAL_ERROR; 8006c9a: 2301 movs r3, #1 8006c9c: e237 b.n 800710e } if(hdma->State != HAL_DMA_STATE_BUSY) 8006c9e: 687b ldr r3, [r7, #4] 8006ca0: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 8006ca4: b2db uxtb r3, r3 8006ca6: 2b02 cmp r3, #2 8006ca8: d004 beq.n 8006cb4 { hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; 8006caa: 687b ldr r3, [r7, #4] 8006cac: 2280 movs r2, #128 @ 0x80 8006cae: 655a str r2, [r3, #84] @ 0x54 return HAL_ERROR; 8006cb0: 2301 movs r3, #1 8006cb2: e22c b.n 800710e } else { if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8006cb4: 687b ldr r3, [r7, #4] 8006cb6: 681b ldr r3, [r3, #0] 8006cb8: 4a5c ldr r2, [pc, #368] @ (8006e2c ) 8006cba: 4293 cmp r3, r2 8006cbc: d04a beq.n 8006d54 8006cbe: 687b ldr r3, [r7, #4] 8006cc0: 681b ldr r3, [r3, #0] 8006cc2: 4a5b ldr r2, [pc, #364] @ (8006e30 ) 8006cc4: 4293 cmp r3, r2 8006cc6: d045 beq.n 8006d54 8006cc8: 687b ldr r3, [r7, #4] 8006cca: 681b ldr r3, [r3, #0] 8006ccc: 4a59 ldr r2, [pc, #356] @ (8006e34 ) 8006cce: 4293 cmp r3, r2 8006cd0: d040 beq.n 8006d54 8006cd2: 687b ldr r3, [r7, #4] 8006cd4: 681b ldr r3, [r3, #0] 8006cd6: 4a58 ldr r2, [pc, #352] @ (8006e38 ) 8006cd8: 4293 cmp r3, r2 8006cda: d03b beq.n 8006d54 8006cdc: 687b ldr r3, [r7, #4] 8006cde: 681b ldr r3, [r3, #0] 8006ce0: 4a56 ldr r2, [pc, #344] @ (8006e3c ) 8006ce2: 4293 cmp r3, r2 8006ce4: d036 beq.n 8006d54 8006ce6: 687b ldr r3, [r7, #4] 8006ce8: 681b ldr r3, [r3, #0] 8006cea: 4a55 ldr r2, [pc, #340] @ (8006e40 ) 8006cec: 4293 cmp r3, r2 8006cee: d031 beq.n 8006d54 8006cf0: 687b ldr r3, [r7, #4] 8006cf2: 681b ldr r3, [r3, #0] 8006cf4: 4a53 ldr r2, [pc, #332] @ (8006e44 ) 8006cf6: 4293 cmp r3, r2 8006cf8: d02c beq.n 8006d54 8006cfa: 687b ldr r3, [r7, #4] 8006cfc: 681b ldr r3, [r3, #0] 8006cfe: 4a52 ldr r2, [pc, #328] @ (8006e48 ) 8006d00: 4293 cmp r3, r2 8006d02: d027 beq.n 8006d54 8006d04: 687b ldr r3, [r7, #4] 8006d06: 681b ldr r3, [r3, #0] 8006d08: 4a50 ldr r2, [pc, #320] @ (8006e4c ) 8006d0a: 4293 cmp r3, r2 8006d0c: d022 beq.n 8006d54 8006d0e: 687b ldr r3, [r7, #4] 8006d10: 681b ldr r3, [r3, #0] 8006d12: 4a4f ldr r2, [pc, #316] @ (8006e50 ) 8006d14: 4293 cmp r3, r2 8006d16: d01d beq.n 8006d54 8006d18: 687b ldr r3, [r7, #4] 8006d1a: 681b ldr r3, [r3, #0] 8006d1c: 4a4d ldr r2, [pc, #308] @ (8006e54 ) 8006d1e: 4293 cmp r3, r2 8006d20: d018 beq.n 8006d54 8006d22: 687b ldr r3, [r7, #4] 8006d24: 681b ldr r3, [r3, #0] 8006d26: 4a4c ldr r2, [pc, #304] @ (8006e58 ) 8006d28: 4293 cmp r3, r2 8006d2a: d013 beq.n 8006d54 8006d2c: 687b ldr r3, [r7, #4] 8006d2e: 681b ldr r3, [r3, #0] 8006d30: 4a4a ldr r2, [pc, #296] @ (8006e5c ) 8006d32: 4293 cmp r3, r2 8006d34: d00e beq.n 8006d54 8006d36: 687b ldr r3, [r7, #4] 8006d38: 681b ldr r3, [r3, #0] 8006d3a: 4a49 ldr r2, [pc, #292] @ (8006e60 ) 8006d3c: 4293 cmp r3, r2 8006d3e: d009 beq.n 8006d54 8006d40: 687b ldr r3, [r7, #4] 8006d42: 681b ldr r3, [r3, #0] 8006d44: 4a47 ldr r2, [pc, #284] @ (8006e64 ) 8006d46: 4293 cmp r3, r2 8006d48: d004 beq.n 8006d54 8006d4a: 687b ldr r3, [r7, #4] 8006d4c: 681b ldr r3, [r3, #0] 8006d4e: 4a46 ldr r2, [pc, #280] @ (8006e68 ) 8006d50: 4293 cmp r3, r2 8006d52: d101 bne.n 8006d58 8006d54: 2301 movs r3, #1 8006d56: e000 b.n 8006d5a 8006d58: 2300 movs r3, #0 8006d5a: 2b00 cmp r3, #0 8006d5c: f000 8086 beq.w 8006e6c { /* Set Abort State */ hdma->State = HAL_DMA_STATE_ABORT; 8006d60: 687b ldr r3, [r7, #4] 8006d62: 2204 movs r2, #4 8006d64: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 8006d68: 687b ldr r3, [r7, #4] 8006d6a: 681b ldr r3, [r3, #0] 8006d6c: 4a2f ldr r2, [pc, #188] @ (8006e2c ) 8006d6e: 4293 cmp r3, r2 8006d70: d04a beq.n 8006e08 8006d72: 687b ldr r3, [r7, #4] 8006d74: 681b ldr r3, [r3, #0] 8006d76: 4a2e ldr r2, [pc, #184] @ (8006e30 ) 8006d78: 4293 cmp r3, r2 8006d7a: d045 beq.n 8006e08 8006d7c: 687b ldr r3, [r7, #4] 8006d7e: 681b ldr r3, [r3, #0] 8006d80: 4a2c ldr r2, [pc, #176] @ (8006e34 ) 8006d82: 4293 cmp r3, r2 8006d84: d040 beq.n 8006e08 8006d86: 687b ldr r3, [r7, #4] 8006d88: 681b ldr r3, [r3, #0] 8006d8a: 4a2b ldr r2, [pc, #172] @ (8006e38 ) 8006d8c: 4293 cmp r3, r2 8006d8e: d03b beq.n 8006e08 8006d90: 687b ldr r3, [r7, #4] 8006d92: 681b ldr r3, [r3, #0] 8006d94: 4a29 ldr r2, [pc, #164] @ (8006e3c ) 8006d96: 4293 cmp r3, r2 8006d98: d036 beq.n 8006e08 8006d9a: 687b ldr r3, [r7, #4] 8006d9c: 681b ldr r3, [r3, #0] 8006d9e: 4a28 ldr r2, [pc, #160] @ (8006e40 ) 8006da0: 4293 cmp r3, r2 8006da2: d031 beq.n 8006e08 8006da4: 687b ldr r3, [r7, #4] 8006da6: 681b ldr r3, [r3, #0] 8006da8: 4a26 ldr r2, [pc, #152] @ (8006e44 ) 8006daa: 4293 cmp r3, r2 8006dac: d02c beq.n 8006e08 8006dae: 687b ldr r3, [r7, #4] 8006db0: 681b ldr r3, [r3, #0] 8006db2: 4a25 ldr r2, [pc, #148] @ (8006e48 ) 8006db4: 4293 cmp r3, r2 8006db6: d027 beq.n 8006e08 8006db8: 687b ldr r3, [r7, #4] 8006dba: 681b ldr r3, [r3, #0] 8006dbc: 4a23 ldr r2, [pc, #140] @ (8006e4c ) 8006dbe: 4293 cmp r3, r2 8006dc0: d022 beq.n 8006e08 8006dc2: 687b ldr r3, [r7, #4] 8006dc4: 681b ldr r3, [r3, #0] 8006dc6: 4a22 ldr r2, [pc, #136] @ (8006e50 ) 8006dc8: 4293 cmp r3, r2 8006dca: d01d beq.n 8006e08 8006dcc: 687b ldr r3, [r7, #4] 8006dce: 681b ldr r3, [r3, #0] 8006dd0: 4a20 ldr r2, [pc, #128] @ (8006e54 ) 8006dd2: 4293 cmp r3, r2 8006dd4: d018 beq.n 8006e08 8006dd6: 687b ldr r3, [r7, #4] 8006dd8: 681b ldr r3, [r3, #0] 8006dda: 4a1f ldr r2, [pc, #124] @ (8006e58 ) 8006ddc: 4293 cmp r3, r2 8006dde: d013 beq.n 8006e08 8006de0: 687b ldr r3, [r7, #4] 8006de2: 681b ldr r3, [r3, #0] 8006de4: 4a1d ldr r2, [pc, #116] @ (8006e5c ) 8006de6: 4293 cmp r3, r2 8006de8: d00e beq.n 8006e08 8006dea: 687b ldr r3, [r7, #4] 8006dec: 681b ldr r3, [r3, #0] 8006dee: 4a1c ldr r2, [pc, #112] @ (8006e60 ) 8006df0: 4293 cmp r3, r2 8006df2: d009 beq.n 8006e08 8006df4: 687b ldr r3, [r7, #4] 8006df6: 681b ldr r3, [r3, #0] 8006df8: 4a1a ldr r2, [pc, #104] @ (8006e64 ) 8006dfa: 4293 cmp r3, r2 8006dfc: d004 beq.n 8006e08 8006dfe: 687b ldr r3, [r7, #4] 8006e00: 681b ldr r3, [r3, #0] 8006e02: 4a19 ldr r2, [pc, #100] @ (8006e68 ) 8006e04: 4293 cmp r3, r2 8006e06: d108 bne.n 8006e1a 8006e08: 687b ldr r3, [r7, #4] 8006e0a: 681b ldr r3, [r3, #0] 8006e0c: 681a ldr r2, [r3, #0] 8006e0e: 687b ldr r3, [r7, #4] 8006e10: 681b ldr r3, [r3, #0] 8006e12: f022 0201 bic.w r2, r2, #1 8006e16: 601a str r2, [r3, #0] 8006e18: e178 b.n 800710c 8006e1a: 687b ldr r3, [r7, #4] 8006e1c: 681b ldr r3, [r3, #0] 8006e1e: 681a ldr r2, [r3, #0] 8006e20: 687b ldr r3, [r7, #4] 8006e22: 681b ldr r3, [r3, #0] 8006e24: f022 0201 bic.w r2, r2, #1 8006e28: 601a str r2, [r3, #0] 8006e2a: e16f b.n 800710c 8006e2c: 40020010 .word 0x40020010 8006e30: 40020028 .word 0x40020028 8006e34: 40020040 .word 0x40020040 8006e38: 40020058 .word 0x40020058 8006e3c: 40020070 .word 0x40020070 8006e40: 40020088 .word 0x40020088 8006e44: 400200a0 .word 0x400200a0 8006e48: 400200b8 .word 0x400200b8 8006e4c: 40020410 .word 0x40020410 8006e50: 40020428 .word 0x40020428 8006e54: 40020440 .word 0x40020440 8006e58: 40020458 .word 0x40020458 8006e5c: 40020470 .word 0x40020470 8006e60: 40020488 .word 0x40020488 8006e64: 400204a0 .word 0x400204a0 8006e68: 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); 8006e6c: 687b ldr r3, [r7, #4] 8006e6e: 681b ldr r3, [r3, #0] 8006e70: 681a ldr r2, [r3, #0] 8006e72: 687b ldr r3, [r7, #4] 8006e74: 681b ldr r3, [r3, #0] 8006e76: f022 020e bic.w r2, r2, #14 8006e7a: 601a str r2, [r3, #0] /* Disable the channel */ __HAL_DMA_DISABLE(hdma); 8006e7c: 687b ldr r3, [r7, #4] 8006e7e: 681b ldr r3, [r3, #0] 8006e80: 4a6c ldr r2, [pc, #432] @ (8007034 ) 8006e82: 4293 cmp r3, r2 8006e84: d04a beq.n 8006f1c 8006e86: 687b ldr r3, [r7, #4] 8006e88: 681b ldr r3, [r3, #0] 8006e8a: 4a6b ldr r2, [pc, #428] @ (8007038 ) 8006e8c: 4293 cmp r3, r2 8006e8e: d045 beq.n 8006f1c 8006e90: 687b ldr r3, [r7, #4] 8006e92: 681b ldr r3, [r3, #0] 8006e94: 4a69 ldr r2, [pc, #420] @ (800703c ) 8006e96: 4293 cmp r3, r2 8006e98: d040 beq.n 8006f1c 8006e9a: 687b ldr r3, [r7, #4] 8006e9c: 681b ldr r3, [r3, #0] 8006e9e: 4a68 ldr r2, [pc, #416] @ (8007040 ) 8006ea0: 4293 cmp r3, r2 8006ea2: d03b beq.n 8006f1c 8006ea4: 687b ldr r3, [r7, #4] 8006ea6: 681b ldr r3, [r3, #0] 8006ea8: 4a66 ldr r2, [pc, #408] @ (8007044 ) 8006eaa: 4293 cmp r3, r2 8006eac: d036 beq.n 8006f1c 8006eae: 687b ldr r3, [r7, #4] 8006eb0: 681b ldr r3, [r3, #0] 8006eb2: 4a65 ldr r2, [pc, #404] @ (8007048 ) 8006eb4: 4293 cmp r3, r2 8006eb6: d031 beq.n 8006f1c 8006eb8: 687b ldr r3, [r7, #4] 8006eba: 681b ldr r3, [r3, #0] 8006ebc: 4a63 ldr r2, [pc, #396] @ (800704c ) 8006ebe: 4293 cmp r3, r2 8006ec0: d02c beq.n 8006f1c 8006ec2: 687b ldr r3, [r7, #4] 8006ec4: 681b ldr r3, [r3, #0] 8006ec6: 4a62 ldr r2, [pc, #392] @ (8007050 ) 8006ec8: 4293 cmp r3, r2 8006eca: d027 beq.n 8006f1c 8006ecc: 687b ldr r3, [r7, #4] 8006ece: 681b ldr r3, [r3, #0] 8006ed0: 4a60 ldr r2, [pc, #384] @ (8007054 ) 8006ed2: 4293 cmp r3, r2 8006ed4: d022 beq.n 8006f1c 8006ed6: 687b ldr r3, [r7, #4] 8006ed8: 681b ldr r3, [r3, #0] 8006eda: 4a5f ldr r2, [pc, #380] @ (8007058 ) 8006edc: 4293 cmp r3, r2 8006ede: d01d beq.n 8006f1c 8006ee0: 687b ldr r3, [r7, #4] 8006ee2: 681b ldr r3, [r3, #0] 8006ee4: 4a5d ldr r2, [pc, #372] @ (800705c ) 8006ee6: 4293 cmp r3, r2 8006ee8: d018 beq.n 8006f1c 8006eea: 687b ldr r3, [r7, #4] 8006eec: 681b ldr r3, [r3, #0] 8006eee: 4a5c ldr r2, [pc, #368] @ (8007060 ) 8006ef0: 4293 cmp r3, r2 8006ef2: d013 beq.n 8006f1c 8006ef4: 687b ldr r3, [r7, #4] 8006ef6: 681b ldr r3, [r3, #0] 8006ef8: 4a5a ldr r2, [pc, #360] @ (8007064 ) 8006efa: 4293 cmp r3, r2 8006efc: d00e beq.n 8006f1c 8006efe: 687b ldr r3, [r7, #4] 8006f00: 681b ldr r3, [r3, #0] 8006f02: 4a59 ldr r2, [pc, #356] @ (8007068 ) 8006f04: 4293 cmp r3, r2 8006f06: d009 beq.n 8006f1c 8006f08: 687b ldr r3, [r7, #4] 8006f0a: 681b ldr r3, [r3, #0] 8006f0c: 4a57 ldr r2, [pc, #348] @ (800706c ) 8006f0e: 4293 cmp r3, r2 8006f10: d004 beq.n 8006f1c 8006f12: 687b ldr r3, [r7, #4] 8006f14: 681b ldr r3, [r3, #0] 8006f16: 4a56 ldr r2, [pc, #344] @ (8007070 ) 8006f18: 4293 cmp r3, r2 8006f1a: d108 bne.n 8006f2e 8006f1c: 687b ldr r3, [r7, #4] 8006f1e: 681b ldr r3, [r3, #0] 8006f20: 681a ldr r2, [r3, #0] 8006f22: 687b ldr r3, [r7, #4] 8006f24: 681b ldr r3, [r3, #0] 8006f26: f022 0201 bic.w r2, r2, #1 8006f2a: 601a str r2, [r3, #0] 8006f2c: e007 b.n 8006f3e 8006f2e: 687b ldr r3, [r7, #4] 8006f30: 681b ldr r3, [r3, #0] 8006f32: 681a ldr r2, [r3, #0] 8006f34: 687b ldr r3, [r7, #4] 8006f36: 681b ldr r3, [r3, #0] 8006f38: f022 0201 bic.w r2, r2, #1 8006f3c: 601a str r2, [r3, #0] if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */ 8006f3e: 687b ldr r3, [r7, #4] 8006f40: 681b ldr r3, [r3, #0] 8006f42: 4a3c ldr r2, [pc, #240] @ (8007034 ) 8006f44: 4293 cmp r3, r2 8006f46: d072 beq.n 800702e 8006f48: 687b ldr r3, [r7, #4] 8006f4a: 681b ldr r3, [r3, #0] 8006f4c: 4a3a ldr r2, [pc, #232] @ (8007038 ) 8006f4e: 4293 cmp r3, r2 8006f50: d06d beq.n 800702e 8006f52: 687b ldr r3, [r7, #4] 8006f54: 681b ldr r3, [r3, #0] 8006f56: 4a39 ldr r2, [pc, #228] @ (800703c ) 8006f58: 4293 cmp r3, r2 8006f5a: d068 beq.n 800702e 8006f5c: 687b ldr r3, [r7, #4] 8006f5e: 681b ldr r3, [r3, #0] 8006f60: 4a37 ldr r2, [pc, #220] @ (8007040 ) 8006f62: 4293 cmp r3, r2 8006f64: d063 beq.n 800702e 8006f66: 687b ldr r3, [r7, #4] 8006f68: 681b ldr r3, [r3, #0] 8006f6a: 4a36 ldr r2, [pc, #216] @ (8007044 ) 8006f6c: 4293 cmp r3, r2 8006f6e: d05e beq.n 800702e 8006f70: 687b ldr r3, [r7, #4] 8006f72: 681b ldr r3, [r3, #0] 8006f74: 4a34 ldr r2, [pc, #208] @ (8007048 ) 8006f76: 4293 cmp r3, r2 8006f78: d059 beq.n 800702e 8006f7a: 687b ldr r3, [r7, #4] 8006f7c: 681b ldr r3, [r3, #0] 8006f7e: 4a33 ldr r2, [pc, #204] @ (800704c ) 8006f80: 4293 cmp r3, r2 8006f82: d054 beq.n 800702e 8006f84: 687b ldr r3, [r7, #4] 8006f86: 681b ldr r3, [r3, #0] 8006f88: 4a31 ldr r2, [pc, #196] @ (8007050 ) 8006f8a: 4293 cmp r3, r2 8006f8c: d04f beq.n 800702e 8006f8e: 687b ldr r3, [r7, #4] 8006f90: 681b ldr r3, [r3, #0] 8006f92: 4a30 ldr r2, [pc, #192] @ (8007054 ) 8006f94: 4293 cmp r3, r2 8006f96: d04a beq.n 800702e 8006f98: 687b ldr r3, [r7, #4] 8006f9a: 681b ldr r3, [r3, #0] 8006f9c: 4a2e ldr r2, [pc, #184] @ (8007058 ) 8006f9e: 4293 cmp r3, r2 8006fa0: d045 beq.n 800702e 8006fa2: 687b ldr r3, [r7, #4] 8006fa4: 681b ldr r3, [r3, #0] 8006fa6: 4a2d ldr r2, [pc, #180] @ (800705c ) 8006fa8: 4293 cmp r3, r2 8006faa: d040 beq.n 800702e 8006fac: 687b ldr r3, [r7, #4] 8006fae: 681b ldr r3, [r3, #0] 8006fb0: 4a2b ldr r2, [pc, #172] @ (8007060 ) 8006fb2: 4293 cmp r3, r2 8006fb4: d03b beq.n 800702e 8006fb6: 687b ldr r3, [r7, #4] 8006fb8: 681b ldr r3, [r3, #0] 8006fba: 4a2a ldr r2, [pc, #168] @ (8007064 ) 8006fbc: 4293 cmp r3, r2 8006fbe: d036 beq.n 800702e 8006fc0: 687b ldr r3, [r7, #4] 8006fc2: 681b ldr r3, [r3, #0] 8006fc4: 4a28 ldr r2, [pc, #160] @ (8007068 ) 8006fc6: 4293 cmp r3, r2 8006fc8: d031 beq.n 800702e 8006fca: 687b ldr r3, [r7, #4] 8006fcc: 681b ldr r3, [r3, #0] 8006fce: 4a27 ldr r2, [pc, #156] @ (800706c ) 8006fd0: 4293 cmp r3, r2 8006fd2: d02c beq.n 800702e 8006fd4: 687b ldr r3, [r7, #4] 8006fd6: 681b ldr r3, [r3, #0] 8006fd8: 4a25 ldr r2, [pc, #148] @ (8007070 ) 8006fda: 4293 cmp r3, r2 8006fdc: d027 beq.n 800702e 8006fde: 687b ldr r3, [r7, #4] 8006fe0: 681b ldr r3, [r3, #0] 8006fe2: 4a24 ldr r2, [pc, #144] @ (8007074 ) 8006fe4: 4293 cmp r3, r2 8006fe6: d022 beq.n 800702e 8006fe8: 687b ldr r3, [r7, #4] 8006fea: 681b ldr r3, [r3, #0] 8006fec: 4a22 ldr r2, [pc, #136] @ (8007078 ) 8006fee: 4293 cmp r3, r2 8006ff0: d01d beq.n 800702e 8006ff2: 687b ldr r3, [r7, #4] 8006ff4: 681b ldr r3, [r3, #0] 8006ff6: 4a21 ldr r2, [pc, #132] @ (800707c ) 8006ff8: 4293 cmp r3, r2 8006ffa: d018 beq.n 800702e 8006ffc: 687b ldr r3, [r7, #4] 8006ffe: 681b ldr r3, [r3, #0] 8007000: 4a1f ldr r2, [pc, #124] @ (8007080 ) 8007002: 4293 cmp r3, r2 8007004: d013 beq.n 800702e 8007006: 687b ldr r3, [r7, #4] 8007008: 681b ldr r3, [r3, #0] 800700a: 4a1e ldr r2, [pc, #120] @ (8007084 ) 800700c: 4293 cmp r3, r2 800700e: d00e beq.n 800702e 8007010: 687b ldr r3, [r7, #4] 8007012: 681b ldr r3, [r3, #0] 8007014: 4a1c ldr r2, [pc, #112] @ (8007088 ) 8007016: 4293 cmp r3, r2 8007018: d009 beq.n 800702e 800701a: 687b ldr r3, [r7, #4] 800701c: 681b ldr r3, [r3, #0] 800701e: 4a1b ldr r2, [pc, #108] @ (800708c ) 8007020: 4293 cmp r3, r2 8007022: d004 beq.n 800702e 8007024: 687b ldr r3, [r7, #4] 8007026: 681b ldr r3, [r3, #0] 8007028: 4a19 ldr r2, [pc, #100] @ (8007090 ) 800702a: 4293 cmp r3, r2 800702c: d132 bne.n 8007094 800702e: 2301 movs r3, #1 8007030: e031 b.n 8007096 8007032: bf00 nop 8007034: 40020010 .word 0x40020010 8007038: 40020028 .word 0x40020028 800703c: 40020040 .word 0x40020040 8007040: 40020058 .word 0x40020058 8007044: 40020070 .word 0x40020070 8007048: 40020088 .word 0x40020088 800704c: 400200a0 .word 0x400200a0 8007050: 400200b8 .word 0x400200b8 8007054: 40020410 .word 0x40020410 8007058: 40020428 .word 0x40020428 800705c: 40020440 .word 0x40020440 8007060: 40020458 .word 0x40020458 8007064: 40020470 .word 0x40020470 8007068: 40020488 .word 0x40020488 800706c: 400204a0 .word 0x400204a0 8007070: 400204b8 .word 0x400204b8 8007074: 58025408 .word 0x58025408 8007078: 5802541c .word 0x5802541c 800707c: 58025430 .word 0x58025430 8007080: 58025444 .word 0x58025444 8007084: 58025458 .word 0x58025458 8007088: 5802546c .word 0x5802546c 800708c: 58025480 .word 0x58025480 8007090: 58025494 .word 0x58025494 8007094: 2300 movs r3, #0 8007096: 2b00 cmp r3, #0 8007098: d028 beq.n 80070ec { /* disable the DMAMUX sync overrun IT */ hdma->DMAmuxChannel->CCR &= ~DMAMUX_CxCR_SOIE; 800709a: 687b ldr r3, [r7, #4] 800709c: 6e1b ldr r3, [r3, #96] @ 0x60 800709e: 681a ldr r2, [r3, #0] 80070a0: 687b ldr r3, [r7, #4] 80070a2: 6e1b ldr r3, [r3, #96] @ 0x60 80070a4: f422 7280 bic.w r2, r2, #256 @ 0x100 80070a8: 601a str r2, [r3, #0] /* Clear all flags */ regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 80070aa: 687b ldr r3, [r7, #4] 80070ac: 6d9b ldr r3, [r3, #88] @ 0x58 80070ae: 60fb str r3, [r7, #12] regs_bdma->IFCR = ((BDMA_IFCR_CGIF0) << (hdma->StreamIndex & 0x1FU)); 80070b0: 687b ldr r3, [r7, #4] 80070b2: 6ddb ldr r3, [r3, #92] @ 0x5c 80070b4: f003 031f and.w r3, r3, #31 80070b8: 2201 movs r2, #1 80070ba: 409a lsls r2, r3 80070bc: 68fb ldr r3, [r7, #12] 80070be: 605a str r2, [r3, #4] /* Clear the DMAMUX synchro overrun flag */ hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask; 80070c0: 687b ldr r3, [r7, #4] 80070c2: 6e5b ldr r3, [r3, #100] @ 0x64 80070c4: 687a ldr r2, [r7, #4] 80070c6: 6e92 ldr r2, [r2, #104] @ 0x68 80070c8: 605a str r2, [r3, #4] if(hdma->DMAmuxRequestGen != 0U) 80070ca: 687b ldr r3, [r7, #4] 80070cc: 6edb ldr r3, [r3, #108] @ 0x6c 80070ce: 2b00 cmp r3, #0 80070d0: d00c beq.n 80070ec { /* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT*/ /* disable the request gen overrun IT */ hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_OIE; 80070d2: 687b ldr r3, [r7, #4] 80070d4: 6edb ldr r3, [r3, #108] @ 0x6c 80070d6: 681a ldr r2, [r3, #0] 80070d8: 687b ldr r3, [r7, #4] 80070da: 6edb ldr r3, [r3, #108] @ 0x6c 80070dc: f422 7280 bic.w r2, r2, #256 @ 0x100 80070e0: 601a str r2, [r3, #0] /* Clear the DMAMUX request generator overrun flag */ hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask; 80070e2: 687b ldr r3, [r7, #4] 80070e4: 6f1b ldr r3, [r3, #112] @ 0x70 80070e6: 687a ldr r2, [r7, #4] 80070e8: 6f52 ldr r2, [r2, #116] @ 0x74 80070ea: 605a str r2, [r3, #4] } } /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80070ec: 687b ldr r3, [r7, #4] 80070ee: 2201 movs r2, #1 80070f0: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80070f4: 687b ldr r3, [r7, #4] 80070f6: 2200 movs r2, #0 80070f8: f883 2034 strb.w r2, [r3, #52] @ 0x34 /* Call User Abort callback */ if(hdma->XferAbortCallback != NULL) 80070fc: 687b ldr r3, [r7, #4] 80070fe: 6d1b ldr r3, [r3, #80] @ 0x50 8007100: 2b00 cmp r3, #0 8007102: d003 beq.n 800710c { hdma->XferAbortCallback(hdma); 8007104: 687b ldr r3, [r7, #4] 8007106: 6d1b ldr r3, [r3, #80] @ 0x50 8007108: 6878 ldr r0, [r7, #4] 800710a: 4798 blx r3 } } } return HAL_OK; 800710c: 2300 movs r3, #0 } 800710e: 4618 mov r0, r3 8007110: 3710 adds r7, #16 8007112: 46bd mov sp, r7 8007114: bd80 pop {r7, pc} 8007116: bf00 nop 08007118 : * @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) { 8007118: b580 push {r7, lr} 800711a: b08a sub sp, #40 @ 0x28 800711c: af00 add r7, sp, #0 800711e: 6078 str r0, [r7, #4] uint32_t tmpisr_dma, tmpisr_bdma; uint32_t ccr_reg; __IO uint32_t count = 0U; 8007120: 2300 movs r3, #0 8007122: 60fb str r3, [r7, #12] uint32_t timeout = SystemCoreClock / 9600U; 8007124: 4b67 ldr r3, [pc, #412] @ (80072c4 ) 8007126: 681b ldr r3, [r3, #0] 8007128: 4a67 ldr r2, [pc, #412] @ (80072c8 ) 800712a: fba2 2303 umull r2, r3, r2, r3 800712e: 0a9b lsrs r3, r3, #10 8007130: 627b str r3, [r7, #36] @ 0x24 /* calculate DMA base and stream number */ DMA_Base_Registers *regs_dma = (DMA_Base_Registers *)hdma->StreamBaseAddress; 8007132: 687b ldr r3, [r7, #4] 8007134: 6d9b ldr r3, [r3, #88] @ 0x58 8007136: 623b str r3, [r7, #32] BDMA_Base_Registers *regs_bdma = (BDMA_Base_Registers *)hdma->StreamBaseAddress; 8007138: 687b ldr r3, [r7, #4] 800713a: 6d9b ldr r3, [r3, #88] @ 0x58 800713c: 61fb str r3, [r7, #28] tmpisr_dma = regs_dma->ISR; 800713e: 6a3b ldr r3, [r7, #32] 8007140: 681b ldr r3, [r3, #0] 8007142: 61bb str r3, [r7, #24] tmpisr_bdma = regs_bdma->ISR; 8007144: 69fb ldr r3, [r7, #28] 8007146: 681b ldr r3, [r3, #0] 8007148: 617b str r3, [r7, #20] if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 800714a: 687b ldr r3, [r7, #4] 800714c: 681b ldr r3, [r3, #0] 800714e: 4a5f ldr r2, [pc, #380] @ (80072cc ) 8007150: 4293 cmp r3, r2 8007152: d04a beq.n 80071ea 8007154: 687b ldr r3, [r7, #4] 8007156: 681b ldr r3, [r3, #0] 8007158: 4a5d ldr r2, [pc, #372] @ (80072d0 ) 800715a: 4293 cmp r3, r2 800715c: d045 beq.n 80071ea 800715e: 687b ldr r3, [r7, #4] 8007160: 681b ldr r3, [r3, #0] 8007162: 4a5c ldr r2, [pc, #368] @ (80072d4 ) 8007164: 4293 cmp r3, r2 8007166: d040 beq.n 80071ea 8007168: 687b ldr r3, [r7, #4] 800716a: 681b ldr r3, [r3, #0] 800716c: 4a5a ldr r2, [pc, #360] @ (80072d8 ) 800716e: 4293 cmp r3, r2 8007170: d03b beq.n 80071ea 8007172: 687b ldr r3, [r7, #4] 8007174: 681b ldr r3, [r3, #0] 8007176: 4a59 ldr r2, [pc, #356] @ (80072dc ) 8007178: 4293 cmp r3, r2 800717a: d036 beq.n 80071ea 800717c: 687b ldr r3, [r7, #4] 800717e: 681b ldr r3, [r3, #0] 8007180: 4a57 ldr r2, [pc, #348] @ (80072e0 ) 8007182: 4293 cmp r3, r2 8007184: d031 beq.n 80071ea 8007186: 687b ldr r3, [r7, #4] 8007188: 681b ldr r3, [r3, #0] 800718a: 4a56 ldr r2, [pc, #344] @ (80072e4 ) 800718c: 4293 cmp r3, r2 800718e: d02c beq.n 80071ea 8007190: 687b ldr r3, [r7, #4] 8007192: 681b ldr r3, [r3, #0] 8007194: 4a54 ldr r2, [pc, #336] @ (80072e8 ) 8007196: 4293 cmp r3, r2 8007198: d027 beq.n 80071ea 800719a: 687b ldr r3, [r7, #4] 800719c: 681b ldr r3, [r3, #0] 800719e: 4a53 ldr r2, [pc, #332] @ (80072ec ) 80071a0: 4293 cmp r3, r2 80071a2: d022 beq.n 80071ea 80071a4: 687b ldr r3, [r7, #4] 80071a6: 681b ldr r3, [r3, #0] 80071a8: 4a51 ldr r2, [pc, #324] @ (80072f0 ) 80071aa: 4293 cmp r3, r2 80071ac: d01d beq.n 80071ea 80071ae: 687b ldr r3, [r7, #4] 80071b0: 681b ldr r3, [r3, #0] 80071b2: 4a50 ldr r2, [pc, #320] @ (80072f4 ) 80071b4: 4293 cmp r3, r2 80071b6: d018 beq.n 80071ea 80071b8: 687b ldr r3, [r7, #4] 80071ba: 681b ldr r3, [r3, #0] 80071bc: 4a4e ldr r2, [pc, #312] @ (80072f8 ) 80071be: 4293 cmp r3, r2 80071c0: d013 beq.n 80071ea 80071c2: 687b ldr r3, [r7, #4] 80071c4: 681b ldr r3, [r3, #0] 80071c6: 4a4d ldr r2, [pc, #308] @ (80072fc ) 80071c8: 4293 cmp r3, r2 80071ca: d00e beq.n 80071ea 80071cc: 687b ldr r3, [r7, #4] 80071ce: 681b ldr r3, [r3, #0] 80071d0: 4a4b ldr r2, [pc, #300] @ (8007300 ) 80071d2: 4293 cmp r3, r2 80071d4: d009 beq.n 80071ea 80071d6: 687b ldr r3, [r7, #4] 80071d8: 681b ldr r3, [r3, #0] 80071da: 4a4a ldr r2, [pc, #296] @ (8007304 ) 80071dc: 4293 cmp r3, r2 80071de: d004 beq.n 80071ea 80071e0: 687b ldr r3, [r7, #4] 80071e2: 681b ldr r3, [r3, #0] 80071e4: 4a48 ldr r2, [pc, #288] @ (8007308 ) 80071e6: 4293 cmp r3, r2 80071e8: d101 bne.n 80071ee 80071ea: 2301 movs r3, #1 80071ec: e000 b.n 80071f0 80071ee: 2300 movs r3, #0 80071f0: 2b00 cmp r3, #0 80071f2: f000 842b beq.w 8007a4c { /* Transfer Error Interrupt management ***************************************/ if ((tmpisr_dma & (DMA_FLAG_TEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 80071f6: 687b ldr r3, [r7, #4] 80071f8: 6ddb ldr r3, [r3, #92] @ 0x5c 80071fa: f003 031f and.w r3, r3, #31 80071fe: 2208 movs r2, #8 8007200: 409a lsls r2, r3 8007202: 69bb ldr r3, [r7, #24] 8007204: 4013 ands r3, r2 8007206: 2b00 cmp r3, #0 8007208: f000 80a2 beq.w 8007350 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_TE) != 0U) 800720c: 687b ldr r3, [r7, #4] 800720e: 681b ldr r3, [r3, #0] 8007210: 4a2e ldr r2, [pc, #184] @ (80072cc ) 8007212: 4293 cmp r3, r2 8007214: d04a beq.n 80072ac 8007216: 687b ldr r3, [r7, #4] 8007218: 681b ldr r3, [r3, #0] 800721a: 4a2d ldr r2, [pc, #180] @ (80072d0 ) 800721c: 4293 cmp r3, r2 800721e: d045 beq.n 80072ac 8007220: 687b ldr r3, [r7, #4] 8007222: 681b ldr r3, [r3, #0] 8007224: 4a2b ldr r2, [pc, #172] @ (80072d4 ) 8007226: 4293 cmp r3, r2 8007228: d040 beq.n 80072ac 800722a: 687b ldr r3, [r7, #4] 800722c: 681b ldr r3, [r3, #0] 800722e: 4a2a ldr r2, [pc, #168] @ (80072d8 ) 8007230: 4293 cmp r3, r2 8007232: d03b beq.n 80072ac 8007234: 687b ldr r3, [r7, #4] 8007236: 681b ldr r3, [r3, #0] 8007238: 4a28 ldr r2, [pc, #160] @ (80072dc ) 800723a: 4293 cmp r3, r2 800723c: d036 beq.n 80072ac 800723e: 687b ldr r3, [r7, #4] 8007240: 681b ldr r3, [r3, #0] 8007242: 4a27 ldr r2, [pc, #156] @ (80072e0 ) 8007244: 4293 cmp r3, r2 8007246: d031 beq.n 80072ac 8007248: 687b ldr r3, [r7, #4] 800724a: 681b ldr r3, [r3, #0] 800724c: 4a25 ldr r2, [pc, #148] @ (80072e4 ) 800724e: 4293 cmp r3, r2 8007250: d02c beq.n 80072ac 8007252: 687b ldr r3, [r7, #4] 8007254: 681b ldr r3, [r3, #0] 8007256: 4a24 ldr r2, [pc, #144] @ (80072e8 ) 8007258: 4293 cmp r3, r2 800725a: d027 beq.n 80072ac 800725c: 687b ldr r3, [r7, #4] 800725e: 681b ldr r3, [r3, #0] 8007260: 4a22 ldr r2, [pc, #136] @ (80072ec ) 8007262: 4293 cmp r3, r2 8007264: d022 beq.n 80072ac 8007266: 687b ldr r3, [r7, #4] 8007268: 681b ldr r3, [r3, #0] 800726a: 4a21 ldr r2, [pc, #132] @ (80072f0 ) 800726c: 4293 cmp r3, r2 800726e: d01d beq.n 80072ac 8007270: 687b ldr r3, [r7, #4] 8007272: 681b ldr r3, [r3, #0] 8007274: 4a1f ldr r2, [pc, #124] @ (80072f4 ) 8007276: 4293 cmp r3, r2 8007278: d018 beq.n 80072ac 800727a: 687b ldr r3, [r7, #4] 800727c: 681b ldr r3, [r3, #0] 800727e: 4a1e ldr r2, [pc, #120] @ (80072f8 ) 8007280: 4293 cmp r3, r2 8007282: d013 beq.n 80072ac 8007284: 687b ldr r3, [r7, #4] 8007286: 681b ldr r3, [r3, #0] 8007288: 4a1c ldr r2, [pc, #112] @ (80072fc ) 800728a: 4293 cmp r3, r2 800728c: d00e beq.n 80072ac 800728e: 687b ldr r3, [r7, #4] 8007290: 681b ldr r3, [r3, #0] 8007292: 4a1b ldr r2, [pc, #108] @ (8007300 ) 8007294: 4293 cmp r3, r2 8007296: d009 beq.n 80072ac 8007298: 687b ldr r3, [r7, #4] 800729a: 681b ldr r3, [r3, #0] 800729c: 4a19 ldr r2, [pc, #100] @ (8007304 ) 800729e: 4293 cmp r3, r2 80072a0: d004 beq.n 80072ac 80072a2: 687b ldr r3, [r7, #4] 80072a4: 681b ldr r3, [r3, #0] 80072a6: 4a18 ldr r2, [pc, #96] @ (8007308 ) 80072a8: 4293 cmp r3, r2 80072aa: d12f bne.n 800730c 80072ac: 687b ldr r3, [r7, #4] 80072ae: 681b ldr r3, [r3, #0] 80072b0: 681b ldr r3, [r3, #0] 80072b2: f003 0304 and.w r3, r3, #4 80072b6: 2b00 cmp r3, #0 80072b8: bf14 ite ne 80072ba: 2301 movne r3, #1 80072bc: 2300 moveq r3, #0 80072be: b2db uxtb r3, r3 80072c0: e02e b.n 8007320 80072c2: bf00 nop 80072c4: 2400000c .word 0x2400000c 80072c8: 1b4e81b5 .word 0x1b4e81b5 80072cc: 40020010 .word 0x40020010 80072d0: 40020028 .word 0x40020028 80072d4: 40020040 .word 0x40020040 80072d8: 40020058 .word 0x40020058 80072dc: 40020070 .word 0x40020070 80072e0: 40020088 .word 0x40020088 80072e4: 400200a0 .word 0x400200a0 80072e8: 400200b8 .word 0x400200b8 80072ec: 40020410 .word 0x40020410 80072f0: 40020428 .word 0x40020428 80072f4: 40020440 .word 0x40020440 80072f8: 40020458 .word 0x40020458 80072fc: 40020470 .word 0x40020470 8007300: 40020488 .word 0x40020488 8007304: 400204a0 .word 0x400204a0 8007308: 400204b8 .word 0x400204b8 800730c: 687b ldr r3, [r7, #4] 800730e: 681b ldr r3, [r3, #0] 8007310: 681b ldr r3, [r3, #0] 8007312: f003 0308 and.w r3, r3, #8 8007316: 2b00 cmp r3, #0 8007318: bf14 ite ne 800731a: 2301 movne r3, #1 800731c: 2300 moveq r3, #0 800731e: b2db uxtb r3, r3 8007320: 2b00 cmp r3, #0 8007322: d015 beq.n 8007350 { /* Disable the transfer error interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TE); 8007324: 687b ldr r3, [r7, #4] 8007326: 681b ldr r3, [r3, #0] 8007328: 681a ldr r2, [r3, #0] 800732a: 687b ldr r3, [r7, #4] 800732c: 681b ldr r3, [r3, #0] 800732e: f022 0204 bic.w r2, r2, #4 8007332: 601a str r2, [r3, #0] /* Clear the transfer error flag */ regs_dma->IFCR = DMA_FLAG_TEIF0_4 << (hdma->StreamIndex & 0x1FU); 8007334: 687b ldr r3, [r7, #4] 8007336: 6ddb ldr r3, [r3, #92] @ 0x5c 8007338: f003 031f and.w r3, r3, #31 800733c: 2208 movs r2, #8 800733e: 409a lsls r2, r3 8007340: 6a3b ldr r3, [r7, #32] 8007342: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_TE; 8007344: 687b ldr r3, [r7, #4] 8007346: 6d5b ldr r3, [r3, #84] @ 0x54 8007348: f043 0201 orr.w r2, r3, #1 800734c: 687b ldr r3, [r7, #4] 800734e: 655a str r2, [r3, #84] @ 0x54 } } /* FIFO Error Interrupt management ******************************************/ if ((tmpisr_dma & (DMA_FLAG_FEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 8007350: 687b ldr r3, [r7, #4] 8007352: 6ddb ldr r3, [r3, #92] @ 0x5c 8007354: f003 031f and.w r3, r3, #31 8007358: 69ba ldr r2, [r7, #24] 800735a: fa22 f303 lsr.w r3, r2, r3 800735e: f003 0301 and.w r3, r3, #1 8007362: 2b00 cmp r3, #0 8007364: d06e beq.n 8007444 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_FE) != 0U) 8007366: 687b ldr r3, [r7, #4] 8007368: 681b ldr r3, [r3, #0] 800736a: 4a69 ldr r2, [pc, #420] @ (8007510 ) 800736c: 4293 cmp r3, r2 800736e: d04a beq.n 8007406 8007370: 687b ldr r3, [r7, #4] 8007372: 681b ldr r3, [r3, #0] 8007374: 4a67 ldr r2, [pc, #412] @ (8007514 ) 8007376: 4293 cmp r3, r2 8007378: d045 beq.n 8007406 800737a: 687b ldr r3, [r7, #4] 800737c: 681b ldr r3, [r3, #0] 800737e: 4a66 ldr r2, [pc, #408] @ (8007518 ) 8007380: 4293 cmp r3, r2 8007382: d040 beq.n 8007406 8007384: 687b ldr r3, [r7, #4] 8007386: 681b ldr r3, [r3, #0] 8007388: 4a64 ldr r2, [pc, #400] @ (800751c ) 800738a: 4293 cmp r3, r2 800738c: d03b beq.n 8007406 800738e: 687b ldr r3, [r7, #4] 8007390: 681b ldr r3, [r3, #0] 8007392: 4a63 ldr r2, [pc, #396] @ (8007520 ) 8007394: 4293 cmp r3, r2 8007396: d036 beq.n 8007406 8007398: 687b ldr r3, [r7, #4] 800739a: 681b ldr r3, [r3, #0] 800739c: 4a61 ldr r2, [pc, #388] @ (8007524 ) 800739e: 4293 cmp r3, r2 80073a0: d031 beq.n 8007406 80073a2: 687b ldr r3, [r7, #4] 80073a4: 681b ldr r3, [r3, #0] 80073a6: 4a60 ldr r2, [pc, #384] @ (8007528 ) 80073a8: 4293 cmp r3, r2 80073aa: d02c beq.n 8007406 80073ac: 687b ldr r3, [r7, #4] 80073ae: 681b ldr r3, [r3, #0] 80073b0: 4a5e ldr r2, [pc, #376] @ (800752c ) 80073b2: 4293 cmp r3, r2 80073b4: d027 beq.n 8007406 80073b6: 687b ldr r3, [r7, #4] 80073b8: 681b ldr r3, [r3, #0] 80073ba: 4a5d ldr r2, [pc, #372] @ (8007530 ) 80073bc: 4293 cmp r3, r2 80073be: d022 beq.n 8007406 80073c0: 687b ldr r3, [r7, #4] 80073c2: 681b ldr r3, [r3, #0] 80073c4: 4a5b ldr r2, [pc, #364] @ (8007534 ) 80073c6: 4293 cmp r3, r2 80073c8: d01d beq.n 8007406 80073ca: 687b ldr r3, [r7, #4] 80073cc: 681b ldr r3, [r3, #0] 80073ce: 4a5a ldr r2, [pc, #360] @ (8007538 ) 80073d0: 4293 cmp r3, r2 80073d2: d018 beq.n 8007406 80073d4: 687b ldr r3, [r7, #4] 80073d6: 681b ldr r3, [r3, #0] 80073d8: 4a58 ldr r2, [pc, #352] @ (800753c ) 80073da: 4293 cmp r3, r2 80073dc: d013 beq.n 8007406 80073de: 687b ldr r3, [r7, #4] 80073e0: 681b ldr r3, [r3, #0] 80073e2: 4a57 ldr r2, [pc, #348] @ (8007540 ) 80073e4: 4293 cmp r3, r2 80073e6: d00e beq.n 8007406 80073e8: 687b ldr r3, [r7, #4] 80073ea: 681b ldr r3, [r3, #0] 80073ec: 4a55 ldr r2, [pc, #340] @ (8007544 ) 80073ee: 4293 cmp r3, r2 80073f0: d009 beq.n 8007406 80073f2: 687b ldr r3, [r7, #4] 80073f4: 681b ldr r3, [r3, #0] 80073f6: 4a54 ldr r2, [pc, #336] @ (8007548 ) 80073f8: 4293 cmp r3, r2 80073fa: d004 beq.n 8007406 80073fc: 687b ldr r3, [r7, #4] 80073fe: 681b ldr r3, [r3, #0] 8007400: 4a52 ldr r2, [pc, #328] @ (800754c ) 8007402: 4293 cmp r3, r2 8007404: d10a bne.n 800741c 8007406: 687b ldr r3, [r7, #4] 8007408: 681b ldr r3, [r3, #0] 800740a: 695b ldr r3, [r3, #20] 800740c: f003 0380 and.w r3, r3, #128 @ 0x80 8007410: 2b00 cmp r3, #0 8007412: bf14 ite ne 8007414: 2301 movne r3, #1 8007416: 2300 moveq r3, #0 8007418: b2db uxtb r3, r3 800741a: e003 b.n 8007424 800741c: 687b ldr r3, [r7, #4] 800741e: 681b ldr r3, [r3, #0] 8007420: 681b ldr r3, [r3, #0] 8007422: 2300 movs r3, #0 8007424: 2b00 cmp r3, #0 8007426: d00d beq.n 8007444 { /* Clear the FIFO error flag */ regs_dma->IFCR = DMA_FLAG_FEIF0_4 << (hdma->StreamIndex & 0x1FU); 8007428: 687b ldr r3, [r7, #4] 800742a: 6ddb ldr r3, [r3, #92] @ 0x5c 800742c: f003 031f and.w r3, r3, #31 8007430: 2201 movs r2, #1 8007432: 409a lsls r2, r3 8007434: 6a3b ldr r3, [r7, #32] 8007436: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_FE; 8007438: 687b ldr r3, [r7, #4] 800743a: 6d5b ldr r3, [r3, #84] @ 0x54 800743c: f043 0202 orr.w r2, r3, #2 8007440: 687b ldr r3, [r7, #4] 8007442: 655a str r2, [r3, #84] @ 0x54 } } /* Direct Mode Error Interrupt management ***********************************/ if ((tmpisr_dma & (DMA_FLAG_DMEIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 8007444: 687b ldr r3, [r7, #4] 8007446: 6ddb ldr r3, [r3, #92] @ 0x5c 8007448: f003 031f and.w r3, r3, #31 800744c: 2204 movs r2, #4 800744e: 409a lsls r2, r3 8007450: 69bb ldr r3, [r7, #24] 8007452: 4013 ands r3, r2 8007454: 2b00 cmp r3, #0 8007456: f000 808f beq.w 8007578 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_DME) != 0U) 800745a: 687b ldr r3, [r7, #4] 800745c: 681b ldr r3, [r3, #0] 800745e: 4a2c ldr r2, [pc, #176] @ (8007510 ) 8007460: 4293 cmp r3, r2 8007462: d04a beq.n 80074fa 8007464: 687b ldr r3, [r7, #4] 8007466: 681b ldr r3, [r3, #0] 8007468: 4a2a ldr r2, [pc, #168] @ (8007514 ) 800746a: 4293 cmp r3, r2 800746c: d045 beq.n 80074fa 800746e: 687b ldr r3, [r7, #4] 8007470: 681b ldr r3, [r3, #0] 8007472: 4a29 ldr r2, [pc, #164] @ (8007518 ) 8007474: 4293 cmp r3, r2 8007476: d040 beq.n 80074fa 8007478: 687b ldr r3, [r7, #4] 800747a: 681b ldr r3, [r3, #0] 800747c: 4a27 ldr r2, [pc, #156] @ (800751c ) 800747e: 4293 cmp r3, r2 8007480: d03b beq.n 80074fa 8007482: 687b ldr r3, [r7, #4] 8007484: 681b ldr r3, [r3, #0] 8007486: 4a26 ldr r2, [pc, #152] @ (8007520 ) 8007488: 4293 cmp r3, r2 800748a: d036 beq.n 80074fa 800748c: 687b ldr r3, [r7, #4] 800748e: 681b ldr r3, [r3, #0] 8007490: 4a24 ldr r2, [pc, #144] @ (8007524 ) 8007492: 4293 cmp r3, r2 8007494: d031 beq.n 80074fa 8007496: 687b ldr r3, [r7, #4] 8007498: 681b ldr r3, [r3, #0] 800749a: 4a23 ldr r2, [pc, #140] @ (8007528 ) 800749c: 4293 cmp r3, r2 800749e: d02c beq.n 80074fa 80074a0: 687b ldr r3, [r7, #4] 80074a2: 681b ldr r3, [r3, #0] 80074a4: 4a21 ldr r2, [pc, #132] @ (800752c ) 80074a6: 4293 cmp r3, r2 80074a8: d027 beq.n 80074fa 80074aa: 687b ldr r3, [r7, #4] 80074ac: 681b ldr r3, [r3, #0] 80074ae: 4a20 ldr r2, [pc, #128] @ (8007530 ) 80074b0: 4293 cmp r3, r2 80074b2: d022 beq.n 80074fa 80074b4: 687b ldr r3, [r7, #4] 80074b6: 681b ldr r3, [r3, #0] 80074b8: 4a1e ldr r2, [pc, #120] @ (8007534 ) 80074ba: 4293 cmp r3, r2 80074bc: d01d beq.n 80074fa 80074be: 687b ldr r3, [r7, #4] 80074c0: 681b ldr r3, [r3, #0] 80074c2: 4a1d ldr r2, [pc, #116] @ (8007538 ) 80074c4: 4293 cmp r3, r2 80074c6: d018 beq.n 80074fa 80074c8: 687b ldr r3, [r7, #4] 80074ca: 681b ldr r3, [r3, #0] 80074cc: 4a1b ldr r2, [pc, #108] @ (800753c ) 80074ce: 4293 cmp r3, r2 80074d0: d013 beq.n 80074fa 80074d2: 687b ldr r3, [r7, #4] 80074d4: 681b ldr r3, [r3, #0] 80074d6: 4a1a ldr r2, [pc, #104] @ (8007540 ) 80074d8: 4293 cmp r3, r2 80074da: d00e beq.n 80074fa 80074dc: 687b ldr r3, [r7, #4] 80074de: 681b ldr r3, [r3, #0] 80074e0: 4a18 ldr r2, [pc, #96] @ (8007544 ) 80074e2: 4293 cmp r3, r2 80074e4: d009 beq.n 80074fa 80074e6: 687b ldr r3, [r7, #4] 80074e8: 681b ldr r3, [r3, #0] 80074ea: 4a17 ldr r2, [pc, #92] @ (8007548 ) 80074ec: 4293 cmp r3, r2 80074ee: d004 beq.n 80074fa 80074f0: 687b ldr r3, [r7, #4] 80074f2: 681b ldr r3, [r3, #0] 80074f4: 4a15 ldr r2, [pc, #84] @ (800754c ) 80074f6: 4293 cmp r3, r2 80074f8: d12a bne.n 8007550 80074fa: 687b ldr r3, [r7, #4] 80074fc: 681b ldr r3, [r3, #0] 80074fe: 681b ldr r3, [r3, #0] 8007500: f003 0302 and.w r3, r3, #2 8007504: 2b00 cmp r3, #0 8007506: bf14 ite ne 8007508: 2301 movne r3, #1 800750a: 2300 moveq r3, #0 800750c: b2db uxtb r3, r3 800750e: e023 b.n 8007558 8007510: 40020010 .word 0x40020010 8007514: 40020028 .word 0x40020028 8007518: 40020040 .word 0x40020040 800751c: 40020058 .word 0x40020058 8007520: 40020070 .word 0x40020070 8007524: 40020088 .word 0x40020088 8007528: 400200a0 .word 0x400200a0 800752c: 400200b8 .word 0x400200b8 8007530: 40020410 .word 0x40020410 8007534: 40020428 .word 0x40020428 8007538: 40020440 .word 0x40020440 800753c: 40020458 .word 0x40020458 8007540: 40020470 .word 0x40020470 8007544: 40020488 .word 0x40020488 8007548: 400204a0 .word 0x400204a0 800754c: 400204b8 .word 0x400204b8 8007550: 687b ldr r3, [r7, #4] 8007552: 681b ldr r3, [r3, #0] 8007554: 681b ldr r3, [r3, #0] 8007556: 2300 movs r3, #0 8007558: 2b00 cmp r3, #0 800755a: d00d beq.n 8007578 { /* Clear the direct mode error flag */ regs_dma->IFCR = DMA_FLAG_DMEIF0_4 << (hdma->StreamIndex & 0x1FU); 800755c: 687b ldr r3, [r7, #4] 800755e: 6ddb ldr r3, [r3, #92] @ 0x5c 8007560: f003 031f and.w r3, r3, #31 8007564: 2204 movs r2, #4 8007566: 409a lsls r2, r3 8007568: 6a3b ldr r3, [r7, #32] 800756a: 609a str r2, [r3, #8] /* Update error code */ hdma->ErrorCode |= HAL_DMA_ERROR_DME; 800756c: 687b ldr r3, [r7, #4] 800756e: 6d5b ldr r3, [r3, #84] @ 0x54 8007570: f043 0204 orr.w r2, r3, #4 8007574: 687b ldr r3, [r7, #4] 8007576: 655a str r2, [r3, #84] @ 0x54 } } /* Half Transfer Complete Interrupt management ******************************/ if ((tmpisr_dma & (DMA_FLAG_HTIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 8007578: 687b ldr r3, [r7, #4] 800757a: 6ddb ldr r3, [r3, #92] @ 0x5c 800757c: f003 031f and.w r3, r3, #31 8007580: 2210 movs r2, #16 8007582: 409a lsls r2, r3 8007584: 69bb ldr r3, [r7, #24] 8007586: 4013 ands r3, r2 8007588: 2b00 cmp r3, #0 800758a: f000 80a6 beq.w 80076da { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_HT) != 0U) 800758e: 687b ldr r3, [r7, #4] 8007590: 681b ldr r3, [r3, #0] 8007592: 4a85 ldr r2, [pc, #532] @ (80077a8 ) 8007594: 4293 cmp r3, r2 8007596: d04a beq.n 800762e 8007598: 687b ldr r3, [r7, #4] 800759a: 681b ldr r3, [r3, #0] 800759c: 4a83 ldr r2, [pc, #524] @ (80077ac ) 800759e: 4293 cmp r3, r2 80075a0: d045 beq.n 800762e 80075a2: 687b ldr r3, [r7, #4] 80075a4: 681b ldr r3, [r3, #0] 80075a6: 4a82 ldr r2, [pc, #520] @ (80077b0 ) 80075a8: 4293 cmp r3, r2 80075aa: d040 beq.n 800762e 80075ac: 687b ldr r3, [r7, #4] 80075ae: 681b ldr r3, [r3, #0] 80075b0: 4a80 ldr r2, [pc, #512] @ (80077b4 ) 80075b2: 4293 cmp r3, r2 80075b4: d03b beq.n 800762e 80075b6: 687b ldr r3, [r7, #4] 80075b8: 681b ldr r3, [r3, #0] 80075ba: 4a7f ldr r2, [pc, #508] @ (80077b8 ) 80075bc: 4293 cmp r3, r2 80075be: d036 beq.n 800762e 80075c0: 687b ldr r3, [r7, #4] 80075c2: 681b ldr r3, [r3, #0] 80075c4: 4a7d ldr r2, [pc, #500] @ (80077bc ) 80075c6: 4293 cmp r3, r2 80075c8: d031 beq.n 800762e 80075ca: 687b ldr r3, [r7, #4] 80075cc: 681b ldr r3, [r3, #0] 80075ce: 4a7c ldr r2, [pc, #496] @ (80077c0 ) 80075d0: 4293 cmp r3, r2 80075d2: d02c beq.n 800762e 80075d4: 687b ldr r3, [r7, #4] 80075d6: 681b ldr r3, [r3, #0] 80075d8: 4a7a ldr r2, [pc, #488] @ (80077c4 ) 80075da: 4293 cmp r3, r2 80075dc: d027 beq.n 800762e 80075de: 687b ldr r3, [r7, #4] 80075e0: 681b ldr r3, [r3, #0] 80075e2: 4a79 ldr r2, [pc, #484] @ (80077c8 ) 80075e4: 4293 cmp r3, r2 80075e6: d022 beq.n 800762e 80075e8: 687b ldr r3, [r7, #4] 80075ea: 681b ldr r3, [r3, #0] 80075ec: 4a77 ldr r2, [pc, #476] @ (80077cc ) 80075ee: 4293 cmp r3, r2 80075f0: d01d beq.n 800762e 80075f2: 687b ldr r3, [r7, #4] 80075f4: 681b ldr r3, [r3, #0] 80075f6: 4a76 ldr r2, [pc, #472] @ (80077d0 ) 80075f8: 4293 cmp r3, r2 80075fa: d018 beq.n 800762e 80075fc: 687b ldr r3, [r7, #4] 80075fe: 681b ldr r3, [r3, #0] 8007600: 4a74 ldr r2, [pc, #464] @ (80077d4 ) 8007602: 4293 cmp r3, r2 8007604: d013 beq.n 800762e 8007606: 687b ldr r3, [r7, #4] 8007608: 681b ldr r3, [r3, #0] 800760a: 4a73 ldr r2, [pc, #460] @ (80077d8 ) 800760c: 4293 cmp r3, r2 800760e: d00e beq.n 800762e 8007610: 687b ldr r3, [r7, #4] 8007612: 681b ldr r3, [r3, #0] 8007614: 4a71 ldr r2, [pc, #452] @ (80077dc ) 8007616: 4293 cmp r3, r2 8007618: d009 beq.n 800762e 800761a: 687b ldr r3, [r7, #4] 800761c: 681b ldr r3, [r3, #0] 800761e: 4a70 ldr r2, [pc, #448] @ (80077e0 ) 8007620: 4293 cmp r3, r2 8007622: d004 beq.n 800762e 8007624: 687b ldr r3, [r7, #4] 8007626: 681b ldr r3, [r3, #0] 8007628: 4a6e ldr r2, [pc, #440] @ (80077e4 ) 800762a: 4293 cmp r3, r2 800762c: d10a bne.n 8007644 800762e: 687b ldr r3, [r7, #4] 8007630: 681b ldr r3, [r3, #0] 8007632: 681b ldr r3, [r3, #0] 8007634: f003 0308 and.w r3, r3, #8 8007638: 2b00 cmp r3, #0 800763a: bf14 ite ne 800763c: 2301 movne r3, #1 800763e: 2300 moveq r3, #0 8007640: b2db uxtb r3, r3 8007642: e009 b.n 8007658 8007644: 687b ldr r3, [r7, #4] 8007646: 681b ldr r3, [r3, #0] 8007648: 681b ldr r3, [r3, #0] 800764a: f003 0304 and.w r3, r3, #4 800764e: 2b00 cmp r3, #0 8007650: bf14 ite ne 8007652: 2301 movne r3, #1 8007654: 2300 moveq r3, #0 8007656: b2db uxtb r3, r3 8007658: 2b00 cmp r3, #0 800765a: d03e beq.n 80076da { /* Clear the half transfer complete flag */ regs_dma->IFCR = DMA_FLAG_HTIF0_4 << (hdma->StreamIndex & 0x1FU); 800765c: 687b ldr r3, [r7, #4] 800765e: 6ddb ldr r3, [r3, #92] @ 0x5c 8007660: f003 031f and.w r3, r3, #31 8007664: 2210 movs r2, #16 8007666: 409a lsls r2, r3 8007668: 6a3b ldr r3, [r7, #32] 800766a: 609a str r2, [r3, #8] /* Multi_Buffering mode enabled */ if(((((DMA_Stream_TypeDef *)hdma->Instance)->CR) & (uint32_t)(DMA_SxCR_DBM)) != 0U) 800766c: 687b ldr r3, [r7, #4] 800766e: 681b ldr r3, [r3, #0] 8007670: 681b ldr r3, [r3, #0] 8007672: f403 2380 and.w r3, r3, #262144 @ 0x40000 8007676: 2b00 cmp r3, #0 8007678: d018 beq.n 80076ac { /* Current memory buffer used is Memory 0 */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CT) == 0U) 800767a: 687b ldr r3, [r7, #4] 800767c: 681b ldr r3, [r3, #0] 800767e: 681b ldr r3, [r3, #0] 8007680: f403 2300 and.w r3, r3, #524288 @ 0x80000 8007684: 2b00 cmp r3, #0 8007686: d108 bne.n 800769a { if(hdma->XferHalfCpltCallback != NULL) 8007688: 687b ldr r3, [r7, #4] 800768a: 6c1b ldr r3, [r3, #64] @ 0x40 800768c: 2b00 cmp r3, #0 800768e: d024 beq.n 80076da { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 8007690: 687b ldr r3, [r7, #4] 8007692: 6c1b ldr r3, [r3, #64] @ 0x40 8007694: 6878 ldr r0, [r7, #4] 8007696: 4798 blx r3 8007698: e01f b.n 80076da } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferM1HalfCpltCallback != NULL) 800769a: 687b ldr r3, [r7, #4] 800769c: 6c9b ldr r3, [r3, #72] @ 0x48 800769e: 2b00 cmp r3, #0 80076a0: d01b beq.n 80076da { /* Half transfer callback */ hdma->XferM1HalfCpltCallback(hdma); 80076a2: 687b ldr r3, [r7, #4] 80076a4: 6c9b ldr r3, [r3, #72] @ 0x48 80076a6: 6878 ldr r0, [r7, #4] 80076a8: 4798 blx r3 80076aa: e016 b.n 80076da } } else { /* Disable the half transfer interrupt if the DMA mode is not CIRCULAR */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CIRC) == 0U) 80076ac: 687b ldr r3, [r7, #4] 80076ae: 681b ldr r3, [r3, #0] 80076b0: 681b ldr r3, [r3, #0] 80076b2: f403 7380 and.w r3, r3, #256 @ 0x100 80076b6: 2b00 cmp r3, #0 80076b8: d107 bne.n 80076ca { /* Disable the half transfer interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_HT); 80076ba: 687b ldr r3, [r7, #4] 80076bc: 681b ldr r3, [r3, #0] 80076be: 681a ldr r2, [r3, #0] 80076c0: 687b ldr r3, [r7, #4] 80076c2: 681b ldr r3, [r3, #0] 80076c4: f022 0208 bic.w r2, r2, #8 80076c8: 601a str r2, [r3, #0] } if(hdma->XferHalfCpltCallback != NULL) 80076ca: 687b ldr r3, [r7, #4] 80076cc: 6c1b ldr r3, [r3, #64] @ 0x40 80076ce: 2b00 cmp r3, #0 80076d0: d003 beq.n 80076da { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 80076d2: 687b ldr r3, [r7, #4] 80076d4: 6c1b ldr r3, [r3, #64] @ 0x40 80076d6: 6878 ldr r0, [r7, #4] 80076d8: 4798 blx r3 } } } } /* Transfer Complete Interrupt management ***********************************/ if ((tmpisr_dma & (DMA_FLAG_TCIF0_4 << (hdma->StreamIndex & 0x1FU))) != 0U) 80076da: 687b ldr r3, [r7, #4] 80076dc: 6ddb ldr r3, [r3, #92] @ 0x5c 80076de: f003 031f and.w r3, r3, #31 80076e2: 2220 movs r2, #32 80076e4: 409a lsls r2, r3 80076e6: 69bb ldr r3, [r7, #24] 80076e8: 4013 ands r3, r2 80076ea: 2b00 cmp r3, #0 80076ec: f000 8110 beq.w 8007910 { if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_TC) != 0U) 80076f0: 687b ldr r3, [r7, #4] 80076f2: 681b ldr r3, [r3, #0] 80076f4: 4a2c ldr r2, [pc, #176] @ (80077a8 ) 80076f6: 4293 cmp r3, r2 80076f8: d04a beq.n 8007790 80076fa: 687b ldr r3, [r7, #4] 80076fc: 681b ldr r3, [r3, #0] 80076fe: 4a2b ldr r2, [pc, #172] @ (80077ac ) 8007700: 4293 cmp r3, r2 8007702: d045 beq.n 8007790 8007704: 687b ldr r3, [r7, #4] 8007706: 681b ldr r3, [r3, #0] 8007708: 4a29 ldr r2, [pc, #164] @ (80077b0 ) 800770a: 4293 cmp r3, r2 800770c: d040 beq.n 8007790 800770e: 687b ldr r3, [r7, #4] 8007710: 681b ldr r3, [r3, #0] 8007712: 4a28 ldr r2, [pc, #160] @ (80077b4 ) 8007714: 4293 cmp r3, r2 8007716: d03b beq.n 8007790 8007718: 687b ldr r3, [r7, #4] 800771a: 681b ldr r3, [r3, #0] 800771c: 4a26 ldr r2, [pc, #152] @ (80077b8 ) 800771e: 4293 cmp r3, r2 8007720: d036 beq.n 8007790 8007722: 687b ldr r3, [r7, #4] 8007724: 681b ldr r3, [r3, #0] 8007726: 4a25 ldr r2, [pc, #148] @ (80077bc ) 8007728: 4293 cmp r3, r2 800772a: d031 beq.n 8007790 800772c: 687b ldr r3, [r7, #4] 800772e: 681b ldr r3, [r3, #0] 8007730: 4a23 ldr r2, [pc, #140] @ (80077c0 ) 8007732: 4293 cmp r3, r2 8007734: d02c beq.n 8007790 8007736: 687b ldr r3, [r7, #4] 8007738: 681b ldr r3, [r3, #0] 800773a: 4a22 ldr r2, [pc, #136] @ (80077c4 ) 800773c: 4293 cmp r3, r2 800773e: d027 beq.n 8007790 8007740: 687b ldr r3, [r7, #4] 8007742: 681b ldr r3, [r3, #0] 8007744: 4a20 ldr r2, [pc, #128] @ (80077c8 ) 8007746: 4293 cmp r3, r2 8007748: d022 beq.n 8007790 800774a: 687b ldr r3, [r7, #4] 800774c: 681b ldr r3, [r3, #0] 800774e: 4a1f ldr r2, [pc, #124] @ (80077cc ) 8007750: 4293 cmp r3, r2 8007752: d01d beq.n 8007790 8007754: 687b ldr r3, [r7, #4] 8007756: 681b ldr r3, [r3, #0] 8007758: 4a1d ldr r2, [pc, #116] @ (80077d0 ) 800775a: 4293 cmp r3, r2 800775c: d018 beq.n 8007790 800775e: 687b ldr r3, [r7, #4] 8007760: 681b ldr r3, [r3, #0] 8007762: 4a1c ldr r2, [pc, #112] @ (80077d4 ) 8007764: 4293 cmp r3, r2 8007766: d013 beq.n 8007790 8007768: 687b ldr r3, [r7, #4] 800776a: 681b ldr r3, [r3, #0] 800776c: 4a1a ldr r2, [pc, #104] @ (80077d8 ) 800776e: 4293 cmp r3, r2 8007770: d00e beq.n 8007790 8007772: 687b ldr r3, [r7, #4] 8007774: 681b ldr r3, [r3, #0] 8007776: 4a19 ldr r2, [pc, #100] @ (80077dc ) 8007778: 4293 cmp r3, r2 800777a: d009 beq.n 8007790 800777c: 687b ldr r3, [r7, #4] 800777e: 681b ldr r3, [r3, #0] 8007780: 4a17 ldr r2, [pc, #92] @ (80077e0 ) 8007782: 4293 cmp r3, r2 8007784: d004 beq.n 8007790 8007786: 687b ldr r3, [r7, #4] 8007788: 681b ldr r3, [r3, #0] 800778a: 4a16 ldr r2, [pc, #88] @ (80077e4 ) 800778c: 4293 cmp r3, r2 800778e: d12b bne.n 80077e8 8007790: 687b ldr r3, [r7, #4] 8007792: 681b ldr r3, [r3, #0] 8007794: 681b ldr r3, [r3, #0] 8007796: f003 0310 and.w r3, r3, #16 800779a: 2b00 cmp r3, #0 800779c: bf14 ite ne 800779e: 2301 movne r3, #1 80077a0: 2300 moveq r3, #0 80077a2: b2db uxtb r3, r3 80077a4: e02a b.n 80077fc 80077a6: bf00 nop 80077a8: 40020010 .word 0x40020010 80077ac: 40020028 .word 0x40020028 80077b0: 40020040 .word 0x40020040 80077b4: 40020058 .word 0x40020058 80077b8: 40020070 .word 0x40020070 80077bc: 40020088 .word 0x40020088 80077c0: 400200a0 .word 0x400200a0 80077c4: 400200b8 .word 0x400200b8 80077c8: 40020410 .word 0x40020410 80077cc: 40020428 .word 0x40020428 80077d0: 40020440 .word 0x40020440 80077d4: 40020458 .word 0x40020458 80077d8: 40020470 .word 0x40020470 80077dc: 40020488 .word 0x40020488 80077e0: 400204a0 .word 0x400204a0 80077e4: 400204b8 .word 0x400204b8 80077e8: 687b ldr r3, [r7, #4] 80077ea: 681b ldr r3, [r3, #0] 80077ec: 681b ldr r3, [r3, #0] 80077ee: f003 0302 and.w r3, r3, #2 80077f2: 2b00 cmp r3, #0 80077f4: bf14 ite ne 80077f6: 2301 movne r3, #1 80077f8: 2300 moveq r3, #0 80077fa: b2db uxtb r3, r3 80077fc: 2b00 cmp r3, #0 80077fe: f000 8087 beq.w 8007910 { /* Clear the transfer complete flag */ regs_dma->IFCR = DMA_FLAG_TCIF0_4 << (hdma->StreamIndex & 0x1FU); 8007802: 687b ldr r3, [r7, #4] 8007804: 6ddb ldr r3, [r3, #92] @ 0x5c 8007806: f003 031f and.w r3, r3, #31 800780a: 2220 movs r2, #32 800780c: 409a lsls r2, r3 800780e: 6a3b ldr r3, [r7, #32] 8007810: 609a str r2, [r3, #8] if(HAL_DMA_STATE_ABORT == hdma->State) 8007812: 687b ldr r3, [r7, #4] 8007814: f893 3035 ldrb.w r3, [r3, #53] @ 0x35 8007818: b2db uxtb r3, r3 800781a: 2b04 cmp r3, #4 800781c: d139 bne.n 8007892 { /* Disable all the transfer interrupts */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC | DMA_IT_TE | DMA_IT_DME); 800781e: 687b ldr r3, [r7, #4] 8007820: 681b ldr r3, [r3, #0] 8007822: 681a ldr r2, [r3, #0] 8007824: 687b ldr r3, [r7, #4] 8007826: 681b ldr r3, [r3, #0] 8007828: f022 0216 bic.w r2, r2, #22 800782c: 601a str r2, [r3, #0] ((DMA_Stream_TypeDef *)hdma->Instance)->FCR &= ~(DMA_IT_FE); 800782e: 687b ldr r3, [r7, #4] 8007830: 681b ldr r3, [r3, #0] 8007832: 695a ldr r2, [r3, #20] 8007834: 687b ldr r3, [r7, #4] 8007836: 681b ldr r3, [r3, #0] 8007838: f022 0280 bic.w r2, r2, #128 @ 0x80 800783c: 615a str r2, [r3, #20] if((hdma->XferHalfCpltCallback != NULL) || (hdma->XferM1HalfCpltCallback != NULL)) 800783e: 687b ldr r3, [r7, #4] 8007840: 6c1b ldr r3, [r3, #64] @ 0x40 8007842: 2b00 cmp r3, #0 8007844: d103 bne.n 800784e 8007846: 687b ldr r3, [r7, #4] 8007848: 6c9b ldr r3, [r3, #72] @ 0x48 800784a: 2b00 cmp r3, #0 800784c: d007 beq.n 800785e { ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_HT); 800784e: 687b ldr r3, [r7, #4] 8007850: 681b ldr r3, [r3, #0] 8007852: 681a ldr r2, [r3, #0] 8007854: 687b ldr r3, [r7, #4] 8007856: 681b ldr r3, [r3, #0] 8007858: f022 0208 bic.w r2, r2, #8 800785c: 601a str r2, [r3, #0] } /* Clear all interrupt flags at correct offset within the register */ regs_dma->IFCR = 0x3FUL << (hdma->StreamIndex & 0x1FU); 800785e: 687b ldr r3, [r7, #4] 8007860: 6ddb ldr r3, [r3, #92] @ 0x5c 8007862: f003 031f and.w r3, r3, #31 8007866: 223f movs r2, #63 @ 0x3f 8007868: 409a lsls r2, r3 800786a: 6a3b ldr r3, [r7, #32] 800786c: 609a str r2, [r3, #8] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 800786e: 687b ldr r3, [r7, #4] 8007870: 2201 movs r2, #1 8007872: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007876: 687b ldr r3, [r7, #4] 8007878: 2200 movs r2, #0 800787a: f883 2034 strb.w r2, [r3, #52] @ 0x34 if(hdma->XferAbortCallback != NULL) 800787e: 687b ldr r3, [r7, #4] 8007880: 6d1b ldr r3, [r3, #80] @ 0x50 8007882: 2b00 cmp r3, #0 8007884: f000 834a beq.w 8007f1c { hdma->XferAbortCallback(hdma); 8007888: 687b ldr r3, [r7, #4] 800788a: 6d1b ldr r3, [r3, #80] @ 0x50 800788c: 6878 ldr r0, [r7, #4] 800788e: 4798 blx r3 } return; 8007890: e344 b.n 8007f1c } if(((((DMA_Stream_TypeDef *)hdma->Instance)->CR) & (uint32_t)(DMA_SxCR_DBM)) != 0U) 8007892: 687b ldr r3, [r7, #4] 8007894: 681b ldr r3, [r3, #0] 8007896: 681b ldr r3, [r3, #0] 8007898: f403 2380 and.w r3, r3, #262144 @ 0x40000 800789c: 2b00 cmp r3, #0 800789e: d018 beq.n 80078d2 { /* Current memory buffer used is Memory 0 */ if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CT) == 0U) 80078a0: 687b ldr r3, [r7, #4] 80078a2: 681b ldr r3, [r3, #0] 80078a4: 681b ldr r3, [r3, #0] 80078a6: f403 2300 and.w r3, r3, #524288 @ 0x80000 80078aa: 2b00 cmp r3, #0 80078ac: d108 bne.n 80078c0 { if(hdma->XferM1CpltCallback != NULL) 80078ae: 687b ldr r3, [r7, #4] 80078b0: 6c5b ldr r3, [r3, #68] @ 0x44 80078b2: 2b00 cmp r3, #0 80078b4: d02c beq.n 8007910 { /* Transfer complete Callback for memory1 */ hdma->XferM1CpltCallback(hdma); 80078b6: 687b ldr r3, [r7, #4] 80078b8: 6c5b ldr r3, [r3, #68] @ 0x44 80078ba: 6878 ldr r0, [r7, #4] 80078bc: 4798 blx r3 80078be: e027 b.n 8007910 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferCpltCallback != NULL) 80078c0: 687b ldr r3, [r7, #4] 80078c2: 6bdb ldr r3, [r3, #60] @ 0x3c 80078c4: 2b00 cmp r3, #0 80078c6: d023 beq.n 8007910 { /* Transfer complete Callback for memory0 */ hdma->XferCpltCallback(hdma); 80078c8: 687b ldr r3, [r7, #4] 80078ca: 6bdb ldr r3, [r3, #60] @ 0x3c 80078cc: 6878 ldr r0, [r7, #4] 80078ce: 4798 blx r3 80078d0: e01e b.n 8007910 } } /* Disable the transfer complete interrupt if the DMA mode is not CIRCULAR */ else { if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_CIRC) == 0U) 80078d2: 687b ldr r3, [r7, #4] 80078d4: 681b ldr r3, [r3, #0] 80078d6: 681b ldr r3, [r3, #0] 80078d8: f403 7380 and.w r3, r3, #256 @ 0x100 80078dc: 2b00 cmp r3, #0 80078de: d10f bne.n 8007900 { /* Disable the transfer complete interrupt */ ((DMA_Stream_TypeDef *)hdma->Instance)->CR &= ~(DMA_IT_TC); 80078e0: 687b ldr r3, [r7, #4] 80078e2: 681b ldr r3, [r3, #0] 80078e4: 681a ldr r2, [r3, #0] 80078e6: 687b ldr r3, [r7, #4] 80078e8: 681b ldr r3, [r3, #0] 80078ea: f022 0210 bic.w r2, r2, #16 80078ee: 601a str r2, [r3, #0] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 80078f0: 687b ldr r3, [r7, #4] 80078f2: 2201 movs r2, #1 80078f4: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 80078f8: 687b ldr r3, [r7, #4] 80078fa: 2200 movs r2, #0 80078fc: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferCpltCallback != NULL) 8007900: 687b ldr r3, [r7, #4] 8007902: 6bdb ldr r3, [r3, #60] @ 0x3c 8007904: 2b00 cmp r3, #0 8007906: d003 beq.n 8007910 { /* Transfer complete callback */ hdma->XferCpltCallback(hdma); 8007908: 687b ldr r3, [r7, #4] 800790a: 6bdb ldr r3, [r3, #60] @ 0x3c 800790c: 6878 ldr r0, [r7, #4] 800790e: 4798 blx r3 } } } /* manage error case */ if(hdma->ErrorCode != HAL_DMA_ERROR_NONE) 8007910: 687b ldr r3, [r7, #4] 8007912: 6d5b ldr r3, [r3, #84] @ 0x54 8007914: 2b00 cmp r3, #0 8007916: f000 8306 beq.w 8007f26 { if((hdma->ErrorCode & HAL_DMA_ERROR_TE) != 0U) 800791a: 687b ldr r3, [r7, #4] 800791c: 6d5b ldr r3, [r3, #84] @ 0x54 800791e: f003 0301 and.w r3, r3, #1 8007922: 2b00 cmp r3, #0 8007924: f000 8088 beq.w 8007a38 { hdma->State = HAL_DMA_STATE_ABORT; 8007928: 687b ldr r3, [r7, #4] 800792a: 2204 movs r2, #4 800792c: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Disable the stream */ __HAL_DMA_DISABLE(hdma); 8007930: 687b ldr r3, [r7, #4] 8007932: 681b ldr r3, [r3, #0] 8007934: 4a7a ldr r2, [pc, #488] @ (8007b20 ) 8007936: 4293 cmp r3, r2 8007938: d04a beq.n 80079d0 800793a: 687b ldr r3, [r7, #4] 800793c: 681b ldr r3, [r3, #0] 800793e: 4a79 ldr r2, [pc, #484] @ (8007b24 ) 8007940: 4293 cmp r3, r2 8007942: d045 beq.n 80079d0 8007944: 687b ldr r3, [r7, #4] 8007946: 681b ldr r3, [r3, #0] 8007948: 4a77 ldr r2, [pc, #476] @ (8007b28 ) 800794a: 4293 cmp r3, r2 800794c: d040 beq.n 80079d0 800794e: 687b ldr r3, [r7, #4] 8007950: 681b ldr r3, [r3, #0] 8007952: 4a76 ldr r2, [pc, #472] @ (8007b2c ) 8007954: 4293 cmp r3, r2 8007956: d03b beq.n 80079d0 8007958: 687b ldr r3, [r7, #4] 800795a: 681b ldr r3, [r3, #0] 800795c: 4a74 ldr r2, [pc, #464] @ (8007b30 ) 800795e: 4293 cmp r3, r2 8007960: d036 beq.n 80079d0 8007962: 687b ldr r3, [r7, #4] 8007964: 681b ldr r3, [r3, #0] 8007966: 4a73 ldr r2, [pc, #460] @ (8007b34 ) 8007968: 4293 cmp r3, r2 800796a: d031 beq.n 80079d0 800796c: 687b ldr r3, [r7, #4] 800796e: 681b ldr r3, [r3, #0] 8007970: 4a71 ldr r2, [pc, #452] @ (8007b38 ) 8007972: 4293 cmp r3, r2 8007974: d02c beq.n 80079d0 8007976: 687b ldr r3, [r7, #4] 8007978: 681b ldr r3, [r3, #0] 800797a: 4a70 ldr r2, [pc, #448] @ (8007b3c ) 800797c: 4293 cmp r3, r2 800797e: d027 beq.n 80079d0 8007980: 687b ldr r3, [r7, #4] 8007982: 681b ldr r3, [r3, #0] 8007984: 4a6e ldr r2, [pc, #440] @ (8007b40 ) 8007986: 4293 cmp r3, r2 8007988: d022 beq.n 80079d0 800798a: 687b ldr r3, [r7, #4] 800798c: 681b ldr r3, [r3, #0] 800798e: 4a6d ldr r2, [pc, #436] @ (8007b44 ) 8007990: 4293 cmp r3, r2 8007992: d01d beq.n 80079d0 8007994: 687b ldr r3, [r7, #4] 8007996: 681b ldr r3, [r3, #0] 8007998: 4a6b ldr r2, [pc, #428] @ (8007b48 ) 800799a: 4293 cmp r3, r2 800799c: d018 beq.n 80079d0 800799e: 687b ldr r3, [r7, #4] 80079a0: 681b ldr r3, [r3, #0] 80079a2: 4a6a ldr r2, [pc, #424] @ (8007b4c ) 80079a4: 4293 cmp r3, r2 80079a6: d013 beq.n 80079d0 80079a8: 687b ldr r3, [r7, #4] 80079aa: 681b ldr r3, [r3, #0] 80079ac: 4a68 ldr r2, [pc, #416] @ (8007b50 ) 80079ae: 4293 cmp r3, r2 80079b0: d00e beq.n 80079d0 80079b2: 687b ldr r3, [r7, #4] 80079b4: 681b ldr r3, [r3, #0] 80079b6: 4a67 ldr r2, [pc, #412] @ (8007b54 ) 80079b8: 4293 cmp r3, r2 80079ba: d009 beq.n 80079d0 80079bc: 687b ldr r3, [r7, #4] 80079be: 681b ldr r3, [r3, #0] 80079c0: 4a65 ldr r2, [pc, #404] @ (8007b58 ) 80079c2: 4293 cmp r3, r2 80079c4: d004 beq.n 80079d0 80079c6: 687b ldr r3, [r7, #4] 80079c8: 681b ldr r3, [r3, #0] 80079ca: 4a64 ldr r2, [pc, #400] @ (8007b5c ) 80079cc: 4293 cmp r3, r2 80079ce: d108 bne.n 80079e2 80079d0: 687b ldr r3, [r7, #4] 80079d2: 681b ldr r3, [r3, #0] 80079d4: 681a ldr r2, [r3, #0] 80079d6: 687b ldr r3, [r7, #4] 80079d8: 681b ldr r3, [r3, #0] 80079da: f022 0201 bic.w r2, r2, #1 80079de: 601a str r2, [r3, #0] 80079e0: e007 b.n 80079f2 80079e2: 687b ldr r3, [r7, #4] 80079e4: 681b ldr r3, [r3, #0] 80079e6: 681a ldr r2, [r3, #0] 80079e8: 687b ldr r3, [r7, #4] 80079ea: 681b ldr r3, [r3, #0] 80079ec: f022 0201 bic.w r2, r2, #1 80079f0: 601a str r2, [r3, #0] do { if (++count > timeout) 80079f2: 68fb ldr r3, [r7, #12] 80079f4: 3301 adds r3, #1 80079f6: 60fb str r3, [r7, #12] 80079f8: 6a7a ldr r2, [r7, #36] @ 0x24 80079fa: 429a cmp r2, r3 80079fc: d307 bcc.n 8007a0e { break; } } while((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U); 80079fe: 687b ldr r3, [r7, #4] 8007a00: 681b ldr r3, [r3, #0] 8007a02: 681b ldr r3, [r3, #0] 8007a04: f003 0301 and.w r3, r3, #1 8007a08: 2b00 cmp r3, #0 8007a0a: d1f2 bne.n 80079f2 8007a0c: e000 b.n 8007a10 break; 8007a0e: bf00 nop if((((DMA_Stream_TypeDef *)hdma->Instance)->CR & DMA_SxCR_EN) != 0U) 8007a10: 687b ldr r3, [r7, #4] 8007a12: 681b ldr r3, [r3, #0] 8007a14: 681b ldr r3, [r3, #0] 8007a16: f003 0301 and.w r3, r3, #1 8007a1a: 2b00 cmp r3, #0 8007a1c: d004 beq.n 8007a28 { /* Change the DMA state to error if DMA disable fails */ hdma->State = HAL_DMA_STATE_ERROR; 8007a1e: 687b ldr r3, [r7, #4] 8007a20: 2203 movs r2, #3 8007a22: f883 2035 strb.w r2, [r3, #53] @ 0x35 8007a26: e003 b.n 8007a30 } else { /* Change the DMA state to Ready if DMA disable success */ hdma->State = HAL_DMA_STATE_READY; 8007a28: 687b ldr r3, [r7, #4] 8007a2a: 2201 movs r2, #1 8007a2c: f883 2035 strb.w r2, [r3, #53] @ 0x35 } /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007a30: 687b ldr r3, [r7, #4] 8007a32: 2200 movs r2, #0 8007a34: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferErrorCallback != NULL) 8007a38: 687b ldr r3, [r7, #4] 8007a3a: 6cdb ldr r3, [r3, #76] @ 0x4c 8007a3c: 2b00 cmp r3, #0 8007a3e: f000 8272 beq.w 8007f26 { /* Transfer error callback */ hdma->XferErrorCallback(hdma); 8007a42: 687b ldr r3, [r7, #4] 8007a44: 6cdb ldr r3, [r3, #76] @ 0x4c 8007a46: 6878 ldr r0, [r7, #4] 8007a48: 4798 blx r3 8007a4a: e26c b.n 8007f26 } } } else if(IS_BDMA_CHANNEL_INSTANCE(hdma->Instance) != 0U) /* BDMA instance(s) */ 8007a4c: 687b ldr r3, [r7, #4] 8007a4e: 681b ldr r3, [r3, #0] 8007a50: 4a43 ldr r2, [pc, #268] @ (8007b60 ) 8007a52: 4293 cmp r3, r2 8007a54: d022 beq.n 8007a9c 8007a56: 687b ldr r3, [r7, #4] 8007a58: 681b ldr r3, [r3, #0] 8007a5a: 4a42 ldr r2, [pc, #264] @ (8007b64 ) 8007a5c: 4293 cmp r3, r2 8007a5e: d01d beq.n 8007a9c 8007a60: 687b ldr r3, [r7, #4] 8007a62: 681b ldr r3, [r3, #0] 8007a64: 4a40 ldr r2, [pc, #256] @ (8007b68 ) 8007a66: 4293 cmp r3, r2 8007a68: d018 beq.n 8007a9c 8007a6a: 687b ldr r3, [r7, #4] 8007a6c: 681b ldr r3, [r3, #0] 8007a6e: 4a3f ldr r2, [pc, #252] @ (8007b6c ) 8007a70: 4293 cmp r3, r2 8007a72: d013 beq.n 8007a9c 8007a74: 687b ldr r3, [r7, #4] 8007a76: 681b ldr r3, [r3, #0] 8007a78: 4a3d ldr r2, [pc, #244] @ (8007b70 ) 8007a7a: 4293 cmp r3, r2 8007a7c: d00e beq.n 8007a9c 8007a7e: 687b ldr r3, [r7, #4] 8007a80: 681b ldr r3, [r3, #0] 8007a82: 4a3c ldr r2, [pc, #240] @ (8007b74 ) 8007a84: 4293 cmp r3, r2 8007a86: d009 beq.n 8007a9c 8007a88: 687b ldr r3, [r7, #4] 8007a8a: 681b ldr r3, [r3, #0] 8007a8c: 4a3a ldr r2, [pc, #232] @ (8007b78 ) 8007a8e: 4293 cmp r3, r2 8007a90: d004 beq.n 8007a9c 8007a92: 687b ldr r3, [r7, #4] 8007a94: 681b ldr r3, [r3, #0] 8007a96: 4a39 ldr r2, [pc, #228] @ (8007b7c ) 8007a98: 4293 cmp r3, r2 8007a9a: d101 bne.n 8007aa0 8007a9c: 2301 movs r3, #1 8007a9e: e000 b.n 8007aa2 8007aa0: 2300 movs r3, #0 8007aa2: 2b00 cmp r3, #0 8007aa4: f000 823f beq.w 8007f26 { ccr_reg = (((BDMA_Channel_TypeDef *)hdma->Instance)->CCR); 8007aa8: 687b ldr r3, [r7, #4] 8007aaa: 681b ldr r3, [r3, #0] 8007aac: 681b ldr r3, [r3, #0] 8007aae: 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)) 8007ab0: 687b ldr r3, [r7, #4] 8007ab2: 6ddb ldr r3, [r3, #92] @ 0x5c 8007ab4: f003 031f and.w r3, r3, #31 8007ab8: 2204 movs r2, #4 8007aba: 409a lsls r2, r3 8007abc: 697b ldr r3, [r7, #20] 8007abe: 4013 ands r3, r2 8007ac0: 2b00 cmp r3, #0 8007ac2: f000 80cd beq.w 8007c60 8007ac6: 693b ldr r3, [r7, #16] 8007ac8: f003 0304 and.w r3, r3, #4 8007acc: 2b00 cmp r3, #0 8007ace: f000 80c7 beq.w 8007c60 { /* Clear the half transfer complete flag */ regs_bdma->IFCR = (BDMA_ISR_HTIF0 << (hdma->StreamIndex & 0x1FU)); 8007ad2: 687b ldr r3, [r7, #4] 8007ad4: 6ddb ldr r3, [r3, #92] @ 0x5c 8007ad6: f003 031f and.w r3, r3, #31 8007ada: 2204 movs r2, #4 8007adc: 409a lsls r2, r3 8007ade: 69fb ldr r3, [r7, #28] 8007ae0: 605a str r2, [r3, #4] /* Disable the transfer complete interrupt if the DMA mode is Double Buffering */ if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007ae2: 693b ldr r3, [r7, #16] 8007ae4: f403 4300 and.w r3, r3, #32768 @ 0x8000 8007ae8: 2b00 cmp r3, #0 8007aea: d049 beq.n 8007b80 { /* Current memory buffer used is Memory 0 */ if((ccr_reg & BDMA_CCR_CT) == 0U) 8007aec: 693b ldr r3, [r7, #16] 8007aee: f403 3380 and.w r3, r3, #65536 @ 0x10000 8007af2: 2b00 cmp r3, #0 8007af4: d109 bne.n 8007b0a { if(hdma->XferM1HalfCpltCallback != NULL) 8007af6: 687b ldr r3, [r7, #4] 8007af8: 6c9b ldr r3, [r3, #72] @ 0x48 8007afa: 2b00 cmp r3, #0 8007afc: f000 8210 beq.w 8007f20 { /* Half transfer Callback for Memory 1 */ hdma->XferM1HalfCpltCallback(hdma); 8007b00: 687b ldr r3, [r7, #4] 8007b02: 6c9b ldr r3, [r3, #72] @ 0x48 8007b04: 6878 ldr r0, [r7, #4] 8007b06: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007b08: e20a b.n 8007f20 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferHalfCpltCallback != NULL) 8007b0a: 687b ldr r3, [r7, #4] 8007b0c: 6c1b ldr r3, [r3, #64] @ 0x40 8007b0e: 2b00 cmp r3, #0 8007b10: f000 8206 beq.w 8007f20 { /* Half transfer Callback for Memory 0 */ hdma->XferHalfCpltCallback(hdma); 8007b14: 687b ldr r3, [r7, #4] 8007b16: 6c1b ldr r3, [r3, #64] @ 0x40 8007b18: 6878 ldr r0, [r7, #4] 8007b1a: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007b1c: e200 b.n 8007f20 8007b1e: bf00 nop 8007b20: 40020010 .word 0x40020010 8007b24: 40020028 .word 0x40020028 8007b28: 40020040 .word 0x40020040 8007b2c: 40020058 .word 0x40020058 8007b30: 40020070 .word 0x40020070 8007b34: 40020088 .word 0x40020088 8007b38: 400200a0 .word 0x400200a0 8007b3c: 400200b8 .word 0x400200b8 8007b40: 40020410 .word 0x40020410 8007b44: 40020428 .word 0x40020428 8007b48: 40020440 .word 0x40020440 8007b4c: 40020458 .word 0x40020458 8007b50: 40020470 .word 0x40020470 8007b54: 40020488 .word 0x40020488 8007b58: 400204a0 .word 0x400204a0 8007b5c: 400204b8 .word 0x400204b8 8007b60: 58025408 .word 0x58025408 8007b64: 5802541c .word 0x5802541c 8007b68: 58025430 .word 0x58025430 8007b6c: 58025444 .word 0x58025444 8007b70: 58025458 .word 0x58025458 8007b74: 5802546c .word 0x5802546c 8007b78: 58025480 .word 0x58025480 8007b7c: 58025494 .word 0x58025494 } } } else { if((ccr_reg & BDMA_CCR_CIRC) == 0U) 8007b80: 693b ldr r3, [r7, #16] 8007b82: f003 0320 and.w r3, r3, #32 8007b86: 2b00 cmp r3, #0 8007b88: d160 bne.n 8007c4c { /* Disable the half transfer interrupt */ __HAL_DMA_DISABLE_IT(hdma, DMA_IT_HT); 8007b8a: 687b ldr r3, [r7, #4] 8007b8c: 681b ldr r3, [r3, #0] 8007b8e: 4a7f ldr r2, [pc, #508] @ (8007d8c ) 8007b90: 4293 cmp r3, r2 8007b92: d04a beq.n 8007c2a 8007b94: 687b ldr r3, [r7, #4] 8007b96: 681b ldr r3, [r3, #0] 8007b98: 4a7d ldr r2, [pc, #500] @ (8007d90 ) 8007b9a: 4293 cmp r3, r2 8007b9c: d045 beq.n 8007c2a 8007b9e: 687b ldr r3, [r7, #4] 8007ba0: 681b ldr r3, [r3, #0] 8007ba2: 4a7c ldr r2, [pc, #496] @ (8007d94 ) 8007ba4: 4293 cmp r3, r2 8007ba6: d040 beq.n 8007c2a 8007ba8: 687b ldr r3, [r7, #4] 8007baa: 681b ldr r3, [r3, #0] 8007bac: 4a7a ldr r2, [pc, #488] @ (8007d98 ) 8007bae: 4293 cmp r3, r2 8007bb0: d03b beq.n 8007c2a 8007bb2: 687b ldr r3, [r7, #4] 8007bb4: 681b ldr r3, [r3, #0] 8007bb6: 4a79 ldr r2, [pc, #484] @ (8007d9c ) 8007bb8: 4293 cmp r3, r2 8007bba: d036 beq.n 8007c2a 8007bbc: 687b ldr r3, [r7, #4] 8007bbe: 681b ldr r3, [r3, #0] 8007bc0: 4a77 ldr r2, [pc, #476] @ (8007da0 ) 8007bc2: 4293 cmp r3, r2 8007bc4: d031 beq.n 8007c2a 8007bc6: 687b ldr r3, [r7, #4] 8007bc8: 681b ldr r3, [r3, #0] 8007bca: 4a76 ldr r2, [pc, #472] @ (8007da4 ) 8007bcc: 4293 cmp r3, r2 8007bce: d02c beq.n 8007c2a 8007bd0: 687b ldr r3, [r7, #4] 8007bd2: 681b ldr r3, [r3, #0] 8007bd4: 4a74 ldr r2, [pc, #464] @ (8007da8 ) 8007bd6: 4293 cmp r3, r2 8007bd8: d027 beq.n 8007c2a 8007bda: 687b ldr r3, [r7, #4] 8007bdc: 681b ldr r3, [r3, #0] 8007bde: 4a73 ldr r2, [pc, #460] @ (8007dac ) 8007be0: 4293 cmp r3, r2 8007be2: d022 beq.n 8007c2a 8007be4: 687b ldr r3, [r7, #4] 8007be6: 681b ldr r3, [r3, #0] 8007be8: 4a71 ldr r2, [pc, #452] @ (8007db0 ) 8007bea: 4293 cmp r3, r2 8007bec: d01d beq.n 8007c2a 8007bee: 687b ldr r3, [r7, #4] 8007bf0: 681b ldr r3, [r3, #0] 8007bf2: 4a70 ldr r2, [pc, #448] @ (8007db4 ) 8007bf4: 4293 cmp r3, r2 8007bf6: d018 beq.n 8007c2a 8007bf8: 687b ldr r3, [r7, #4] 8007bfa: 681b ldr r3, [r3, #0] 8007bfc: 4a6e ldr r2, [pc, #440] @ (8007db8 ) 8007bfe: 4293 cmp r3, r2 8007c00: d013 beq.n 8007c2a 8007c02: 687b ldr r3, [r7, #4] 8007c04: 681b ldr r3, [r3, #0] 8007c06: 4a6d ldr r2, [pc, #436] @ (8007dbc ) 8007c08: 4293 cmp r3, r2 8007c0a: d00e beq.n 8007c2a 8007c0c: 687b ldr r3, [r7, #4] 8007c0e: 681b ldr r3, [r3, #0] 8007c10: 4a6b ldr r2, [pc, #428] @ (8007dc0 ) 8007c12: 4293 cmp r3, r2 8007c14: d009 beq.n 8007c2a 8007c16: 687b ldr r3, [r7, #4] 8007c18: 681b ldr r3, [r3, #0] 8007c1a: 4a6a ldr r2, [pc, #424] @ (8007dc4 ) 8007c1c: 4293 cmp r3, r2 8007c1e: d004 beq.n 8007c2a 8007c20: 687b ldr r3, [r7, #4] 8007c22: 681b ldr r3, [r3, #0] 8007c24: 4a68 ldr r2, [pc, #416] @ (8007dc8 ) 8007c26: 4293 cmp r3, r2 8007c28: d108 bne.n 8007c3c 8007c2a: 687b ldr r3, [r7, #4] 8007c2c: 681b ldr r3, [r3, #0] 8007c2e: 681a ldr r2, [r3, #0] 8007c30: 687b ldr r3, [r7, #4] 8007c32: 681b ldr r3, [r3, #0] 8007c34: f022 0208 bic.w r2, r2, #8 8007c38: 601a str r2, [r3, #0] 8007c3a: e007 b.n 8007c4c 8007c3c: 687b ldr r3, [r7, #4] 8007c3e: 681b ldr r3, [r3, #0] 8007c40: 681a ldr r2, [r3, #0] 8007c42: 687b ldr r3, [r7, #4] 8007c44: 681b ldr r3, [r3, #0] 8007c46: f022 0204 bic.w r2, r2, #4 8007c4a: 601a str r2, [r3, #0] } /* DMA peripheral state is not updated in Half Transfer */ /* but in Transfer Complete case */ if(hdma->XferHalfCpltCallback != NULL) 8007c4c: 687b ldr r3, [r7, #4] 8007c4e: 6c1b ldr r3, [r3, #64] @ 0x40 8007c50: 2b00 cmp r3, #0 8007c52: f000 8165 beq.w 8007f20 { /* Half transfer callback */ hdma->XferHalfCpltCallback(hdma); 8007c56: 687b ldr r3, [r7, #4] 8007c58: 6c1b ldr r3, [r3, #64] @ 0x40 8007c5a: 6878 ldr r0, [r7, #4] 8007c5c: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007c5e: e15f b.n 8007f20 } } } /* Transfer Complete Interrupt management ***********************************/ else if (((tmpisr_bdma & (BDMA_FLAG_TC0 << (hdma->StreamIndex & 0x1FU))) != 0U) && ((ccr_reg & BDMA_CCR_TCIE) != 0U)) 8007c60: 687b ldr r3, [r7, #4] 8007c62: 6ddb ldr r3, [r3, #92] @ 0x5c 8007c64: f003 031f and.w r3, r3, #31 8007c68: 2202 movs r2, #2 8007c6a: 409a lsls r2, r3 8007c6c: 697b ldr r3, [r7, #20] 8007c6e: 4013 ands r3, r2 8007c70: 2b00 cmp r3, #0 8007c72: f000 80c5 beq.w 8007e00 8007c76: 693b ldr r3, [r7, #16] 8007c78: f003 0302 and.w r3, r3, #2 8007c7c: 2b00 cmp r3, #0 8007c7e: f000 80bf beq.w 8007e00 { /* Clear the transfer complete flag */ regs_bdma->IFCR = (BDMA_ISR_TCIF0) << (hdma->StreamIndex & 0x1FU); 8007c82: 687b ldr r3, [r7, #4] 8007c84: 6ddb ldr r3, [r3, #92] @ 0x5c 8007c86: f003 031f and.w r3, r3, #31 8007c8a: 2202 movs r2, #2 8007c8c: 409a lsls r2, r3 8007c8e: 69fb ldr r3, [r7, #28] 8007c90: 605a str r2, [r3, #4] /* Disable the transfer complete interrupt if the DMA mode is Double Buffering */ if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007c92: 693b ldr r3, [r7, #16] 8007c94: f403 4300 and.w r3, r3, #32768 @ 0x8000 8007c98: 2b00 cmp r3, #0 8007c9a: d018 beq.n 8007cce { /* Current memory buffer used is Memory 0 */ if((ccr_reg & BDMA_CCR_CT) == 0U) 8007c9c: 693b ldr r3, [r7, #16] 8007c9e: f403 3380 and.w r3, r3, #65536 @ 0x10000 8007ca2: 2b00 cmp r3, #0 8007ca4: d109 bne.n 8007cba { if(hdma->XferM1CpltCallback != NULL) 8007ca6: 687b ldr r3, [r7, #4] 8007ca8: 6c5b ldr r3, [r3, #68] @ 0x44 8007caa: 2b00 cmp r3, #0 8007cac: f000 813a beq.w 8007f24 { /* Transfer complete Callback for Memory 1 */ hdma->XferM1CpltCallback(hdma); 8007cb0: 687b ldr r3, [r7, #4] 8007cb2: 6c5b ldr r3, [r3, #68] @ 0x44 8007cb4: 6878 ldr r0, [r7, #4] 8007cb6: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007cb8: e134 b.n 8007f24 } } /* Current memory buffer used is Memory 1 */ else { if(hdma->XferCpltCallback != NULL) 8007cba: 687b ldr r3, [r7, #4] 8007cbc: 6bdb ldr r3, [r3, #60] @ 0x3c 8007cbe: 2b00 cmp r3, #0 8007cc0: f000 8130 beq.w 8007f24 { /* Transfer complete Callback for Memory 0 */ hdma->XferCpltCallback(hdma); 8007cc4: 687b ldr r3, [r7, #4] 8007cc6: 6bdb ldr r3, [r3, #60] @ 0x3c 8007cc8: 6878 ldr r0, [r7, #4] 8007cca: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007ccc: e12a b.n 8007f24 } } } else { if((ccr_reg & BDMA_CCR_CIRC) == 0U) 8007cce: 693b ldr r3, [r7, #16] 8007cd0: f003 0320 and.w r3, r3, #32 8007cd4: 2b00 cmp r3, #0 8007cd6: f040 8089 bne.w 8007dec { /* 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); 8007cda: 687b ldr r3, [r7, #4] 8007cdc: 681b ldr r3, [r3, #0] 8007cde: 4a2b ldr r2, [pc, #172] @ (8007d8c ) 8007ce0: 4293 cmp r3, r2 8007ce2: d04a beq.n 8007d7a 8007ce4: 687b ldr r3, [r7, #4] 8007ce6: 681b ldr r3, [r3, #0] 8007ce8: 4a29 ldr r2, [pc, #164] @ (8007d90 ) 8007cea: 4293 cmp r3, r2 8007cec: d045 beq.n 8007d7a 8007cee: 687b ldr r3, [r7, #4] 8007cf0: 681b ldr r3, [r3, #0] 8007cf2: 4a28 ldr r2, [pc, #160] @ (8007d94 ) 8007cf4: 4293 cmp r3, r2 8007cf6: d040 beq.n 8007d7a 8007cf8: 687b ldr r3, [r7, #4] 8007cfa: 681b ldr r3, [r3, #0] 8007cfc: 4a26 ldr r2, [pc, #152] @ (8007d98 ) 8007cfe: 4293 cmp r3, r2 8007d00: d03b beq.n 8007d7a 8007d02: 687b ldr r3, [r7, #4] 8007d04: 681b ldr r3, [r3, #0] 8007d06: 4a25 ldr r2, [pc, #148] @ (8007d9c ) 8007d08: 4293 cmp r3, r2 8007d0a: d036 beq.n 8007d7a 8007d0c: 687b ldr r3, [r7, #4] 8007d0e: 681b ldr r3, [r3, #0] 8007d10: 4a23 ldr r2, [pc, #140] @ (8007da0 ) 8007d12: 4293 cmp r3, r2 8007d14: d031 beq.n 8007d7a 8007d16: 687b ldr r3, [r7, #4] 8007d18: 681b ldr r3, [r3, #0] 8007d1a: 4a22 ldr r2, [pc, #136] @ (8007da4 ) 8007d1c: 4293 cmp r3, r2 8007d1e: d02c beq.n 8007d7a 8007d20: 687b ldr r3, [r7, #4] 8007d22: 681b ldr r3, [r3, #0] 8007d24: 4a20 ldr r2, [pc, #128] @ (8007da8 ) 8007d26: 4293 cmp r3, r2 8007d28: d027 beq.n 8007d7a 8007d2a: 687b ldr r3, [r7, #4] 8007d2c: 681b ldr r3, [r3, #0] 8007d2e: 4a1f ldr r2, [pc, #124] @ (8007dac ) 8007d30: 4293 cmp r3, r2 8007d32: d022 beq.n 8007d7a 8007d34: 687b ldr r3, [r7, #4] 8007d36: 681b ldr r3, [r3, #0] 8007d38: 4a1d ldr r2, [pc, #116] @ (8007db0 ) 8007d3a: 4293 cmp r3, r2 8007d3c: d01d beq.n 8007d7a 8007d3e: 687b ldr r3, [r7, #4] 8007d40: 681b ldr r3, [r3, #0] 8007d42: 4a1c ldr r2, [pc, #112] @ (8007db4 ) 8007d44: 4293 cmp r3, r2 8007d46: d018 beq.n 8007d7a 8007d48: 687b ldr r3, [r7, #4] 8007d4a: 681b ldr r3, [r3, #0] 8007d4c: 4a1a ldr r2, [pc, #104] @ (8007db8 ) 8007d4e: 4293 cmp r3, r2 8007d50: d013 beq.n 8007d7a 8007d52: 687b ldr r3, [r7, #4] 8007d54: 681b ldr r3, [r3, #0] 8007d56: 4a19 ldr r2, [pc, #100] @ (8007dbc ) 8007d58: 4293 cmp r3, r2 8007d5a: d00e beq.n 8007d7a 8007d5c: 687b ldr r3, [r7, #4] 8007d5e: 681b ldr r3, [r3, #0] 8007d60: 4a17 ldr r2, [pc, #92] @ (8007dc0 ) 8007d62: 4293 cmp r3, r2 8007d64: d009 beq.n 8007d7a 8007d66: 687b ldr r3, [r7, #4] 8007d68: 681b ldr r3, [r3, #0] 8007d6a: 4a16 ldr r2, [pc, #88] @ (8007dc4 ) 8007d6c: 4293 cmp r3, r2 8007d6e: d004 beq.n 8007d7a 8007d70: 687b ldr r3, [r7, #4] 8007d72: 681b ldr r3, [r3, #0] 8007d74: 4a14 ldr r2, [pc, #80] @ (8007dc8 ) 8007d76: 4293 cmp r3, r2 8007d78: d128 bne.n 8007dcc 8007d7a: 687b ldr r3, [r7, #4] 8007d7c: 681b ldr r3, [r3, #0] 8007d7e: 681a ldr r2, [r3, #0] 8007d80: 687b ldr r3, [r7, #4] 8007d82: 681b ldr r3, [r3, #0] 8007d84: f022 0214 bic.w r2, r2, #20 8007d88: 601a str r2, [r3, #0] 8007d8a: e027 b.n 8007ddc 8007d8c: 40020010 .word 0x40020010 8007d90: 40020028 .word 0x40020028 8007d94: 40020040 .word 0x40020040 8007d98: 40020058 .word 0x40020058 8007d9c: 40020070 .word 0x40020070 8007da0: 40020088 .word 0x40020088 8007da4: 400200a0 .word 0x400200a0 8007da8: 400200b8 .word 0x400200b8 8007dac: 40020410 .word 0x40020410 8007db0: 40020428 .word 0x40020428 8007db4: 40020440 .word 0x40020440 8007db8: 40020458 .word 0x40020458 8007dbc: 40020470 .word 0x40020470 8007dc0: 40020488 .word 0x40020488 8007dc4: 400204a0 .word 0x400204a0 8007dc8: 400204b8 .word 0x400204b8 8007dcc: 687b ldr r3, [r7, #4] 8007dce: 681b ldr r3, [r3, #0] 8007dd0: 681a ldr r2, [r3, #0] 8007dd2: 687b ldr r3, [r7, #4] 8007dd4: 681b ldr r3, [r3, #0] 8007dd6: f022 020a bic.w r2, r2, #10 8007dda: 601a str r2, [r3, #0] /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8007ddc: 687b ldr r3, [r7, #4] 8007dde: 2201 movs r2, #1 8007de0: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007de4: 687b ldr r3, [r7, #4] 8007de6: 2200 movs r2, #0 8007de8: f883 2034 strb.w r2, [r3, #52] @ 0x34 } if(hdma->XferCpltCallback != NULL) 8007dec: 687b ldr r3, [r7, #4] 8007dee: 6bdb ldr r3, [r3, #60] @ 0x3c 8007df0: 2b00 cmp r3, #0 8007df2: f000 8097 beq.w 8007f24 { /* Transfer complete callback */ hdma->XferCpltCallback(hdma); 8007df6: 687b ldr r3, [r7, #4] 8007df8: 6bdb ldr r3, [r3, #60] @ 0x3c 8007dfa: 6878 ldr r0, [r7, #4] 8007dfc: 4798 blx r3 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007dfe: e091 b.n 8007f24 } } } /* Transfer Error Interrupt management **************************************/ else if (((tmpisr_bdma & (BDMA_FLAG_TE0 << (hdma->StreamIndex & 0x1FU))) != 0U) && ((ccr_reg & BDMA_CCR_TEIE) != 0U)) 8007e00: 687b ldr r3, [r7, #4] 8007e02: 6ddb ldr r3, [r3, #92] @ 0x5c 8007e04: f003 031f and.w r3, r3, #31 8007e08: 2208 movs r2, #8 8007e0a: 409a lsls r2, r3 8007e0c: 697b ldr r3, [r7, #20] 8007e0e: 4013 ands r3, r2 8007e10: 2b00 cmp r3, #0 8007e12: f000 8088 beq.w 8007f26 8007e16: 693b ldr r3, [r7, #16] 8007e18: f003 0308 and.w r3, r3, #8 8007e1c: 2b00 cmp r3, #0 8007e1e: f000 8082 beq.w 8007f26 { /* 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)); 8007e22: 687b ldr r3, [r7, #4] 8007e24: 681b ldr r3, [r3, #0] 8007e26: 4a41 ldr r2, [pc, #260] @ (8007f2c ) 8007e28: 4293 cmp r3, r2 8007e2a: d04a beq.n 8007ec2 8007e2c: 687b ldr r3, [r7, #4] 8007e2e: 681b ldr r3, [r3, #0] 8007e30: 4a3f ldr r2, [pc, #252] @ (8007f30 ) 8007e32: 4293 cmp r3, r2 8007e34: d045 beq.n 8007ec2 8007e36: 687b ldr r3, [r7, #4] 8007e38: 681b ldr r3, [r3, #0] 8007e3a: 4a3e ldr r2, [pc, #248] @ (8007f34 ) 8007e3c: 4293 cmp r3, r2 8007e3e: d040 beq.n 8007ec2 8007e40: 687b ldr r3, [r7, #4] 8007e42: 681b ldr r3, [r3, #0] 8007e44: 4a3c ldr r2, [pc, #240] @ (8007f38 ) 8007e46: 4293 cmp r3, r2 8007e48: d03b beq.n 8007ec2 8007e4a: 687b ldr r3, [r7, #4] 8007e4c: 681b ldr r3, [r3, #0] 8007e4e: 4a3b ldr r2, [pc, #236] @ (8007f3c ) 8007e50: 4293 cmp r3, r2 8007e52: d036 beq.n 8007ec2 8007e54: 687b ldr r3, [r7, #4] 8007e56: 681b ldr r3, [r3, #0] 8007e58: 4a39 ldr r2, [pc, #228] @ (8007f40 ) 8007e5a: 4293 cmp r3, r2 8007e5c: d031 beq.n 8007ec2 8007e5e: 687b ldr r3, [r7, #4] 8007e60: 681b ldr r3, [r3, #0] 8007e62: 4a38 ldr r2, [pc, #224] @ (8007f44 ) 8007e64: 4293 cmp r3, r2 8007e66: d02c beq.n 8007ec2 8007e68: 687b ldr r3, [r7, #4] 8007e6a: 681b ldr r3, [r3, #0] 8007e6c: 4a36 ldr r2, [pc, #216] @ (8007f48 ) 8007e6e: 4293 cmp r3, r2 8007e70: d027 beq.n 8007ec2 8007e72: 687b ldr r3, [r7, #4] 8007e74: 681b ldr r3, [r3, #0] 8007e76: 4a35 ldr r2, [pc, #212] @ (8007f4c ) 8007e78: 4293 cmp r3, r2 8007e7a: d022 beq.n 8007ec2 8007e7c: 687b ldr r3, [r7, #4] 8007e7e: 681b ldr r3, [r3, #0] 8007e80: 4a33 ldr r2, [pc, #204] @ (8007f50 ) 8007e82: 4293 cmp r3, r2 8007e84: d01d beq.n 8007ec2 8007e86: 687b ldr r3, [r7, #4] 8007e88: 681b ldr r3, [r3, #0] 8007e8a: 4a32 ldr r2, [pc, #200] @ (8007f54 ) 8007e8c: 4293 cmp r3, r2 8007e8e: d018 beq.n 8007ec2 8007e90: 687b ldr r3, [r7, #4] 8007e92: 681b ldr r3, [r3, #0] 8007e94: 4a30 ldr r2, [pc, #192] @ (8007f58 ) 8007e96: 4293 cmp r3, r2 8007e98: d013 beq.n 8007ec2 8007e9a: 687b ldr r3, [r7, #4] 8007e9c: 681b ldr r3, [r3, #0] 8007e9e: 4a2f ldr r2, [pc, #188] @ (8007f5c ) 8007ea0: 4293 cmp r3, r2 8007ea2: d00e beq.n 8007ec2 8007ea4: 687b ldr r3, [r7, #4] 8007ea6: 681b ldr r3, [r3, #0] 8007ea8: 4a2d ldr r2, [pc, #180] @ (8007f60 ) 8007eaa: 4293 cmp r3, r2 8007eac: d009 beq.n 8007ec2 8007eae: 687b ldr r3, [r7, #4] 8007eb0: 681b ldr r3, [r3, #0] 8007eb2: 4a2c ldr r2, [pc, #176] @ (8007f64 ) 8007eb4: 4293 cmp r3, r2 8007eb6: d004 beq.n 8007ec2 8007eb8: 687b ldr r3, [r7, #4] 8007eba: 681b ldr r3, [r3, #0] 8007ebc: 4a2a ldr r2, [pc, #168] @ (8007f68 ) 8007ebe: 4293 cmp r3, r2 8007ec0: d108 bne.n 8007ed4 8007ec2: 687b ldr r3, [r7, #4] 8007ec4: 681b ldr r3, [r3, #0] 8007ec6: 681a ldr r2, [r3, #0] 8007ec8: 687b ldr r3, [r7, #4] 8007eca: 681b ldr r3, [r3, #0] 8007ecc: f022 021c bic.w r2, r2, #28 8007ed0: 601a str r2, [r3, #0] 8007ed2: e007 b.n 8007ee4 8007ed4: 687b ldr r3, [r7, #4] 8007ed6: 681b ldr r3, [r3, #0] 8007ed8: 681a ldr r2, [r3, #0] 8007eda: 687b ldr r3, [r7, #4] 8007edc: 681b ldr r3, [r3, #0] 8007ede: f022 020e bic.w r2, r2, #14 8007ee2: 601a str r2, [r3, #0] /* Clear all flags */ regs_bdma->IFCR = (BDMA_ISR_GIF0) << (hdma->StreamIndex & 0x1FU); 8007ee4: 687b ldr r3, [r7, #4] 8007ee6: 6ddb ldr r3, [r3, #92] @ 0x5c 8007ee8: f003 031f and.w r3, r3, #31 8007eec: 2201 movs r2, #1 8007eee: 409a lsls r2, r3 8007ef0: 69fb ldr r3, [r7, #28] 8007ef2: 605a str r2, [r3, #4] /* Update error code */ hdma->ErrorCode = HAL_DMA_ERROR_TE; 8007ef4: 687b ldr r3, [r7, #4] 8007ef6: 2201 movs r2, #1 8007ef8: 655a str r2, [r3, #84] @ 0x54 /* Change the DMA state */ hdma->State = HAL_DMA_STATE_READY; 8007efa: 687b ldr r3, [r7, #4] 8007efc: 2201 movs r2, #1 8007efe: f883 2035 strb.w r2, [r3, #53] @ 0x35 /* Process Unlocked */ __HAL_UNLOCK(hdma); 8007f02: 687b ldr r3, [r7, #4] 8007f04: 2200 movs r2, #0 8007f06: f883 2034 strb.w r2, [r3, #52] @ 0x34 if (hdma->XferErrorCallback != NULL) 8007f0a: 687b ldr r3, [r7, #4] 8007f0c: 6cdb ldr r3, [r3, #76] @ 0x4c 8007f0e: 2b00 cmp r3, #0 8007f10: d009 beq.n 8007f26 { /* Transfer error callback */ hdma->XferErrorCallback(hdma); 8007f12: 687b ldr r3, [r7, #4] 8007f14: 6cdb ldr r3, [r3, #76] @ 0x4c 8007f16: 6878 ldr r0, [r7, #4] 8007f18: 4798 blx r3 8007f1a: e004 b.n 8007f26 return; 8007f1c: bf00 nop 8007f1e: e002 b.n 8007f26 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007f20: bf00 nop 8007f22: e000 b.n 8007f26 if((ccr_reg & BDMA_CCR_DBM) != 0U) 8007f24: bf00 nop } else { /* Nothing To Do */ } } 8007f26: 3728 adds r7, #40 @ 0x28 8007f28: 46bd mov sp, r7 8007f2a: bd80 pop {r7, pc} 8007f2c: 40020010 .word 0x40020010 8007f30: 40020028 .word 0x40020028 8007f34: 40020040 .word 0x40020040 8007f38: 40020058 .word 0x40020058 8007f3c: 40020070 .word 0x40020070 8007f40: 40020088 .word 0x40020088 8007f44: 400200a0 .word 0x400200a0 8007f48: 400200b8 .word 0x400200b8 8007f4c: 40020410 .word 0x40020410 8007f50: 40020428 .word 0x40020428 8007f54: 40020440 .word 0x40020440 8007f58: 40020458 .word 0x40020458 8007f5c: 40020470 .word 0x40020470 8007f60: 40020488 .word 0x40020488 8007f64: 400204a0 .word 0x400204a0 8007f68: 400204b8 .word 0x400204b8 08007f6c : * @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) { 8007f6c: b480 push {r7} 8007f6e: b085 sub sp, #20 8007f70: af00 add r7, sp, #0 8007f72: 6078 str r0, [r7, #4] if(IS_DMA_STREAM_INSTANCE(hdma->Instance) != 0U) /* DMA1 or DMA2 instance */ 8007f74: 687b ldr r3, [r7, #4] 8007f76: 681b ldr r3, [r3, #0] 8007f78: 4a42 ldr r2, [pc, #264] @ (8008084 ) 8007f7a: 4293 cmp r3, r2 8007f7c: d04a beq.n 8008014 8007f7e: 687b ldr r3, [r7, #4] 8007f80: 681b ldr r3, [r3, #0] 8007f82: 4a41 ldr r2, [pc, #260] @ (8008088 ) 8007f84: 4293 cmp r3, r2 8007f86: d045 beq.n 8008014 8007f88: 687b ldr r3, [r7, #4] 8007f8a: 681b ldr r3, [r3, #0] 8007f8c: 4a3f ldr r2, [pc, #252] @ (800808c ) 8007f8e: 4293 cmp r3, r2 8007f90: d040 beq.n 8008014 8007f92: 687b ldr r3, [r7, #4] 8007f94: 681b ldr r3, [r3, #0] 8007f96: 4a3e ldr r2, [pc, #248] @ (8008090 ) 8007f98: 4293 cmp r3, r2 8007f9a: d03b beq.n 8008014 8007f9c: 687b ldr r3, [r7, #4] 8007f9e: 681b ldr r3, [r3, #0] 8007fa0: 4a3c ldr r2, [pc, #240] @ (8008094 ) 8007fa2: 4293 cmp r3, r2 8007fa4: d036 beq.n 8008014 8007fa6: 687b ldr r3, [r7, #4] 8007fa8: 681b ldr r3, [r3, #0] 8007faa: 4a3b ldr r2, [pc, #236] @ (8008098 ) 8007fac: 4293 cmp r3, r2 8007fae: d031 beq.n 8008014 8007fb0: 687b ldr r3, [r7, #4] 8007fb2: 681b ldr r3, [r3, #0] 8007fb4: 4a39 ldr r2, [pc, #228] @ (800809c ) 8007fb6: 4293 cmp r3, r2 8007fb8: d02c beq.n 8008014 8007fba: 687b ldr r3, [r7, #4] 8007fbc: 681b ldr r3, [r3, #0] 8007fbe: 4a38 ldr r2, [pc, #224] @ (80080a0 ) 8007fc0: 4293 cmp r3, r2 8007fc2: d027 beq.n 8008014 8007fc4: 687b ldr r3, [r7, #4] 8007fc6: 681b ldr r3, [r3, #0] 8007fc8: 4a36 ldr r2, [pc, #216] @ (80080a4 ) 8007fca: 4293 cmp r3, r2 8007fcc: d022 beq.n 8008014 8007fce: 687b ldr r3, [r7, #4] 8007fd0: 681b ldr r3, [r3, #0] 8007fd2: 4a35 ldr r2, [pc, #212] @ (80080a8 ) 8007fd4: 4293 cmp r3, r2 8007fd6: d01d beq.n 8008014 8007fd8: 687b ldr r3, [r7, #4] 8007fda: 681b ldr r3, [r3, #0] 8007fdc: 4a33 ldr r2, [pc, #204] @ (80080ac ) 8007fde: 4293 cmp r3, r2 8007fe0: d018 beq.n 8008014 8007fe2: 687b ldr r3, [r7, #4] 8007fe4: 681b ldr r3, [r3, #0] 8007fe6: 4a32 ldr r2, [pc, #200] @ (80080b0 ) 8007fe8: 4293 cmp r3, r2 8007fea: d013 beq.n 8008014 8007fec: 687b ldr r3, [r7, #4] 8007fee: 681b ldr r3, [r3, #0] 8007ff0: 4a30 ldr r2, [pc, #192] @ (80080b4 ) 8007ff2: 4293 cmp r3, r2 8007ff4: d00e beq.n 8008014 8007ff6: 687b ldr r3, [r7, #4] 8007ff8: 681b ldr r3, [r3, #0] 8007ffa: 4a2f ldr r2, [pc, #188] @ (80080b8 ) 8007ffc: 4293 cmp r3, r2 8007ffe: d009 beq.n 8008014 8008000: 687b ldr r3, [r7, #4] 8008002: 681b ldr r3, [r3, #0] 8008004: 4a2d ldr r2, [pc, #180] @ (80080bc ) 8008006: 4293 cmp r3, r2 8008008: d004 beq.n 8008014 800800a: 687b ldr r3, [r7, #4] 800800c: 681b ldr r3, [r3, #0] 800800e: 4a2c ldr r2, [pc, #176] @ (80080c0 ) 8008010: 4293 cmp r3, r2 8008012: d101 bne.n 8008018 8008014: 2301 movs r3, #1 8008016: e000 b.n 800801a 8008018: 2300 movs r3, #0 800801a: 2b00 cmp r3, #0 800801c: d024 beq.n 8008068 { uint32_t stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 16U) / 24U; 800801e: 687b ldr r3, [r7, #4] 8008020: 681b ldr r3, [r3, #0] 8008022: b2db uxtb r3, r3 8008024: 3b10 subs r3, #16 8008026: 4a27 ldr r2, [pc, #156] @ (80080c4 ) 8008028: fba2 2303 umull r2, r3, r2, r3 800802c: 091b lsrs r3, r3, #4 800802e: 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]; 8008030: 68fb ldr r3, [r7, #12] 8008032: f003 0307 and.w r3, r3, #7 8008036: 4a24 ldr r2, [pc, #144] @ (80080c8 ) 8008038: 5cd3 ldrb r3, [r2, r3] 800803a: 461a mov r2, r3 800803c: 687b ldr r3, [r7, #4] 800803e: 65da str r2, [r3, #92] @ 0x5c if (stream_number > 3U) 8008040: 68fb ldr r3, [r7, #12] 8008042: 2b03 cmp r3, #3 8008044: d908 bls.n 8008058 { /* return pointer to HISR and HIFCR */ hdma->StreamBaseAddress = (((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0x3FFU)) + 4U); 8008046: 687b ldr r3, [r7, #4] 8008048: 681b ldr r3, [r3, #0] 800804a: 461a mov r2, r3 800804c: 4b1f ldr r3, [pc, #124] @ (80080cc ) 800804e: 4013 ands r3, r2 8008050: 1d1a adds r2, r3, #4 8008052: 687b ldr r3, [r7, #4] 8008054: 659a str r2, [r3, #88] @ 0x58 8008056: e00d b.n 8008074 } else { /* return pointer to LISR and LIFCR */ hdma->StreamBaseAddress = ((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0x3FFU)); 8008058: 687b ldr r3, [r7, #4] 800805a: 681b ldr r3, [r3, #0] 800805c: 461a mov r2, r3 800805e: 4b1b ldr r3, [pc, #108] @ (80080cc ) 8008060: 4013 ands r3, r2 8008062: 687a ldr r2, [r7, #4] 8008064: 6593 str r3, [r2, #88] @ 0x58 8008066: e005 b.n 8008074 } } else /* BDMA instance(s) */ { /* return pointer to ISR and IFCR */ hdma->StreamBaseAddress = ((uint32_t)((uint32_t*)hdma->Instance) & (uint32_t)(~0xFFU)); 8008068: 687b ldr r3, [r7, #4] 800806a: 681b ldr r3, [r3, #0] 800806c: f023 02ff bic.w r2, r3, #255 @ 0xff 8008070: 687b ldr r3, [r7, #4] 8008072: 659a str r2, [r3, #88] @ 0x58 } return hdma->StreamBaseAddress; 8008074: 687b ldr r3, [r7, #4] 8008076: 6d9b ldr r3, [r3, #88] @ 0x58 } 8008078: 4618 mov r0, r3 800807a: 3714 adds r7, #20 800807c: 46bd mov sp, r7 800807e: f85d 7b04 ldr.w r7, [sp], #4 8008082: 4770 bx lr 8008084: 40020010 .word 0x40020010 8008088: 40020028 .word 0x40020028 800808c: 40020040 .word 0x40020040 8008090: 40020058 .word 0x40020058 8008094: 40020070 .word 0x40020070 8008098: 40020088 .word 0x40020088 800809c: 400200a0 .word 0x400200a0 80080a0: 400200b8 .word 0x400200b8 80080a4: 40020410 .word 0x40020410 80080a8: 40020428 .word 0x40020428 80080ac: 40020440 .word 0x40020440 80080b0: 40020458 .word 0x40020458 80080b4: 40020470 .word 0x40020470 80080b8: 40020488 .word 0x40020488 80080bc: 400204a0 .word 0x400204a0 80080c0: 400204b8 .word 0x400204b8 80080c4: aaaaaaab .word 0xaaaaaaab 80080c8: 08031acc .word 0x08031acc 80080cc: fffffc00 .word 0xfffffc00 080080d0 : * @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) { 80080d0: b480 push {r7} 80080d2: b085 sub sp, #20 80080d4: af00 add r7, sp, #0 80080d6: 6078 str r0, [r7, #4] HAL_StatusTypeDef status = HAL_OK; 80080d8: 2300 movs r3, #0 80080da: 73fb strb r3, [r7, #15] /* Memory Data size equal to Byte */ if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_BYTE) 80080dc: 687b ldr r3, [r7, #4] 80080de: 699b ldr r3, [r3, #24] 80080e0: 2b00 cmp r3, #0 80080e2: d120 bne.n 8008126 { switch (hdma->Init.FIFOThreshold) 80080e4: 687b ldr r3, [r7, #4] 80080e6: 6a9b ldr r3, [r3, #40] @ 0x28 80080e8: 2b03 cmp r3, #3 80080ea: d858 bhi.n 800819e 80080ec: a201 add r2, pc, #4 @ (adr r2, 80080f4 ) 80080ee: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80080f2: bf00 nop 80080f4: 08008105 .word 0x08008105 80080f8: 08008117 .word 0x08008117 80080fc: 08008105 .word 0x08008105 8008100: 0800819f .word 0x0800819f { case DMA_FIFO_THRESHOLD_1QUARTERFULL: case DMA_FIFO_THRESHOLD_3QUARTERSFULL: if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 8008104: 687b ldr r3, [r7, #4] 8008106: 6adb ldr r3, [r3, #44] @ 0x2c 8008108: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 800810c: 2b00 cmp r3, #0 800810e: d048 beq.n 80081a2 { status = HAL_ERROR; 8008110: 2301 movs r3, #1 8008112: 73fb strb r3, [r7, #15] } break; 8008114: e045 b.n 80081a2 case DMA_FIFO_THRESHOLD_HALFFULL: if (hdma->Init.MemBurst == DMA_MBURST_INC16) 8008116: 687b ldr r3, [r7, #4] 8008118: 6adb ldr r3, [r3, #44] @ 0x2c 800811a: f1b3 7fc0 cmp.w r3, #25165824 @ 0x1800000 800811e: d142 bne.n 80081a6 { status = HAL_ERROR; 8008120: 2301 movs r3, #1 8008122: 73fb strb r3, [r7, #15] } break; 8008124: e03f b.n 80081a6 break; } } /* Memory Data size equal to Half-Word */ else if (hdma->Init.MemDataAlignment == DMA_MDATAALIGN_HALFWORD) 8008126: 687b ldr r3, [r7, #4] 8008128: 699b ldr r3, [r3, #24] 800812a: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800812e: d123 bne.n 8008178 { switch (hdma->Init.FIFOThreshold) 8008130: 687b ldr r3, [r7, #4] 8008132: 6a9b ldr r3, [r3, #40] @ 0x28 8008134: 2b03 cmp r3, #3 8008136: d838 bhi.n 80081aa 8008138: a201 add r2, pc, #4 @ (adr r2, 8008140 ) 800813a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800813e: bf00 nop 8008140: 08008151 .word 0x08008151 8008144: 08008157 .word 0x08008157 8008148: 08008151 .word 0x08008151 800814c: 08008169 .word 0x08008169 { case DMA_FIFO_THRESHOLD_1QUARTERFULL: case DMA_FIFO_THRESHOLD_3QUARTERSFULL: status = HAL_ERROR; 8008150: 2301 movs r3, #1 8008152: 73fb strb r3, [r7, #15] break; 8008154: e030 b.n 80081b8 case DMA_FIFO_THRESHOLD_HALFFULL: if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 8008156: 687b ldr r3, [r7, #4] 8008158: 6adb ldr r3, [r3, #44] @ 0x2c 800815a: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 800815e: 2b00 cmp r3, #0 8008160: d025 beq.n 80081ae { status = HAL_ERROR; 8008162: 2301 movs r3, #1 8008164: 73fb strb r3, [r7, #15] } break; 8008166: e022 b.n 80081ae case DMA_FIFO_THRESHOLD_FULL: if (hdma->Init.MemBurst == DMA_MBURST_INC16) 8008168: 687b ldr r3, [r7, #4] 800816a: 6adb ldr r3, [r3, #44] @ 0x2c 800816c: f1b3 7fc0 cmp.w r3, #25165824 @ 0x1800000 8008170: d11f bne.n 80081b2 { status = HAL_ERROR; 8008172: 2301 movs r3, #1 8008174: 73fb strb r3, [r7, #15] } break; 8008176: e01c b.n 80081b2 } /* Memory Data size equal to Word */ else { switch (hdma->Init.FIFOThreshold) 8008178: 687b ldr r3, [r7, #4] 800817a: 6a9b ldr r3, [r3, #40] @ 0x28 800817c: 2b02 cmp r3, #2 800817e: d902 bls.n 8008186 8008180: 2b03 cmp r3, #3 8008182: d003 beq.n 800818c status = HAL_ERROR; } break; default: break; 8008184: e018 b.n 80081b8 status = HAL_ERROR; 8008186: 2301 movs r3, #1 8008188: 73fb strb r3, [r7, #15] break; 800818a: e015 b.n 80081b8 if ((hdma->Init.MemBurst & DMA_SxCR_MBURST_1) == DMA_SxCR_MBURST_1) 800818c: 687b ldr r3, [r7, #4] 800818e: 6adb ldr r3, [r3, #44] @ 0x2c 8008190: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 8008194: 2b00 cmp r3, #0 8008196: d00e beq.n 80081b6 status = HAL_ERROR; 8008198: 2301 movs r3, #1 800819a: 73fb strb r3, [r7, #15] break; 800819c: e00b b.n 80081b6 break; 800819e: bf00 nop 80081a0: e00a b.n 80081b8 break; 80081a2: bf00 nop 80081a4: e008 b.n 80081b8 break; 80081a6: bf00 nop 80081a8: e006 b.n 80081b8 break; 80081aa: bf00 nop 80081ac: e004 b.n 80081b8 break; 80081ae: bf00 nop 80081b0: e002 b.n 80081b8 break; 80081b2: bf00 nop 80081b4: e000 b.n 80081b8 break; 80081b6: bf00 nop } } return status; 80081b8: 7bfb ldrb r3, [r7, #15] } 80081ba: 4618 mov r0, r3 80081bc: 3714 adds r7, #20 80081be: 46bd mov sp, r7 80081c0: f85d 7b04 ldr.w r7, [sp], #4 80081c4: 4770 bx lr 80081c6: bf00 nop 080081c8 : * @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) { 80081c8: b480 push {r7} 80081ca: b085 sub sp, #20 80081cc: af00 add r7, sp, #0 80081ce: 6078 str r0, [r7, #4] uint32_t stream_number; uint32_t stream_baseaddress = (uint32_t)((uint32_t*)hdma->Instance); 80081d0: 687b ldr r3, [r7, #4] 80081d2: 681b ldr r3, [r3, #0] 80081d4: 60bb str r3, [r7, #8] if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 80081d6: 687b ldr r3, [r7, #4] 80081d8: 681b ldr r3, [r3, #0] 80081da: 4a38 ldr r2, [pc, #224] @ (80082bc ) 80081dc: 4293 cmp r3, r2 80081de: d022 beq.n 8008226 80081e0: 687b ldr r3, [r7, #4] 80081e2: 681b ldr r3, [r3, #0] 80081e4: 4a36 ldr r2, [pc, #216] @ (80082c0 ) 80081e6: 4293 cmp r3, r2 80081e8: d01d beq.n 8008226 80081ea: 687b ldr r3, [r7, #4] 80081ec: 681b ldr r3, [r3, #0] 80081ee: 4a35 ldr r2, [pc, #212] @ (80082c4 ) 80081f0: 4293 cmp r3, r2 80081f2: d018 beq.n 8008226 80081f4: 687b ldr r3, [r7, #4] 80081f6: 681b ldr r3, [r3, #0] 80081f8: 4a33 ldr r2, [pc, #204] @ (80082c8 ) 80081fa: 4293 cmp r3, r2 80081fc: d013 beq.n 8008226 80081fe: 687b ldr r3, [r7, #4] 8008200: 681b ldr r3, [r3, #0] 8008202: 4a32 ldr r2, [pc, #200] @ (80082cc ) 8008204: 4293 cmp r3, r2 8008206: d00e beq.n 8008226 8008208: 687b ldr r3, [r7, #4] 800820a: 681b ldr r3, [r3, #0] 800820c: 4a30 ldr r2, [pc, #192] @ (80082d0 ) 800820e: 4293 cmp r3, r2 8008210: d009 beq.n 8008226 8008212: 687b ldr r3, [r7, #4] 8008214: 681b ldr r3, [r3, #0] 8008216: 4a2f ldr r2, [pc, #188] @ (80082d4 ) 8008218: 4293 cmp r3, r2 800821a: d004 beq.n 8008226 800821c: 687b ldr r3, [r7, #4] 800821e: 681b ldr r3, [r3, #0] 8008220: 4a2d ldr r2, [pc, #180] @ (80082d8 ) 8008222: 4293 cmp r3, r2 8008224: d101 bne.n 800822a 8008226: 2301 movs r3, #1 8008228: e000 b.n 800822c 800822a: 2300 movs r3, #0 800822c: 2b00 cmp r3, #0 800822e: d01a beq.n 8008266 { /* BDMA Channels are connected to DMAMUX2 channels */ stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 8U) / 20U; 8008230: 687b ldr r3, [r7, #4] 8008232: 681b ldr r3, [r3, #0] 8008234: b2db uxtb r3, r3 8008236: 3b08 subs r3, #8 8008238: 4a28 ldr r2, [pc, #160] @ (80082dc ) 800823a: fba2 2303 umull r2, r3, r2, r3 800823e: 091b lsrs r3, r3, #4 8008240: 60fb str r3, [r7, #12] hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)((uint32_t)(((uint32_t)DMAMUX2_Channel0) + (stream_number * 4U))); 8008242: 68fa ldr r2, [r7, #12] 8008244: 4b26 ldr r3, [pc, #152] @ (80082e0 ) 8008246: 4413 add r3, r2 8008248: 009b lsls r3, r3, #2 800824a: 461a mov r2, r3 800824c: 687b ldr r3, [r7, #4] 800824e: 661a str r2, [r3, #96] @ 0x60 hdma->DMAmuxChannelStatus = DMAMUX2_ChannelStatus; 8008250: 687b ldr r3, [r7, #4] 8008252: 4a24 ldr r2, [pc, #144] @ (80082e4 ) 8008254: 665a str r2, [r3, #100] @ 0x64 hdma->DMAmuxChannelStatusMask = 1UL << (stream_number & 0x1FU); 8008256: 68fb ldr r3, [r7, #12] 8008258: f003 031f and.w r3, r3, #31 800825c: 2201 movs r2, #1 800825e: 409a lsls r2, r3 8008260: 687b ldr r3, [r7, #4] 8008262: 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); } } 8008264: e024 b.n 80082b0 stream_number = (((uint32_t)((uint32_t*)hdma->Instance) & 0xFFU) - 16U) / 24U; 8008266: 687b ldr r3, [r7, #4] 8008268: 681b ldr r3, [r3, #0] 800826a: b2db uxtb r3, r3 800826c: 3b10 subs r3, #16 800826e: 4a1e ldr r2, [pc, #120] @ (80082e8 ) 8008270: fba2 2303 umull r2, r3, r2, r3 8008274: 091b lsrs r3, r3, #4 8008276: 60fb str r3, [r7, #12] if((stream_baseaddress <= ((uint32_t)DMA2_Stream7) ) && \ 8008278: 68bb ldr r3, [r7, #8] 800827a: 4a1c ldr r2, [pc, #112] @ (80082ec ) 800827c: 4293 cmp r3, r2 800827e: d806 bhi.n 800828e 8008280: 68bb ldr r3, [r7, #8] 8008282: 4a1b ldr r2, [pc, #108] @ (80082f0 ) 8008284: 4293 cmp r3, r2 8008286: d902 bls.n 800828e stream_number += 8U; 8008288: 68fb ldr r3, [r7, #12] 800828a: 3308 adds r3, #8 800828c: 60fb str r3, [r7, #12] hdma->DMAmuxChannel = (DMAMUX_Channel_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_Channel0) + (stream_number * 4U))); 800828e: 68fa ldr r2, [r7, #12] 8008290: 4b18 ldr r3, [pc, #96] @ (80082f4 ) 8008292: 4413 add r3, r2 8008294: 009b lsls r3, r3, #2 8008296: 461a mov r2, r3 8008298: 687b ldr r3, [r7, #4] 800829a: 661a str r2, [r3, #96] @ 0x60 hdma->DMAmuxChannelStatus = DMAMUX1_ChannelStatus; 800829c: 687b ldr r3, [r7, #4] 800829e: 4a16 ldr r2, [pc, #88] @ (80082f8 ) 80082a0: 665a str r2, [r3, #100] @ 0x64 hdma->DMAmuxChannelStatusMask = 1UL << (stream_number & 0x1FU); 80082a2: 68fb ldr r3, [r7, #12] 80082a4: f003 031f and.w r3, r3, #31 80082a8: 2201 movs r2, #1 80082aa: 409a lsls r2, r3 80082ac: 687b ldr r3, [r7, #4] 80082ae: 669a str r2, [r3, #104] @ 0x68 } 80082b0: bf00 nop 80082b2: 3714 adds r7, #20 80082b4: 46bd mov sp, r7 80082b6: f85d 7b04 ldr.w r7, [sp], #4 80082ba: 4770 bx lr 80082bc: 58025408 .word 0x58025408 80082c0: 5802541c .word 0x5802541c 80082c4: 58025430 .word 0x58025430 80082c8: 58025444 .word 0x58025444 80082cc: 58025458 .word 0x58025458 80082d0: 5802546c .word 0x5802546c 80082d4: 58025480 .word 0x58025480 80082d8: 58025494 .word 0x58025494 80082dc: cccccccd .word 0xcccccccd 80082e0: 16009600 .word 0x16009600 80082e4: 58025880 .word 0x58025880 80082e8: aaaaaaab .word 0xaaaaaaab 80082ec: 400204b8 .word 0x400204b8 80082f0: 4002040f .word 0x4002040f 80082f4: 10008200 .word 0x10008200 80082f8: 40020880 .word 0x40020880 080082fc : * @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) { 80082fc: b480 push {r7} 80082fe: b085 sub sp, #20 8008300: af00 add r7, sp, #0 8008302: 6078 str r0, [r7, #4] uint32_t request = hdma->Init.Request & DMAMUX_CxCR_DMAREQ_ID; 8008304: 687b ldr r3, [r7, #4] 8008306: 685b ldr r3, [r3, #4] 8008308: b2db uxtb r3, r3 800830a: 60fb str r3, [r7, #12] if((request >= DMA_REQUEST_GENERATOR0) && (request <= DMA_REQUEST_GENERATOR7)) 800830c: 68fb ldr r3, [r7, #12] 800830e: 2b00 cmp r3, #0 8008310: d04a beq.n 80083a8 8008312: 68fb ldr r3, [r7, #12] 8008314: 2b08 cmp r3, #8 8008316: d847 bhi.n 80083a8 { if(IS_BDMA_CHANNEL_DMAMUX_INSTANCE(hdma->Instance) != 0U) 8008318: 687b ldr r3, [r7, #4] 800831a: 681b ldr r3, [r3, #0] 800831c: 4a25 ldr r2, [pc, #148] @ (80083b4 ) 800831e: 4293 cmp r3, r2 8008320: d022 beq.n 8008368 8008322: 687b ldr r3, [r7, #4] 8008324: 681b ldr r3, [r3, #0] 8008326: 4a24 ldr r2, [pc, #144] @ (80083b8 ) 8008328: 4293 cmp r3, r2 800832a: d01d beq.n 8008368 800832c: 687b ldr r3, [r7, #4] 800832e: 681b ldr r3, [r3, #0] 8008330: 4a22 ldr r2, [pc, #136] @ (80083bc ) 8008332: 4293 cmp r3, r2 8008334: d018 beq.n 8008368 8008336: 687b ldr r3, [r7, #4] 8008338: 681b ldr r3, [r3, #0] 800833a: 4a21 ldr r2, [pc, #132] @ (80083c0 ) 800833c: 4293 cmp r3, r2 800833e: d013 beq.n 8008368 8008340: 687b ldr r3, [r7, #4] 8008342: 681b ldr r3, [r3, #0] 8008344: 4a1f ldr r2, [pc, #124] @ (80083c4 ) 8008346: 4293 cmp r3, r2 8008348: d00e beq.n 8008368 800834a: 687b ldr r3, [r7, #4] 800834c: 681b ldr r3, [r3, #0] 800834e: 4a1e ldr r2, [pc, #120] @ (80083c8 ) 8008350: 4293 cmp r3, r2 8008352: d009 beq.n 8008368 8008354: 687b ldr r3, [r7, #4] 8008356: 681b ldr r3, [r3, #0] 8008358: 4a1c ldr r2, [pc, #112] @ (80083cc ) 800835a: 4293 cmp r3, r2 800835c: d004 beq.n 8008368 800835e: 687b ldr r3, [r7, #4] 8008360: 681b ldr r3, [r3, #0] 8008362: 4a1b ldr r2, [pc, #108] @ (80083d0 ) 8008364: 4293 cmp r3, r2 8008366: d101 bne.n 800836c 8008368: 2301 movs r3, #1 800836a: e000 b.n 800836e 800836c: 2300 movs r3, #0 800836e: 2b00 cmp r3, #0 8008370: d00a beq.n 8008388 { /* BDMA Channels are connected to DMAMUX2 request generator blocks */ hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX2_RequestGenerator0) + ((request - 1U) * 4U))); 8008372: 68fa ldr r2, [r7, #12] 8008374: 4b17 ldr r3, [pc, #92] @ (80083d4 ) 8008376: 4413 add r3, r2 8008378: 009b lsls r3, r3, #2 800837a: 461a mov r2, r3 800837c: 687b ldr r3, [r7, #4] 800837e: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = DMAMUX2_RequestGenStatus; 8008380: 687b ldr r3, [r7, #4] 8008382: 4a15 ldr r2, [pc, #84] @ (80083d8 ) 8008384: 671a str r2, [r3, #112] @ 0x70 8008386: e009 b.n 800839c } else { /* DMA1 and DMA2 Streams use DMAMUX1 request generator blocks */ hdma->DMAmuxRequestGen = (DMAMUX_RequestGen_TypeDef *)((uint32_t)(((uint32_t)DMAMUX1_RequestGenerator0) + ((request - 1U) * 4U))); 8008388: 68fa ldr r2, [r7, #12] 800838a: 4b14 ldr r3, [pc, #80] @ (80083dc ) 800838c: 4413 add r3, r2 800838e: 009b lsls r3, r3, #2 8008390: 461a mov r2, r3 8008392: 687b ldr r3, [r7, #4] 8008394: 66da str r2, [r3, #108] @ 0x6c hdma->DMAmuxRequestGenStatus = DMAMUX1_RequestGenStatus; 8008396: 687b ldr r3, [r7, #4] 8008398: 4a11 ldr r2, [pc, #68] @ (80083e0 ) 800839a: 671a str r2, [r3, #112] @ 0x70 } hdma->DMAmuxRequestGenStatusMask = 1UL << (request - 1U); 800839c: 68fb ldr r3, [r7, #12] 800839e: 3b01 subs r3, #1 80083a0: 2201 movs r2, #1 80083a2: 409a lsls r2, r3 80083a4: 687b ldr r3, [r7, #4] 80083a6: 675a str r2, [r3, #116] @ 0x74 } } 80083a8: bf00 nop 80083aa: 3714 adds r7, #20 80083ac: 46bd mov sp, r7 80083ae: f85d 7b04 ldr.w r7, [sp], #4 80083b2: 4770 bx lr 80083b4: 58025408 .word 0x58025408 80083b8: 5802541c .word 0x5802541c 80083bc: 58025430 .word 0x58025430 80083c0: 58025444 .word 0x58025444 80083c4: 58025458 .word 0x58025458 80083c8: 5802546c .word 0x5802546c 80083cc: 58025480 .word 0x58025480 80083d0: 58025494 .word 0x58025494 80083d4: 1600963f .word 0x1600963f 80083d8: 58025940 .word 0x58025940 80083dc: 1000823f .word 0x1000823f 80083e0: 40020940 .word 0x40020940 080083e4 : * @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) { 80083e4: b580 push {r7, lr} 80083e6: b084 sub sp, #16 80083e8: af00 add r7, sp, #0 80083ea: 6078 str r0, [r7, #4] uint32_t tickstart; if (heth == NULL) 80083ec: 687b ldr r3, [r7, #4] 80083ee: 2b00 cmp r3, #0 80083f0: d101 bne.n 80083f6 { return HAL_ERROR; 80083f2: 2301 movs r3, #1 80083f4: e0e3 b.n 80085be } if (heth->gState == HAL_ETH_STATE_RESET) 80083f6: 687b ldr r3, [r7, #4] 80083f8: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 80083fc: 2b00 cmp r3, #0 80083fe: d106 bne.n 800840e { heth->gState = HAL_ETH_STATE_BUSY; 8008400: 687b ldr r3, [r7, #4] 8008402: 2223 movs r2, #35 @ 0x23 8008404: 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); 8008408: 6878 ldr r0, [r7, #4] 800840a: f008 fb89 bl 8010b20 #endif /* (USE_HAL_ETH_REGISTER_CALLBACKS) */ } __HAL_RCC_SYSCFG_CLK_ENABLE(); 800840e: 4b6e ldr r3, [pc, #440] @ (80085c8 ) 8008410: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8008414: 4a6c ldr r2, [pc, #432] @ (80085c8 ) 8008416: f043 0302 orr.w r3, r3, #2 800841a: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 800841e: 4b6a ldr r3, [pc, #424] @ (80085c8 ) 8008420: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 8008424: f003 0302 and.w r3, r3, #2 8008428: 60bb str r3, [r7, #8] 800842a: 68bb ldr r3, [r7, #8] if (heth->Init.MediaInterface == HAL_ETH_MII_MODE) 800842c: 687b ldr r3, [r7, #4] 800842e: 7a1b ldrb r3, [r3, #8] 8008430: 2b00 cmp r3, #0 8008432: d103 bne.n 800843c { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_MII); 8008434: 2000 movs r0, #0 8008436: f7fd fa3d bl 80058b4 800843a: e003 b.n 8008444 } else { HAL_SYSCFG_ETHInterfaceSelect(SYSCFG_ETH_RMII); 800843c: f44f 0000 mov.w r0, #8388608 @ 0x800000 8008440: f7fd fa38 bl 80058b4 } /* Dummy read to sync with ETH */ (void)SYSCFG->PMCR; 8008444: 4b61 ldr r3, [pc, #388] @ (80085cc ) 8008446: 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); 8008448: 687b ldr r3, [r7, #4] 800844a: 681b ldr r3, [r3, #0] 800844c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008450: 681b ldr r3, [r3, #0] 8008452: 687a ldr r2, [r7, #4] 8008454: 6812 ldr r2, [r2, #0] 8008456: f043 0301 orr.w r3, r3, #1 800845a: f502 5280 add.w r2, r2, #4096 @ 0x1000 800845e: 6013 str r3, [r2, #0] /* Get tick */ tickstart = HAL_GetTick(); 8008460: f7fd f9ec bl 800583c 8008464: 60f8 str r0, [r7, #12] /* Wait for software reset */ while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 8008466: e011 b.n 800848c { if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT)) 8008468: f7fd f9e8 bl 800583c 800846c: 4602 mov r2, r0 800846e: 68fb ldr r3, [r7, #12] 8008470: 1ad3 subs r3, r2, r3 8008472: f5b3 7ffa cmp.w r3, #500 @ 0x1f4 8008476: d909 bls.n 800848c { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT; 8008478: 687b ldr r3, [r7, #4] 800847a: 2204 movs r2, #4 800847c: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 8008480: 687b ldr r3, [r7, #4] 8008482: 22e0 movs r2, #224 @ 0xe0 8008484: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return Error */ return HAL_ERROR; 8008488: 2301 movs r3, #1 800848a: e098 b.n 80085be while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) 800848c: 687b ldr r3, [r7, #4] 800848e: 681b ldr r3, [r3, #0] 8008490: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008494: 681b ldr r3, [r3, #0] 8008496: f003 0301 and.w r3, r3, #1 800849a: 2b00 cmp r3, #0 800849c: d1e4 bne.n 8008468 } } /*------------------ MDIO CSR Clock Range Configuration --------------------*/ HAL_ETH_SetMDIOClockRange(heth); 800849e: 6878 ldr r0, [r7, #4] 80084a0: f000 ff1c bl 80092dc /*------------------ MAC LPI 1US Tic Counter Configuration --------------------*/ WRITE_REG(heth->Instance->MAC1USTCR, (((uint32_t)HAL_RCC_GetHCLKFreq() / ETH_MAC_US_TICK) - 1U)); 80084a4: f003 f80e bl 800b4c4 80084a8: 4603 mov r3, r0 80084aa: 4a49 ldr r2, [pc, #292] @ (80085d0 ) 80084ac: fba2 2303 umull r2, r3, r2, r3 80084b0: 0c9a lsrs r2, r3, #18 80084b2: 687b ldr r3, [r7, #4] 80084b4: 681b ldr r3, [r3, #0] 80084b6: 3a01 subs r2, #1 80084b8: f8c3 20dc str.w r2, [r3, #220] @ 0xdc /*------------------ MAC, MTL and DMA default Configuration ----------------*/ ETH_MACDMAConfig(heth); 80084bc: 6878 ldr r0, [r7, #4] 80084be: f001 f90d bl 80096dc /* SET DSL to 64 bit */ MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_DSL, ETH_DMACCR_DSL_64BIT); 80084c2: 687b ldr r3, [r7, #4] 80084c4: 681b ldr r3, [r3, #0] 80084c6: f503 5380 add.w r3, r3, #4096 @ 0x1000 80084ca: f8d3 3100 ldr.w r3, [r3, #256] @ 0x100 80084ce: f423 13e0 bic.w r3, r3, #1835008 @ 0x1c0000 80084d2: 687a ldr r2, [r7, #4] 80084d4: 6812 ldr r2, [r2, #0] 80084d6: f443 2300 orr.w r3, r3, #524288 @ 0x80000 80084da: f502 5280 add.w r2, r2, #4096 @ 0x1000 80084de: f8c2 3100 str.w r3, [r2, #256] @ 0x100 /* Set Receive Buffers Length (must be a multiple of 4) */ if ((heth->Init.RxBuffLen % 0x4U) != 0x0U) 80084e2: 687b ldr r3, [r7, #4] 80084e4: 695b ldr r3, [r3, #20] 80084e6: f003 0303 and.w r3, r3, #3 80084ea: 2b00 cmp r3, #0 80084ec: d009 beq.n 8008502 { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_PARAM; 80084ee: 687b ldr r3, [r7, #4] 80084f0: 2201 movs r2, #1 80084f2: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; 80084f6: 687b ldr r3, [r7, #4] 80084f8: 22e0 movs r2, #224 @ 0xe0 80084fa: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return Error */ return HAL_ERROR; 80084fe: 2301 movs r3, #1 8008500: e05d b.n 80085be } else { MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_RBSZ, ((heth->Init.RxBuffLen) << 1)); 8008502: 687b ldr r3, [r7, #4] 8008504: 681b ldr r3, [r3, #0] 8008506: f503 5380 add.w r3, r3, #4096 @ 0x1000 800850a: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 800850e: 4b31 ldr r3, [pc, #196] @ (80085d4 ) 8008510: 4013 ands r3, r2 8008512: 687a ldr r2, [r7, #4] 8008514: 6952 ldr r2, [r2, #20] 8008516: 0051 lsls r1, r2, #1 8008518: 687a ldr r2, [r7, #4] 800851a: 6812 ldr r2, [r2, #0] 800851c: 430b orrs r3, r1 800851e: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008522: f8c2 3108 str.w r3, [r2, #264] @ 0x108 } /*------------------ DMA Tx Descriptors Configuration ----------------------*/ ETH_DMATxDescListInit(heth); 8008526: 6878 ldr r0, [r7, #4] 8008528: f001 f975 bl 8009816 /*------------------ DMA Rx Descriptors Configuration ----------------------*/ ETH_DMARxDescListInit(heth); 800852c: 6878 ldr r0, [r7, #4] 800852e: f001 f9bb bl 80098a8 /*--------------------- 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]); 8008532: 687b ldr r3, [r7, #4] 8008534: 685b ldr r3, [r3, #4] 8008536: 3305 adds r3, #5 8008538: 781b ldrb r3, [r3, #0] 800853a: 021a lsls r2, r3, #8 800853c: 687b ldr r3, [r7, #4] 800853e: 685b ldr r3, [r3, #4] 8008540: 3304 adds r3, #4 8008542: 781b ldrb r3, [r3, #0] 8008544: 4619 mov r1, r3 8008546: 687b ldr r3, [r7, #4] 8008548: 681b ldr r3, [r3, #0] 800854a: 430a orrs r2, r1 800854c: 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) | 8008550: 687b ldr r3, [r7, #4] 8008552: 685b ldr r3, [r3, #4] 8008554: 3303 adds r3, #3 8008556: 781b ldrb r3, [r3, #0] 8008558: 061a lsls r2, r3, #24 800855a: 687b ldr r3, [r7, #4] 800855c: 685b ldr r3, [r3, #4] 800855e: 3302 adds r3, #2 8008560: 781b ldrb r3, [r3, #0] 8008562: 041b lsls r3, r3, #16 8008564: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 8008566: 687b ldr r3, [r7, #4] 8008568: 685b ldr r3, [r3, #4] 800856a: 3301 adds r3, #1 800856c: 781b ldrb r3, [r3, #0] 800856e: 021b lsls r3, r3, #8 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8008570: 431a orrs r2, r3 ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 8008572: 687b ldr r3, [r7, #4] 8008574: 685b ldr r3, [r3, #4] 8008576: 781b ldrb r3, [r3, #0] 8008578: 4619 mov r1, r3 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 800857a: 687b ldr r3, [r7, #4] 800857c: 681b ldr r3, [r3, #0] ((uint32_t)(heth->Init.MACAddr[1]) << 8) | (uint32_t)heth->Init.MACAddr[0]); 800857e: 430a orrs r2, r1 heth->Instance->MACA0LR = (((uint32_t)(heth->Init.MACAddr[3]) << 24) | ((uint32_t)(heth->Init.MACAddr[2]) << 16) | 8008580: f8c3 2304 str.w r2, [r3, #772] @ 0x304 /* Disable Rx MMC Interrupts */ SET_BIT(heth->Instance->MMCRIMR, ETH_MMCRIMR_RXLPITRCIM | ETH_MMCRIMR_RXLPIUSCIM | \ 8008584: 687b ldr r3, [r7, #4] 8008586: 681b ldr r3, [r3, #0] 8008588: f8d3 170c ldr.w r1, [r3, #1804] @ 0x70c 800858c: 687b ldr r3, [r7, #4] 800858e: 681a ldr r2, [r3, #0] 8008590: 4b11 ldr r3, [pc, #68] @ (80085d8 ) 8008592: 430b orrs r3, r1 8008594: 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 | \ 8008598: 687b ldr r3, [r7, #4] 800859a: 681b ldr r3, [r3, #0] 800859c: f8d3 1710 ldr.w r1, [r3, #1808] @ 0x710 80085a0: 687b ldr r3, [r7, #4] 80085a2: 681a ldr r2, [r3, #0] 80085a4: 4b0d ldr r3, [pc, #52] @ (80085dc ) 80085a6: 430b orrs r3, r1 80085a8: f8c2 3710 str.w r3, [r2, #1808] @ 0x710 ETH_MMCTIMR_TXGPKTIM | ETH_MMCTIMR_TXMCOLGPIM | ETH_MMCTIMR_TXSCOLGPIM); heth->ErrorCode = HAL_ETH_ERROR_NONE; 80085ac: 687b ldr r3, [r7, #4] 80085ae: 2200 movs r2, #0 80085b0: f8c3 2088 str.w r2, [r3, #136] @ 0x88 heth->gState = HAL_ETH_STATE_READY; 80085b4: 687b ldr r3, [r7, #4] 80085b6: 2210 movs r2, #16 80085b8: f8c3 2084 str.w r2, [r3, #132] @ 0x84 return HAL_OK; 80085bc: 2300 movs r3, #0 } 80085be: 4618 mov r0, r3 80085c0: 3710 adds r7, #16 80085c2: 46bd mov sp, r7 80085c4: bd80 pop {r7, pc} 80085c6: bf00 nop 80085c8: 58024400 .word 0x58024400 80085cc: 58000400 .word 0x58000400 80085d0: 431bde83 .word 0x431bde83 80085d4: ffff8001 .word 0xffff8001 80085d8: 0c020060 .word 0x0c020060 80085dc: 0c20c000 .word 0x0c20c000 080085e0 : * @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) { 80085e0: b580 push {r7, lr} 80085e2: b082 sub sp, #8 80085e4: af00 add r7, sp, #0 80085e6: 6078 str r0, [r7, #4] if (heth->gState == HAL_ETH_STATE_READY) 80085e8: 687b ldr r3, [r7, #4] 80085ea: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 80085ee: 2b10 cmp r3, #16 80085f0: d165 bne.n 80086be { heth->gState = HAL_ETH_STATE_BUSY; 80085f2: 687b ldr r3, [r7, #4] 80085f4: 2223 movs r2, #35 @ 0x23 80085f6: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* save IT mode to ETH Handle */ heth->RxDescList.ItMode = 1U; 80085fa: 687b ldr r3, [r7, #4] 80085fc: 2201 movs r2, #1 80085fe: 659a str r2, [r3, #88] @ 0x58 /* Set number of descriptors to build */ heth->RxDescList.RxBuildDescCnt = ETH_RX_DESC_CNT; 8008600: 687b ldr r3, [r7, #4] 8008602: 2204 movs r2, #4 8008604: 66da str r2, [r3, #108] @ 0x6c /* Build all descriptors */ ETH_UpdateDescriptor(heth); 8008606: 6878 ldr r0, [r7, #4] 8008608: f000 f9e4 bl 80089d4 /* Enable the DMA transmission */ SET_BIT(heth->Instance->DMACTCR, ETH_DMACTCR_ST); 800860c: 687b ldr r3, [r7, #4] 800860e: 681b ldr r3, [r3, #0] 8008610: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008614: f8d3 3104 ldr.w r3, [r3, #260] @ 0x104 8008618: 687a ldr r2, [r7, #4] 800861a: 6812 ldr r2, [r2, #0] 800861c: f043 0301 orr.w r3, r3, #1 8008620: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008624: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /* Enable the DMA reception */ SET_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 8008628: 687b ldr r3, [r7, #4] 800862a: 681b ldr r3, [r3, #0] 800862c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008630: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 8008634: 687a ldr r2, [r7, #4] 8008636: 6812 ldr r2, [r2, #0] 8008638: f043 0301 orr.w r3, r3, #1 800863c: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008640: f8c2 3108 str.w r3, [r2, #264] @ 0x108 /* Clear Tx and Rx process stopped flags */ heth->Instance->DMACSR |= (ETH_DMACSR_TPS | ETH_DMACSR_RPS); 8008644: 687b ldr r3, [r7, #4] 8008646: 681b ldr r3, [r3, #0] 8008648: f503 5380 add.w r3, r3, #4096 @ 0x1000 800864c: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 8008650: 687a ldr r2, [r7, #4] 8008652: 6812 ldr r2, [r2, #0] 8008654: f443 7381 orr.w r3, r3, #258 @ 0x102 8008658: f502 5280 add.w r2, r2, #4096 @ 0x1000 800865c: f8c2 3160 str.w r3, [r2, #352] @ 0x160 /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 8008660: 687b ldr r3, [r7, #4] 8008662: 681b ldr r3, [r3, #0] 8008664: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 8008668: 687b ldr r3, [r7, #4] 800866a: 681b ldr r3, [r3, #0] 800866c: f042 0201 orr.w r2, r2, #1 8008670: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /* Enable the MAC transmission */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 8008674: 687b ldr r3, [r7, #4] 8008676: 681b ldr r3, [r3, #0] 8008678: 681a ldr r2, [r3, #0] 800867a: 687b ldr r3, [r7, #4] 800867c: 681b ldr r3, [r3, #0] 800867e: f042 0202 orr.w r2, r2, #2 8008682: 601a str r2, [r3, #0] /* Enable the MAC reception */ SET_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 8008684: 687b ldr r3, [r7, #4] 8008686: 681b ldr r3, [r3, #0] 8008688: 681a ldr r2, [r3, #0] 800868a: 687b ldr r3, [r7, #4] 800868c: 681b ldr r3, [r3, #0] 800868e: f042 0201 orr.w r2, r2, #1 8008692: 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 | 8008694: 687b ldr r3, [r7, #4] 8008696: 681b ldr r3, [r3, #0] 8008698: f503 5380 add.w r3, r3, #4096 @ 0x1000 800869c: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 80086a0: 687b ldr r3, [r7, #4] 80086a2: 681a ldr r2, [r3, #0] 80086a4: f24d 03c1 movw r3, #53441 @ 0xd0c1 80086a8: 430b orrs r3, r1 80086aa: f502 5280 add.w r2, r2, #4096 @ 0x1000 80086ae: f8c2 3134 str.w r3, [r2, #308] @ 0x134 ETH_DMACIER_FBEE | ETH_DMACIER_AIE | ETH_DMACIER_RBUE)); heth->gState = HAL_ETH_STATE_STARTED; 80086b2: 687b ldr r3, [r7, #4] 80086b4: 2223 movs r2, #35 @ 0x23 80086b6: f8c3 2084 str.w r2, [r3, #132] @ 0x84 return HAL_OK; 80086ba: 2300 movs r3, #0 80086bc: e000 b.n 80086c0 } else { return HAL_ERROR; 80086be: 2301 movs r3, #1 } } 80086c0: 4618 mov r0, r3 80086c2: 3708 adds r7, #8 80086c4: 46bd mov sp, r7 80086c6: bd80 pop {r7, pc} 080086c8 : * @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) { 80086c8: b480 push {r7} 80086ca: b085 sub sp, #20 80086cc: af00 add r7, sp, #0 80086ce: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmarxdesc; uint32_t descindex; if (heth->gState == HAL_ETH_STATE_STARTED) 80086d0: 687b ldr r3, [r7, #4] 80086d2: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 80086d6: 2b23 cmp r3, #35 @ 0x23 80086d8: d165 bne.n 80087a6 { /* Set the ETH peripheral state to BUSY */ heth->gState = HAL_ETH_STATE_BUSY; 80086da: 687b ldr r3, [r7, #4] 80086dc: 2223 movs r2, #35 @ 0x23 80086de: 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 | 80086e2: 687b ldr r3, [r7, #4] 80086e4: 681b ldr r3, [r3, #0] 80086e6: f503 5380 add.w r3, r3, #4096 @ 0x1000 80086ea: f8d3 1134 ldr.w r1, [r3, #308] @ 0x134 80086ee: 687b ldr r3, [r7, #4] 80086f0: 681a ldr r2, [r3, #0] 80086f2: 4b30 ldr r3, [pc, #192] @ (80087b4 ) 80086f4: 400b ands r3, r1 80086f6: f502 5280 add.w r2, r2, #4096 @ 0x1000 80086fa: 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); 80086fe: 687b ldr r3, [r7, #4] 8008700: 681b ldr r3, [r3, #0] 8008702: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008706: f8d3 3104 ldr.w r3, [r3, #260] @ 0x104 800870a: 687a ldr r2, [r7, #4] 800870c: 6812 ldr r2, [r2, #0] 800870e: f023 0301 bic.w r3, r3, #1 8008712: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008716: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /* Disable the DMA reception */ CLEAR_BIT(heth->Instance->DMACRCR, ETH_DMACRCR_SR); 800871a: 687b ldr r3, [r7, #4] 800871c: 681b ldr r3, [r3, #0] 800871e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008722: f8d3 3108 ldr.w r3, [r3, #264] @ 0x108 8008726: 687a ldr r2, [r7, #4] 8008728: 6812 ldr r2, [r2, #0] 800872a: f023 0301 bic.w r3, r3, #1 800872e: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008732: f8c2 3108 str.w r3, [r2, #264] @ 0x108 /* Disable the MAC reception */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_RE); 8008736: 687b ldr r3, [r7, #4] 8008738: 681b ldr r3, [r3, #0] 800873a: 681a ldr r2, [r3, #0] 800873c: 687b ldr r3, [r7, #4] 800873e: 681b ldr r3, [r3, #0] 8008740: f022 0201 bic.w r2, r2, #1 8008744: 601a str r2, [r3, #0] /* Set the Flush Transmit FIFO bit */ SET_BIT(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_FTQ); 8008746: 687b ldr r3, [r7, #4] 8008748: 681b ldr r3, [r3, #0] 800874a: f8d3 2d00 ldr.w r2, [r3, #3328] @ 0xd00 800874e: 687b ldr r3, [r7, #4] 8008750: 681b ldr r3, [r3, #0] 8008752: f042 0201 orr.w r2, r2, #1 8008756: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /* Disable the MAC transmission */ CLEAR_BIT(heth->Instance->MACCR, ETH_MACCR_TE); 800875a: 687b ldr r3, [r7, #4] 800875c: 681b ldr r3, [r3, #0] 800875e: 681a ldr r2, [r3, #0] 8008760: 687b ldr r3, [r7, #4] 8008762: 681b ldr r3, [r3, #0] 8008764: f022 0202 bic.w r2, r2, #2 8008768: 601a str r2, [r3, #0] /* Clear IOC bit to all Rx descriptors */ for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 800876a: 2300 movs r3, #0 800876c: 60fb str r3, [r7, #12] 800876e: e00e b.n 800878e { dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descindex]; 8008770: 687b ldr r3, [r7, #4] 8008772: 68fa ldr r2, [r7, #12] 8008774: 3212 adds r2, #18 8008776: f853 3022 ldr.w r3, [r3, r2, lsl #2] 800877a: 60bb str r3, [r7, #8] CLEAR_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCRF_IOC); 800877c: 68bb ldr r3, [r7, #8] 800877e: 68db ldr r3, [r3, #12] 8008780: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 8008784: 68bb ldr r3, [r7, #8] 8008786: 60da str r2, [r3, #12] for (descindex = 0; descindex < (uint32_t)ETH_RX_DESC_CNT; descindex++) 8008788: 68fb ldr r3, [r7, #12] 800878a: 3301 adds r3, #1 800878c: 60fb str r3, [r7, #12] 800878e: 68fb ldr r3, [r7, #12] 8008790: 2b03 cmp r3, #3 8008792: d9ed bls.n 8008770 } heth->RxDescList.ItMode = 0U; 8008794: 687b ldr r3, [r7, #4] 8008796: 2200 movs r2, #0 8008798: 659a str r2, [r3, #88] @ 0x58 heth->gState = HAL_ETH_STATE_READY; 800879a: 687b ldr r3, [r7, #4] 800879c: 2210 movs r2, #16 800879e: f8c3 2084 str.w r2, [r3, #132] @ 0x84 /* Return function status */ return HAL_OK; 80087a2: 2300 movs r3, #0 80087a4: e000 b.n 80087a8 } else { return HAL_ERROR; 80087a6: 2301 movs r3, #1 } } 80087a8: 4618 mov r0, r3 80087aa: 3714 adds r7, #20 80087ac: 46bd mov sp, r7 80087ae: f85d 7b04 ldr.w r7, [sp], #4 80087b2: 4770 bx lr 80087b4: ffff2f3e .word 0xffff2f3e 080087b8 : * 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) { 80087b8: b580 push {r7, lr} 80087ba: b082 sub sp, #8 80087bc: af00 add r7, sp, #0 80087be: 6078 str r0, [r7, #4] 80087c0: 6039 str r1, [r7, #0] if (pTxConfig == NULL) 80087c2: 683b ldr r3, [r7, #0] 80087c4: 2b00 cmp r3, #0 80087c6: d109 bne.n 80087dc { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 80087c8: 687b ldr r3, [r7, #4] 80087ca: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 80087ce: f043 0201 orr.w r2, r3, #1 80087d2: 687b ldr r3, [r7, #4] 80087d4: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 80087d8: 2301 movs r3, #1 80087da: e03a b.n 8008852 } if (heth->gState == HAL_ETH_STATE_STARTED) 80087dc: 687b ldr r3, [r7, #4] 80087de: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 80087e2: 2b23 cmp r3, #35 @ 0x23 80087e4: d134 bne.n 8008850 { /* Save the packet pointer to release. */ heth->TxDescList.CurrentPacketAddress = (uint32_t *)pTxConfig->pData; 80087e6: 683b ldr r3, [r7, #0] 80087e8: 6b5a ldr r2, [r3, #52] @ 0x34 80087ea: 687b ldr r3, [r7, #4] 80087ec: 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) 80087ee: 2201 movs r2, #1 80087f0: 6839 ldr r1, [r7, #0] 80087f2: 6878 ldr r0, [r7, #4] 80087f4: f001 f8b6 bl 8009964 80087f8: 4603 mov r3, r0 80087fa: 2b00 cmp r3, #0 80087fc: d009 beq.n 8008812 { heth->ErrorCode |= HAL_ETH_ERROR_BUSY; 80087fe: 687b ldr r3, [r7, #4] 8008800: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008804: f043 0202 orr.w r2, r3, #2 8008808: 687b ldr r3, [r7, #4] 800880a: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 800880e: 2301 movs r3, #1 8008810: e01f b.n 8008852 __ASM volatile ("dsb 0xF":::"memory"); 8008812: f3bf 8f4f dsb sy } 8008816: bf00 nop /* Ensure completion of descriptor preparation before transmission start */ __DSB(); /* Incr current tx desc index */ INCR_TX_DESC_INDEX(heth->TxDescList.CurTxDesc, 1U); 8008818: 687b ldr r3, [r7, #4] 800881a: 6a9b ldr r3, [r3, #40] @ 0x28 800881c: 1c5a adds r2, r3, #1 800881e: 687b ldr r3, [r7, #4] 8008820: 629a str r2, [r3, #40] @ 0x28 8008822: 687b ldr r3, [r7, #4] 8008824: 6a9b ldr r3, [r3, #40] @ 0x28 8008826: 2b03 cmp r3, #3 8008828: d904 bls.n 8008834 800882a: 687b ldr r3, [r7, #4] 800882c: 6a9b ldr r3, [r3, #40] @ 0x28 800882e: 1f1a subs r2, r3, #4 8008830: 687b ldr r3, [r7, #4] 8008832: 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])); 8008834: 687b ldr r3, [r7, #4] 8008836: 6a99 ldr r1, [r3, #40] @ 0x28 8008838: 687b ldr r3, [r7, #4] 800883a: 681a ldr r2, [r3, #0] 800883c: 687b ldr r3, [r7, #4] 800883e: 3106 adds r1, #6 8008840: f853 3021 ldr.w r3, [r3, r1, lsl #2] 8008844: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008848: f8c2 3120 str.w r3, [r2, #288] @ 0x120 return HAL_OK; 800884c: 2300 movs r3, #0 800884e: e000 b.n 8008852 } else { return HAL_ERROR; 8008850: 2301 movs r3, #1 } } 8008852: 4618 mov r0, r3 8008854: 3708 adds r7, #8 8008856: 46bd mov sp, r7 8008858: bd80 pop {r7, pc} 0800885a : * 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) { 800885a: b580 push {r7, lr} 800885c: b088 sub sp, #32 800885e: af00 add r7, sp, #0 8008860: 6078 str r0, [r7, #4] 8008862: 6039 str r1, [r7, #0] uint32_t descidx; ETH_DMADescTypeDef *dmarxdesc; uint32_t desccnt = 0U; 8008864: 2300 movs r3, #0 8008866: 617b str r3, [r7, #20] uint32_t desccntmax; uint32_t bufflength; uint8_t rxdataready = 0U; 8008868: 2300 movs r3, #0 800886a: 74fb strb r3, [r7, #19] if (pAppBuff == NULL) 800886c: 683b ldr r3, [r7, #0] 800886e: 2b00 cmp r3, #0 8008870: d109 bne.n 8008886 { heth->ErrorCode |= HAL_ETH_ERROR_PARAM; 8008872: 687b ldr r3, [r7, #4] 8008874: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008878: f043 0201 orr.w r2, r3, #1 800887c: 687b ldr r3, [r7, #4] 800887e: f8c3 2088 str.w r2, [r3, #136] @ 0x88 return HAL_ERROR; 8008882: 2301 movs r3, #1 8008884: e0a2 b.n 80089cc } if (heth->gState != HAL_ETH_STATE_STARTED) 8008886: 687b ldr r3, [r7, #4] 8008888: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800888c: 2b23 cmp r3, #35 @ 0x23 800888e: d001 beq.n 8008894 { return HAL_ERROR; 8008890: 2301 movs r3, #1 8008892: e09b b.n 80089cc } descidx = heth->RxDescList.RxDescIdx; 8008894: 687b ldr r3, [r7, #4] 8008896: 6ddb ldr r3, [r3, #92] @ 0x5c 8008898: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 800889a: 687b ldr r3, [r7, #4] 800889c: 69fa ldr r2, [r7, #28] 800889e: 3212 adds r2, #18 80088a0: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80088a4: 61bb str r3, [r7, #24] desccntmax = ETH_RX_DESC_CNT - heth->RxDescList.RxBuildDescCnt; 80088a6: 687b ldr r3, [r7, #4] 80088a8: 6edb ldr r3, [r3, #108] @ 0x6c 80088aa: f1c3 0304 rsb r3, r3, #4 80088ae: 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) 80088b0: e064 b.n 800897c && (rxdataready == 0U)) { if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_CTXT) != (uint32_t)RESET) 80088b2: 69bb ldr r3, [r7, #24] 80088b4: 68db ldr r3, [r3, #12] 80088b6: f003 4380 and.w r3, r3, #1073741824 @ 0x40000000 80088ba: 2b00 cmp r3, #0 80088bc: d007 beq.n 80088ce { /* Get timestamp high */ heth->RxDescList.TimeStamp.TimeStampHigh = dmarxdesc->DESC1; 80088be: 69bb ldr r3, [r7, #24] 80088c0: 685a ldr r2, [r3, #4] 80088c2: 687b ldr r3, [r7, #4] 80088c4: 679a str r2, [r3, #120] @ 0x78 /* Get timestamp low */ heth->RxDescList.TimeStamp.TimeStampLow = dmarxdesc->DESC0; 80088c6: 69bb ldr r3, [r7, #24] 80088c8: 681a ldr r2, [r3, #0] 80088ca: 687b ldr r3, [r7, #4] 80088cc: 675a str r2, [r3, #116] @ 0x74 } if ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) || (heth->RxDescList.pRxStart != NULL)) 80088ce: 69bb ldr r3, [r7, #24] 80088d0: 68db ldr r3, [r3, #12] 80088d2: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 80088d6: 2b00 cmp r3, #0 80088d8: d103 bne.n 80088e2 80088da: 687b ldr r3, [r7, #4] 80088dc: 6fdb ldr r3, [r3, #124] @ 0x7c 80088de: 2b00 cmp r3, #0 80088e0: d03a beq.n 8008958 { /* Check if first descriptor */ if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_FD) != (uint32_t)RESET) 80088e2: 69bb ldr r3, [r7, #24] 80088e4: 68db ldr r3, [r3, #12] 80088e6: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 80088ea: 2b00 cmp r3, #0 80088ec: d005 beq.n 80088fa { heth->RxDescList.RxDescCnt = 0; 80088ee: 687b ldr r3, [r7, #4] 80088f0: 2200 movs r2, #0 80088f2: 661a str r2, [r3, #96] @ 0x60 heth->RxDescList.RxDataLength = 0; 80088f4: 687b ldr r3, [r7, #4] 80088f6: 2200 movs r2, #0 80088f8: 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; 80088fa: 69bb ldr r3, [r7, #24] 80088fc: 68db ldr r3, [r3, #12] 80088fe: f3c3 020e ubfx r2, r3, #0, #15 8008902: 687b ldr r3, [r7, #4] 8008904: 6e5b ldr r3, [r3, #100] @ 0x64 8008906: 1ad3 subs r3, r2, r3 8008908: 60bb str r3, [r7, #8] /* Check if last descriptor */ if (READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_LD) != (uint32_t)RESET) 800890a: 69bb ldr r3, [r7, #24] 800890c: 68db ldr r3, [r3, #12] 800890e: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 8008912: 2b00 cmp r3, #0 8008914: d005 beq.n 8008922 { /* Save Last descriptor index */ heth->RxDescList.pRxLastRxDesc = dmarxdesc->DESC3; 8008916: 69bb ldr r3, [r7, #24] 8008918: 68da ldr r2, [r3, #12] 800891a: 687b ldr r3, [r7, #4] 800891c: 671a str r2, [r3, #112] @ 0x70 /* Packet ready */ rxdataready = 1; 800891e: 2301 movs r3, #1 8008920: 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, 8008922: 687b ldr r3, [r7, #4] 8008924: f103 007c add.w r0, r3, #124 @ 0x7c 8008928: 687b ldr r3, [r7, #4] 800892a: f103 0180 add.w r1, r3, #128 @ 0x80 (uint8_t *)dmarxdesc->BackupAddr0, (uint16_t) bufflength); 800892e: 69bb ldr r3, [r7, #24] 8008930: 691b ldr r3, [r3, #16] HAL_ETH_RxLinkCallback(&heth->RxDescList.pRxStart, &heth->RxDescList.pRxEnd, 8008932: 461a mov r2, r3 8008934: 68bb ldr r3, [r7, #8] 8008936: b29b uxth r3, r3 8008938: f008 faf4 bl 8010f24 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->RxDescList.RxDescCnt++; 800893c: 687b ldr r3, [r7, #4] 800893e: 6e1b ldr r3, [r3, #96] @ 0x60 8008940: 1c5a adds r2, r3, #1 8008942: 687b ldr r3, [r7, #4] 8008944: 661a str r2, [r3, #96] @ 0x60 heth->RxDescList.RxDataLength += bufflength; 8008946: 687b ldr r3, [r7, #4] 8008948: 6e5a ldr r2, [r3, #100] @ 0x64 800894a: 68bb ldr r3, [r7, #8] 800894c: 441a add r2, r3 800894e: 687b ldr r3, [r7, #4] 8008950: 665a str r2, [r3, #100] @ 0x64 /* Clear buffer pointer */ dmarxdesc->BackupAddr0 = 0; 8008952: 69bb ldr r3, [r7, #24] 8008954: 2200 movs r2, #0 8008956: 611a str r2, [r3, #16] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 8008958: 69fb ldr r3, [r7, #28] 800895a: 3301 adds r3, #1 800895c: 61fb str r3, [r7, #28] 800895e: 69fb ldr r3, [r7, #28] 8008960: 2b03 cmp r3, #3 8008962: d902 bls.n 800896a 8008964: 69fb ldr r3, [r7, #28] 8008966: 3b04 subs r3, #4 8008968: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 800896a: 687b ldr r3, [r7, #4] 800896c: 69fa ldr r2, [r7, #28] 800896e: 3212 adds r2, #18 8008970: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8008974: 61bb str r3, [r7, #24] desccnt++; 8008976: 697b ldr r3, [r7, #20] 8008978: 3301 adds r3, #1 800897a: 617b str r3, [r7, #20] while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 800897c: 69bb ldr r3, [r7, #24] 800897e: 68db ldr r3, [r3, #12] && (rxdataready == 0U)) 8008980: 2b00 cmp r3, #0 8008982: db06 blt.n 8008992 while ((READ_BIT(dmarxdesc->DESC3, ETH_DMARXNDESCWBF_OWN) == (uint32_t)RESET) && (desccnt < desccntmax) 8008984: 697a ldr r2, [r7, #20] 8008986: 68fb ldr r3, [r7, #12] 8008988: 429a cmp r2, r3 800898a: d202 bcs.n 8008992 && (rxdataready == 0U)) 800898c: 7cfb ldrb r3, [r7, #19] 800898e: 2b00 cmp r3, #0 8008990: d08f beq.n 80088b2 } heth->RxDescList.RxBuildDescCnt += desccnt; 8008992: 687b ldr r3, [r7, #4] 8008994: 6eda ldr r2, [r3, #108] @ 0x6c 8008996: 697b ldr r3, [r7, #20] 8008998: 441a add r2, r3 800899a: 687b ldr r3, [r7, #4] 800899c: 66da str r2, [r3, #108] @ 0x6c if ((heth->RxDescList.RxBuildDescCnt) != 0U) 800899e: 687b ldr r3, [r7, #4] 80089a0: 6edb ldr r3, [r3, #108] @ 0x6c 80089a2: 2b00 cmp r3, #0 80089a4: d002 beq.n 80089ac { /* Update Descriptors */ ETH_UpdateDescriptor(heth); 80089a6: 6878 ldr r0, [r7, #4] 80089a8: f000 f814 bl 80089d4 } heth->RxDescList.RxDescIdx = descidx; 80089ac: 687b ldr r3, [r7, #4] 80089ae: 69fa ldr r2, [r7, #28] 80089b0: 65da str r2, [r3, #92] @ 0x5c if (rxdataready == 1U) 80089b2: 7cfb ldrb r3, [r7, #19] 80089b4: 2b01 cmp r3, #1 80089b6: d108 bne.n 80089ca { /* Return received packet */ *pAppBuff = heth->RxDescList.pRxStart; 80089b8: 687b ldr r3, [r7, #4] 80089ba: 6fda ldr r2, [r3, #124] @ 0x7c 80089bc: 683b ldr r3, [r7, #0] 80089be: 601a str r2, [r3, #0] /* Reset first element */ heth->RxDescList.pRxStart = NULL; 80089c0: 687b ldr r3, [r7, #4] 80089c2: 2200 movs r2, #0 80089c4: 67da str r2, [r3, #124] @ 0x7c return HAL_OK; 80089c6: 2300 movs r3, #0 80089c8: e000 b.n 80089cc } /* Packet not ready */ return HAL_ERROR; 80089ca: 2301 movs r3, #1 } 80089cc: 4618 mov r0, r3 80089ce: 3720 adds r7, #32 80089d0: 46bd mov sp, r7 80089d2: bd80 pop {r7, pc} 080089d4 : * @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) { 80089d4: b580 push {r7, lr} 80089d6: b088 sub sp, #32 80089d8: af00 add r7, sp, #0 80089da: 6078 str r0, [r7, #4] uint32_t descidx; uint32_t tailidx; uint32_t desccount; ETH_DMADescTypeDef *dmarxdesc; uint8_t *buff = NULL; 80089dc: 2300 movs r3, #0 80089de: 60bb str r3, [r7, #8] uint8_t allocStatus = 1U; 80089e0: 2301 movs r3, #1 80089e2: 74fb strb r3, [r7, #19] descidx = heth->RxDescList.RxBuildDescIdx; 80089e4: 687b ldr r3, [r7, #4] 80089e6: 6e9b ldr r3, [r3, #104] @ 0x68 80089e8: 61fb str r3, [r7, #28] dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 80089ea: 687b ldr r3, [r7, #4] 80089ec: 69fa ldr r2, [r7, #28] 80089ee: 3212 adds r2, #18 80089f0: f853 3022 ldr.w r3, [r3, r2, lsl #2] 80089f4: 617b str r3, [r7, #20] desccount = heth->RxDescList.RxBuildDescCnt; 80089f6: 687b ldr r3, [r7, #4] 80089f8: 6edb ldr r3, [r3, #108] @ 0x6c 80089fa: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 80089fc: e038 b.n 8008a70 { /* Check if a buffer's attached the descriptor */ if (READ_REG(dmarxdesc->BackupAddr0) == 0U) 80089fe: 697b ldr r3, [r7, #20] 8008a00: 691b ldr r3, [r3, #16] 8008a02: 2b00 cmp r3, #0 8008a04: d112 bne.n 8008a2c #if (USE_HAL_ETH_REGISTER_CALLBACKS == 1) /*Call registered Allocate callback*/ heth->rxAllocateCallback(&buff); #else /* Allocate callback */ HAL_ETH_RxAllocateCallback(&buff); 8008a06: f107 0308 add.w r3, r7, #8 8008a0a: 4618 mov r0, r3 8008a0c: f008 fa5a bl 8010ec4 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ if (buff == NULL) 8008a10: 68bb ldr r3, [r7, #8] 8008a12: 2b00 cmp r3, #0 8008a14: d102 bne.n 8008a1c { allocStatus = 0U; 8008a16: 2300 movs r3, #0 8008a18: 74fb strb r3, [r7, #19] 8008a1a: e007 b.n 8008a2c } else { WRITE_REG(dmarxdesc->BackupAddr0, (uint32_t)buff); 8008a1c: 68bb ldr r3, [r7, #8] 8008a1e: 461a mov r2, r3 8008a20: 697b ldr r3, [r7, #20] 8008a22: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->DESC0, (uint32_t)buff); 8008a24: 68bb ldr r3, [r7, #8] 8008a26: 461a mov r2, r3 8008a28: 697b ldr r3, [r7, #20] 8008a2a: 601a str r2, [r3, #0] } } if (allocStatus != 0U) 8008a2c: 7cfb ldrb r3, [r7, #19] 8008a2e: 2b00 cmp r3, #0 8008a30: d01e beq.n 8008a70 { if (heth->RxDescList.ItMode != 0U) 8008a32: 687b ldr r3, [r7, #4] 8008a34: 6d9b ldr r3, [r3, #88] @ 0x58 8008a36: 2b00 cmp r3, #0 8008a38: d004 beq.n 8008a44 { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V | ETH_DMARXNDESCRF_IOC); 8008a3a: 697b ldr r3, [r7, #20] 8008a3c: f04f 4241 mov.w r2, #3238002688 @ 0xc1000000 8008a40: 60da str r2, [r3, #12] 8008a42: e003 b.n 8008a4c } else { WRITE_REG(dmarxdesc->DESC3, ETH_DMARXNDESCRF_OWN | ETH_DMARXNDESCRF_BUF1V); 8008a44: 697b ldr r3, [r7, #20] 8008a46: f04f 4201 mov.w r2, #2164260864 @ 0x81000000 8008a4a: 60da str r2, [r3, #12] } /* Increment current rx descriptor index */ INCR_RX_DESC_INDEX(descidx, 1U); 8008a4c: 69fb ldr r3, [r7, #28] 8008a4e: 3301 adds r3, #1 8008a50: 61fb str r3, [r7, #28] 8008a52: 69fb ldr r3, [r7, #28] 8008a54: 2b03 cmp r3, #3 8008a56: d902 bls.n 8008a5e 8008a58: 69fb ldr r3, [r7, #28] 8008a5a: 3b04 subs r3, #4 8008a5c: 61fb str r3, [r7, #28] /* Get current descriptor address */ dmarxdesc = (ETH_DMADescTypeDef *)heth->RxDescList.RxDesc[descidx]; 8008a5e: 687b ldr r3, [r7, #4] 8008a60: 69fa ldr r2, [r7, #28] 8008a62: 3212 adds r2, #18 8008a64: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8008a68: 617b str r3, [r7, #20] desccount--; 8008a6a: 69bb ldr r3, [r7, #24] 8008a6c: 3b01 subs r3, #1 8008a6e: 61bb str r3, [r7, #24] while ((desccount > 0U) && (allocStatus != 0U)) 8008a70: 69bb ldr r3, [r7, #24] 8008a72: 2b00 cmp r3, #0 8008a74: d002 beq.n 8008a7c 8008a76: 7cfb ldrb r3, [r7, #19] 8008a78: 2b00 cmp r3, #0 8008a7a: d1c0 bne.n 80089fe } } if (heth->RxDescList.RxBuildDescCnt != desccount) 8008a7c: 687b ldr r3, [r7, #4] 8008a7e: 6edb ldr r3, [r3, #108] @ 0x6c 8008a80: 69ba ldr r2, [r7, #24] 8008a82: 429a cmp r2, r3 8008a84: d01b beq.n 8008abe { /* Set the tail pointer index */ tailidx = (descidx + 1U) % ETH_RX_DESC_CNT; 8008a86: 69fb ldr r3, [r7, #28] 8008a88: 3301 adds r3, #1 8008a8a: f003 0303 and.w r3, r3, #3 8008a8e: 60fb str r3, [r7, #12] __ASM volatile ("dmb 0xF":::"memory"); 8008a90: f3bf 8f5f dmb sy } 8008a94: 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)))); 8008a96: 687b ldr r3, [r7, #4] 8008a98: 6919 ldr r1, [r3, #16] 8008a9a: 68fa ldr r2, [r7, #12] 8008a9c: 4613 mov r3, r2 8008a9e: 005b lsls r3, r3, #1 8008aa0: 4413 add r3, r2 8008aa2: 00db lsls r3, r3, #3 8008aa4: 18ca adds r2, r1, r3 8008aa6: 687b ldr r3, [r7, #4] 8008aa8: 681b ldr r3, [r3, #0] 8008aaa: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008aae: f8c3 2128 str.w r2, [r3, #296] @ 0x128 heth->RxDescList.RxBuildDescIdx = descidx; 8008ab2: 687b ldr r3, [r7, #4] 8008ab4: 69fa ldr r2, [r7, #28] 8008ab6: 669a str r2, [r3, #104] @ 0x68 heth->RxDescList.RxBuildDescCnt = desccount; 8008ab8: 687b ldr r3, [r7, #4] 8008aba: 69ba ldr r2, [r7, #24] 8008abc: 66da str r2, [r3, #108] @ 0x6c } } 8008abe: bf00 nop 8008ac0: 3720 adds r7, #32 8008ac2: 46bd mov sp, r7 8008ac4: bd80 pop {r7, pc} 08008ac6 : * @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) { 8008ac6: b580 push {r7, lr} 8008ac8: b086 sub sp, #24 8008aca: af00 add r7, sp, #0 8008acc: 6078 str r0, [r7, #4] ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; 8008ace: 687b ldr r3, [r7, #4] 8008ad0: 3318 adds r3, #24 8008ad2: 60bb str r3, [r7, #8] uint32_t numOfBuf = dmatxdesclist->BuffersInUse; 8008ad4: 68bb ldr r3, [r7, #8] 8008ad6: 6a9b ldr r3, [r3, #40] @ 0x28 8008ad8: 617b str r3, [r7, #20] uint32_t idx = dmatxdesclist->releaseIndex; 8008ada: 68bb ldr r3, [r7, #8] 8008adc: 6adb ldr r3, [r3, #44] @ 0x2c 8008ade: 613b str r3, [r7, #16] uint8_t pktTxStatus = 1U; 8008ae0: 2301 movs r3, #1 8008ae2: 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)) 8008ae4: e047 b.n 8008b76 { pktInUse = 1U; 8008ae6: 2301 movs r3, #1 8008ae8: 73bb strb r3, [r7, #14] numOfBuf--; 8008aea: 697b ldr r3, [r7, #20] 8008aec: 3b01 subs r3, #1 8008aee: 617b str r3, [r7, #20] /* If no packet, just examine the next packet. */ if (dmatxdesclist->PacketAddress[idx] == NULL) 8008af0: 68ba ldr r2, [r7, #8] 8008af2: 693b ldr r3, [r7, #16] 8008af4: 3304 adds r3, #4 8008af6: 009b lsls r3, r3, #2 8008af8: 4413 add r3, r2 8008afa: 685b ldr r3, [r3, #4] 8008afc: 2b00 cmp r3, #0 8008afe: d10a bne.n 8008b16 { /* No packet in use, skip to next. */ INCR_TX_DESC_INDEX(idx, 1U); 8008b00: 693b ldr r3, [r7, #16] 8008b02: 3301 adds r3, #1 8008b04: 613b str r3, [r7, #16] 8008b06: 693b ldr r3, [r7, #16] 8008b08: 2b03 cmp r3, #3 8008b0a: d902 bls.n 8008b12 8008b0c: 693b ldr r3, [r7, #16] 8008b0e: 3b04 subs r3, #4 8008b10: 613b str r3, [r7, #16] pktInUse = 0U; 8008b12: 2300 movs r3, #0 8008b14: 73bb strb r3, [r7, #14] } if (pktInUse != 0U) 8008b16: 7bbb ldrb r3, [r7, #14] 8008b18: 2b00 cmp r3, #0 8008b1a: d02c beq.n 8008b76 { /* Determine if the packet has been transmitted. */ if ((heth->Init.TxDesc[idx].DESC3 & ETH_DMATXNDESCRF_OWN) == 0U) 8008b1c: 687b ldr r3, [r7, #4] 8008b1e: 68d9 ldr r1, [r3, #12] 8008b20: 693a ldr r2, [r7, #16] 8008b22: 4613 mov r3, r2 8008b24: 005b lsls r3, r3, #1 8008b26: 4413 add r3, r2 8008b28: 00db lsls r3, r3, #3 8008b2a: 440b add r3, r1 8008b2c: 68db ldr r3, [r3, #12] 8008b2e: 2b00 cmp r3, #0 8008b30: db1f blt.n 8008b72 { HAL_ETH_TxPtpCallback(dmatxdesclist->PacketAddress[idx], timestamp); } #endif /* HAL_ETH_USE_PTP */ /* Release the packet. */ HAL_ETH_TxFreeCallback(dmatxdesclist->PacketAddress[idx]); 8008b32: 68ba ldr r2, [r7, #8] 8008b34: 693b ldr r3, [r7, #16] 8008b36: 3304 adds r3, #4 8008b38: 009b lsls r3, r3, #2 8008b3a: 4413 add r3, r2 8008b3c: 685b ldr r3, [r3, #4] 8008b3e: 4618 mov r0, r3 8008b40: f008 fa58 bl 8010ff4 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ /* Clear the entry in the in-use array. */ dmatxdesclist->PacketAddress[idx] = NULL; 8008b44: 68ba ldr r2, [r7, #8] 8008b46: 693b ldr r3, [r7, #16] 8008b48: 3304 adds r3, #4 8008b4a: 009b lsls r3, r3, #2 8008b4c: 4413 add r3, r2 8008b4e: 2200 movs r2, #0 8008b50: 605a str r2, [r3, #4] /* Update the transmit relesae index and number of buffers in use. */ INCR_TX_DESC_INDEX(idx, 1U); 8008b52: 693b ldr r3, [r7, #16] 8008b54: 3301 adds r3, #1 8008b56: 613b str r3, [r7, #16] 8008b58: 693b ldr r3, [r7, #16] 8008b5a: 2b03 cmp r3, #3 8008b5c: d902 bls.n 8008b64 8008b5e: 693b ldr r3, [r7, #16] 8008b60: 3b04 subs r3, #4 8008b62: 613b str r3, [r7, #16] dmatxdesclist->BuffersInUse = numOfBuf; 8008b64: 68bb ldr r3, [r7, #8] 8008b66: 697a ldr r2, [r7, #20] 8008b68: 629a str r2, [r3, #40] @ 0x28 dmatxdesclist->releaseIndex = idx; 8008b6a: 68bb ldr r3, [r7, #8] 8008b6c: 693a ldr r2, [r7, #16] 8008b6e: 62da str r2, [r3, #44] @ 0x2c 8008b70: e001 b.n 8008b76 } else { /* Get out of the loop! */ pktTxStatus = 0U; 8008b72: 2300 movs r3, #0 8008b74: 73fb strb r3, [r7, #15] while ((numOfBuf != 0U) && (pktTxStatus != 0U)) 8008b76: 697b ldr r3, [r7, #20] 8008b78: 2b00 cmp r3, #0 8008b7a: d002 beq.n 8008b82 8008b7c: 7bfb ldrb r3, [r7, #15] 8008b7e: 2b00 cmp r3, #0 8008b80: d1b1 bne.n 8008ae6 } } } return HAL_OK; 8008b82: 2300 movs r3, #0 } 8008b84: 4618 mov r0, r3 8008b86: 3718 adds r7, #24 8008b88: 46bd mov sp, r7 8008b8a: bd80 pop {r7, pc} 08008b8c : * @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) { 8008b8c: b580 push {r7, lr} 8008b8e: b086 sub sp, #24 8008b90: af00 add r7, sp, #0 8008b92: 6078 str r0, [r7, #4] uint32_t mac_flag = READ_REG(heth->Instance->MACISR); 8008b94: 687b ldr r3, [r7, #4] 8008b96: 681b ldr r3, [r3, #0] 8008b98: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 8008b9c: 617b str r3, [r7, #20] uint32_t dma_flag = READ_REG(heth->Instance->DMACSR); 8008b9e: 687b ldr r3, [r7, #4] 8008ba0: 681b ldr r3, [r3, #0] 8008ba2: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008ba6: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 8008baa: 613b str r3, [r7, #16] uint32_t dma_itsource = READ_REG(heth->Instance->DMACIER); 8008bac: 687b ldr r3, [r7, #4] 8008bae: 681b ldr r3, [r3, #0] 8008bb0: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008bb4: f8d3 3134 ldr.w r3, [r3, #308] @ 0x134 8008bb8: 60fb str r3, [r7, #12] uint32_t exti_d1_flag = READ_REG(EXTI_D1->PR3); 8008bba: 4b6d ldr r3, [pc, #436] @ (8008d70 ) 8008bbc: 6a9b ldr r3, [r3, #40] @ 0x28 8008bbe: 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)) 8008bc0: 693b ldr r3, [r7, #16] 8008bc2: f003 0340 and.w r3, r3, #64 @ 0x40 8008bc6: 2b00 cmp r3, #0 8008bc8: d010 beq.n 8008bec 8008bca: 68fb ldr r3, [r7, #12] 8008bcc: f003 0340 and.w r3, r3, #64 @ 0x40 8008bd0: 2b00 cmp r3, #0 8008bd2: d00b beq.n 8008bec { /* Clear the Eth DMA Rx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_RI | ETH_DMACSR_NIS); 8008bd4: 687b ldr r3, [r7, #4] 8008bd6: 681b ldr r3, [r3, #0] 8008bd8: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008bdc: 461a mov r2, r3 8008bde: f248 0340 movw r3, #32832 @ 0x8040 8008be2: 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); 8008be6: 6878 ldr r0, [r7, #4] 8008be8: f007 fcf4 bl 80105d4 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* Packet transmitted */ if (((dma_flag & ETH_DMACSR_TI) != 0U) && ((dma_itsource & ETH_DMACIER_TIE) != 0U)) 8008bec: 693b ldr r3, [r7, #16] 8008bee: f003 0301 and.w r3, r3, #1 8008bf2: 2b00 cmp r3, #0 8008bf4: d010 beq.n 8008c18 8008bf6: 68fb ldr r3, [r7, #12] 8008bf8: f003 0301 and.w r3, r3, #1 8008bfc: 2b00 cmp r3, #0 8008bfe: d00b beq.n 8008c18 { /* Clear the Eth DMA Tx IT pending bits */ __HAL_ETH_DMA_CLEAR_IT(heth, ETH_DMACSR_TI | ETH_DMACSR_NIS); 8008c00: 687b ldr r3, [r7, #4] 8008c02: 681b ldr r3, [r3, #0] 8008c04: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008c08: 461a mov r2, r3 8008c0a: f248 0301 movw r3, #32769 @ 0x8001 8008c0e: 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); 8008c12: 6878 ldr r0, [r7, #4] 8008c14: f007 fcee bl 80105f4 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* ETH DMA Error */ if (((dma_flag & ETH_DMACSR_AIS) != 0U) && ((dma_itsource & ETH_DMACIER_AIE) != 0U)) 8008c18: 693b ldr r3, [r7, #16] 8008c1a: f403 4380 and.w r3, r3, #16384 @ 0x4000 8008c1e: 2b00 cmp r3, #0 8008c20: d047 beq.n 8008cb2 8008c22: 68fb ldr r3, [r7, #12] 8008c24: f403 4380 and.w r3, r3, #16384 @ 0x4000 8008c28: 2b00 cmp r3, #0 8008c2a: d042 beq.n 8008cb2 { heth->ErrorCode |= HAL_ETH_ERROR_DMA; 8008c2c: 687b ldr r3, [r7, #4] 8008c2e: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008c32: f043 0208 orr.w r2, r3, #8 8008c36: 687b ldr r3, [r7, #4] 8008c38: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* if fatal bus error occurred */ if ((dma_flag & ETH_DMACSR_FBE) != 0U) 8008c3c: 693b ldr r3, [r7, #16] 8008c3e: f403 5380 and.w r3, r3, #4096 @ 0x1000 8008c42: 2b00 cmp r3, #0 8008c44: d01e beq.n 8008c84 { /* Get DMA error code */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_FBE | ETH_DMACSR_TPS | ETH_DMACSR_RPS)); 8008c46: 687b ldr r3, [r7, #4] 8008c48: 681b ldr r3, [r3, #0] 8008c4a: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008c4e: f8d3 2160 ldr.w r2, [r3, #352] @ 0x160 8008c52: f241 1302 movw r3, #4354 @ 0x1102 8008c56: 4013 ands r3, r2 8008c58: 687a ldr r2, [r7, #4] 8008c5a: f8c2 308c str.w r3, [r2, #140] @ 0x8c /* Disable all interrupts */ __HAL_ETH_DMA_DISABLE_IT(heth, ETH_DMACIER_NIE | ETH_DMACIER_AIE); 8008c5e: 687b ldr r3, [r7, #4] 8008c60: 681b ldr r3, [r3, #0] 8008c62: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008c66: f8d3 3134 ldr.w r3, [r3, #308] @ 0x134 8008c6a: 687a ldr r2, [r7, #4] 8008c6c: 6812 ldr r2, [r2, #0] 8008c6e: f423 4340 bic.w r3, r3, #49152 @ 0xc000 8008c72: f502 5280 add.w r2, r2, #4096 @ 0x1000 8008c76: f8c2 3134 str.w r3, [r2, #308] @ 0x134 /* Set HAL state to ERROR */ heth->gState = HAL_ETH_STATE_ERROR; 8008c7a: 687b ldr r3, [r7, #4] 8008c7c: 22e0 movs r2, #224 @ 0xe0 8008c7e: f8c3 2084 str.w r2, [r3, #132] @ 0x84 8008c82: e013 b.n 8008cac } else { /* Get DMA error status */ heth->DMAErrorCode = READ_BIT(heth->Instance->DMACSR, (ETH_DMACSR_CDE | ETH_DMACSR_ETI | ETH_DMACSR_RWT | 8008c84: 687b ldr r3, [r7, #4] 8008c86: 681b ldr r3, [r3, #0] 8008c88: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008c8c: f8d3 3160 ldr.w r3, [r3, #352] @ 0x160 8008c90: f403 42cd and.w r2, r3, #26240 @ 0x6680 8008c94: 687b ldr r3, [r7, #4] 8008c96: 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 | 8008c9a: 687b ldr r3, [r7, #4] 8008c9c: 681b ldr r3, [r3, #0] 8008c9e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8008ca2: 461a mov r2, r3 8008ca4: f44f 43cd mov.w r3, #26240 @ 0x6680 8008ca8: 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); 8008cac: 6878 ldr r0, [r7, #4] 8008cae: f007 fcb1 bl 8010614 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } /* ETH MAC Error IT */ if (((mac_flag & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 8008cb2: 697b ldr r3, [r7, #20] 8008cb4: f403 4380 and.w r3, r3, #16384 @ 0x4000 8008cb8: 2b00 cmp r3, #0 8008cba: d104 bne.n 8008cc6 ((mac_flag & ETH_MACIER_TXSTSIE) == ETH_MACIER_TXSTSIE)) 8008cbc: 697b ldr r3, [r7, #20] 8008cbe: f403 5300 and.w r3, r3, #8192 @ 0x2000 if (((mac_flag & ETH_MACIER_RXSTSIE) == ETH_MACIER_RXSTSIE) || \ 8008cc2: 2b00 cmp r3, #0 8008cc4: d019 beq.n 8008cfa { heth->ErrorCode |= HAL_ETH_ERROR_MAC; 8008cc6: 687b ldr r3, [r7, #4] 8008cc8: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 8008ccc: f043 0210 orr.w r2, r3, #16 8008cd0: 687b ldr r3, [r7, #4] 8008cd2: 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); 8008cd6: 687b ldr r3, [r7, #4] 8008cd8: 681b ldr r3, [r3, #0] 8008cda: f8d3 20b8 ldr.w r2, [r3, #184] @ 0xb8 8008cde: 687b ldr r3, [r7, #4] 8008ce0: f8c3 2090 str.w r2, [r3, #144] @ 0x90 heth->gState = HAL_ETH_STATE_ERROR; 8008ce4: 687b ldr r3, [r7, #4] 8008ce6: 22e0 movs r2, #224 @ 0xe0 8008ce8: 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); 8008cec: 6878 ldr r0, [r7, #4] 8008cee: f007 fc91 bl 8010614 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACErrorCode = (uint32_t)(0x0U); 8008cf2: 687b ldr r3, [r7, #4] 8008cf4: 2200 movs r2, #0 8008cf6: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* ETH PMT IT */ if ((mac_flag & ETH_MAC_PMT_IT) != 0U) 8008cfa: 697b ldr r3, [r7, #20] 8008cfc: f003 0310 and.w r3, r3, #16 8008d00: 2b00 cmp r3, #0 8008d02: d00f beq.n 8008d24 { /* 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)); 8008d04: 687b ldr r3, [r7, #4] 8008d06: 681b ldr r3, [r3, #0] 8008d08: f8d3 30c0 ldr.w r3, [r3, #192] @ 0xc0 8008d0c: f003 0260 and.w r2, r3, #96 @ 0x60 8008d10: 687b ldr r3, [r7, #4] 8008d12: 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); 8008d16: 6878 ldr r0, [r7, #4] 8008d18: f000 f82c bl 8008d74 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACWakeUpEvent = (uint32_t)(0x0U); 8008d1c: 687b ldr r3, [r7, #4] 8008d1e: 2200 movs r2, #0 8008d20: f8c3 2094 str.w r2, [r3, #148] @ 0x94 } /* ETH EEE IT */ if ((mac_flag & ETH_MAC_LPI_IT) != 0U) 8008d24: 697b ldr r3, [r7, #20] 8008d26: f003 0320 and.w r3, r3, #32 8008d2a: 2b00 cmp r3, #0 8008d2c: d00f beq.n 8008d4e { /* Get MAC LPI interrupt source and clear the status register pending bit */ heth->MACLPIEvent = READ_BIT(heth->Instance->MACLCSR, 0x0000000FU); 8008d2e: 687b ldr r3, [r7, #4] 8008d30: 681b ldr r3, [r3, #0] 8008d32: f8d3 30d0 ldr.w r3, [r3, #208] @ 0xd0 8008d36: f003 020f and.w r2, r3, #15 8008d3a: 687b ldr r3, [r7, #4] 8008d3c: 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); 8008d40: 6878 ldr r0, [r7, #4] 8008d42: f000 f821 bl 8008d88 #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ heth->MACLPIEvent = (uint32_t)(0x0U); 8008d46: 687b ldr r3, [r7, #4] 8008d48: 2200 movs r2, #0 8008d4a: 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) 8008d4e: 68bb ldr r3, [r7, #8] 8008d50: f403 0380 and.w r3, r3, #4194304 @ 0x400000 8008d54: 2b00 cmp r3, #0 8008d56: d006 beq.n 8008d66 { /* Clear ETH WAKEUP Exti pending bit */ __HAL_ETH_WAKEUP_EXTI_CLEAR_FLAG(ETH_WAKEUP_EXTI_LINE); 8008d58: 4b05 ldr r3, [pc, #20] @ (8008d70 ) 8008d5a: f44f 0280 mov.w r2, #4194304 @ 0x400000 8008d5e: 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); 8008d60: 6878 ldr r0, [r7, #4] 8008d62: f000 f81b bl 8008d9c #endif /* USE_HAL_ETH_REGISTER_CALLBACKS */ } #endif /* DUAL_CORE */ } 8008d66: bf00 nop 8008d68: 3718 adds r7, #24 8008d6a: 46bd mov sp, r7 8008d6c: bd80 pop {r7, pc} 8008d6e: bf00 nop 8008d70: 58000080 .word 0x58000080 08008d74 : * @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) { 8008d74: b480 push {r7} 8008d76: b083 sub sp, #12 8008d78: af00 add r7, sp, #0 8008d7a: 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 */ } 8008d7c: bf00 nop 8008d7e: 370c adds r7, #12 8008d80: 46bd mov sp, r7 8008d82: f85d 7b04 ldr.w r7, [sp], #4 8008d86: 4770 bx lr 08008d88 : * @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) { 8008d88: b480 push {r7} 8008d8a: b083 sub sp, #12 8008d8c: af00 add r7, sp, #0 8008d8e: 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 */ } 8008d90: bf00 nop 8008d92: 370c adds r7, #12 8008d94: 46bd mov sp, r7 8008d96: f85d 7b04 ldr.w r7, [sp], #4 8008d9a: 4770 bx lr 08008d9c : * @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) { 8008d9c: b480 push {r7} 8008d9e: b083 sub sp, #12 8008da0: af00 add r7, sp, #0 8008da2: 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 */ } 8008da4: bf00 nop 8008da6: 370c adds r7, #12 8008da8: 46bd mov sp, r7 8008daa: f85d 7b04 ldr.w r7, [sp], #4 8008dae: 4770 bx lr 08008db0 : * @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) { 8008db0: b580 push {r7, lr} 8008db2: b086 sub sp, #24 8008db4: af00 add r7, sp, #0 8008db6: 60f8 str r0, [r7, #12] 8008db8: 60b9 str r1, [r7, #8] 8008dba: 607a str r2, [r7, #4] 8008dbc: 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) 8008dbe: 68fb ldr r3, [r7, #12] 8008dc0: 681b ldr r3, [r3, #0] 8008dc2: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008dc6: f003 0301 and.w r3, r3, #1 8008dca: 2b00 cmp r3, #0 8008dcc: d001 beq.n 8008dd2 { return HAL_ERROR; 8008dce: 2301 movs r3, #1 8008dd0: e03e b.n 8008e50 } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8008dd2: 68fb ldr r3, [r7, #12] 8008dd4: 681b ldr r3, [r3, #0] 8008dd6: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008dda: 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)); 8008ddc: 697b ldr r3, [r7, #20] 8008dde: f023 7278 bic.w r2, r3, #65011712 @ 0x3e00000 8008de2: 68bb ldr r3, [r7, #8] 8008de4: 055b lsls r3, r3, #21 8008de6: 4313 orrs r3, r2 8008de8: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8008dea: 697b ldr r3, [r7, #20] 8008dec: f423 12f8 bic.w r2, r3, #2031616 @ 0x1f0000 8008df0: 687b ldr r3, [r7, #4] 8008df2: 041b lsls r3, r3, #16 8008df4: 4313 orrs r3, r2 8008df6: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_RD); 8008df8: 697b ldr r3, [r7, #20] 8008dfa: f043 030c orr.w r3, r3, #12 8008dfe: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8008e00: 697b ldr r3, [r7, #20] 8008e02: f043 0301 orr.w r3, r3, #1 8008e06: 617b str r3, [r7, #20] /* Write the result value into the MDII Address register */ WRITE_REG(heth->Instance->MACMDIOAR, tmpreg); 8008e08: 68fb ldr r3, [r7, #12] 8008e0a: 681b ldr r3, [r3, #0] 8008e0c: 697a ldr r2, [r7, #20] 8008e0e: f8c3 2200 str.w r2, [r3, #512] @ 0x200 tickstart = HAL_GetTick(); 8008e12: f7fc fd13 bl 800583c 8008e16: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008e18: e009 b.n 8008e2e { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8008e1a: f7fc fd0f bl 800583c 8008e1e: 4602 mov r2, r0 8008e20: 693b ldr r3, [r7, #16] 8008e22: 1ad3 subs r3, r2, r3 8008e24: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8008e28: d901 bls.n 8008e2e { return HAL_ERROR; 8008e2a: 2301 movs r3, #1 8008e2c: e010 b.n 8008e50 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008e2e: 68fb ldr r3, [r7, #12] 8008e30: 681b ldr r3, [r3, #0] 8008e32: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008e36: f003 0301 and.w r3, r3, #1 8008e3a: 2b00 cmp r3, #0 8008e3c: d1ed bne.n 8008e1a } } /* Get MACMIIDR value */ WRITE_REG(*pRegValue, (uint16_t)heth->Instance->MACMDIODR); 8008e3e: 68fb ldr r3, [r7, #12] 8008e40: 681b ldr r3, [r3, #0] 8008e42: f8d3 3204 ldr.w r3, [r3, #516] @ 0x204 8008e46: b29b uxth r3, r3 8008e48: 461a mov r2, r3 8008e4a: 683b ldr r3, [r7, #0] 8008e4c: 601a str r2, [r3, #0] return HAL_OK; 8008e4e: 2300 movs r3, #0 } 8008e50: 4618 mov r0, r3 8008e52: 3718 adds r7, #24 8008e54: 46bd mov sp, r7 8008e56: bd80 pop {r7, pc} 08008e58 : * @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) { 8008e58: b580 push {r7, lr} 8008e5a: b086 sub sp, #24 8008e5c: af00 add r7, sp, #0 8008e5e: 60f8 str r0, [r7, #12] 8008e60: 60b9 str r1, [r7, #8] 8008e62: 607a str r2, [r7, #4] 8008e64: 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) 8008e66: 68fb ldr r3, [r7, #12] 8008e68: 681b ldr r3, [r3, #0] 8008e6a: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008e6e: f003 0301 and.w r3, r3, #1 8008e72: 2b00 cmp r3, #0 8008e74: d001 beq.n 8008e7a { return HAL_ERROR; 8008e76: 2301 movs r3, #1 8008e78: e03c b.n 8008ef4 } /* Get the MACMDIOAR value */ WRITE_REG(tmpreg, heth->Instance->MACMDIOAR); 8008e7a: 68fb ldr r3, [r7, #12] 8008e7c: 681b ldr r3, [r3, #0] 8008e7e: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008e82: 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)); 8008e84: 697b ldr r3, [r7, #20] 8008e86: f023 7278 bic.w r2, r3, #65011712 @ 0x3e00000 8008e8a: 68bb ldr r3, [r7, #8] 8008e8c: 055b lsls r3, r3, #21 8008e8e: 4313 orrs r3, r2 8008e90: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_RDA, (PHYReg << 16)); 8008e92: 697b ldr r3, [r7, #20] 8008e94: f423 12f8 bic.w r2, r3, #2031616 @ 0x1f0000 8008e98: 687b ldr r3, [r7, #4] 8008e9a: 041b lsls r3, r3, #16 8008e9c: 4313 orrs r3, r2 8008e9e: 617b str r3, [r7, #20] MODIFY_REG(tmpreg, ETH_MACMDIOAR_MOC, ETH_MACMDIOAR_MOC_WR); 8008ea0: 697b ldr r3, [r7, #20] 8008ea2: f023 030c bic.w r3, r3, #12 8008ea6: f043 0304 orr.w r3, r3, #4 8008eaa: 617b str r3, [r7, #20] SET_BIT(tmpreg, ETH_MACMDIOAR_MB); 8008eac: 697b ldr r3, [r7, #20] 8008eae: f043 0301 orr.w r3, r3, #1 8008eb2: 617b str r3, [r7, #20] /* Give the value to the MII data register */ WRITE_REG(ETH->MACMDIODR, (uint16_t)RegValue); 8008eb4: 683b ldr r3, [r7, #0] 8008eb6: b29a uxth r2, r3 8008eb8: 4b10 ldr r3, [pc, #64] @ (8008efc ) 8008eba: f8c3 2204 str.w r2, [r3, #516] @ 0x204 /* Write the result value into the MII Address register */ WRITE_REG(ETH->MACMDIOAR, tmpreg); 8008ebe: 4a0f ldr r2, [pc, #60] @ (8008efc ) 8008ec0: 697b ldr r3, [r7, #20] 8008ec2: f8c2 3200 str.w r3, [r2, #512] @ 0x200 tickstart = HAL_GetTick(); 8008ec6: f7fc fcb9 bl 800583c 8008eca: 6138 str r0, [r7, #16] /* Wait for the Busy flag */ while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008ecc: e009 b.n 8008ee2 { if (((HAL_GetTick() - tickstart) > ETH_MDIO_BUS_TIMEOUT)) 8008ece: f7fc fcb5 bl 800583c 8008ed2: 4602 mov r2, r0 8008ed4: 693b ldr r3, [r7, #16] 8008ed6: 1ad3 subs r3, r2, r3 8008ed8: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 8008edc: d901 bls.n 8008ee2 { return HAL_ERROR; 8008ede: 2301 movs r3, #1 8008ee0: e008 b.n 8008ef4 while (READ_BIT(heth->Instance->MACMDIOAR, ETH_MACMDIOAR_MB) > 0U) 8008ee2: 68fb ldr r3, [r7, #12] 8008ee4: 681b ldr r3, [r3, #0] 8008ee6: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 8008eea: f003 0301 and.w r3, r3, #1 8008eee: 2b00 cmp r3, #0 8008ef0: d1ed bne.n 8008ece } } return HAL_OK; 8008ef2: 2300 movs r3, #0 } 8008ef4: 4618 mov r0, r3 8008ef6: 3718 adds r7, #24 8008ef8: 46bd mov sp, r7 8008efa: bd80 pop {r7, pc} 8008efc: 40028000 .word 0x40028000 08008f00 : * @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) { 8008f00: b480 push {r7} 8008f02: b083 sub sp, #12 8008f04: af00 add r7, sp, #0 8008f06: 6078 str r0, [r7, #4] 8008f08: 6039 str r1, [r7, #0] if (macconf == NULL) 8008f0a: 683b ldr r3, [r7, #0] 8008f0c: 2b00 cmp r3, #0 8008f0e: d101 bne.n 8008f14 { return HAL_ERROR; 8008f10: 2301 movs r3, #1 8008f12: e1c3 b.n 800929c } /* Get MAC parameters */ macconf->PreambleLength = READ_BIT(heth->Instance->MACCR, ETH_MACCR_PRELEN); 8008f14: 687b ldr r3, [r7, #4] 8008f16: 681b ldr r3, [r3, #0] 8008f18: 681b ldr r3, [r3, #0] 8008f1a: f003 020c and.w r2, r3, #12 8008f1e: 683b ldr r3, [r7, #0] 8008f20: 62da str r2, [r3, #44] @ 0x2c macconf->DeferralCheck = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DC) >> 4) > 0U) ? ENABLE : DISABLE; 8008f22: 687b ldr r3, [r7, #4] 8008f24: 681b ldr r3, [r3, #0] 8008f26: 681b ldr r3, [r3, #0] 8008f28: f003 0310 and.w r3, r3, #16 8008f2c: 2b00 cmp r3, #0 8008f2e: bf14 ite ne 8008f30: 2301 movne r3, #1 8008f32: 2300 moveq r3, #0 8008f34: b2db uxtb r3, r3 8008f36: 461a mov r2, r3 8008f38: 683b ldr r3, [r7, #0] 8008f3a: f883 2028 strb.w r2, [r3, #40] @ 0x28 macconf->BackOffLimit = READ_BIT(heth->Instance->MACCR, ETH_MACCR_BL); 8008f3e: 687b ldr r3, [r7, #4] 8008f40: 681b ldr r3, [r3, #0] 8008f42: 681b ldr r3, [r3, #0] 8008f44: f003 0260 and.w r2, r3, #96 @ 0x60 8008f48: 683b ldr r3, [r7, #0] 8008f4a: 625a str r2, [r3, #36] @ 0x24 macconf->RetryTransmission = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DR) >> 8) == 0U) ? ENABLE : DISABLE; 8008f4c: 687b ldr r3, [r7, #4] 8008f4e: 681b ldr r3, [r3, #0] 8008f50: 681b ldr r3, [r3, #0] 8008f52: f403 7380 and.w r3, r3, #256 @ 0x100 8008f56: 2b00 cmp r3, #0 8008f58: bf0c ite eq 8008f5a: 2301 moveq r3, #1 8008f5c: 2300 movne r3, #0 8008f5e: b2db uxtb r3, r3 8008f60: 461a mov r2, r3 8008f62: 683b ldr r3, [r7, #0] 8008f64: f883 2020 strb.w r2, [r3, #32] macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8008f68: 687b ldr r3, [r7, #4] 8008f6a: 681b ldr r3, [r3, #0] 8008f6c: 681b ldr r3, [r3, #0] 8008f6e: f403 7300 and.w r3, r3, #512 @ 0x200 ? ENABLE : DISABLE; 8008f72: 2b00 cmp r3, #0 8008f74: bf14 ite ne 8008f76: 2301 movne r3, #1 8008f78: 2300 moveq r3, #0 8008f7a: b2db uxtb r3, r3 8008f7c: 461a mov r2, r3 macconf->CarrierSenseDuringTransmit = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DCRS) >> 9) > 0U) 8008f7e: 683b ldr r3, [r7, #0] 8008f80: 77da strb r2, [r3, #31] macconf->ReceiveOwn = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_DO) >> 10) == 0U) ? ENABLE : DISABLE; 8008f82: 687b ldr r3, [r7, #4] 8008f84: 681b ldr r3, [r3, #0] 8008f86: 681b ldr r3, [r3, #0] 8008f88: f403 6380 and.w r3, r3, #1024 @ 0x400 8008f8c: 2b00 cmp r3, #0 8008f8e: bf0c ite eq 8008f90: 2301 moveq r3, #1 8008f92: 2300 movne r3, #0 8008f94: b2db uxtb r3, r3 8008f96: 461a mov r2, r3 8008f98: 683b ldr r3, [r7, #0] 8008f9a: 779a strb r2, [r3, #30] macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8008f9c: 687b ldr r3, [r7, #4] 8008f9e: 681b ldr r3, [r3, #0] 8008fa0: 681b ldr r3, [r3, #0] ETH_MACCR_ECRSFD) >> 11) > 0U) ? ENABLE : DISABLE; 8008fa2: f403 6300 and.w r3, r3, #2048 @ 0x800 8008fa6: 2b00 cmp r3, #0 8008fa8: bf14 ite ne 8008faa: 2301 movne r3, #1 8008fac: 2300 moveq r3, #0 8008fae: b2db uxtb r3, r3 8008fb0: 461a mov r2, r3 macconf->CarrierSenseBeforeTransmit = ((READ_BIT(heth->Instance->MACCR, 8008fb2: 683b ldr r3, [r7, #0] 8008fb4: 775a strb r2, [r3, #29] macconf->LoopbackMode = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_LM) >> 12) > 0U) ? ENABLE : DISABLE; 8008fb6: 687b ldr r3, [r7, #4] 8008fb8: 681b ldr r3, [r3, #0] 8008fba: 681b ldr r3, [r3, #0] 8008fbc: f403 5380 and.w r3, r3, #4096 @ 0x1000 8008fc0: 2b00 cmp r3, #0 8008fc2: bf14 ite ne 8008fc4: 2301 movne r3, #1 8008fc6: 2300 moveq r3, #0 8008fc8: b2db uxtb r3, r3 8008fca: 461a mov r2, r3 8008fcc: 683b ldr r3, [r7, #0] 8008fce: 771a strb r2, [r3, #28] macconf->DuplexMode = READ_BIT(heth->Instance->MACCR, ETH_MACCR_DM); 8008fd0: 687b ldr r3, [r7, #4] 8008fd2: 681b ldr r3, [r3, #0] 8008fd4: 681b ldr r3, [r3, #0] 8008fd6: f403 5200 and.w r2, r3, #8192 @ 0x2000 8008fda: 683b ldr r3, [r7, #0] 8008fdc: 619a str r2, [r3, #24] macconf->Speed = READ_BIT(heth->Instance->MACCR, ETH_MACCR_FES); 8008fde: 687b ldr r3, [r7, #4] 8008fe0: 681b ldr r3, [r3, #0] 8008fe2: 681b ldr r3, [r3, #0] 8008fe4: f403 4280 and.w r2, r3, #16384 @ 0x4000 8008fe8: 683b ldr r3, [r7, #0] 8008fea: 615a str r2, [r3, #20] macconf->JumboPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JE) >> 16) > 0U) ? ENABLE : DISABLE; 8008fec: 687b ldr r3, [r7, #4] 8008fee: 681b ldr r3, [r3, #0] 8008ff0: 681b ldr r3, [r3, #0] 8008ff2: f403 3380 and.w r3, r3, #65536 @ 0x10000 8008ff6: 2b00 cmp r3, #0 8008ff8: bf14 ite ne 8008ffa: 2301 movne r3, #1 8008ffc: 2300 moveq r3, #0 8008ffe: b2db uxtb r3, r3 8009000: 461a mov r2, r3 8009002: 683b ldr r3, [r7, #0] 8009004: 749a strb r2, [r3, #18] macconf->Jabber = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_JD) >> 17) == 0U) ? ENABLE : DISABLE; 8009006: 687b ldr r3, [r7, #4] 8009008: 681b ldr r3, [r3, #0] 800900a: 681b ldr r3, [r3, #0] 800900c: f403 3300 and.w r3, r3, #131072 @ 0x20000 8009010: 2b00 cmp r3, #0 8009012: bf0c ite eq 8009014: 2301 moveq r3, #1 8009016: 2300 movne r3, #0 8009018: b2db uxtb r3, r3 800901a: 461a mov r2, r3 800901c: 683b ldr r3, [r7, #0] 800901e: 745a strb r2, [r3, #17] macconf->Watchdog = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_WD) >> 19) == 0U) ? ENABLE : DISABLE; 8009020: 687b ldr r3, [r7, #4] 8009022: 681b ldr r3, [r3, #0] 8009024: 681b ldr r3, [r3, #0] 8009026: f403 2300 and.w r3, r3, #524288 @ 0x80000 800902a: 2b00 cmp r3, #0 800902c: bf0c ite eq 800902e: 2301 moveq r3, #1 8009030: 2300 movne r3, #0 8009032: b2db uxtb r3, r3 8009034: 461a mov r2, r3 8009036: 683b ldr r3, [r7, #0] 8009038: 741a strb r2, [r3, #16] macconf->AutomaticPadCRCStrip = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_ACS) >> 20) > 0U) ? ENABLE : DISABLE; 800903a: 687b ldr r3, [r7, #4] 800903c: 681b ldr r3, [r3, #0] 800903e: 681b ldr r3, [r3, #0] 8009040: f403 1380 and.w r3, r3, #1048576 @ 0x100000 8009044: 2b00 cmp r3, #0 8009046: bf14 ite ne 8009048: 2301 movne r3, #1 800904a: 2300 moveq r3, #0 800904c: b2db uxtb r3, r3 800904e: 461a mov r2, r3 8009050: 683b ldr r3, [r7, #0] 8009052: 73da strb r2, [r3, #15] macconf->CRCStripTypePacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_CST) >> 21) > 0U) ? ENABLE : DISABLE; 8009054: 687b ldr r3, [r7, #4] 8009056: 681b ldr r3, [r3, #0] 8009058: 681b ldr r3, [r3, #0] 800905a: f403 1300 and.w r3, r3, #2097152 @ 0x200000 800905e: 2b00 cmp r3, #0 8009060: bf14 ite ne 8009062: 2301 movne r3, #1 8009064: 2300 moveq r3, #0 8009066: b2db uxtb r3, r3 8009068: 461a mov r2, r3 800906a: 683b ldr r3, [r7, #0] 800906c: 739a strb r2, [r3, #14] macconf->Support2KPacket = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_S2KP) >> 22) > 0U) ? ENABLE : DISABLE; 800906e: 687b ldr r3, [r7, #4] 8009070: 681b ldr r3, [r3, #0] 8009072: 681b ldr r3, [r3, #0] 8009074: f403 0380 and.w r3, r3, #4194304 @ 0x400000 8009078: 2b00 cmp r3, #0 800907a: bf14 ite ne 800907c: 2301 movne r3, #1 800907e: 2300 moveq r3, #0 8009080: b2db uxtb r3, r3 8009082: 461a mov r2, r3 8009084: 683b ldr r3, [r7, #0] 8009086: 735a strb r2, [r3, #13] macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 8009088: 687b ldr r3, [r7, #4] 800908a: 681b ldr r3, [r3, #0] 800908c: 681b ldr r3, [r3, #0] ETH_MACCR_GPSLCE) >> 23) > 0U) ? ENABLE : DISABLE; 800908e: f403 0300 and.w r3, r3, #8388608 @ 0x800000 8009092: 2b00 cmp r3, #0 8009094: bf14 ite ne 8009096: 2301 movne r3, #1 8009098: 2300 moveq r3, #0 800909a: b2db uxtb r3, r3 800909c: 461a mov r2, r3 macconf->GiantPacketSizeLimitControl = ((READ_BIT(heth->Instance->MACCR, 800909e: 683b ldr r3, [r7, #0] 80090a0: 731a strb r2, [r3, #12] macconf->InterPacketGapVal = READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPG); 80090a2: 687b ldr r3, [r7, #4] 80090a4: 681b ldr r3, [r3, #0] 80090a6: 681b ldr r3, [r3, #0] 80090a8: f003 62e0 and.w r2, r3, #117440512 @ 0x7000000 80090ac: 683b ldr r3, [r7, #0] 80090ae: 609a str r2, [r3, #8] macconf->ChecksumOffload = ((READ_BIT(heth->Instance->MACCR, ETH_MACCR_IPC) >> 27) > 0U) ? ENABLE : DISABLE; 80090b0: 687b ldr r3, [r7, #4] 80090b2: 681b ldr r3, [r3, #0] 80090b4: 681b ldr r3, [r3, #0] 80090b6: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 80090ba: 2b00 cmp r3, #0 80090bc: bf14 ite ne 80090be: 2301 movne r3, #1 80090c0: 2300 moveq r3, #0 80090c2: b2db uxtb r3, r3 80090c4: 461a mov r2, r3 80090c6: 683b ldr r3, [r7, #0] 80090c8: 711a strb r2, [r3, #4] macconf->SourceAddrControl = READ_BIT(heth->Instance->MACCR, ETH_MACCR_SARC); 80090ca: 687b ldr r3, [r7, #4] 80090cc: 681b ldr r3, [r3, #0] 80090ce: 681b ldr r3, [r3, #0] 80090d0: f003 42e0 and.w r2, r3, #1879048192 @ 0x70000000 80090d4: 683b ldr r3, [r7, #0] 80090d6: 601a str r2, [r3, #0] macconf->GiantPacketSizeLimit = READ_BIT(heth->Instance->MACECR, ETH_MACECR_GPSL); 80090d8: 687b ldr r3, [r7, #4] 80090da: 681b ldr r3, [r3, #0] 80090dc: 685b ldr r3, [r3, #4] 80090de: f3c3 020d ubfx r2, r3, #0, #14 80090e2: 683b ldr r3, [r7, #0] 80090e4: 635a str r2, [r3, #52] @ 0x34 macconf->CRCCheckingRxPackets = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_DCRCC) >> 16) == 0U) ? ENABLE : DISABLE; 80090e6: 687b ldr r3, [r7, #4] 80090e8: 681b ldr r3, [r3, #0] 80090ea: 685b ldr r3, [r3, #4] 80090ec: f403 3380 and.w r3, r3, #65536 @ 0x10000 80090f0: 2b00 cmp r3, #0 80090f2: bf0c ite eq 80090f4: 2301 moveq r3, #1 80090f6: 2300 movne r3, #0 80090f8: b2db uxtb r3, r3 80090fa: 461a mov r2, r3 80090fc: 683b ldr r3, [r7, #0] 80090fe: f883 2032 strb.w r2, [r3, #50] @ 0x32 macconf->SlowProtocolDetect = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_SPEN) >> 17) > 0U) ? ENABLE : DISABLE; 8009102: 687b ldr r3, [r7, #4] 8009104: 681b ldr r3, [r3, #0] 8009106: 685b ldr r3, [r3, #4] 8009108: f403 3300 and.w r3, r3, #131072 @ 0x20000 800910c: 2b00 cmp r3, #0 800910e: bf14 ite ne 8009110: 2301 movne r3, #1 8009112: 2300 moveq r3, #0 8009114: b2db uxtb r3, r3 8009116: 461a mov r2, r3 8009118: 683b ldr r3, [r7, #0] 800911a: f883 2031 strb.w r2, [r3, #49] @ 0x31 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 800911e: 687b ldr r3, [r7, #4] 8009120: 681b ldr r3, [r3, #0] 8009122: 685b ldr r3, [r3, #4] ETH_MACECR_USP) >> 18) > 0U) ? ENABLE : DISABLE; 8009124: f403 2380 and.w r3, r3, #262144 @ 0x40000 8009128: 2b00 cmp r3, #0 800912a: bf14 ite ne 800912c: 2301 movne r3, #1 800912e: 2300 moveq r3, #0 8009130: b2db uxtb r3, r3 8009132: 461a mov r2, r3 macconf->UnicastSlowProtocolPacketDetect = ((READ_BIT(heth->Instance->MACECR, 8009134: 683b ldr r3, [r7, #0] 8009136: f883 2030 strb.w r2, [r3, #48] @ 0x30 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 800913a: 687b ldr r3, [r7, #4] 800913c: 681b ldr r3, [r3, #0] 800913e: 685b ldr r3, [r3, #4] 8009140: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 ? ENABLE : DISABLE; 8009144: 2b00 cmp r3, #0 8009146: bf14 ite ne 8009148: 2301 movne r3, #1 800914a: 2300 moveq r3, #0 800914c: b2db uxtb r3, r3 800914e: 461a mov r2, r3 macconf->ExtendedInterPacketGap = ((READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPGEN) >> 24) > 0U) 8009150: 683b ldr r3, [r7, #0] 8009152: f883 2038 strb.w r2, [r3, #56] @ 0x38 macconf->ExtendedInterPacketGapVal = READ_BIT(heth->Instance->MACECR, ETH_MACECR_EIPG) >> 25; 8009156: 687b ldr r3, [r7, #4] 8009158: 681b ldr r3, [r3, #0] 800915a: 685b ldr r3, [r3, #4] 800915c: 0e5b lsrs r3, r3, #25 800915e: f003 021f and.w r2, r3, #31 8009162: 683b ldr r3, [r7, #0] 8009164: 63da str r2, [r3, #60] @ 0x3c macconf->ProgrammableWatchdog = ((READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_PWE) >> 8) > 0U) ? ENABLE : DISABLE; 8009166: 687b ldr r3, [r7, #4] 8009168: 681b ldr r3, [r3, #0] 800916a: 68db ldr r3, [r3, #12] 800916c: f403 7380 and.w r3, r3, #256 @ 0x100 8009170: 2b00 cmp r3, #0 8009172: bf14 ite ne 8009174: 2301 movne r3, #1 8009176: 2300 moveq r3, #0 8009178: b2db uxtb r3, r3 800917a: 461a mov r2, r3 800917c: 683b ldr r3, [r7, #0] 800917e: f883 2040 strb.w r2, [r3, #64] @ 0x40 macconf->WatchdogTimeout = READ_BIT(heth->Instance->MACWTR, ETH_MACWTR_WTO); 8009182: 687b ldr r3, [r7, #4] 8009184: 681b ldr r3, [r3, #0] 8009186: 68db ldr r3, [r3, #12] 8009188: f003 020f and.w r2, r3, #15 800918c: 683b ldr r3, [r7, #0] 800918e: 645a str r2, [r3, #68] @ 0x44 macconf->TransmitFlowControl = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_TFE) >> 1) > 0U) ? ENABLE : DISABLE; 8009190: 687b ldr r3, [r7, #4] 8009192: 681b ldr r3, [r3, #0] 8009194: 6f1b ldr r3, [r3, #112] @ 0x70 8009196: f003 0302 and.w r3, r3, #2 800919a: 2b00 cmp r3, #0 800919c: bf14 ite ne 800919e: 2301 movne r3, #1 80091a0: 2300 moveq r3, #0 80091a2: b2db uxtb r3, r3 80091a4: 461a mov r2, r3 80091a6: 683b ldr r3, [r7, #0] 80091a8: f883 2054 strb.w r2, [r3, #84] @ 0x54 macconf->ZeroQuantaPause = ((READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_DZPQ) >> 7) == 0U) ? ENABLE : DISABLE; 80091ac: 687b ldr r3, [r7, #4] 80091ae: 681b ldr r3, [r3, #0] 80091b0: 6f1b ldr r3, [r3, #112] @ 0x70 80091b2: f003 0380 and.w r3, r3, #128 @ 0x80 80091b6: 2b00 cmp r3, #0 80091b8: bf0c ite eq 80091ba: 2301 moveq r3, #1 80091bc: 2300 movne r3, #0 80091be: b2db uxtb r3, r3 80091c0: 461a mov r2, r3 80091c2: 683b ldr r3, [r7, #0] 80091c4: f883 204c strb.w r2, [r3, #76] @ 0x4c macconf->PauseLowThreshold = READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PLT); 80091c8: 687b ldr r3, [r7, #4] 80091ca: 681b ldr r3, [r3, #0] 80091cc: 6f1b ldr r3, [r3, #112] @ 0x70 80091ce: f003 0270 and.w r2, r3, #112 @ 0x70 80091d2: 683b ldr r3, [r7, #0] 80091d4: 651a str r2, [r3, #80] @ 0x50 macconf->PauseTime = (READ_BIT(heth->Instance->MACTFCR, ETH_MACTFCR_PT) >> 16); 80091d6: 687b ldr r3, [r7, #4] 80091d8: 681b ldr r3, [r3, #0] 80091da: 6f1b ldr r3, [r3, #112] @ 0x70 80091dc: 0c1b lsrs r3, r3, #16 80091de: b29a uxth r2, r3 80091e0: 683b ldr r3, [r7, #0] 80091e2: 649a str r2, [r3, #72] @ 0x48 macconf->ReceiveFlowControl = (READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_RFE) > 0U) ? ENABLE : DISABLE; 80091e4: 687b ldr r3, [r7, #4] 80091e6: 681b ldr r3, [r3, #0] 80091e8: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 80091ec: f003 0301 and.w r3, r3, #1 80091f0: 2b00 cmp r3, #0 80091f2: bf14 ite ne 80091f4: 2301 movne r3, #1 80091f6: 2300 moveq r3, #0 80091f8: b2db uxtb r3, r3 80091fa: 461a mov r2, r3 80091fc: 683b ldr r3, [r7, #0] 80091fe: f883 2056 strb.w r2, [r3, #86] @ 0x56 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 8009202: 687b ldr r3, [r7, #4] 8009204: 681b ldr r3, [r3, #0] 8009206: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800920a: f003 0302 and.w r3, r3, #2 ? ENABLE : DISABLE; 800920e: 2b00 cmp r3, #0 8009210: bf14 ite ne 8009212: 2301 movne r3, #1 8009214: 2300 moveq r3, #0 8009216: b2db uxtb r3, r3 8009218: 461a mov r2, r3 macconf->UnicastPausePacketDetect = ((READ_BIT(heth->Instance->MACRFCR, ETH_MACRFCR_UP) >> 1) > 0U) 800921a: 683b ldr r3, [r7, #0] 800921c: f883 2055 strb.w r2, [r3, #85] @ 0x55 macconf->TransmitQueueMode = READ_BIT(heth->Instance->MTLTQOMR, (ETH_MTLTQOMR_TTC | ETH_MTLTQOMR_TSF)); 8009220: 687b ldr r3, [r7, #4] 8009222: 681b ldr r3, [r3, #0] 8009224: f8d3 3d00 ldr.w r3, [r3, #3328] @ 0xd00 8009228: f003 0272 and.w r2, r3, #114 @ 0x72 800922c: 683b ldr r3, [r7, #0] 800922e: 659a str r2, [r3, #88] @ 0x58 macconf->ReceiveQueueMode = READ_BIT(heth->Instance->MTLRQOMR, (ETH_MTLRQOMR_RTC | ETH_MTLRQOMR_RSF)); 8009230: 687b ldr r3, [r7, #4] 8009232: 681b ldr r3, [r3, #0] 8009234: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 8009238: f003 0223 and.w r2, r3, #35 @ 0x23 800923c: 683b ldr r3, [r7, #0] 800923e: 65da str r2, [r3, #92] @ 0x5c macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8009240: 687b ldr r3, [r7, #4] 8009242: 681b ldr r3, [r3, #0] 8009244: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 ETH_MTLRQOMR_FUP) >> 3) > 0U) ? ENABLE : DISABLE; 8009248: f003 0308 and.w r3, r3, #8 800924c: 2b00 cmp r3, #0 800924e: bf14 ite ne 8009250: 2301 movne r3, #1 8009252: 2300 moveq r3, #0 8009254: b2db uxtb r3, r3 8009256: 461a mov r2, r3 macconf->ForwardRxUndersizedGoodPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8009258: 683b ldr r3, [r7, #0] 800925a: f883 2062 strb.w r2, [r3, #98] @ 0x62 macconf->ForwardRxErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_FEP) >> 4) > 0U) ? ENABLE : DISABLE; 800925e: 687b ldr r3, [r7, #4] 8009260: 681b ldr r3, [r3, #0] 8009262: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 8009266: f003 0310 and.w r3, r3, #16 800926a: 2b00 cmp r3, #0 800926c: bf14 ite ne 800926e: 2301 movne r3, #1 8009270: 2300 moveq r3, #0 8009272: b2db uxtb r3, r3 8009274: 461a mov r2, r3 8009276: 683b ldr r3, [r7, #0] 8009278: f883 2061 strb.w r2, [r3, #97] @ 0x61 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 800927c: 687b ldr r3, [r7, #4] 800927e: 681b ldr r3, [r3, #0] 8009280: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 ETH_MTLRQOMR_DISTCPEF) >> 6) == 0U) ? ENABLE : DISABLE; 8009284: f003 0340 and.w r3, r3, #64 @ 0x40 8009288: 2b00 cmp r3, #0 800928a: bf0c ite eq 800928c: 2301 moveq r3, #1 800928e: 2300 movne r3, #0 8009290: b2db uxtb r3, r3 8009292: 461a mov r2, r3 macconf->DropTCPIPChecksumErrorPacket = ((READ_BIT(heth->Instance->MTLRQOMR, 8009294: 683b ldr r3, [r7, #0] 8009296: f883 2060 strb.w r2, [r3, #96] @ 0x60 return HAL_OK; 800929a: 2300 movs r3, #0 } 800929c: 4618 mov r0, r3 800929e: 370c adds r7, #12 80092a0: 46bd mov sp, r7 80092a2: f85d 7b04 ldr.w r7, [sp], #4 80092a6: 4770 bx lr 080092a8 : * @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) { 80092a8: b580 push {r7, lr} 80092aa: b082 sub sp, #8 80092ac: af00 add r7, sp, #0 80092ae: 6078 str r0, [r7, #4] 80092b0: 6039 str r1, [r7, #0] if (macconf == NULL) 80092b2: 683b ldr r3, [r7, #0] 80092b4: 2b00 cmp r3, #0 80092b6: d101 bne.n 80092bc { return HAL_ERROR; 80092b8: 2301 movs r3, #1 80092ba: e00b b.n 80092d4 } if (heth->gState == HAL_ETH_STATE_READY) 80092bc: 687b ldr r3, [r7, #4] 80092be: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 80092c2: 2b10 cmp r3, #16 80092c4: d105 bne.n 80092d2 { ETH_SetMACConfig(heth, macconf); 80092c6: 6839 ldr r1, [r7, #0] 80092c8: 6878 ldr r0, [r7, #4] 80092ca: f000 f865 bl 8009398 return HAL_OK; 80092ce: 2300 movs r3, #0 80092d0: e000 b.n 80092d4 } else { return HAL_ERROR; 80092d2: 2301 movs r3, #1 } } 80092d4: 4618 mov r0, r3 80092d6: 3708 adds r7, #8 80092d8: 46bd mov sp, r7 80092da: bd80 pop {r7, pc} 080092dc : * @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) { 80092dc: b580 push {r7, lr} 80092de: b084 sub sp, #16 80092e0: af00 add r7, sp, #0 80092e2: 6078 str r0, [r7, #4] uint32_t hclk; uint32_t tmpreg; /* Get the ETHERNET MACMDIOAR value */ tmpreg = (heth->Instance)->MACMDIOAR; 80092e4: 687b ldr r3, [r7, #4] 80092e6: 681b ldr r3, [r3, #0] 80092e8: f8d3 3200 ldr.w r3, [r3, #512] @ 0x200 80092ec: 60fb str r3, [r7, #12] /* Clear CSR Clock Range bits */ tmpreg &= ~ETH_MACMDIOAR_CR; 80092ee: 68fb ldr r3, [r7, #12] 80092f0: f423 6370 bic.w r3, r3, #3840 @ 0xf00 80092f4: 60fb str r3, [r7, #12] /* Get hclk frequency value */ hclk = HAL_RCC_GetHCLKFreq(); 80092f6: f002 f8e5 bl 800b4c4 80092fa: 60b8 str r0, [r7, #8] /* Set CR bits depending on hclk value */ if (hclk < 35000000U) 80092fc: 68bb ldr r3, [r7, #8] 80092fe: 4a1a ldr r2, [pc, #104] @ (8009368 ) 8009300: 4293 cmp r3, r2 8009302: d804 bhi.n 800930e { /* CSR Clock Range between 0-35 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV16; 8009304: 68fb ldr r3, [r7, #12] 8009306: f443 7300 orr.w r3, r3, #512 @ 0x200 800930a: 60fb str r3, [r7, #12] 800930c: e022 b.n 8009354 } else if (hclk < 60000000U) 800930e: 68bb ldr r3, [r7, #8] 8009310: 4a16 ldr r2, [pc, #88] @ (800936c ) 8009312: 4293 cmp r3, r2 8009314: d204 bcs.n 8009320 { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV26; 8009316: 68fb ldr r3, [r7, #12] 8009318: f443 7340 orr.w r3, r3, #768 @ 0x300 800931c: 60fb str r3, [r7, #12] 800931e: e019 b.n 8009354 } else if (hclk < 100000000U) 8009320: 68bb ldr r3, [r7, #8] 8009322: 4a13 ldr r2, [pc, #76] @ (8009370 ) 8009324: 4293 cmp r3, r2 8009326: d915 bls.n 8009354 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV42; } else if (hclk < 150000000U) 8009328: 68bb ldr r3, [r7, #8] 800932a: 4a12 ldr r2, [pc, #72] @ (8009374 ) 800932c: 4293 cmp r3, r2 800932e: d804 bhi.n 800933a { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV62; 8009330: 68fb ldr r3, [r7, #12] 8009332: f443 7380 orr.w r3, r3, #256 @ 0x100 8009336: 60fb str r3, [r7, #12] 8009338: e00c b.n 8009354 } else if (hclk < 250000000U) 800933a: 68bb ldr r3, [r7, #8] 800933c: 4a0e ldr r2, [pc, #56] @ (8009378 ) 800933e: 4293 cmp r3, r2 8009340: d804 bhi.n 800934c { /* CSR Clock Range between 150-250 MHz */ tmpreg |= (uint32_t)ETH_MACMDIOAR_CR_DIV102; 8009342: 68fb ldr r3, [r7, #12] 8009344: f443 6380 orr.w r3, r3, #1024 @ 0x400 8009348: 60fb str r3, [r7, #12] 800934a: e003 b.n 8009354 } else /* (hclk >= 250000000U) */ { /* CSR Clock >= 250 MHz */ tmpreg |= (uint32_t)(ETH_MACMDIOAR_CR_DIV124); 800934c: 68fb ldr r3, [r7, #12] 800934e: f443 63a0 orr.w r3, r3, #1280 @ 0x500 8009352: 60fb str r3, [r7, #12] } /* Configure the CSR Clock Range */ (heth->Instance)->MACMDIOAR = (uint32_t)tmpreg; 8009354: 687b ldr r3, [r7, #4] 8009356: 681b ldr r3, [r3, #0] 8009358: 68fa ldr r2, [r7, #12] 800935a: f8c3 2200 str.w r2, [r3, #512] @ 0x200 } 800935e: bf00 nop 8009360: 3710 adds r7, #16 8009362: 46bd mov sp, r7 8009364: bd80 pop {r7, pc} 8009366: bf00 nop 8009368: 02160ebf .word 0x02160ebf 800936c: 03938700 .word 0x03938700 8009370: 05f5e0ff .word 0x05f5e0ff 8009374: 08f0d17f .word 0x08f0d17f 8009378: 0ee6b27f .word 0x0ee6b27f 0800937c : * @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) { 800937c: b480 push {r7} 800937e: b083 sub sp, #12 8009380: af00 add r7, sp, #0 8009382: 6078 str r0, [r7, #4] return heth->DMAErrorCode; 8009384: 687b ldr r3, [r7, #4] 8009386: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c } 800938a: 4618 mov r0, r3 800938c: 370c adds r7, #12 800938e: 46bd mov sp, r7 8009390: f85d 7b04 ldr.w r7, [sp], #4 8009394: 4770 bx lr ... 08009398 : /** @addtogroup ETH_Private_Functions ETH Private Functions * @{ */ static void ETH_SetMACConfig(ETH_HandleTypeDef *heth, const ETH_MACConfigTypeDef *macconf) { 8009398: b480 push {r7} 800939a: b085 sub sp, #20 800939c: af00 add r7, sp, #0 800939e: 6078 str r0, [r7, #4] 80093a0: 6039 str r1, [r7, #0] uint32_t macregval; /*------------------------ MACCR Configuration --------------------*/ macregval = (macconf->InterPacketGapVal | 80093a2: 683b ldr r3, [r7, #0] 80093a4: 689a ldr r2, [r3, #8] macconf->SourceAddrControl | 80093a6: 683b ldr r3, [r7, #0] 80093a8: 681b ldr r3, [r3, #0] macregval = (macconf->InterPacketGapVal | 80093aa: 431a orrs r2, r3 ((uint32_t)macconf->ChecksumOffload << 27) | 80093ac: 683b ldr r3, [r7, #0] 80093ae: 791b ldrb r3, [r3, #4] 80093b0: 06db lsls r3, r3, #27 macconf->SourceAddrControl | 80093b2: 431a orrs r2, r3 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 80093b4: 683b ldr r3, [r7, #0] 80093b6: 7b1b ldrb r3, [r3, #12] 80093b8: 05db lsls r3, r3, #23 ((uint32_t)macconf->ChecksumOffload << 27) | 80093ba: 431a orrs r2, r3 ((uint32_t)macconf->Support2KPacket << 22) | 80093bc: 683b ldr r3, [r7, #0] 80093be: 7b5b ldrb r3, [r3, #13] 80093c0: 059b lsls r3, r3, #22 ((uint32_t)macconf->GiantPacketSizeLimitControl << 23) | 80093c2: 431a orrs r2, r3 ((uint32_t)macconf->CRCStripTypePacket << 21) | 80093c4: 683b ldr r3, [r7, #0] 80093c6: 7b9b ldrb r3, [r3, #14] 80093c8: 055b lsls r3, r3, #21 ((uint32_t)macconf->Support2KPacket << 22) | 80093ca: 431a orrs r2, r3 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 80093cc: 683b ldr r3, [r7, #0] 80093ce: 7bdb ldrb r3, [r3, #15] 80093d0: 051b lsls r3, r3, #20 ((uint32_t)macconf->CRCStripTypePacket << 21) | 80093d2: 4313 orrs r3, r2 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 80093d4: 683a ldr r2, [r7, #0] 80093d6: 7c12 ldrb r2, [r2, #16] 80093d8: 2a00 cmp r2, #0 80093da: d102 bne.n 80093e2 80093dc: f44f 2200 mov.w r2, #524288 @ 0x80000 80093e0: e000 b.n 80093e4 80093e2: 2200 movs r2, #0 ((uint32_t)macconf->AutomaticPadCRCStrip << 20) | 80093e4: 4313 orrs r3, r2 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 80093e6: 683a ldr r2, [r7, #0] 80093e8: 7c52 ldrb r2, [r2, #17] 80093ea: 2a00 cmp r2, #0 80093ec: d102 bne.n 80093f4 80093ee: f44f 3200 mov.w r2, #131072 @ 0x20000 80093f2: e000 b.n 80093f6 80093f4: 2200 movs r2, #0 ((uint32_t)((macconf->Watchdog == DISABLE) ? 1U : 0U) << 19) | 80093f6: 431a orrs r2, r3 ((uint32_t)macconf->JumboPacket << 16) | 80093f8: 683b ldr r3, [r7, #0] 80093fa: 7c9b ldrb r3, [r3, #18] 80093fc: 041b lsls r3, r3, #16 ((uint32_t)((macconf->Jabber == DISABLE) ? 1U : 0U) << 17) | 80093fe: 431a orrs r2, r3 macconf->Speed | 8009400: 683b ldr r3, [r7, #0] 8009402: 695b ldr r3, [r3, #20] ((uint32_t)macconf->JumboPacket << 16) | 8009404: 431a orrs r2, r3 macconf->DuplexMode | 8009406: 683b ldr r3, [r7, #0] 8009408: 699b ldr r3, [r3, #24] macconf->Speed | 800940a: 431a orrs r2, r3 ((uint32_t)macconf->LoopbackMode << 12) | 800940c: 683b ldr r3, [r7, #0] 800940e: 7f1b ldrb r3, [r3, #28] 8009410: 031b lsls r3, r3, #12 macconf->DuplexMode | 8009412: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 8009414: 683b ldr r3, [r7, #0] 8009416: 7f5b ldrb r3, [r3, #29] 8009418: 02db lsls r3, r3, #11 ((uint32_t)macconf->LoopbackMode << 12) | 800941a: 4313 orrs r3, r2 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 800941c: 683a ldr r2, [r7, #0] 800941e: 7f92 ldrb r2, [r2, #30] 8009420: 2a00 cmp r2, #0 8009422: d102 bne.n 800942a 8009424: f44f 6280 mov.w r2, #1024 @ 0x400 8009428: e000 b.n 800942c 800942a: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseBeforeTransmit << 11) | 800942c: 431a orrs r2, r3 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 800942e: 683b ldr r3, [r7, #0] 8009430: 7fdb ldrb r3, [r3, #31] 8009432: 025b lsls r3, r3, #9 ((uint32_t)((macconf->ReceiveOwn == DISABLE) ? 1U : 0U) << 10) | 8009434: 4313 orrs r3, r2 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 8009436: 683a ldr r2, [r7, #0] 8009438: f892 2020 ldrb.w r2, [r2, #32] 800943c: 2a00 cmp r2, #0 800943e: d102 bne.n 8009446 8009440: f44f 7280 mov.w r2, #256 @ 0x100 8009444: e000 b.n 8009448 8009446: 2200 movs r2, #0 ((uint32_t)macconf->CarrierSenseDuringTransmit << 9) | 8009448: 431a orrs r2, r3 macconf->BackOffLimit | 800944a: 683b ldr r3, [r7, #0] 800944c: 6a5b ldr r3, [r3, #36] @ 0x24 ((uint32_t)((macconf->RetryTransmission == DISABLE) ? 1U : 0U) << 8) | 800944e: 431a orrs r2, r3 ((uint32_t)macconf->DeferralCheck << 4) | 8009450: 683b ldr r3, [r7, #0] 8009452: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8009456: 011b lsls r3, r3, #4 macconf->BackOffLimit | 8009458: 431a orrs r2, r3 macconf->PreambleLength); 800945a: 683b ldr r3, [r7, #0] 800945c: 6adb ldr r3, [r3, #44] @ 0x2c macregval = (macconf->InterPacketGapVal | 800945e: 4313 orrs r3, r2 8009460: 60fb str r3, [r7, #12] /* Write to MACCR */ MODIFY_REG(heth->Instance->MACCR, ETH_MACCR_MASK, macregval); 8009462: 687b ldr r3, [r7, #4] 8009464: 681b ldr r3, [r3, #0] 8009466: 681a ldr r2, [r3, #0] 8009468: 4b56 ldr r3, [pc, #344] @ (80095c4 ) 800946a: 4013 ands r3, r2 800946c: 687a ldr r2, [r7, #4] 800946e: 6812 ldr r2, [r2, #0] 8009470: 68f9 ldr r1, [r7, #12] 8009472: 430b orrs r3, r1 8009474: 6013 str r3, [r2, #0] /*------------------------ MACECR Configuration --------------------*/ macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8009476: 683b ldr r3, [r7, #0] 8009478: 6bdb ldr r3, [r3, #60] @ 0x3c 800947a: 065a lsls r2, r3, #25 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 800947c: 683b ldr r3, [r7, #0] 800947e: f893 3038 ldrb.w r3, [r3, #56] @ 0x38 8009482: 061b lsls r3, r3, #24 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 8009484: 431a orrs r2, r3 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 8009486: 683b ldr r3, [r7, #0] 8009488: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 800948c: 049b lsls r3, r3, #18 ((uint32_t)macconf->ExtendedInterPacketGap << 24) | 800948e: 431a orrs r2, r3 ((uint32_t)macconf->SlowProtocolDetect << 17) | 8009490: 683b ldr r3, [r7, #0] 8009492: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8009496: 045b lsls r3, r3, #17 ((uint32_t)macconf->UnicastSlowProtocolPacketDetect << 18) | 8009498: 4313 orrs r3, r2 ((uint32_t)((macconf->CRCCheckingRxPackets == DISABLE) ? 1U : 0U) << 16) | 800949a: 683a ldr r2, [r7, #0] 800949c: f892 2032 ldrb.w r2, [r2, #50] @ 0x32 80094a0: 2a00 cmp r2, #0 80094a2: d102 bne.n 80094aa 80094a4: f44f 3280 mov.w r2, #65536 @ 0x10000 80094a8: e000 b.n 80094ac 80094aa: 2200 movs r2, #0 ((uint32_t)macconf->SlowProtocolDetect << 17) | 80094ac: 431a orrs r2, r3 macconf->GiantPacketSizeLimit); 80094ae: 683b ldr r3, [r7, #0] 80094b0: 6b5b ldr r3, [r3, #52] @ 0x34 macregval = ((macconf->ExtendedInterPacketGapVal << 25) | 80094b2: 4313 orrs r3, r2 80094b4: 60fb str r3, [r7, #12] /* Write to MACECR */ MODIFY_REG(heth->Instance->MACECR, ETH_MACECR_MASK, macregval); 80094b6: 687b ldr r3, [r7, #4] 80094b8: 681b ldr r3, [r3, #0] 80094ba: 685a ldr r2, [r3, #4] 80094bc: 4b42 ldr r3, [pc, #264] @ (80095c8 ) 80094be: 4013 ands r3, r2 80094c0: 687a ldr r2, [r7, #4] 80094c2: 6812 ldr r2, [r2, #0] 80094c4: 68f9 ldr r1, [r7, #12] 80094c6: 430b orrs r3, r1 80094c8: 6053 str r3, [r2, #4] /*------------------------ MACWTR Configuration --------------------*/ macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 80094ca: 683b ldr r3, [r7, #0] 80094cc: f893 3040 ldrb.w r3, [r3, #64] @ 0x40 80094d0: 021a lsls r2, r3, #8 macconf->WatchdogTimeout); 80094d2: 683b ldr r3, [r7, #0] 80094d4: 6c5b ldr r3, [r3, #68] @ 0x44 macregval = (((uint32_t)macconf->ProgrammableWatchdog << 8) | 80094d6: 4313 orrs r3, r2 80094d8: 60fb str r3, [r7, #12] /* Write to MACWTR */ MODIFY_REG(heth->Instance->MACWTR, ETH_MACWTR_MASK, macregval); 80094da: 687b ldr r3, [r7, #4] 80094dc: 681b ldr r3, [r3, #0] 80094de: 68da ldr r2, [r3, #12] 80094e0: 4b3a ldr r3, [pc, #232] @ (80095cc ) 80094e2: 4013 ands r3, r2 80094e4: 687a ldr r2, [r7, #4] 80094e6: 6812 ldr r2, [r2, #0] 80094e8: 68f9 ldr r1, [r7, #12] 80094ea: 430b orrs r3, r1 80094ec: 60d3 str r3, [r2, #12] /*------------------------ MACTFCR Configuration --------------------*/ macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 80094ee: 683b ldr r3, [r7, #0] 80094f0: f893 3054 ldrb.w r3, [r3, #84] @ 0x54 80094f4: 005a lsls r2, r3, #1 macconf->PauseLowThreshold | 80094f6: 683b ldr r3, [r7, #0] 80094f8: 6d1b ldr r3, [r3, #80] @ 0x50 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 80094fa: 4313 orrs r3, r2 ((uint32_t)((macconf->ZeroQuantaPause == DISABLE) ? 1U : 0U) << 7) | 80094fc: 683a ldr r2, [r7, #0] 80094fe: f892 204c ldrb.w r2, [r2, #76] @ 0x4c 8009502: 2a00 cmp r2, #0 8009504: d101 bne.n 800950a 8009506: 2280 movs r2, #128 @ 0x80 8009508: e000 b.n 800950c 800950a: 2200 movs r2, #0 macconf->PauseLowThreshold | 800950c: 431a orrs r2, r3 (macconf->PauseTime << 16)); 800950e: 683b ldr r3, [r7, #0] 8009510: 6c9b ldr r3, [r3, #72] @ 0x48 8009512: 041b lsls r3, r3, #16 macregval = (((uint32_t)macconf->TransmitFlowControl << 1) | 8009514: 4313 orrs r3, r2 8009516: 60fb str r3, [r7, #12] /* Write to MACTFCR */ MODIFY_REG(heth->Instance->MACTFCR, ETH_MACTFCR_MASK, macregval); 8009518: 687b ldr r3, [r7, #4] 800951a: 681b ldr r3, [r3, #0] 800951c: 6f1a ldr r2, [r3, #112] @ 0x70 800951e: f64f 730d movw r3, #65293 @ 0xff0d 8009522: 4013 ands r3, r2 8009524: 687a ldr r2, [r7, #4] 8009526: 6812 ldr r2, [r2, #0] 8009528: 68f9 ldr r1, [r7, #12] 800952a: 430b orrs r3, r1 800952c: 6713 str r3, [r2, #112] @ 0x70 /*------------------------ MACRFCR Configuration --------------------*/ macregval = ((uint32_t)macconf->ReceiveFlowControl | 800952e: 683b ldr r3, [r7, #0] 8009530: f893 3056 ldrb.w r3, [r3, #86] @ 0x56 8009534: 461a mov r2, r3 ((uint32_t)macconf->UnicastPausePacketDetect << 1)); 8009536: 683b ldr r3, [r7, #0] 8009538: f893 3055 ldrb.w r3, [r3, #85] @ 0x55 800953c: 005b lsls r3, r3, #1 macregval = ((uint32_t)macconf->ReceiveFlowControl | 800953e: 4313 orrs r3, r2 8009540: 60fb str r3, [r7, #12] /* Write to MACRFCR */ MODIFY_REG(heth->Instance->MACRFCR, ETH_MACRFCR_MASK, macregval); 8009542: 687b ldr r3, [r7, #4] 8009544: 681b ldr r3, [r3, #0] 8009546: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800954a: f023 0103 bic.w r1, r3, #3 800954e: 687b ldr r3, [r7, #4] 8009550: 681b ldr r3, [r3, #0] 8009552: 68fa ldr r2, [r7, #12] 8009554: 430a orrs r2, r1 8009556: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /*------------------------ MTLTQOMR Configuration --------------------*/ /* Write to MTLTQOMR */ MODIFY_REG(heth->Instance->MTLTQOMR, ETH_MTLTQOMR_MASK, macconf->TransmitQueueMode); 800955a: 687b ldr r3, [r7, #4] 800955c: 681b ldr r3, [r3, #0] 800955e: f8d3 3d00 ldr.w r3, [r3, #3328] @ 0xd00 8009562: f023 0172 bic.w r1, r3, #114 @ 0x72 8009566: 683b ldr r3, [r7, #0] 8009568: 6d9a ldr r2, [r3, #88] @ 0x58 800956a: 687b ldr r3, [r7, #4] 800956c: 681b ldr r3, [r3, #0] 800956e: 430a orrs r2, r1 8009570: f8c3 2d00 str.w r2, [r3, #3328] @ 0xd00 /*------------------------ MTLRQOMR Configuration --------------------*/ macregval = (macconf->ReceiveQueueMode | 8009574: 683b ldr r3, [r7, #0] 8009576: 6ddb ldr r3, [r3, #92] @ 0x5c ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8009578: 683a ldr r2, [r7, #0] 800957a: f892 2060 ldrb.w r2, [r2, #96] @ 0x60 800957e: 2a00 cmp r2, #0 8009580: d101 bne.n 8009586 8009582: 2240 movs r2, #64 @ 0x40 8009584: e000 b.n 8009588 8009586: 2200 movs r2, #0 macregval = (macconf->ReceiveQueueMode | 8009588: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxErrorPacket << 4) | 800958a: 683b ldr r3, [r7, #0] 800958c: f893 3061 ldrb.w r3, [r3, #97] @ 0x61 8009590: 011b lsls r3, r3, #4 ((uint32_t)((macconf->DropTCPIPChecksumErrorPacket == DISABLE) ? 1U : 0U) << 6) | 8009592: 431a orrs r2, r3 ((uint32_t)macconf->ForwardRxUndersizedGoodPacket << 3)); 8009594: 683b ldr r3, [r7, #0] 8009596: f893 3062 ldrb.w r3, [r3, #98] @ 0x62 800959a: 00db lsls r3, r3, #3 macregval = (macconf->ReceiveQueueMode | 800959c: 4313 orrs r3, r2 800959e: 60fb str r3, [r7, #12] /* Write to MTLRQOMR */ MODIFY_REG(heth->Instance->MTLRQOMR, ETH_MTLRQOMR_MASK, macregval); 80095a0: 687b ldr r3, [r7, #4] 80095a2: 681b ldr r3, [r3, #0] 80095a4: f8d3 3d30 ldr.w r3, [r3, #3376] @ 0xd30 80095a8: f023 017b bic.w r1, r3, #123 @ 0x7b 80095ac: 687b ldr r3, [r7, #4] 80095ae: 681b ldr r3, [r3, #0] 80095b0: 68fa ldr r2, [r7, #12] 80095b2: 430a orrs r2, r1 80095b4: f8c3 2d30 str.w r2, [r3, #3376] @ 0xd30 } 80095b8: bf00 nop 80095ba: 3714 adds r7, #20 80095bc: 46bd mov sp, r7 80095be: f85d 7b04 ldr.w r7, [sp], #4 80095c2: 4770 bx lr 80095c4: 00048083 .word 0x00048083 80095c8: c0f88000 .word 0xc0f88000 80095cc: fffffef0 .word 0xfffffef0 080095d0 : static void ETH_SetDMAConfig(ETH_HandleTypeDef *heth, const ETH_DMAConfigTypeDef *dmaconf) { 80095d0: b480 push {r7} 80095d2: b085 sub sp, #20 80095d4: af00 add r7, sp, #0 80095d6: 6078 str r0, [r7, #4] 80095d8: 6039 str r1, [r7, #0] uint32_t dmaregval; /*------------------------ DMAMR Configuration --------------------*/ MODIFY_REG(heth->Instance->DMAMR, ETH_DMAMR_MASK, dmaconf->DMAArbitration); 80095da: 687b ldr r3, [r7, #4] 80095dc: 681b ldr r3, [r3, #0] 80095de: f503 5380 add.w r3, r3, #4096 @ 0x1000 80095e2: 681a ldr r2, [r3, #0] 80095e4: 4b38 ldr r3, [pc, #224] @ (80096c8 ) 80095e6: 4013 ands r3, r2 80095e8: 683a ldr r2, [r7, #0] 80095ea: 6811 ldr r1, [r2, #0] 80095ec: 687a ldr r2, [r7, #4] 80095ee: 6812 ldr r2, [r2, #0] 80095f0: 430b orrs r3, r1 80095f2: f502 5280 add.w r2, r2, #4096 @ 0x1000 80095f6: 6013 str r3, [r2, #0] /*------------------------ DMASBMR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 80095f8: 683b ldr r3, [r7, #0] 80095fa: 791b ldrb r3, [r3, #4] 80095fc: 031a lsls r2, r3, #12 dmaconf->BurstMode | 80095fe: 683b ldr r3, [r7, #0] 8009600: 689b ldr r3, [r3, #8] dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 8009602: 431a orrs r2, r3 ((uint32_t)dmaconf->RebuildINCRxBurst << 15)); 8009604: 683b ldr r3, [r7, #0] 8009606: 7b1b ldrb r3, [r3, #12] 8009608: 03db lsls r3, r3, #15 dmaregval = (((uint32_t)dmaconf->AddressAlignedBeats << 12) | 800960a: 4313 orrs r3, r2 800960c: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMASBMR, ETH_DMASBMR_MASK, dmaregval); 800960e: 687b ldr r3, [r7, #4] 8009610: 681b ldr r3, [r3, #0] 8009612: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009616: 685a ldr r2, [r3, #4] 8009618: 4b2c ldr r3, [pc, #176] @ (80096cc ) 800961a: 4013 ands r3, r2 800961c: 687a ldr r2, [r7, #4] 800961e: 6812 ldr r2, [r2, #0] 8009620: 68f9 ldr r1, [r7, #12] 8009622: 430b orrs r3, r1 8009624: f502 5280 add.w r2, r2, #4096 @ 0x1000 8009628: 6053 str r3, [r2, #4] /*------------------------ DMACCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 800962a: 683b ldr r3, [r7, #0] 800962c: 7b5b ldrb r3, [r3, #13] 800962e: 041a lsls r2, r3, #16 dmaconf->MaximumSegmentSize); 8009630: 683b ldr r3, [r7, #0] 8009632: 6a1b ldr r3, [r3, #32] dmaregval = (((uint32_t)dmaconf->PBLx8Mode << 16) | 8009634: 4313 orrs r3, r2 8009636: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACCR, ETH_DMACCR_MASK, dmaregval); 8009638: 687b ldr r3, [r7, #4] 800963a: 681b ldr r3, [r3, #0] 800963c: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009640: f8d3 2100 ldr.w r2, [r3, #256] @ 0x100 8009644: 4b22 ldr r3, [pc, #136] @ (80096d0 ) 8009646: 4013 ands r3, r2 8009648: 687a ldr r2, [r7, #4] 800964a: 6812 ldr r2, [r2, #0] 800964c: 68f9 ldr r1, [r7, #12] 800964e: 430b orrs r3, r1 8009650: f502 5280 add.w r2, r2, #4096 @ 0x1000 8009654: f8c2 3100 str.w r3, [r2, #256] @ 0x100 /*------------------------ DMACTCR Configuration --------------------*/ dmaregval = (dmaconf->TxDMABurstLength | 8009658: 683b ldr r3, [r7, #0] 800965a: 691a ldr r2, [r3, #16] ((uint32_t)dmaconf->SecondPacketOperate << 4) | 800965c: 683b ldr r3, [r7, #0] 800965e: 7d1b ldrb r3, [r3, #20] 8009660: 011b lsls r3, r3, #4 dmaregval = (dmaconf->TxDMABurstLength | 8009662: 431a orrs r2, r3 ((uint32_t)dmaconf->TCPSegmentation << 12)); 8009664: 683b ldr r3, [r7, #0] 8009666: 7f5b ldrb r3, [r3, #29] 8009668: 031b lsls r3, r3, #12 dmaregval = (dmaconf->TxDMABurstLength | 800966a: 4313 orrs r3, r2 800966c: 60fb str r3, [r7, #12] MODIFY_REG(heth->Instance->DMACTCR, ETH_DMACTCR_MASK, dmaregval); 800966e: 687b ldr r3, [r7, #4] 8009670: 681b ldr r3, [r3, #0] 8009672: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009676: f8d3 2104 ldr.w r2, [r3, #260] @ 0x104 800967a: 4b16 ldr r3, [pc, #88] @ (80096d4 ) 800967c: 4013 ands r3, r2 800967e: 687a ldr r2, [r7, #4] 8009680: 6812 ldr r2, [r2, #0] 8009682: 68f9 ldr r1, [r7, #12] 8009684: 430b orrs r3, r1 8009686: f502 5280 add.w r2, r2, #4096 @ 0x1000 800968a: f8c2 3104 str.w r3, [r2, #260] @ 0x104 /*------------------------ DMACRCR Configuration --------------------*/ dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 800968e: 683b ldr r3, [r7, #0] 8009690: 7f1b ldrb r3, [r3, #28] 8009692: 07da lsls r2, r3, #31 dmaconf->RxDMABurstLength); 8009694: 683b ldr r3, [r7, #0] 8009696: 699b ldr r3, [r3, #24] dmaregval = (((uint32_t)dmaconf->FlushRxPacket << 31) | 8009698: 4313 orrs r3, r2 800969a: 60fb str r3, [r7, #12] /* Write to DMACRCR */ MODIFY_REG(heth->Instance->DMACRCR, ETH_DMACRCR_MASK, dmaregval); 800969c: 687b ldr r3, [r7, #4] 800969e: 681b ldr r3, [r3, #0] 80096a0: f503 5380 add.w r3, r3, #4096 @ 0x1000 80096a4: f8d3 2108 ldr.w r2, [r3, #264] @ 0x108 80096a8: 4b0b ldr r3, [pc, #44] @ (80096d8 ) 80096aa: 4013 ands r3, r2 80096ac: 687a ldr r2, [r7, #4] 80096ae: 6812 ldr r2, [r2, #0] 80096b0: 68f9 ldr r1, [r7, #12] 80096b2: 430b orrs r3, r1 80096b4: f502 5280 add.w r2, r2, #4096 @ 0x1000 80096b8: f8c2 3108 str.w r3, [r2, #264] @ 0x108 } 80096bc: bf00 nop 80096be: 3714 adds r7, #20 80096c0: 46bd mov sp, r7 80096c2: f85d 7b04 ldr.w r7, [sp], #4 80096c6: 4770 bx lr 80096c8: ffff87fd .word 0xffff87fd 80096cc: ffff2ffe .word 0xffff2ffe 80096d0: fffec000 .word 0xfffec000 80096d4: ffc0efef .word 0xffc0efef 80096d8: 7fc0ffff .word 0x7fc0ffff 080096dc : * @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) { 80096dc: b580 push {r7, lr} 80096de: b0a4 sub sp, #144 @ 0x90 80096e0: af00 add r7, sp, #0 80096e2: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef macDefaultConf; ETH_DMAConfigTypeDef dmaDefaultConf; /*--------------- ETHERNET MAC registers default Configuration --------------*/ macDefaultConf.AutomaticPadCRCStrip = ENABLE; 80096e4: 2301 movs r3, #1 80096e6: f887 303b strb.w r3, [r7, #59] @ 0x3b macDefaultConf.BackOffLimit = ETH_BACKOFFLIMIT_10; 80096ea: 2300 movs r3, #0 80096ec: 653b str r3, [r7, #80] @ 0x50 macDefaultConf.CarrierSenseBeforeTransmit = DISABLE; 80096ee: 2300 movs r3, #0 80096f0: f887 3049 strb.w r3, [r7, #73] @ 0x49 macDefaultConf.CarrierSenseDuringTransmit = DISABLE; 80096f4: 2300 movs r3, #0 80096f6: f887 304b strb.w r3, [r7, #75] @ 0x4b macDefaultConf.ChecksumOffload = ENABLE; 80096fa: 2301 movs r3, #1 80096fc: f887 3030 strb.w r3, [r7, #48] @ 0x30 macDefaultConf.CRCCheckingRxPackets = ENABLE; 8009700: 2301 movs r3, #1 8009702: f887 305e strb.w r3, [r7, #94] @ 0x5e macDefaultConf.CRCStripTypePacket = ENABLE; 8009706: 2301 movs r3, #1 8009708: f887 303a strb.w r3, [r7, #58] @ 0x3a macDefaultConf.DeferralCheck = DISABLE; 800970c: 2300 movs r3, #0 800970e: f887 3054 strb.w r3, [r7, #84] @ 0x54 macDefaultConf.DropTCPIPChecksumErrorPacket = ENABLE; 8009712: 2301 movs r3, #1 8009714: f887 308c strb.w r3, [r7, #140] @ 0x8c macDefaultConf.DuplexMode = ETH_FULLDUPLEX_MODE; 8009718: f44f 5300 mov.w r3, #8192 @ 0x2000 800971c: 647b str r3, [r7, #68] @ 0x44 macDefaultConf.ExtendedInterPacketGap = DISABLE; 800971e: 2300 movs r3, #0 8009720: f887 3064 strb.w r3, [r7, #100] @ 0x64 macDefaultConf.ExtendedInterPacketGapVal = 0x0U; 8009724: 2300 movs r3, #0 8009726: 66bb str r3, [r7, #104] @ 0x68 macDefaultConf.ForwardRxErrorPacket = DISABLE; 8009728: 2300 movs r3, #0 800972a: f887 308d strb.w r3, [r7, #141] @ 0x8d macDefaultConf.ForwardRxUndersizedGoodPacket = DISABLE; 800972e: 2300 movs r3, #0 8009730: f887 308e strb.w r3, [r7, #142] @ 0x8e macDefaultConf.GiantPacketSizeLimit = 0x618U; 8009734: f44f 63c3 mov.w r3, #1560 @ 0x618 8009738: 663b str r3, [r7, #96] @ 0x60 macDefaultConf.GiantPacketSizeLimitControl = DISABLE; 800973a: 2300 movs r3, #0 800973c: f887 3038 strb.w r3, [r7, #56] @ 0x38 macDefaultConf.InterPacketGapVal = ETH_INTERPACKETGAP_96BIT; 8009740: 2300 movs r3, #0 8009742: 637b str r3, [r7, #52] @ 0x34 macDefaultConf.Jabber = ENABLE; 8009744: 2301 movs r3, #1 8009746: f887 303d strb.w r3, [r7, #61] @ 0x3d macDefaultConf.JumboPacket = DISABLE; 800974a: 2300 movs r3, #0 800974c: f887 303e strb.w r3, [r7, #62] @ 0x3e macDefaultConf.LoopbackMode = DISABLE; 8009750: 2300 movs r3, #0 8009752: f887 3048 strb.w r3, [r7, #72] @ 0x48 macDefaultConf.PauseLowThreshold = ETH_PAUSELOWTHRESHOLD_MINUS_4; 8009756: 2300 movs r3, #0 8009758: 67fb str r3, [r7, #124] @ 0x7c macDefaultConf.PauseTime = 0x0U; 800975a: 2300 movs r3, #0 800975c: 677b str r3, [r7, #116] @ 0x74 macDefaultConf.PreambleLength = ETH_PREAMBLELENGTH_7; 800975e: 2300 movs r3, #0 8009760: 65bb str r3, [r7, #88] @ 0x58 macDefaultConf.ProgrammableWatchdog = DISABLE; 8009762: 2300 movs r3, #0 8009764: f887 306c strb.w r3, [r7, #108] @ 0x6c macDefaultConf.ReceiveFlowControl = DISABLE; 8009768: 2300 movs r3, #0 800976a: f887 3082 strb.w r3, [r7, #130] @ 0x82 macDefaultConf.ReceiveOwn = ENABLE; 800976e: 2301 movs r3, #1 8009770: f887 304a strb.w r3, [r7, #74] @ 0x4a macDefaultConf.ReceiveQueueMode = ETH_RECEIVESTOREFORWARD; 8009774: 2320 movs r3, #32 8009776: f8c7 3088 str.w r3, [r7, #136] @ 0x88 macDefaultConf.RetryTransmission = ENABLE; 800977a: 2301 movs r3, #1 800977c: f887 304c strb.w r3, [r7, #76] @ 0x4c macDefaultConf.SlowProtocolDetect = DISABLE; 8009780: 2300 movs r3, #0 8009782: f887 305d strb.w r3, [r7, #93] @ 0x5d macDefaultConf.SourceAddrControl = ETH_SOURCEADDRESS_REPLACE_ADDR0; 8009786: f04f 5340 mov.w r3, #805306368 @ 0x30000000 800978a: 62fb str r3, [r7, #44] @ 0x2c macDefaultConf.Speed = ETH_SPEED_100M; 800978c: f44f 4380 mov.w r3, #16384 @ 0x4000 8009790: 643b str r3, [r7, #64] @ 0x40 macDefaultConf.Support2KPacket = DISABLE; 8009792: 2300 movs r3, #0 8009794: f887 3039 strb.w r3, [r7, #57] @ 0x39 macDefaultConf.TransmitQueueMode = ETH_TRANSMITSTOREFORWARD; 8009798: 2302 movs r3, #2 800979a: f8c7 3084 str.w r3, [r7, #132] @ 0x84 macDefaultConf.TransmitFlowControl = DISABLE; 800979e: 2300 movs r3, #0 80097a0: f887 3080 strb.w r3, [r7, #128] @ 0x80 macDefaultConf.UnicastPausePacketDetect = DISABLE; 80097a4: 2300 movs r3, #0 80097a6: f887 3081 strb.w r3, [r7, #129] @ 0x81 macDefaultConf.UnicastSlowProtocolPacketDetect = DISABLE; 80097aa: 2300 movs r3, #0 80097ac: f887 305c strb.w r3, [r7, #92] @ 0x5c macDefaultConf.Watchdog = ENABLE; 80097b0: 2301 movs r3, #1 80097b2: f887 303c strb.w r3, [r7, #60] @ 0x3c macDefaultConf.WatchdogTimeout = ETH_MACWTR_WTO_2KB; 80097b6: 2300 movs r3, #0 80097b8: 673b str r3, [r7, #112] @ 0x70 macDefaultConf.ZeroQuantaPause = ENABLE; 80097ba: 2301 movs r3, #1 80097bc: f887 3078 strb.w r3, [r7, #120] @ 0x78 /* MAC default configuration */ ETH_SetMACConfig(heth, &macDefaultConf); 80097c0: f107 032c add.w r3, r7, #44 @ 0x2c 80097c4: 4619 mov r1, r3 80097c6: 6878 ldr r0, [r7, #4] 80097c8: f7ff fde6 bl 8009398 /*--------------- ETHERNET DMA registers default Configuration --------------*/ dmaDefaultConf.AddressAlignedBeats = ENABLE; 80097cc: 2301 movs r3, #1 80097ce: 733b strb r3, [r7, #12] dmaDefaultConf.BurstMode = ETH_BURSTLENGTH_FIXED; 80097d0: 2301 movs r3, #1 80097d2: 613b str r3, [r7, #16] dmaDefaultConf.DMAArbitration = ETH_DMAARBITRATION_RX1_TX1; 80097d4: 2300 movs r3, #0 80097d6: 60bb str r3, [r7, #8] dmaDefaultConf.FlushRxPacket = DISABLE; 80097d8: 2300 movs r3, #0 80097da: f887 3024 strb.w r3, [r7, #36] @ 0x24 dmaDefaultConf.PBLx8Mode = DISABLE; 80097de: 2300 movs r3, #0 80097e0: 757b strb r3, [r7, #21] dmaDefaultConf.RebuildINCRxBurst = DISABLE; 80097e2: 2300 movs r3, #0 80097e4: 753b strb r3, [r7, #20] dmaDefaultConf.RxDMABurstLength = ETH_RXDMABURSTLENGTH_32BEAT; 80097e6: f44f 1300 mov.w r3, #2097152 @ 0x200000 80097ea: 623b str r3, [r7, #32] dmaDefaultConf.SecondPacketOperate = DISABLE; 80097ec: 2300 movs r3, #0 80097ee: 773b strb r3, [r7, #28] dmaDefaultConf.TxDMABurstLength = ETH_TXDMABURSTLENGTH_32BEAT; 80097f0: f44f 1300 mov.w r3, #2097152 @ 0x200000 80097f4: 61bb str r3, [r7, #24] dmaDefaultConf.TCPSegmentation = DISABLE; 80097f6: 2300 movs r3, #0 80097f8: f887 3025 strb.w r3, [r7, #37] @ 0x25 dmaDefaultConf.MaximumSegmentSize = ETH_SEGMENT_SIZE_DEFAULT; 80097fc: f44f 7306 mov.w r3, #536 @ 0x218 8009800: 62bb str r3, [r7, #40] @ 0x28 /* DMA default configuration */ ETH_SetDMAConfig(heth, &dmaDefaultConf); 8009802: f107 0308 add.w r3, r7, #8 8009806: 4619 mov r1, r3 8009808: 6878 ldr r0, [r7, #4] 800980a: f7ff fee1 bl 80095d0 } 800980e: bf00 nop 8009810: 3790 adds r7, #144 @ 0x90 8009812: 46bd mov sp, r7 8009814: bd80 pop {r7, pc} 08009816 : * @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) { 8009816: b480 push {r7} 8009818: b085 sub sp, #20 800981a: af00 add r7, sp, #0 800981c: 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++) 800981e: 2300 movs r3, #0 8009820: 60fb str r3, [r7, #12] 8009822: e01d b.n 8009860 { dmatxdesc = heth->Init.TxDesc + i; 8009824: 687b ldr r3, [r7, #4] 8009826: 68d9 ldr r1, [r3, #12] 8009828: 68fa ldr r2, [r7, #12] 800982a: 4613 mov r3, r2 800982c: 005b lsls r3, r3, #1 800982e: 4413 add r3, r2 8009830: 00db lsls r3, r3, #3 8009832: 440b add r3, r1 8009834: 60bb str r3, [r7, #8] WRITE_REG(dmatxdesc->DESC0, 0x0U); 8009836: 68bb ldr r3, [r7, #8] 8009838: 2200 movs r2, #0 800983a: 601a str r2, [r3, #0] WRITE_REG(dmatxdesc->DESC1, 0x0U); 800983c: 68bb ldr r3, [r7, #8] 800983e: 2200 movs r2, #0 8009840: 605a str r2, [r3, #4] WRITE_REG(dmatxdesc->DESC2, 0x0U); 8009842: 68bb ldr r3, [r7, #8] 8009844: 2200 movs r2, #0 8009846: 609a str r2, [r3, #8] WRITE_REG(dmatxdesc->DESC3, 0x0U); 8009848: 68bb ldr r3, [r7, #8] 800984a: 2200 movs r2, #0 800984c: 60da str r2, [r3, #12] WRITE_REG(heth->TxDescList.TxDesc[i], (uint32_t)dmatxdesc); 800984e: 68b9 ldr r1, [r7, #8] 8009850: 687b ldr r3, [r7, #4] 8009852: 68fa ldr r2, [r7, #12] 8009854: 3206 adds r2, #6 8009856: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_TX_DESC_CNT; i++) 800985a: 68fb ldr r3, [r7, #12] 800985c: 3301 adds r3, #1 800985e: 60fb str r3, [r7, #12] 8009860: 68fb ldr r3, [r7, #12] 8009862: 2b03 cmp r3, #3 8009864: d9de bls.n 8009824 } heth->TxDescList.CurTxDesc = 0; 8009866: 687b ldr r3, [r7, #4] 8009868: 2200 movs r2, #0 800986a: 629a str r2, [r3, #40] @ 0x28 /* Set Transmit Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACTDRLR, (ETH_TX_DESC_CNT - 1U)); 800986c: 687b ldr r3, [r7, #4] 800986e: 681b ldr r3, [r3, #0] 8009870: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009874: 461a mov r2, r3 8009876: 2303 movs r3, #3 8009878: f8c2 312c str.w r3, [r2, #300] @ 0x12c /* Set Transmit Descriptor List Address */ WRITE_REG(heth->Instance->DMACTDLAR, (uint32_t) heth->Init.TxDesc); 800987c: 687b ldr r3, [r7, #4] 800987e: 68da ldr r2, [r3, #12] 8009880: 687b ldr r3, [r7, #4] 8009882: 681b ldr r3, [r3, #0] 8009884: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009888: f8c3 2114 str.w r2, [r3, #276] @ 0x114 /* Set Transmit Descriptor Tail pointer */ WRITE_REG(heth->Instance->DMACTDTPR, (uint32_t) heth->Init.TxDesc); 800988c: 687b ldr r3, [r7, #4] 800988e: 68da ldr r2, [r3, #12] 8009890: 687b ldr r3, [r7, #4] 8009892: 681b ldr r3, [r3, #0] 8009894: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009898: f8c3 2120 str.w r2, [r3, #288] @ 0x120 } 800989c: bf00 nop 800989e: 3714 adds r7, #20 80098a0: 46bd mov sp, r7 80098a2: f85d 7b04 ldr.w r7, [sp], #4 80098a6: 4770 bx lr 080098a8 : * @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) { 80098a8: b480 push {r7} 80098aa: b085 sub sp, #20 80098ac: af00 add r7, sp, #0 80098ae: 6078 str r0, [r7, #4] ETH_DMADescTypeDef *dmarxdesc; uint32_t i; for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 80098b0: 2300 movs r3, #0 80098b2: 60fb str r3, [r7, #12] 80098b4: e023 b.n 80098fe { dmarxdesc = heth->Init.RxDesc + i; 80098b6: 687b ldr r3, [r7, #4] 80098b8: 6919 ldr r1, [r3, #16] 80098ba: 68fa ldr r2, [r7, #12] 80098bc: 4613 mov r3, r2 80098be: 005b lsls r3, r3, #1 80098c0: 4413 add r3, r2 80098c2: 00db lsls r3, r3, #3 80098c4: 440b add r3, r1 80098c6: 60bb str r3, [r7, #8] WRITE_REG(dmarxdesc->DESC0, 0x0U); 80098c8: 68bb ldr r3, [r7, #8] 80098ca: 2200 movs r2, #0 80098cc: 601a str r2, [r3, #0] WRITE_REG(dmarxdesc->DESC1, 0x0U); 80098ce: 68bb ldr r3, [r7, #8] 80098d0: 2200 movs r2, #0 80098d2: 605a str r2, [r3, #4] WRITE_REG(dmarxdesc->DESC2, 0x0U); 80098d4: 68bb ldr r3, [r7, #8] 80098d6: 2200 movs r2, #0 80098d8: 609a str r2, [r3, #8] WRITE_REG(dmarxdesc->DESC3, 0x0U); 80098da: 68bb ldr r3, [r7, #8] 80098dc: 2200 movs r2, #0 80098de: 60da str r2, [r3, #12] WRITE_REG(dmarxdesc->BackupAddr0, 0x0U); 80098e0: 68bb ldr r3, [r7, #8] 80098e2: 2200 movs r2, #0 80098e4: 611a str r2, [r3, #16] WRITE_REG(dmarxdesc->BackupAddr1, 0x0U); 80098e6: 68bb ldr r3, [r7, #8] 80098e8: 2200 movs r2, #0 80098ea: 615a str r2, [r3, #20] /* Set Rx descritors addresses */ WRITE_REG(heth->RxDescList.RxDesc[i], (uint32_t)dmarxdesc); 80098ec: 68b9 ldr r1, [r7, #8] 80098ee: 687b ldr r3, [r7, #4] 80098f0: 68fa ldr r2, [r7, #12] 80098f2: 3212 adds r2, #18 80098f4: f843 1022 str.w r1, [r3, r2, lsl #2] for (i = 0; i < (uint32_t)ETH_RX_DESC_CNT; i++) 80098f8: 68fb ldr r3, [r7, #12] 80098fa: 3301 adds r3, #1 80098fc: 60fb str r3, [r7, #12] 80098fe: 68fb ldr r3, [r7, #12] 8009900: 2b03 cmp r3, #3 8009902: d9d8 bls.n 80098b6 } WRITE_REG(heth->RxDescList.RxDescIdx, 0U); 8009904: 687b ldr r3, [r7, #4] 8009906: 2200 movs r2, #0 8009908: 65da str r2, [r3, #92] @ 0x5c WRITE_REG(heth->RxDescList.RxDescCnt, 0U); 800990a: 687b ldr r3, [r7, #4] 800990c: 2200 movs r2, #0 800990e: 661a str r2, [r3, #96] @ 0x60 WRITE_REG(heth->RxDescList.RxBuildDescIdx, 0U); 8009910: 687b ldr r3, [r7, #4] 8009912: 2200 movs r2, #0 8009914: 669a str r2, [r3, #104] @ 0x68 WRITE_REG(heth->RxDescList.RxBuildDescCnt, 0U); 8009916: 687b ldr r3, [r7, #4] 8009918: 2200 movs r2, #0 800991a: 66da str r2, [r3, #108] @ 0x6c WRITE_REG(heth->RxDescList.ItMode, 0U); 800991c: 687b ldr r3, [r7, #4] 800991e: 2200 movs r2, #0 8009920: 659a str r2, [r3, #88] @ 0x58 /* Set Receive Descriptor Ring Length */ WRITE_REG(heth->Instance->DMACRDRLR, ((uint32_t)(ETH_RX_DESC_CNT - 1U))); 8009922: 687b ldr r3, [r7, #4] 8009924: 681b ldr r3, [r3, #0] 8009926: f503 5380 add.w r3, r3, #4096 @ 0x1000 800992a: 461a mov r2, r3 800992c: 2303 movs r3, #3 800992e: f8c2 3130 str.w r3, [r2, #304] @ 0x130 /* Set Receive Descriptor List Address */ WRITE_REG(heth->Instance->DMACRDLAR, (uint32_t) heth->Init.RxDesc); 8009932: 687b ldr r3, [r7, #4] 8009934: 691a ldr r2, [r3, #16] 8009936: 687b ldr r3, [r7, #4] 8009938: 681b ldr r3, [r3, #0] 800993a: f503 5380 add.w r3, r3, #4096 @ 0x1000 800993e: 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)))); 8009942: 687b ldr r3, [r7, #4] 8009944: 691b ldr r3, [r3, #16] 8009946: f103 0248 add.w r2, r3, #72 @ 0x48 800994a: 687b ldr r3, [r7, #4] 800994c: 681b ldr r3, [r3, #0] 800994e: f503 5380 add.w r3, r3, #4096 @ 0x1000 8009952: f8c3 2128 str.w r2, [r3, #296] @ 0x128 } 8009956: bf00 nop 8009958: 3714 adds r7, #20 800995a: 46bd mov sp, r7 800995c: f85d 7b04 ldr.w r7, [sp], #4 8009960: 4770 bx lr ... 08009964 : * @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) { 8009964: b480 push {r7} 8009966: b091 sub sp, #68 @ 0x44 8009968: af00 add r7, sp, #0 800996a: 60f8 str r0, [r7, #12] 800996c: 60b9 str r1, [r7, #8] 800996e: 607a str r2, [r7, #4] ETH_TxDescListTypeDef *dmatxdesclist = &heth->TxDescList; 8009970: 68fb ldr r3, [r7, #12] 8009972: 3318 adds r3, #24 8009974: 627b str r3, [r7, #36] @ 0x24 uint32_t descidx = dmatxdesclist->CurTxDesc; 8009976: 6a7b ldr r3, [r7, #36] @ 0x24 8009978: 691b ldr r3, [r3, #16] 800997a: 63fb str r3, [r7, #60] @ 0x3c uint32_t firstdescidx = dmatxdesclist->CurTxDesc; 800997c: 6a7b ldr r3, [r7, #36] @ 0x24 800997e: 691b ldr r3, [r3, #16] 8009980: 623b str r3, [r7, #32] uint32_t idx; uint32_t descnbr = 0; 8009982: 2300 movs r3, #0 8009984: 637b str r3, [r7, #52] @ 0x34 ETH_DMADescTypeDef *dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009986: 6a7b ldr r3, [r7, #36] @ 0x24 8009988: 6bfa ldr r2, [r7, #60] @ 0x3c 800998a: f853 3022 ldr.w r3, [r3, r2, lsl #2] 800998e: 633b str r3, [r7, #48] @ 0x30 ETH_BufferTypeDef *txbuffer = pTxConfig->TxBuffer; 8009990: 68bb ldr r3, [r7, #8] 8009992: 689b ldr r3, [r3, #8] 8009994: 62fb str r3, [r7, #44] @ 0x2c uint32_t bd_count = 0; 8009996: 2300 movs r3, #0 8009998: 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) 800999a: 6b3b ldr r3, [r7, #48] @ 0x30 800999c: 68db ldr r3, [r3, #12] 800999e: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 80099a2: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 80099a6: d007 beq.n 80099b8 || (dmatxdesclist->PacketAddress[descidx] != NULL)) 80099a8: 6a7a ldr r2, [r7, #36] @ 0x24 80099aa: 6bfb ldr r3, [r7, #60] @ 0x3c 80099ac: 3304 adds r3, #4 80099ae: 009b lsls r3, r3, #2 80099b0: 4413 add r3, r2 80099b2: 685b ldr r3, [r3, #4] 80099b4: 2b00 cmp r3, #0 80099b6: d001 beq.n 80099bc { return HAL_ETH_ERROR_BUSY; 80099b8: 2302 movs r3, #2 80099ba: e266 b.n 8009e8a /***************************************************************************/ /***************** 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) 80099bc: 68bb ldr r3, [r7, #8] 80099be: 681b ldr r3, [r3, #0] 80099c0: f003 0304 and.w r3, r3, #4 80099c4: 2b00 cmp r3, #0 80099c6: d044 beq.n 8009a52 { /* Set vlan tag value */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_VT, pTxConfig->VlanTag); 80099c8: 6b3b ldr r3, [r7, #48] @ 0x30 80099ca: 68da ldr r2, [r3, #12] 80099cc: 4b75 ldr r3, [pc, #468] @ (8009ba4 ) 80099ce: 4013 ands r3, r2 80099d0: 68ba ldr r2, [r7, #8] 80099d2: 6a52 ldr r2, [r2, #36] @ 0x24 80099d4: 431a orrs r2, r3 80099d6: 6b3b ldr r3, [r7, #48] @ 0x30 80099d8: 60da str r2, [r3, #12] /* Set vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_VLTV); 80099da: 6b3b ldr r3, [r7, #48] @ 0x30 80099dc: 68db ldr r3, [r3, #12] 80099de: f443 3280 orr.w r2, r3, #65536 @ 0x10000 80099e2: 6b3b ldr r3, [r7, #48] @ 0x30 80099e4: 60da str r2, [r3, #12] /* Set the descriptor as the vlan input source */ SET_BIT(heth->Instance->MACVIR, ETH_MACVIR_VLTI); 80099e6: 68fb ldr r3, [r7, #12] 80099e8: 681b ldr r3, [r3, #0] 80099ea: 6e1a ldr r2, [r3, #96] @ 0x60 80099ec: 68fb ldr r3, [r7, #12] 80099ee: 681b ldr r3, [r3, #0] 80099f0: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 80099f4: 661a str r2, [r3, #96] @ 0x60 /* if inner VLAN is enabled */ if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_INNERVLANTAG) != (uint32_t)RESET) 80099f6: 68bb ldr r3, [r7, #8] 80099f8: 681b ldr r3, [r3, #0] 80099fa: f003 0308 and.w r3, r3, #8 80099fe: 2b00 cmp r3, #0 8009a00: d027 beq.n 8009a52 { /* Set inner vlan tag value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_IVT, (pTxConfig->InnerVlanTag << 16)); 8009a02: 6b3b ldr r3, [r7, #48] @ 0x30 8009a04: 689b ldr r3, [r3, #8] 8009a06: b29a uxth r2, r3 8009a08: 68bb ldr r3, [r7, #8] 8009a0a: 6adb ldr r3, [r3, #44] @ 0x2c 8009a0c: 041b lsls r3, r3, #16 8009a0e: 431a orrs r2, r3 8009a10: 6b3b ldr r3, [r7, #48] @ 0x30 8009a12: 609a str r2, [r3, #8] /* Set inner vlan tag valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_IVLTV); 8009a14: 6b3b ldr r3, [r7, #48] @ 0x30 8009a16: 68db ldr r3, [r3, #12] 8009a18: f443 3200 orr.w r2, r3, #131072 @ 0x20000 8009a1c: 6b3b ldr r3, [r7, #48] @ 0x30 8009a1e: 60da str r2, [r3, #12] /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXCDESC_IVTIR, pTxConfig->InnerVlanCtrl); 8009a20: 6b3b ldr r3, [r7, #48] @ 0x30 8009a22: 68db ldr r3, [r3, #12] 8009a24: f423 2240 bic.w r2, r3, #786432 @ 0xc0000 8009a28: 68bb ldr r3, [r7, #8] 8009a2a: 6b1b ldr r3, [r3, #48] @ 0x30 8009a2c: 431a orrs r2, r3 8009a2e: 6b3b ldr r3, [r7, #48] @ 0x30 8009a30: 60da str r2, [r3, #12] /* Set the descriptor as the inner vlan input source */ SET_BIT(heth->Instance->MACIVIR, ETH_MACIVIR_VLTI); 8009a32: 68fb ldr r3, [r7, #12] 8009a34: 681b ldr r3, [r3, #0] 8009a36: 6e5a ldr r2, [r3, #100] @ 0x64 8009a38: 68fb ldr r3, [r7, #12] 8009a3a: 681b ldr r3, [r3, #0] 8009a3c: f442 1280 orr.w r2, r2, #1048576 @ 0x100000 8009a40: 665a str r2, [r3, #100] @ 0x64 /* Enable double VLAN processing */ SET_BIT(heth->Instance->MACVTR, ETH_MACVTR_EDVLP); 8009a42: 68fb ldr r3, [r7, #12] 8009a44: 681b ldr r3, [r3, #0] 8009a46: 6d1a ldr r2, [r3, #80] @ 0x50 8009a48: 68fb ldr r3, [r7, #12] 8009a4a: 681b ldr r3, [r3, #0] 8009a4c: f042 6280 orr.w r2, r2, #67108864 @ 0x4000000 8009a50: 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) 8009a52: 68bb ldr r3, [r7, #8] 8009a54: 681b ldr r3, [r3, #0] 8009a56: f003 0310 and.w r3, r3, #16 8009a5a: 2b00 cmp r3, #0 8009a5c: d00e beq.n 8009a7c { /* Set MSS value */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXCDESC_MSS, pTxConfig->MaxSegmentSize); 8009a5e: 6b3b ldr r3, [r7, #48] @ 0x30 8009a60: 689a ldr r2, [r3, #8] 8009a62: 4b51 ldr r3, [pc, #324] @ (8009ba8 ) 8009a64: 4013 ands r3, r2 8009a66: 68ba ldr r2, [r7, #8] 8009a68: 6992 ldr r2, [r2, #24] 8009a6a: 431a orrs r2, r3 8009a6c: 6b3b ldr r3, [r7, #48] @ 0x30 8009a6e: 609a str r2, [r3, #8] /* Set MSS valid bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_TCMSSV); 8009a70: 6b3b ldr r3, [r7, #48] @ 0x30 8009a72: 68db ldr r3, [r3, #12] 8009a74: f043 6280 orr.w r2, r3, #67108864 @ 0x4000000 8009a78: 6b3b ldr r3, [r7, #48] @ 0x30 8009a7a: 60da str r2, [r3, #12] } if ((READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8009a7c: 68bb ldr r3, [r7, #8] 8009a7e: 681b ldr r3, [r3, #0] 8009a80: f003 0304 and.w r3, r3, #4 8009a84: 2b00 cmp r3, #0 8009a86: d105 bne.n 8009a94 || (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET)) 8009a88: 68bb ldr r3, [r7, #8] 8009a8a: 681b ldr r3, [r3, #0] 8009a8c: f003 0310 and.w r3, r3, #16 8009a90: 2b00 cmp r3, #0 8009a92: d036 beq.n 8009b02 { /* Set as context descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXCDESC_CTXT); 8009a94: 6b3b ldr r3, [r7, #48] @ 0x30 8009a96: 68db ldr r3, [r3, #12] 8009a98: f043 4280 orr.w r2, r3, #1073741824 @ 0x40000000 8009a9c: 6b3b ldr r3, [r7, #48] @ 0x30 8009a9e: 60da str r2, [r3, #12] __ASM volatile ("dmb 0xF":::"memory"); 8009aa0: f3bf 8f5f dmb sy } 8009aa4: 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); 8009aa6: 6b3b ldr r3, [r7, #48] @ 0x30 8009aa8: 68db ldr r3, [r3, #12] 8009aaa: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009aae: 6b3b ldr r3, [r7, #48] @ 0x30 8009ab0: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8009ab2: 6bfb ldr r3, [r7, #60] @ 0x3c 8009ab4: 3301 adds r3, #1 8009ab6: 63fb str r3, [r7, #60] @ 0x3c 8009ab8: 6bfb ldr r3, [r7, #60] @ 0x3c 8009aba: 2b03 cmp r3, #3 8009abc: d902 bls.n 8009ac4 8009abe: 6bfb ldr r3, [r7, #60] @ 0x3c 8009ac0: 3b04 subs r3, #4 8009ac2: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009ac4: 6a7b ldr r3, [r7, #36] @ 0x24 8009ac6: 6bfa ldr r2, [r7, #60] @ 0x3c 8009ac8: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009acc: 633b str r3, [r7, #48] @ 0x30 descnbr += 1U; 8009ace: 6b7b ldr r3, [r7, #52] @ 0x34 8009ad0: 3301 adds r3, #1 8009ad2: 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) 8009ad4: 6b3b ldr r3, [r7, #48] @ 0x30 8009ad6: 68db ldr r3, [r3, #12] 8009ad8: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8009adc: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 8009ae0: d10f bne.n 8009b02 { dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[firstdescidx]; 8009ae2: 6a7b ldr r3, [r7, #36] @ 0x24 8009ae4: 6a3a ldr r2, [r7, #32] 8009ae6: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009aea: 633b str r3, [r7, #48] @ 0x30 __ASM volatile ("dmb 0xF":::"memory"); 8009aec: f3bf 8f5f dmb sy } 8009af0: 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); 8009af2: 6b3b ldr r3, [r7, #48] @ 0x30 8009af4: 68db ldr r3, [r3, #12] 8009af6: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 8009afa: 6b3b ldr r3, [r7, #48] @ 0x30 8009afc: 60da str r2, [r3, #12] return HAL_ETH_ERROR_BUSY; 8009afe: 2302 movs r3, #2 8009b00: e1c3 b.n 8009e8a /***************************************************************************/ /***************** Normal descriptors configuration *****************/ /***************************************************************************/ descnbr += 1U; 8009b02: 6b7b ldr r3, [r7, #52] @ 0x34 8009b04: 3301 adds r3, #1 8009b06: 637b str r3, [r7, #52] @ 0x34 /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8009b08: 6afb ldr r3, [r7, #44] @ 0x2c 8009b0a: 681b ldr r3, [r3, #0] 8009b0c: 461a mov r2, r3 8009b0e: 6b3b ldr r3, [r7, #48] @ 0x30 8009b10: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8009b12: 6b3b ldr r3, [r7, #48] @ 0x30 8009b14: 689a ldr r2, [r3, #8] 8009b16: 4b24 ldr r3, [pc, #144] @ (8009ba8 ) 8009b18: 4013 ands r3, r2 8009b1a: 6afa ldr r2, [r7, #44] @ 0x2c 8009b1c: 6852 ldr r2, [r2, #4] 8009b1e: 431a orrs r2, r3 8009b20: 6b3b ldr r3, [r7, #48] @ 0x30 8009b22: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 8009b24: 6afb ldr r3, [r7, #44] @ 0x2c 8009b26: 689b ldr r3, [r3, #8] 8009b28: 2b00 cmp r3, #0 8009b2a: d012 beq.n 8009b52 { txbuffer = txbuffer->next; 8009b2c: 6afb ldr r3, [r7, #44] @ 0x2c 8009b2e: 689b ldr r3, [r3, #8] 8009b30: 62fb str r3, [r7, #44] @ 0x2c /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 8009b32: 6afb ldr r3, [r7, #44] @ 0x2c 8009b34: 681b ldr r3, [r3, #0] 8009b36: 461a mov r2, r3 8009b38: 6b3b ldr r3, [r7, #48] @ 0x30 8009b3a: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8009b3c: 6b3b ldr r3, [r7, #48] @ 0x30 8009b3e: 689a ldr r2, [r3, #8] 8009b40: 4b1a ldr r3, [pc, #104] @ (8009bac ) 8009b42: 4013 ands r3, r2 8009b44: 6afa ldr r2, [r7, #44] @ 0x2c 8009b46: 6852 ldr r2, [r2, #4] 8009b48: 0412 lsls r2, r2, #16 8009b4a: 431a orrs r2, r3 8009b4c: 6b3b ldr r3, [r7, #48] @ 0x30 8009b4e: 609a str r2, [r3, #8] 8009b50: e008 b.n 8009b64 } else { WRITE_REG(dmatxdesc->DESC1, 0x0U); 8009b52: 6b3b ldr r3, [r7, #48] @ 0x30 8009b54: 2200 movs r2, #0 8009b56: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8009b58: 6b3b ldr r3, [r7, #48] @ 0x30 8009b5a: 689a ldr r2, [r3, #8] 8009b5c: 4b13 ldr r3, [pc, #76] @ (8009bac ) 8009b5e: 4013 ands r3, r2 8009b60: 6b3a ldr r2, [r7, #48] @ 0x30 8009b62: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8009b64: 68bb ldr r3, [r7, #8] 8009b66: 681b ldr r3, [r3, #0] 8009b68: f003 0310 and.w r3, r3, #16 8009b6c: 2b00 cmp r3, #0 8009b6e: d021 beq.n 8009bb4 { /* Set TCP Header length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_THL, (pTxConfig->TCPHeaderLen << 19)); 8009b70: 6b3b ldr r3, [r7, #48] @ 0x30 8009b72: 68db ldr r3, [r3, #12] 8009b74: f423 02f0 bic.w r2, r3, #7864320 @ 0x780000 8009b78: 68bb ldr r3, [r7, #8] 8009b7a: 6a1b ldr r3, [r3, #32] 8009b7c: 04db lsls r3, r3, #19 8009b7e: 431a orrs r2, r3 8009b80: 6b3b ldr r3, [r7, #48] @ 0x30 8009b82: 60da str r2, [r3, #12] /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8009b84: 6b3b ldr r3, [r7, #48] @ 0x30 8009b86: 68da ldr r2, [r3, #12] 8009b88: 4b09 ldr r3, [pc, #36] @ (8009bb0 ) 8009b8a: 4013 ands r3, r2 8009b8c: 68ba ldr r2, [r7, #8] 8009b8e: 69d2 ldr r2, [r2, #28] 8009b90: 431a orrs r2, r3 8009b92: 6b3b ldr r3, [r7, #48] @ 0x30 8009b94: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 8009b96: 6b3b ldr r3, [r7, #48] @ 0x30 8009b98: 68db ldr r3, [r3, #12] 8009b9a: f443 2280 orr.w r2, r3, #262144 @ 0x40000 8009b9e: 6b3b ldr r3, [r7, #48] @ 0x30 8009ba0: 60da str r2, [r3, #12] 8009ba2: e02e b.n 8009c02 8009ba4: ffff0000 .word 0xffff0000 8009ba8: ffffc000 .word 0xffffc000 8009bac: c000ffff .word 0xc000ffff 8009bb0: fffc0000 .word 0xfffc0000 } else { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 8009bb4: 6b3b ldr r3, [r7, #48] @ 0x30 8009bb6: 68da ldr r2, [r3, #12] 8009bb8: 4b7b ldr r3, [pc, #492] @ (8009da8 ) 8009bba: 4013 ands r3, r2 8009bbc: 68ba ldr r2, [r7, #8] 8009bbe: 6852 ldr r2, [r2, #4] 8009bc0: 431a orrs r2, r3 8009bc2: 6b3b ldr r3, [r7, #48] @ 0x30 8009bc4: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 8009bc6: 68bb ldr r3, [r7, #8] 8009bc8: 681b ldr r3, [r3, #0] 8009bca: f003 0301 and.w r3, r3, #1 8009bce: 2b00 cmp r3, #0 8009bd0: d008 beq.n 8009be4 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8009bd2: 6b3b ldr r3, [r7, #48] @ 0x30 8009bd4: 68db ldr r3, [r3, #12] 8009bd6: f423 3240 bic.w r2, r3, #196608 @ 0x30000 8009bda: 68bb ldr r3, [r7, #8] 8009bdc: 695b ldr r3, [r3, #20] 8009bde: 431a orrs r2, r3 8009be0: 6b3b ldr r3, [r7, #48] @ 0x30 8009be2: 60da str r2, [r3, #12] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CRCPAD) != (uint32_t)RESET) 8009be4: 68bb ldr r3, [r7, #8] 8009be6: 681b ldr r3, [r3, #0] 8009be8: f003 0320 and.w r3, r3, #32 8009bec: 2b00 cmp r3, #0 8009bee: d008 beq.n 8009c02 { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CPC, pTxConfig->CRCPadCtrl); 8009bf0: 6b3b ldr r3, [r7, #48] @ 0x30 8009bf2: 68db ldr r3, [r3, #12] 8009bf4: f023 6240 bic.w r2, r3, #201326592 @ 0xc000000 8009bf8: 68bb ldr r3, [r7, #8] 8009bfa: 691b ldr r3, [r3, #16] 8009bfc: 431a orrs r2, r3 8009bfe: 6b3b ldr r3, [r7, #48] @ 0x30 8009c00: 60da str r2, [r3, #12] } } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_VLANTAG) != (uint32_t)RESET) 8009c02: 68bb ldr r3, [r7, #8] 8009c04: 681b ldr r3, [r3, #0] 8009c06: f003 0304 and.w r3, r3, #4 8009c0a: 2b00 cmp r3, #0 8009c0c: d008 beq.n 8009c20 { /* Set Vlan Tag control */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_VTIR, pTxConfig->VlanCtrl); 8009c0e: 6b3b ldr r3, [r7, #48] @ 0x30 8009c10: 689b ldr r3, [r3, #8] 8009c12: f423 4240 bic.w r2, r3, #49152 @ 0xc000 8009c16: 68bb ldr r3, [r7, #8] 8009c18: 6a9b ldr r3, [r3, #40] @ 0x28 8009c1a: 431a orrs r2, r3 8009c1c: 6b3b ldr r3, [r7, #48] @ 0x30 8009c1e: 609a str r2, [r3, #8] } /* Mark it as First Descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8009c20: 6b3b ldr r3, [r7, #48] @ 0x30 8009c22: 68db ldr r3, [r3, #12] 8009c24: f043 5200 orr.w r2, r3, #536870912 @ 0x20000000 8009c28: 6b3b ldr r3, [r7, #48] @ 0x30 8009c2a: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8009c2c: 6b3b ldr r3, [r7, #48] @ 0x30 8009c2e: 68db ldr r3, [r3, #12] 8009c30: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 8009c34: 6b3b ldr r3, [r7, #48] @ 0x30 8009c36: 60da str r2, [r3, #12] __ASM volatile ("dmb 0xF":::"memory"); 8009c38: f3bf 8f5f dmb sy } 8009c3c: 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); 8009c3e: 6b3b ldr r3, [r7, #48] @ 0x30 8009c40: 68db ldr r3, [r3, #12] 8009c42: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009c46: 6b3b ldr r3, [r7, #48] @ 0x30 8009c48: 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) 8009c4a: 68bb ldr r3, [r7, #8] 8009c4c: 681b ldr r3, [r3, #0] 8009c4e: f003 0302 and.w r3, r3, #2 8009c52: 2b00 cmp r3, #0 8009c54: f000 80da beq.w 8009e0c { MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_SAIC, pTxConfig->SrcAddrCtrl); 8009c58: 6b3b ldr r3, [r7, #48] @ 0x30 8009c5a: 68db ldr r3, [r3, #12] 8009c5c: f023 7260 bic.w r2, r3, #58720256 @ 0x3800000 8009c60: 68bb ldr r3, [r7, #8] 8009c62: 68db ldr r3, [r3, #12] 8009c64: 431a orrs r2, r3 8009c66: 6b3b ldr r3, [r7, #48] @ 0x30 8009c68: 60da str r2, [r3, #12] } /* only if the packet is split into more than one descriptors > 1 */ while (txbuffer->next != NULL) 8009c6a: e0cf b.n 8009e0c { /* Clear the LD bit of previous descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8009c6c: 6b3b ldr r3, [r7, #48] @ 0x30 8009c6e: 68db ldr r3, [r3, #12] 8009c70: f023 5280 bic.w r2, r3, #268435456 @ 0x10000000 8009c74: 6b3b ldr r3, [r7, #48] @ 0x30 8009c76: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8009c78: 6bfb ldr r3, [r7, #60] @ 0x3c 8009c7a: 3301 adds r3, #1 8009c7c: 63fb str r3, [r7, #60] @ 0x3c 8009c7e: 6bfb ldr r3, [r7, #60] @ 0x3c 8009c80: 2b03 cmp r3, #3 8009c82: d902 bls.n 8009c8a 8009c84: 6bfb ldr r3, [r7, #60] @ 0x3c 8009c86: 3b04 subs r3, #4 8009c88: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009c8a: 6a7b ldr r3, [r7, #36] @ 0x24 8009c8c: 6bfa ldr r2, [r7, #60] @ 0x3c 8009c8e: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009c92: 633b str r3, [r7, #48] @ 0x30 /* Clear the FD bit of new Descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FD); 8009c94: 6b3b ldr r3, [r7, #48] @ 0x30 8009c96: 68db ldr r3, [r3, #12] 8009c98: f023 5200 bic.w r2, r3, #536870912 @ 0x20000000 8009c9c: 6b3b ldr r3, [r7, #48] @ 0x30 8009c9e: 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) 8009ca0: 6b3b ldr r3, [r7, #48] @ 0x30 8009ca2: 68db ldr r3, [r3, #12] 8009ca4: f003 4300 and.w r3, r3, #2147483648 @ 0x80000000 8009ca8: f1b3 4f00 cmp.w r3, #2147483648 @ 0x80000000 8009cac: d007 beq.n 8009cbe || (dmatxdesclist->PacketAddress[descidx] != NULL)) 8009cae: 6a7a ldr r2, [r7, #36] @ 0x24 8009cb0: 6bfb ldr r3, [r7, #60] @ 0x3c 8009cb2: 3304 adds r3, #4 8009cb4: 009b lsls r3, r3, #2 8009cb6: 4413 add r3, r2 8009cb8: 685b ldr r3, [r3, #4] 8009cba: 2b00 cmp r3, #0 8009cbc: d029 beq.n 8009d12 { descidx = firstdescidx; 8009cbe: 6a3b ldr r3, [r7, #32] 8009cc0: 63fb str r3, [r7, #60] @ 0x3c dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009cc2: 6a7b ldr r3, [r7, #36] @ 0x24 8009cc4: 6bfa ldr r2, [r7, #60] @ 0x3c 8009cc6: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009cca: 633b str r3, [r7, #48] @ 0x30 /* clear previous desc own bit */ for (idx = 0; idx < descnbr; idx ++) 8009ccc: 2300 movs r3, #0 8009cce: 63bb str r3, [r7, #56] @ 0x38 8009cd0: e019 b.n 8009d06 __ASM volatile ("dmb 0xF":::"memory"); 8009cd2: f3bf 8f5f dmb sy } 8009cd6: bf00 nop { /* Ensure rest of descriptor is written to RAM before the OWN bit */ __DMB(); CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_OWN); 8009cd8: 6b3b ldr r3, [r7, #48] @ 0x30 8009cda: 68db ldr r3, [r3, #12] 8009cdc: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 8009ce0: 6b3b ldr r3, [r7, #48] @ 0x30 8009ce2: 60da str r2, [r3, #12] /* Increment current tx descriptor index */ INCR_TX_DESC_INDEX(descidx, 1U); 8009ce4: 6bfb ldr r3, [r7, #60] @ 0x3c 8009ce6: 3301 adds r3, #1 8009ce8: 63fb str r3, [r7, #60] @ 0x3c 8009cea: 6bfb ldr r3, [r7, #60] @ 0x3c 8009cec: 2b03 cmp r3, #3 8009cee: d902 bls.n 8009cf6 8009cf0: 6bfb ldr r3, [r7, #60] @ 0x3c 8009cf2: 3b04 subs r3, #4 8009cf4: 63fb str r3, [r7, #60] @ 0x3c /* Get current descriptor address */ dmatxdesc = (ETH_DMADescTypeDef *)dmatxdesclist->TxDesc[descidx]; 8009cf6: 6a7b ldr r3, [r7, #36] @ 0x24 8009cf8: 6bfa ldr r2, [r7, #60] @ 0x3c 8009cfa: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009cfe: 633b str r3, [r7, #48] @ 0x30 for (idx = 0; idx < descnbr; idx ++) 8009d00: 6bbb ldr r3, [r7, #56] @ 0x38 8009d02: 3301 adds r3, #1 8009d04: 63bb str r3, [r7, #56] @ 0x38 8009d06: 6bba ldr r2, [r7, #56] @ 0x38 8009d08: 6b7b ldr r3, [r7, #52] @ 0x34 8009d0a: 429a cmp r2, r3 8009d0c: d3e1 bcc.n 8009cd2 } return HAL_ETH_ERROR_BUSY; 8009d0e: 2302 movs r3, #2 8009d10: e0bb b.n 8009e8a } descnbr += 1U; 8009d12: 6b7b ldr r3, [r7, #52] @ 0x34 8009d14: 3301 adds r3, #1 8009d16: 637b str r3, [r7, #52] @ 0x34 /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8009d18: 6afb ldr r3, [r7, #44] @ 0x2c 8009d1a: 689b ldr r3, [r3, #8] 8009d1c: 62fb str r3, [r7, #44] @ 0x2c /* Set header or buffer 1 address */ WRITE_REG(dmatxdesc->DESC0, (uint32_t)txbuffer->buffer); 8009d1e: 6afb ldr r3, [r7, #44] @ 0x2c 8009d20: 681b ldr r3, [r3, #0] 8009d22: 461a mov r2, r3 8009d24: 6b3b ldr r3, [r7, #48] @ 0x30 8009d26: 601a str r2, [r3, #0] /* Set header or buffer 1 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B1L, txbuffer->len); 8009d28: 6b3b ldr r3, [r7, #48] @ 0x30 8009d2a: 689a ldr r2, [r3, #8] 8009d2c: 4b1f ldr r3, [pc, #124] @ (8009dac ) 8009d2e: 4013 ands r3, r2 8009d30: 6afa ldr r2, [r7, #44] @ 0x2c 8009d32: 6852 ldr r2, [r2, #4] 8009d34: 431a orrs r2, r3 8009d36: 6b3b ldr r3, [r7, #48] @ 0x30 8009d38: 609a str r2, [r3, #8] if (txbuffer->next != NULL) 8009d3a: 6afb ldr r3, [r7, #44] @ 0x2c 8009d3c: 689b ldr r3, [r3, #8] 8009d3e: 2b00 cmp r3, #0 8009d40: d012 beq.n 8009d68 { /* Get the next Tx buffer in the list */ txbuffer = txbuffer->next; 8009d42: 6afb ldr r3, [r7, #44] @ 0x2c 8009d44: 689b ldr r3, [r3, #8] 8009d46: 62fb str r3, [r7, #44] @ 0x2c /* Set buffer 2 address */ WRITE_REG(dmatxdesc->DESC1, (uint32_t)txbuffer->buffer); 8009d48: 6afb ldr r3, [r7, #44] @ 0x2c 8009d4a: 681b ldr r3, [r3, #0] 8009d4c: 461a mov r2, r3 8009d4e: 6b3b ldr r3, [r7, #48] @ 0x30 8009d50: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, (txbuffer->len << 16)); 8009d52: 6b3b ldr r3, [r7, #48] @ 0x30 8009d54: 689a ldr r2, [r3, #8] 8009d56: 4b16 ldr r3, [pc, #88] @ (8009db0 ) 8009d58: 4013 ands r3, r2 8009d5a: 6afa ldr r2, [r7, #44] @ 0x2c 8009d5c: 6852 ldr r2, [r2, #4] 8009d5e: 0412 lsls r2, r2, #16 8009d60: 431a orrs r2, r3 8009d62: 6b3b ldr r3, [r7, #48] @ 0x30 8009d64: 609a str r2, [r3, #8] 8009d66: e008 b.n 8009d7a } else { WRITE_REG(dmatxdesc->DESC1, 0x0U); 8009d68: 6b3b ldr r3, [r7, #48] @ 0x30 8009d6a: 2200 movs r2, #0 8009d6c: 605a str r2, [r3, #4] /* Set buffer 2 Length */ MODIFY_REG(dmatxdesc->DESC2, ETH_DMATXNDESCRF_B2L, 0x0U); 8009d6e: 6b3b ldr r3, [r7, #48] @ 0x30 8009d70: 689a ldr r2, [r3, #8] 8009d72: 4b0f ldr r3, [pc, #60] @ (8009db0 ) 8009d74: 4013 ands r3, r2 8009d76: 6b3a ldr r2, [r7, #48] @ 0x30 8009d78: 6093 str r3, [r2, #8] } if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_TSO) != (uint32_t)RESET) 8009d7a: 68bb ldr r3, [r7, #8] 8009d7c: 681b ldr r3, [r3, #0] 8009d7e: f003 0310 and.w r3, r3, #16 8009d82: 2b00 cmp r3, #0 8009d84: d018 beq.n 8009db8 { /* Set TCP payload length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TPL, pTxConfig->PayloadLen); 8009d86: 6b3b ldr r3, [r7, #48] @ 0x30 8009d88: 68da ldr r2, [r3, #12] 8009d8a: 4b0a ldr r3, [pc, #40] @ (8009db4 ) 8009d8c: 4013 ands r3, r2 8009d8e: 68ba ldr r2, [r7, #8] 8009d90: 69d2 ldr r2, [r2, #28] 8009d92: 431a orrs r2, r3 8009d94: 6b3b ldr r3, [r7, #48] @ 0x30 8009d96: 60da str r2, [r3, #12] /* Set TCP Segmentation Enabled bit */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_TSE); 8009d98: 6b3b ldr r3, [r7, #48] @ 0x30 8009d9a: 68db ldr r3, [r3, #12] 8009d9c: f443 2280 orr.w r2, r3, #262144 @ 0x40000 8009da0: 6b3b ldr r3, [r7, #48] @ 0x30 8009da2: 60da str r2, [r3, #12] 8009da4: e020 b.n 8009de8 8009da6: bf00 nop 8009da8: ffff8000 .word 0xffff8000 8009dac: ffffc000 .word 0xffffc000 8009db0: c000ffff .word 0xc000ffff 8009db4: fffc0000 .word 0xfffc0000 } else { /* Set the packet length */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_FL, pTxConfig->Length); 8009db8: 6b3b ldr r3, [r7, #48] @ 0x30 8009dba: 68da ldr r2, [r3, #12] 8009dbc: 4b36 ldr r3, [pc, #216] @ (8009e98 ) 8009dbe: 4013 ands r3, r2 8009dc0: 68ba ldr r2, [r7, #8] 8009dc2: 6852 ldr r2, [r2, #4] 8009dc4: 431a orrs r2, r3 8009dc6: 6b3b ldr r3, [r7, #48] @ 0x30 8009dc8: 60da str r2, [r3, #12] if (READ_BIT(pTxConfig->Attributes, ETH_TX_PACKETS_FEATURES_CSUM) != (uint32_t)RESET) 8009dca: 68bb ldr r3, [r7, #8] 8009dcc: 681b ldr r3, [r3, #0] 8009dce: f003 0301 and.w r3, r3, #1 8009dd2: 2b00 cmp r3, #0 8009dd4: d008 beq.n 8009de8 { /* Checksum Insertion Control */ MODIFY_REG(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CIC, pTxConfig->ChecksumCtrl); 8009dd6: 6b3b ldr r3, [r7, #48] @ 0x30 8009dd8: 68db ldr r3, [r3, #12] 8009dda: f423 3240 bic.w r2, r3, #196608 @ 0x30000 8009dde: 68bb ldr r3, [r7, #8] 8009de0: 695b ldr r3, [r3, #20] 8009de2: 431a orrs r2, r3 8009de4: 6b3b ldr r3, [r7, #48] @ 0x30 8009de6: 60da str r2, [r3, #12] } } bd_count += 1U; 8009de8: 6abb ldr r3, [r7, #40] @ 0x28 8009dea: 3301 adds r3, #1 8009dec: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("dmb 0xF":::"memory"); 8009dee: f3bf 8f5f dmb sy } 8009df2: 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); 8009df4: 6b3b ldr r3, [r7, #48] @ 0x30 8009df6: 68db ldr r3, [r3, #12] 8009df8: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009dfc: 6b3b ldr r3, [r7, #48] @ 0x30 8009dfe: 60da str r2, [r3, #12] /* Mark it as NORMAL descriptor */ CLEAR_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_CTXT); 8009e00: 6b3b ldr r3, [r7, #48] @ 0x30 8009e02: 68db ldr r3, [r3, #12] 8009e04: f023 4280 bic.w r2, r3, #1073741824 @ 0x40000000 8009e08: 6b3b ldr r3, [r7, #48] @ 0x30 8009e0a: 60da str r2, [r3, #12] while (txbuffer->next != NULL) 8009e0c: 6afb ldr r3, [r7, #44] @ 0x2c 8009e0e: 689b ldr r3, [r3, #8] 8009e10: 2b00 cmp r3, #0 8009e12: f47f af2b bne.w 8009c6c } if (ItMode != ((uint32_t)RESET)) 8009e16: 687b ldr r3, [r7, #4] 8009e18: 2b00 cmp r3, #0 8009e1a: d006 beq.n 8009e2a { /* Set Interrupt on completion bit */ SET_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8009e1c: 6b3b ldr r3, [r7, #48] @ 0x30 8009e1e: 689b ldr r3, [r3, #8] 8009e20: f043 4200 orr.w r2, r3, #2147483648 @ 0x80000000 8009e24: 6b3b ldr r3, [r7, #48] @ 0x30 8009e26: 609a str r2, [r3, #8] 8009e28: e005 b.n 8009e36 } else { /* Clear Interrupt on completion bit */ CLEAR_BIT(dmatxdesc->DESC2, ETH_DMATXNDESCRF_IOC); 8009e2a: 6b3b ldr r3, [r7, #48] @ 0x30 8009e2c: 689b ldr r3, [r3, #8] 8009e2e: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 8009e32: 6b3b ldr r3, [r7, #48] @ 0x30 8009e34: 609a str r2, [r3, #8] } /* Mark it as LAST descriptor */ SET_BIT(dmatxdesc->DESC3, ETH_DMATXNDESCRF_LD); 8009e36: 6b3b ldr r3, [r7, #48] @ 0x30 8009e38: 68db ldr r3, [r3, #12] 8009e3a: f043 5280 orr.w r2, r3, #268435456 @ 0x10000000 8009e3e: 6b3b ldr r3, [r7, #48] @ 0x30 8009e40: 60da str r2, [r3, #12] /* Save the current packet address to expose it to the application */ dmatxdesclist->PacketAddress[descidx] = dmatxdesclist->CurrentPacketAddress; 8009e42: 6a7b ldr r3, [r7, #36] @ 0x24 8009e44: 6a5a ldr r2, [r3, #36] @ 0x24 8009e46: 6a79 ldr r1, [r7, #36] @ 0x24 8009e48: 6bfb ldr r3, [r7, #60] @ 0x3c 8009e4a: 3304 adds r3, #4 8009e4c: 009b lsls r3, r3, #2 8009e4e: 440b add r3, r1 8009e50: 605a str r2, [r3, #4] dmatxdesclist->CurTxDesc = descidx; 8009e52: 6a7b ldr r3, [r7, #36] @ 0x24 8009e54: 6bfa ldr r2, [r7, #60] @ 0x3c 8009e56: 611a str r2, [r3, #16] __ASM volatile ("MRS %0, primask" : "=r" (result) :: "memory"); 8009e58: f3ef 8310 mrs r3, PRIMASK 8009e5c: 613b str r3, [r7, #16] return(result); 8009e5e: 693b ldr r3, [r7, #16] /* Enter critical section */ primask_bit = __get_PRIMASK(); 8009e60: 61fb str r3, [r7, #28] 8009e62: 2301 movs r3, #1 8009e64: 617b str r3, [r7, #20] __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); 8009e66: 697b ldr r3, [r7, #20] 8009e68: f383 8810 msr PRIMASK, r3 } 8009e6c: bf00 nop __set_PRIMASK(1); dmatxdesclist->BuffersInUse += bd_count + 1U; 8009e6e: 6a7b ldr r3, [r7, #36] @ 0x24 8009e70: 6a9a ldr r2, [r3, #40] @ 0x28 8009e72: 6abb ldr r3, [r7, #40] @ 0x28 8009e74: 4413 add r3, r2 8009e76: 1c5a adds r2, r3, #1 8009e78: 6a7b ldr r3, [r7, #36] @ 0x24 8009e7a: 629a str r2, [r3, #40] @ 0x28 8009e7c: 69fb ldr r3, [r7, #28] 8009e7e: 61bb str r3, [r7, #24] __ASM volatile ("MSR primask, %0" : : "r" (priMask) : "memory"); 8009e80: 69bb ldr r3, [r7, #24] 8009e82: f383 8810 msr PRIMASK, r3 } 8009e86: bf00 nop /* Exit critical section: restore previous priority mask */ __set_PRIMASK(primask_bit); /* Return function status */ return HAL_ETH_ERROR_NONE; 8009e88: 2300 movs r3, #0 } 8009e8a: 4618 mov r0, r3 8009e8c: 3744 adds r7, #68 @ 0x44 8009e8e: 46bd mov sp, r7 8009e90: f85d 7b04 ldr.w r7, [sp], #4 8009e94: 4770 bx lr 8009e96: bf00 nop 8009e98: ffff8000 .word 0xffff8000 08009e9c : * @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) { 8009e9c: b480 push {r7} 8009e9e: b089 sub sp, #36 @ 0x24 8009ea0: af00 add r7, sp, #0 8009ea2: 6078 str r0, [r7, #4] 8009ea4: 6039 str r1, [r7, #0] uint32_t position = 0x00U; 8009ea6: 2300 movs r3, #0 8009ea8: 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 */ 8009eaa: 4b89 ldr r3, [pc, #548] @ (800a0d0 ) 8009eac: 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) 8009eae: e194 b.n 800a1da { /* Get current io position */ iocurrent = (GPIO_Init->Pin) & (1UL << position); 8009eb0: 683b ldr r3, [r7, #0] 8009eb2: 681a ldr r2, [r3, #0] 8009eb4: 2101 movs r1, #1 8009eb6: 69fb ldr r3, [r7, #28] 8009eb8: fa01 f303 lsl.w r3, r1, r3 8009ebc: 4013 ands r3, r2 8009ebe: 613b str r3, [r7, #16] if (iocurrent != 0x00U) 8009ec0: 693b ldr r3, [r7, #16] 8009ec2: 2b00 cmp r3, #0 8009ec4: f000 8186 beq.w 800a1d4 { /*--------------------- 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)) 8009ec8: 683b ldr r3, [r7, #0] 8009eca: 685b ldr r3, [r3, #4] 8009ecc: f003 0303 and.w r3, r3, #3 8009ed0: 2b01 cmp r3, #1 8009ed2: d005 beq.n 8009ee0 8009ed4: 683b ldr r3, [r7, #0] 8009ed6: 685b ldr r3, [r3, #4] 8009ed8: f003 0303 and.w r3, r3, #3 8009edc: 2b02 cmp r3, #2 8009ede: d130 bne.n 8009f42 { /* Check the Speed parameter */ assert_param(IS_GPIO_SPEED(GPIO_Init->Speed)); /* Configure the IO Speed */ temp = GPIOx->OSPEEDR; 8009ee0: 687b ldr r3, [r7, #4] 8009ee2: 689b ldr r3, [r3, #8] 8009ee4: 61bb str r3, [r7, #24] temp &= ~(GPIO_OSPEEDR_OSPEED0 << (position * 2U)); 8009ee6: 69fb ldr r3, [r7, #28] 8009ee8: 005b lsls r3, r3, #1 8009eea: 2203 movs r2, #3 8009eec: fa02 f303 lsl.w r3, r2, r3 8009ef0: 43db mvns r3, r3 8009ef2: 69ba ldr r2, [r7, #24] 8009ef4: 4013 ands r3, r2 8009ef6: 61bb str r3, [r7, #24] temp |= (GPIO_Init->Speed << (position * 2U)); 8009ef8: 683b ldr r3, [r7, #0] 8009efa: 68da ldr r2, [r3, #12] 8009efc: 69fb ldr r3, [r7, #28] 8009efe: 005b lsls r3, r3, #1 8009f00: fa02 f303 lsl.w r3, r2, r3 8009f04: 69ba ldr r2, [r7, #24] 8009f06: 4313 orrs r3, r2 8009f08: 61bb str r3, [r7, #24] GPIOx->OSPEEDR = temp; 8009f0a: 687b ldr r3, [r7, #4] 8009f0c: 69ba ldr r2, [r7, #24] 8009f0e: 609a str r2, [r3, #8] /* Configure the IO Output Type */ temp = GPIOx->OTYPER; 8009f10: 687b ldr r3, [r7, #4] 8009f12: 685b ldr r3, [r3, #4] 8009f14: 61bb str r3, [r7, #24] temp &= ~(GPIO_OTYPER_OT0 << position) ; 8009f16: 2201 movs r2, #1 8009f18: 69fb ldr r3, [r7, #28] 8009f1a: fa02 f303 lsl.w r3, r2, r3 8009f1e: 43db mvns r3, r3 8009f20: 69ba ldr r2, [r7, #24] 8009f22: 4013 ands r3, r2 8009f24: 61bb str r3, [r7, #24] temp |= (((GPIO_Init->Mode & OUTPUT_TYPE) >> OUTPUT_TYPE_Pos) << position); 8009f26: 683b ldr r3, [r7, #0] 8009f28: 685b ldr r3, [r3, #4] 8009f2a: 091b lsrs r3, r3, #4 8009f2c: f003 0201 and.w r2, r3, #1 8009f30: 69fb ldr r3, [r7, #28] 8009f32: fa02 f303 lsl.w r3, r2, r3 8009f36: 69ba ldr r2, [r7, #24] 8009f38: 4313 orrs r3, r2 8009f3a: 61bb str r3, [r7, #24] GPIOx->OTYPER = temp; 8009f3c: 687b ldr r3, [r7, #4] 8009f3e: 69ba ldr r2, [r7, #24] 8009f40: 605a str r2, [r3, #4] } if ((GPIO_Init->Mode & GPIO_MODE) != MODE_ANALOG) 8009f42: 683b ldr r3, [r7, #0] 8009f44: 685b ldr r3, [r3, #4] 8009f46: f003 0303 and.w r3, r3, #3 8009f4a: 2b03 cmp r3, #3 8009f4c: d017 beq.n 8009f7e { /* 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; 8009f4e: 687b ldr r3, [r7, #4] 8009f50: 68db ldr r3, [r3, #12] 8009f52: 61bb str r3, [r7, #24] temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2U)); 8009f54: 69fb ldr r3, [r7, #28] 8009f56: 005b lsls r3, r3, #1 8009f58: 2203 movs r2, #3 8009f5a: fa02 f303 lsl.w r3, r2, r3 8009f5e: 43db mvns r3, r3 8009f60: 69ba ldr r2, [r7, #24] 8009f62: 4013 ands r3, r2 8009f64: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Pull) << (position * 2U)); 8009f66: 683b ldr r3, [r7, #0] 8009f68: 689a ldr r2, [r3, #8] 8009f6a: 69fb ldr r3, [r7, #28] 8009f6c: 005b lsls r3, r3, #1 8009f6e: fa02 f303 lsl.w r3, r2, r3 8009f72: 69ba ldr r2, [r7, #24] 8009f74: 4313 orrs r3, r2 8009f76: 61bb str r3, [r7, #24] GPIOx->PUPDR = temp; 8009f78: 687b ldr r3, [r7, #4] 8009f7a: 69ba ldr r2, [r7, #24] 8009f7c: 60da str r2, [r3, #12] } /* In case of Alternate function mode selection */ if ((GPIO_Init->Mode & GPIO_MODE) == MODE_AF) 8009f7e: 683b ldr r3, [r7, #0] 8009f80: 685b ldr r3, [r3, #4] 8009f82: f003 0303 and.w r3, r3, #3 8009f86: 2b02 cmp r3, #2 8009f88: d123 bne.n 8009fd2 /* 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]; 8009f8a: 69fb ldr r3, [r7, #28] 8009f8c: 08da lsrs r2, r3, #3 8009f8e: 687b ldr r3, [r7, #4] 8009f90: 3208 adds r2, #8 8009f92: f853 3022 ldr.w r3, [r3, r2, lsl #2] 8009f96: 61bb str r3, [r7, #24] temp &= ~(0xFU << ((position & 0x07U) * 4U)); 8009f98: 69fb ldr r3, [r7, #28] 8009f9a: f003 0307 and.w r3, r3, #7 8009f9e: 009b lsls r3, r3, #2 8009fa0: 220f movs r2, #15 8009fa2: fa02 f303 lsl.w r3, r2, r3 8009fa6: 43db mvns r3, r3 8009fa8: 69ba ldr r2, [r7, #24] 8009faa: 4013 ands r3, r2 8009fac: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Alternate) << ((position & 0x07U) * 4U)); 8009fae: 683b ldr r3, [r7, #0] 8009fb0: 691a ldr r2, [r3, #16] 8009fb2: 69fb ldr r3, [r7, #28] 8009fb4: f003 0307 and.w r3, r3, #7 8009fb8: 009b lsls r3, r3, #2 8009fba: fa02 f303 lsl.w r3, r2, r3 8009fbe: 69ba ldr r2, [r7, #24] 8009fc0: 4313 orrs r3, r2 8009fc2: 61bb str r3, [r7, #24] GPIOx->AFR[position >> 3U] = temp; 8009fc4: 69fb ldr r3, [r7, #28] 8009fc6: 08da lsrs r2, r3, #3 8009fc8: 687b ldr r3, [r7, #4] 8009fca: 3208 adds r2, #8 8009fcc: 69b9 ldr r1, [r7, #24] 8009fce: f843 1022 str.w r1, [r3, r2, lsl #2] } /* Configure IO Direction mode (Input, Output, Alternate or Analog) */ temp = GPIOx->MODER; 8009fd2: 687b ldr r3, [r7, #4] 8009fd4: 681b ldr r3, [r3, #0] 8009fd6: 61bb str r3, [r7, #24] temp &= ~(GPIO_MODER_MODE0 << (position * 2U)); 8009fd8: 69fb ldr r3, [r7, #28] 8009fda: 005b lsls r3, r3, #1 8009fdc: 2203 movs r2, #3 8009fde: fa02 f303 lsl.w r3, r2, r3 8009fe2: 43db mvns r3, r3 8009fe4: 69ba ldr r2, [r7, #24] 8009fe6: 4013 ands r3, r2 8009fe8: 61bb str r3, [r7, #24] temp |= ((GPIO_Init->Mode & GPIO_MODE) << (position * 2U)); 8009fea: 683b ldr r3, [r7, #0] 8009fec: 685b ldr r3, [r3, #4] 8009fee: f003 0203 and.w r2, r3, #3 8009ff2: 69fb ldr r3, [r7, #28] 8009ff4: 005b lsls r3, r3, #1 8009ff6: fa02 f303 lsl.w r3, r2, r3 8009ffa: 69ba ldr r2, [r7, #24] 8009ffc: 4313 orrs r3, r2 8009ffe: 61bb str r3, [r7, #24] GPIOx->MODER = temp; 800a000: 687b ldr r3, [r7, #4] 800a002: 69ba ldr r2, [r7, #24] 800a004: 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) 800a006: 683b ldr r3, [r7, #0] 800a008: 685b ldr r3, [r3, #4] 800a00a: f403 3340 and.w r3, r3, #196608 @ 0x30000 800a00e: 2b00 cmp r3, #0 800a010: f000 80e0 beq.w 800a1d4 { /* Enable SYSCFG Clock */ __HAL_RCC_SYSCFG_CLK_ENABLE(); 800a014: 4b2f ldr r3, [pc, #188] @ (800a0d4 ) 800a016: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 800a01a: 4a2e ldr r2, [pc, #184] @ (800a0d4 ) 800a01c: f043 0302 orr.w r3, r3, #2 800a020: f8c2 30f4 str.w r3, [r2, #244] @ 0xf4 800a024: 4b2b ldr r3, [pc, #172] @ (800a0d4 ) 800a026: f8d3 30f4 ldr.w r3, [r3, #244] @ 0xf4 800a02a: f003 0302 and.w r3, r3, #2 800a02e: 60fb str r3, [r7, #12] 800a030: 68fb ldr r3, [r7, #12] temp = SYSCFG->EXTICR[position >> 2U]; 800a032: 4a29 ldr r2, [pc, #164] @ (800a0d8 ) 800a034: 69fb ldr r3, [r7, #28] 800a036: 089b lsrs r3, r3, #2 800a038: 3302 adds r3, #2 800a03a: f852 3023 ldr.w r3, [r2, r3, lsl #2] 800a03e: 61bb str r3, [r7, #24] temp &= ~(0x0FUL << (4U * (position & 0x03U))); 800a040: 69fb ldr r3, [r7, #28] 800a042: f003 0303 and.w r3, r3, #3 800a046: 009b lsls r3, r3, #2 800a048: 220f movs r2, #15 800a04a: fa02 f303 lsl.w r3, r2, r3 800a04e: 43db mvns r3, r3 800a050: 69ba ldr r2, [r7, #24] 800a052: 4013 ands r3, r2 800a054: 61bb str r3, [r7, #24] temp |= (GPIO_GET_INDEX(GPIOx) << (4U * (position & 0x03U))); 800a056: 687b ldr r3, [r7, #4] 800a058: 4a20 ldr r2, [pc, #128] @ (800a0dc ) 800a05a: 4293 cmp r3, r2 800a05c: d052 beq.n 800a104 800a05e: 687b ldr r3, [r7, #4] 800a060: 4a1f ldr r2, [pc, #124] @ (800a0e0 ) 800a062: 4293 cmp r3, r2 800a064: d031 beq.n 800a0ca 800a066: 687b ldr r3, [r7, #4] 800a068: 4a1e ldr r2, [pc, #120] @ (800a0e4 ) 800a06a: 4293 cmp r3, r2 800a06c: d02b beq.n 800a0c6 800a06e: 687b ldr r3, [r7, #4] 800a070: 4a1d ldr r2, [pc, #116] @ (800a0e8 ) 800a072: 4293 cmp r3, r2 800a074: d025 beq.n 800a0c2 800a076: 687b ldr r3, [r7, #4] 800a078: 4a1c ldr r2, [pc, #112] @ (800a0ec ) 800a07a: 4293 cmp r3, r2 800a07c: d01f beq.n 800a0be 800a07e: 687b ldr r3, [r7, #4] 800a080: 4a1b ldr r2, [pc, #108] @ (800a0f0 ) 800a082: 4293 cmp r3, r2 800a084: d019 beq.n 800a0ba 800a086: 687b ldr r3, [r7, #4] 800a088: 4a1a ldr r2, [pc, #104] @ (800a0f4 ) 800a08a: 4293 cmp r3, r2 800a08c: d013 beq.n 800a0b6 800a08e: 687b ldr r3, [r7, #4] 800a090: 4a19 ldr r2, [pc, #100] @ (800a0f8 ) 800a092: 4293 cmp r3, r2 800a094: d00d beq.n 800a0b2 800a096: 687b ldr r3, [r7, #4] 800a098: 4a18 ldr r2, [pc, #96] @ (800a0fc ) 800a09a: 4293 cmp r3, r2 800a09c: d007 beq.n 800a0ae 800a09e: 687b ldr r3, [r7, #4] 800a0a0: 4a17 ldr r2, [pc, #92] @ (800a100 ) 800a0a2: 4293 cmp r3, r2 800a0a4: d101 bne.n 800a0aa 800a0a6: 2309 movs r3, #9 800a0a8: e02d b.n 800a106 800a0aa: 230a movs r3, #10 800a0ac: e02b b.n 800a106 800a0ae: 2308 movs r3, #8 800a0b0: e029 b.n 800a106 800a0b2: 2307 movs r3, #7 800a0b4: e027 b.n 800a106 800a0b6: 2306 movs r3, #6 800a0b8: e025 b.n 800a106 800a0ba: 2305 movs r3, #5 800a0bc: e023 b.n 800a106 800a0be: 2304 movs r3, #4 800a0c0: e021 b.n 800a106 800a0c2: 2303 movs r3, #3 800a0c4: e01f b.n 800a106 800a0c6: 2302 movs r3, #2 800a0c8: e01d b.n 800a106 800a0ca: 2301 movs r3, #1 800a0cc: e01b b.n 800a106 800a0ce: bf00 nop 800a0d0: 58000080 .word 0x58000080 800a0d4: 58024400 .word 0x58024400 800a0d8: 58000400 .word 0x58000400 800a0dc: 58020000 .word 0x58020000 800a0e0: 58020400 .word 0x58020400 800a0e4: 58020800 .word 0x58020800 800a0e8: 58020c00 .word 0x58020c00 800a0ec: 58021000 .word 0x58021000 800a0f0: 58021400 .word 0x58021400 800a0f4: 58021800 .word 0x58021800 800a0f8: 58021c00 .word 0x58021c00 800a0fc: 58022000 .word 0x58022000 800a100: 58022400 .word 0x58022400 800a104: 2300 movs r3, #0 800a106: 69fa ldr r2, [r7, #28] 800a108: f002 0203 and.w r2, r2, #3 800a10c: 0092 lsls r2, r2, #2 800a10e: 4093 lsls r3, r2 800a110: 69ba ldr r2, [r7, #24] 800a112: 4313 orrs r3, r2 800a114: 61bb str r3, [r7, #24] SYSCFG->EXTICR[position >> 2U] = temp; 800a116: 4938 ldr r1, [pc, #224] @ (800a1f8 ) 800a118: 69fb ldr r3, [r7, #28] 800a11a: 089b lsrs r3, r3, #2 800a11c: 3302 adds r3, #2 800a11e: 69ba ldr r2, [r7, #24] 800a120: f841 2023 str.w r2, [r1, r3, lsl #2] /* Clear Rising Falling edge configuration */ temp = EXTI->RTSR1; 800a124: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a128: 681b ldr r3, [r3, #0] 800a12a: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a12c: 693b ldr r3, [r7, #16] 800a12e: 43db mvns r3, r3 800a130: 69ba ldr r2, [r7, #24] 800a132: 4013 ands r3, r2 800a134: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_RISING) != 0x00U) 800a136: 683b ldr r3, [r7, #0] 800a138: 685b ldr r3, [r3, #4] 800a13a: f403 1380 and.w r3, r3, #1048576 @ 0x100000 800a13e: 2b00 cmp r3, #0 800a140: d003 beq.n 800a14a { temp |= iocurrent; 800a142: 69ba ldr r2, [r7, #24] 800a144: 693b ldr r3, [r7, #16] 800a146: 4313 orrs r3, r2 800a148: 61bb str r3, [r7, #24] } EXTI->RTSR1 = temp; 800a14a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a14e: 69bb ldr r3, [r7, #24] 800a150: 6013 str r3, [r2, #0] temp = EXTI->FTSR1; 800a152: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a156: 685b ldr r3, [r3, #4] 800a158: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a15a: 693b ldr r3, [r7, #16] 800a15c: 43db mvns r3, r3 800a15e: 69ba ldr r2, [r7, #24] 800a160: 4013 ands r3, r2 800a162: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & TRIGGER_FALLING) != 0x00U) 800a164: 683b ldr r3, [r7, #0] 800a166: 685b ldr r3, [r3, #4] 800a168: f403 1300 and.w r3, r3, #2097152 @ 0x200000 800a16c: 2b00 cmp r3, #0 800a16e: d003 beq.n 800a178 { temp |= iocurrent; 800a170: 69ba ldr r2, [r7, #24] 800a172: 693b ldr r3, [r7, #16] 800a174: 4313 orrs r3, r2 800a176: 61bb str r3, [r7, #24] } EXTI->FTSR1 = temp; 800a178: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a17c: 69bb ldr r3, [r7, #24] 800a17e: 6053 str r3, [r2, #4] temp = EXTI_CurrentCPU->EMR1; 800a180: 697b ldr r3, [r7, #20] 800a182: 685b ldr r3, [r3, #4] 800a184: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a186: 693b ldr r3, [r7, #16] 800a188: 43db mvns r3, r3 800a18a: 69ba ldr r2, [r7, #24] 800a18c: 4013 ands r3, r2 800a18e: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_EVT) != 0x00U) 800a190: 683b ldr r3, [r7, #0] 800a192: 685b ldr r3, [r3, #4] 800a194: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a198: 2b00 cmp r3, #0 800a19a: d003 beq.n 800a1a4 { temp |= iocurrent; 800a19c: 69ba ldr r2, [r7, #24] 800a19e: 693b ldr r3, [r7, #16] 800a1a0: 4313 orrs r3, r2 800a1a2: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->EMR1 = temp; 800a1a4: 697b ldr r3, [r7, #20] 800a1a6: 69ba ldr r2, [r7, #24] 800a1a8: 605a str r2, [r3, #4] /* Clear EXTI line configuration */ temp = EXTI_CurrentCPU->IMR1; 800a1aa: 697b ldr r3, [r7, #20] 800a1ac: 681b ldr r3, [r3, #0] 800a1ae: 61bb str r3, [r7, #24] temp &= ~(iocurrent); 800a1b0: 693b ldr r3, [r7, #16] 800a1b2: 43db mvns r3, r3 800a1b4: 69ba ldr r2, [r7, #24] 800a1b6: 4013 ands r3, r2 800a1b8: 61bb str r3, [r7, #24] if ((GPIO_Init->Mode & EXTI_IT) != 0x00U) 800a1ba: 683b ldr r3, [r7, #0] 800a1bc: 685b ldr r3, [r3, #4] 800a1be: f403 3380 and.w r3, r3, #65536 @ 0x10000 800a1c2: 2b00 cmp r3, #0 800a1c4: d003 beq.n 800a1ce { temp |= iocurrent; 800a1c6: 69ba ldr r2, [r7, #24] 800a1c8: 693b ldr r3, [r7, #16] 800a1ca: 4313 orrs r3, r2 800a1cc: 61bb str r3, [r7, #24] } EXTI_CurrentCPU->IMR1 = temp; 800a1ce: 697b ldr r3, [r7, #20] 800a1d0: 69ba ldr r2, [r7, #24] 800a1d2: 601a str r2, [r3, #0] } } position++; 800a1d4: 69fb ldr r3, [r7, #28] 800a1d6: 3301 adds r3, #1 800a1d8: 61fb str r3, [r7, #28] while (((GPIO_Init->Pin) >> position) != 0x00U) 800a1da: 683b ldr r3, [r7, #0] 800a1dc: 681a ldr r2, [r3, #0] 800a1de: 69fb ldr r3, [r7, #28] 800a1e0: fa22 f303 lsr.w r3, r2, r3 800a1e4: 2b00 cmp r3, #0 800a1e6: f47f ae63 bne.w 8009eb0 } } 800a1ea: bf00 nop 800a1ec: bf00 nop 800a1ee: 3724 adds r7, #36 @ 0x24 800a1f0: 46bd mov sp, r7 800a1f2: f85d 7b04 ldr.w r7, [sp], #4 800a1f6: 4770 bx lr 800a1f8: 58000400 .word 0x58000400 0800a1fc : * @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) { 800a1fc: b480 push {r7} 800a1fe: b085 sub sp, #20 800a200: af00 add r7, sp, #0 800a202: 6078 str r0, [r7, #4] 800a204: 460b mov r3, r1 800a206: 807b strh r3, [r7, #2] GPIO_PinState bitstatus; /* Check the parameters */ assert_param(IS_GPIO_PIN(GPIO_Pin)); if ((GPIOx->IDR & GPIO_Pin) != 0x00U) 800a208: 687b ldr r3, [r7, #4] 800a20a: 691a ldr r2, [r3, #16] 800a20c: 887b ldrh r3, [r7, #2] 800a20e: 4013 ands r3, r2 800a210: 2b00 cmp r3, #0 800a212: d002 beq.n 800a21a { bitstatus = GPIO_PIN_SET; 800a214: 2301 movs r3, #1 800a216: 73fb strb r3, [r7, #15] 800a218: e001 b.n 800a21e } else { bitstatus = GPIO_PIN_RESET; 800a21a: 2300 movs r3, #0 800a21c: 73fb strb r3, [r7, #15] } return bitstatus; 800a21e: 7bfb ldrb r3, [r7, #15] } 800a220: 4618 mov r0, r3 800a222: 3714 adds r7, #20 800a224: 46bd mov sp, r7 800a226: f85d 7b04 ldr.w r7, [sp], #4 800a22a: 4770 bx lr 0800a22c : * @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) { 800a22c: b480 push {r7} 800a22e: b083 sub sp, #12 800a230: af00 add r7, sp, #0 800a232: 6078 str r0, [r7, #4] 800a234: 460b mov r3, r1 800a236: 807b strh r3, [r7, #2] 800a238: 4613 mov r3, r2 800a23a: 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) 800a23c: 787b ldrb r3, [r7, #1] 800a23e: 2b00 cmp r3, #0 800a240: d003 beq.n 800a24a { GPIOx->BSRR = GPIO_Pin; 800a242: 887a ldrh r2, [r7, #2] 800a244: 687b ldr r3, [r7, #4] 800a246: 619a str r2, [r3, #24] } else { GPIOx->BSRR = (uint32_t)GPIO_Pin << GPIO_NUMBER; } } 800a248: e003 b.n 800a252 GPIOx->BSRR = (uint32_t)GPIO_Pin << GPIO_NUMBER; 800a24a: 887b ldrh r3, [r7, #2] 800a24c: 041a lsls r2, r3, #16 800a24e: 687b ldr r3, [r7, #4] 800a250: 619a str r2, [r3, #24] } 800a252: bf00 nop 800a254: 370c adds r7, #12 800a256: 46bd mov sp, r7 800a258: f85d 7b04 ldr.w r7, [sp], #4 800a25c: 4770 bx lr 0800a25e : * @param hiwdg pointer to a IWDG_HandleTypeDef structure that contains * the configuration information for the specified IWDG module. * @retval HAL status */ HAL_StatusTypeDef HAL_IWDG_Init(IWDG_HandleTypeDef *hiwdg) { 800a25e: b580 push {r7, lr} 800a260: b084 sub sp, #16 800a262: af00 add r7, sp, #0 800a264: 6078 str r0, [r7, #4] uint32_t tickstart; /* Check the IWDG handle allocation */ if (hiwdg == NULL) 800a266: 687b ldr r3, [r7, #4] 800a268: 2b00 cmp r3, #0 800a26a: d101 bne.n 800a270 { return HAL_ERROR; 800a26c: 2301 movs r3, #1 800a26e: e041 b.n 800a2f4 assert_param(IS_IWDG_PRESCALER(hiwdg->Init.Prescaler)); assert_param(IS_IWDG_RELOAD(hiwdg->Init.Reload)); assert_param(IS_IWDG_WINDOW(hiwdg->Init.Window)); /* Enable IWDG. LSI is turned on automatically */ __HAL_IWDG_START(hiwdg); 800a270: 687b ldr r3, [r7, #4] 800a272: 681b ldr r3, [r3, #0] 800a274: f64c 42cc movw r2, #52428 @ 0xcccc 800a278: 601a str r2, [r3, #0] /* Enable write access to IWDG_PR, IWDG_RLR and IWDG_WINR registers by writing 0x5555 in KR */ IWDG_ENABLE_WRITE_ACCESS(hiwdg); 800a27a: 687b ldr r3, [r7, #4] 800a27c: 681b ldr r3, [r3, #0] 800a27e: f245 5255 movw r2, #21845 @ 0x5555 800a282: 601a str r2, [r3, #0] /* Write to IWDG registers the Prescaler & Reload values to work with */ hiwdg->Instance->PR = hiwdg->Init.Prescaler; 800a284: 687b ldr r3, [r7, #4] 800a286: 681b ldr r3, [r3, #0] 800a288: 687a ldr r2, [r7, #4] 800a28a: 6852 ldr r2, [r2, #4] 800a28c: 605a str r2, [r3, #4] hiwdg->Instance->RLR = hiwdg->Init.Reload; 800a28e: 687b ldr r3, [r7, #4] 800a290: 681b ldr r3, [r3, #0] 800a292: 687a ldr r2, [r7, #4] 800a294: 6892 ldr r2, [r2, #8] 800a296: 609a str r2, [r3, #8] /* Check pending flag, if previous update not done, return timeout */ tickstart = HAL_GetTick(); 800a298: f7fb fad0 bl 800583c 800a29c: 60f8 str r0, [r7, #12] /* Wait for register to be updated */ while ((hiwdg->Instance->SR & IWDG_KERNEL_UPDATE_FLAGS) != 0x00u) 800a29e: e00f b.n 800a2c0 { if ((HAL_GetTick() - tickstart) > HAL_IWDG_DEFAULT_TIMEOUT) 800a2a0: f7fb facc bl 800583c 800a2a4: 4602 mov r2, r0 800a2a6: 68fb ldr r3, [r7, #12] 800a2a8: 1ad3 subs r3, r2, r3 800a2aa: 2b31 cmp r3, #49 @ 0x31 800a2ac: d908 bls.n 800a2c0 { if ((hiwdg->Instance->SR & IWDG_KERNEL_UPDATE_FLAGS) != 0x00u) 800a2ae: 687b ldr r3, [r7, #4] 800a2b0: 681b ldr r3, [r3, #0] 800a2b2: 68db ldr r3, [r3, #12] 800a2b4: f003 0307 and.w r3, r3, #7 800a2b8: 2b00 cmp r3, #0 800a2ba: d001 beq.n 800a2c0 { return HAL_TIMEOUT; 800a2bc: 2303 movs r3, #3 800a2be: e019 b.n 800a2f4 while ((hiwdg->Instance->SR & IWDG_KERNEL_UPDATE_FLAGS) != 0x00u) 800a2c0: 687b ldr r3, [r7, #4] 800a2c2: 681b ldr r3, [r3, #0] 800a2c4: 68db ldr r3, [r3, #12] 800a2c6: f003 0307 and.w r3, r3, #7 800a2ca: 2b00 cmp r3, #0 800a2cc: d1e8 bne.n 800a2a0 } } /* If window parameter is different than current value, modify window register */ if (hiwdg->Instance->WINR != hiwdg->Init.Window) 800a2ce: 687b ldr r3, [r7, #4] 800a2d0: 681b ldr r3, [r3, #0] 800a2d2: 691a ldr r2, [r3, #16] 800a2d4: 687b ldr r3, [r7, #4] 800a2d6: 68db ldr r3, [r3, #12] 800a2d8: 429a cmp r2, r3 800a2da: d005 beq.n 800a2e8 { /* Write to IWDG WINR the IWDG_Window value to compare with. In any case, even if window feature is disabled, Watchdog will be reloaded by writing windows register */ hiwdg->Instance->WINR = hiwdg->Init.Window; 800a2dc: 687b ldr r3, [r7, #4] 800a2de: 681b ldr r3, [r3, #0] 800a2e0: 687a ldr r2, [r7, #4] 800a2e2: 68d2 ldr r2, [r2, #12] 800a2e4: 611a str r2, [r3, #16] 800a2e6: e004 b.n 800a2f2 } else { /* Reload IWDG counter with value defined in the reload register */ __HAL_IWDG_RELOAD_COUNTER(hiwdg); 800a2e8: 687b ldr r3, [r7, #4] 800a2ea: 681b ldr r3, [r3, #0] 800a2ec: f64a 22aa movw r2, #43690 @ 0xaaaa 800a2f0: 601a str r2, [r3, #0] } /* Return function status */ return HAL_OK; 800a2f2: 2300 movs r3, #0 } 800a2f4: 4618 mov r0, r3 800a2f6: 3710 adds r7, #16 800a2f8: 46bd mov sp, r7 800a2fa: bd80 pop {r7, pc} 0800a2fc : * @param hiwdg pointer to a IWDG_HandleTypeDef structure that contains * the configuration information for the specified IWDG module. * @retval HAL status */ HAL_StatusTypeDef HAL_IWDG_Refresh(IWDG_HandleTypeDef *hiwdg) { 800a2fc: b480 push {r7} 800a2fe: b083 sub sp, #12 800a300: af00 add r7, sp, #0 800a302: 6078 str r0, [r7, #4] /* Reload IWDG counter with value defined in the reload register */ __HAL_IWDG_RELOAD_COUNTER(hiwdg); 800a304: 687b ldr r3, [r7, #4] 800a306: 681b ldr r3, [r3, #0] 800a308: f64a 22aa movw r2, #43690 @ 0xaaaa 800a30c: 601a str r2, [r3, #0] /* Return function status */ return HAL_OK; 800a30e: 2300 movs r3, #0 } 800a310: 4618 mov r0, r3 800a312: 370c adds r7, #12 800a314: 46bd mov sp, r7 800a316: f85d 7b04 ldr.w r7, [sp], #4 800a31a: 4770 bx lr 0800a31c : * 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) { 800a31c: b480 push {r7} 800a31e: b083 sub sp, #12 800a320: af00 add r7, sp, #0 800a322: 6078 str r0, [r7, #4] /* Check the PVD configuration parameter */ if (sConfigPVD == NULL) 800a324: 687b ldr r3, [r7, #4] 800a326: 2b00 cmp r3, #0 800a328: d069 beq.n 800a3fe /* 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); 800a32a: 4b38 ldr r3, [pc, #224] @ (800a40c ) 800a32c: 681b ldr r3, [r3, #0] 800a32e: f023 02e0 bic.w r2, r3, #224 @ 0xe0 800a332: 687b ldr r3, [r7, #4] 800a334: 681b ldr r3, [r3, #0] 800a336: 4935 ldr r1, [pc, #212] @ (800a40c ) 800a338: 4313 orrs r3, r2 800a33a: 600b str r3, [r1, #0] /* Clear previous config */ #if !defined (DUAL_CORE) __HAL_PWR_PVD_EXTI_DISABLE_EVENT (); 800a33c: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a340: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a344: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a348: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a34c: f8c2 3084 str.w r3, [r2, #132] @ 0x84 __HAL_PWR_PVD_EXTI_DISABLE_IT (); 800a350: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a354: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a358: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a35c: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a360: f8c2 3080 str.w r3, [r2, #128] @ 0x80 #endif /* !defined (DUAL_CORE) */ __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE (); 800a364: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a368: 681b ldr r3, [r3, #0] 800a36a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a36e: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a372: 6013 str r3, [r2, #0] __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE (); 800a374: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a378: 685b ldr r3, [r3, #4] 800a37a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a37e: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a382: 6053 str r3, [r2, #4] #if !defined (DUAL_CORE) /* Interrupt mode configuration */ if ((sConfigPVD->Mode & PVD_MODE_IT) == PVD_MODE_IT) 800a384: 687b ldr r3, [r7, #4] 800a386: 685b ldr r3, [r3, #4] 800a388: f403 3380 and.w r3, r3, #65536 @ 0x10000 800a38c: 2b00 cmp r3, #0 800a38e: d009 beq.n 800a3a4 { __HAL_PWR_PVD_EXTI_ENABLE_IT (); 800a390: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a394: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a398: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a39c: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a3a0: f8c2 3080 str.w r3, [r2, #128] @ 0x80 } /* Event mode configuration */ if ((sConfigPVD->Mode & PVD_MODE_EVT) == PVD_MODE_EVT) 800a3a4: 687b ldr r3, [r7, #4] 800a3a6: 685b ldr r3, [r3, #4] 800a3a8: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a3ac: 2b00 cmp r3, #0 800a3ae: d009 beq.n 800a3c4 { __HAL_PWR_PVD_EXTI_ENABLE_EVENT (); 800a3b0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a3b4: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a3b8: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a3bc: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a3c0: f8c2 3084 str.w r3, [r2, #132] @ 0x84 } #endif /* !defined (DUAL_CORE) */ /* Rising edge configuration */ if ((sConfigPVD->Mode & PVD_RISING_EDGE) == PVD_RISING_EDGE) 800a3c4: 687b ldr r3, [r7, #4] 800a3c6: 685b ldr r3, [r3, #4] 800a3c8: f003 0301 and.w r3, r3, #1 800a3cc: 2b00 cmp r3, #0 800a3ce: d007 beq.n 800a3e0 { __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE (); 800a3d0: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a3d4: 681b ldr r3, [r3, #0] 800a3d6: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a3da: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a3de: 6013 str r3, [r2, #0] } /* Falling edge configuration */ if ((sConfigPVD->Mode & PVD_FALLING_EDGE) == PVD_FALLING_EDGE) 800a3e0: 687b ldr r3, [r7, #4] 800a3e2: 685b ldr r3, [r3, #4] 800a3e4: f003 0302 and.w r3, r3, #2 800a3e8: 2b00 cmp r3, #0 800a3ea: d009 beq.n 800a400 { __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE (); 800a3ec: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a3f0: 685b ldr r3, [r3, #4] 800a3f2: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a3f6: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a3fa: 6053 str r3, [r2, #4] 800a3fc: e000 b.n 800a400 return; 800a3fe: bf00 nop } } 800a400: 370c adds r7, #12 800a402: 46bd mov sp, r7 800a404: f85d 7b04 ldr.w r7, [sp], #4 800a408: 4770 bx lr 800a40a: bf00 nop 800a40c: 58024800 .word 0x58024800 0800a410 : /** * @brief Enable the Programmable Voltage Detector (PVD). * @retval None. */ void HAL_PWR_EnablePVD (void) { 800a410: b480 push {r7} 800a412: af00 add r7, sp, #0 /* Enable the power voltage detector */ SET_BIT (PWR->CR1, PWR_CR1_PVDEN); 800a414: 4b05 ldr r3, [pc, #20] @ (800a42c ) 800a416: 681b ldr r3, [r3, #0] 800a418: 4a04 ldr r2, [pc, #16] @ (800a42c ) 800a41a: f043 0310 orr.w r3, r3, #16 800a41e: 6013 str r3, [r2, #0] } 800a420: bf00 nop 800a422: 46bd mov sp, r7 800a424: f85d 7b04 ldr.w r7, [sp], #4 800a428: 4770 bx lr 800a42a: bf00 nop 800a42c: 58024800 .word 0x58024800 0800a430 : * 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) { 800a430: b580 push {r7, lr} 800a432: b084 sub sp, #16 800a434: af00 add r7, sp, #0 800a436: 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) 800a438: 4b19 ldr r3, [pc, #100] @ (800a4a0 ) 800a43a: 68db ldr r3, [r3, #12] 800a43c: f003 0304 and.w r3, r3, #4 800a440: 2b04 cmp r3, #4 800a442: d00a beq.n 800a45a #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) 800a444: 4b16 ldr r3, [pc, #88] @ (800a4a0 ) 800a446: 68db ldr r3, [r3, #12] 800a448: f003 0307 and.w r3, r3, #7 800a44c: 687a ldr r2, [r7, #4] 800a44e: 429a cmp r2, r3 800a450: d001 beq.n 800a456 { /* Supply configuration update locked, can't apply a new supply config */ return HAL_ERROR; 800a452: 2301 movs r3, #1 800a454: e01f b.n 800a496 else { /* Supply configuration update locked, but new supply configuration matches with old supply configuration : nothing to do */ return HAL_OK; 800a456: 2300 movs r3, #0 800a458: e01d b.n 800a496 } } /* Set the power supply configuration */ MODIFY_REG (PWR->CR3, PWR_SUPPLY_CONFIG_MASK, SupplySource); 800a45a: 4b11 ldr r3, [pc, #68] @ (800a4a0 ) 800a45c: 68db ldr r3, [r3, #12] 800a45e: f023 0207 bic.w r2, r3, #7 800a462: 490f ldr r1, [pc, #60] @ (800a4a0 ) 800a464: 687b ldr r3, [r7, #4] 800a466: 4313 orrs r3, r2 800a468: 60cb str r3, [r1, #12] /* Get tick */ tickstart = HAL_GetTick (); 800a46a: f7fb f9e7 bl 800583c 800a46e: 60f8 str r0, [r7, #12] /* Wait till voltage level flag is set */ while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 800a470: e009 b.n 800a486 { if ((HAL_GetTick () - tickstart) > PWR_FLAG_SETTING_DELAY) 800a472: f7fb f9e3 bl 800583c 800a476: 4602 mov r2, r0 800a478: 68fb ldr r3, [r7, #12] 800a47a: 1ad3 subs r3, r2, r3 800a47c: f5b3 7f7a cmp.w r3, #1000 @ 0x3e8 800a480: d901 bls.n 800a486 { return HAL_ERROR; 800a482: 2301 movs r3, #1 800a484: e007 b.n 800a496 while (__HAL_PWR_GET_FLAG (PWR_FLAG_ACTVOSRDY) == 0U) 800a486: 4b06 ldr r3, [pc, #24] @ (800a4a0 ) 800a488: 685b ldr r3, [r3, #4] 800a48a: f403 5300 and.w r3, r3, #8192 @ 0x2000 800a48e: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800a492: d1ee bne.n 800a472 } } } #endif /* defined (SMPS) */ return HAL_OK; 800a494: 2300 movs r3, #0 } 800a496: 4618 mov r0, r3 800a498: 3710 adds r7, #16 800a49a: 46bd mov sp, r7 800a49c: bd80 pop {r7, pc} 800a49e: bf00 nop 800a4a0: 58024800 .word 0x58024800 0800a4a4 : * 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) { 800a4a4: b480 push {r7} 800a4a6: b083 sub sp, #12 800a4a8: af00 add r7, sp, #0 800a4aa: 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); 800a4ac: 4b37 ldr r3, [pc, #220] @ (800a58c ) 800a4ae: 681b ldr r3, [r3, #0] 800a4b0: f423 22c0 bic.w r2, r3, #393216 @ 0x60000 800a4b4: 687b ldr r3, [r7, #4] 800a4b6: 681b ldr r3, [r3, #0] 800a4b8: 4934 ldr r1, [pc, #208] @ (800a58c ) 800a4ba: 4313 orrs r3, r2 800a4bc: 600b str r3, [r1, #0] /* Clear any previous config */ #if !defined (DUAL_CORE) __HAL_PWR_AVD_EXTI_DISABLE_EVENT (); 800a4be: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a4c2: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a4c6: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a4ca: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a4ce: f8c2 3084 str.w r3, [r2, #132] @ 0x84 __HAL_PWR_AVD_EXTI_DISABLE_IT (); 800a4d2: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a4d6: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a4da: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a4de: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a4e2: f8c2 3080 str.w r3, [r2, #128] @ 0x80 #endif /* !defined (DUAL_CORE) */ __HAL_PWR_AVD_EXTI_DISABLE_RISING_EDGE (); 800a4e6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a4ea: 681b ldr r3, [r3, #0] 800a4ec: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a4f0: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a4f4: 6013 str r3, [r2, #0] __HAL_PWR_AVD_EXTI_DISABLE_FALLING_EDGE (); 800a4f6: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a4fa: 685b ldr r3, [r3, #4] 800a4fc: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a500: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a504: 6053 str r3, [r2, #4] #if !defined (DUAL_CORE) /* Configure the interrupt mode */ if ((sConfigAVD->Mode & AVD_MODE_IT) == AVD_MODE_IT) 800a506: 687b ldr r3, [r7, #4] 800a508: 685b ldr r3, [r3, #4] 800a50a: f403 3380 and.w r3, r3, #65536 @ 0x10000 800a50e: 2b00 cmp r3, #0 800a510: d009 beq.n 800a526 { __HAL_PWR_AVD_EXTI_ENABLE_IT (); 800a512: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a516: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800a51a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a51e: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a522: f8c2 3080 str.w r3, [r2, #128] @ 0x80 } /* Configure the event mode */ if ((sConfigAVD->Mode & AVD_MODE_EVT) == AVD_MODE_EVT) 800a526: 687b ldr r3, [r7, #4] 800a528: 685b ldr r3, [r3, #4] 800a52a: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a52e: 2b00 cmp r3, #0 800a530: d009 beq.n 800a546 { __HAL_PWR_AVD_EXTI_ENABLE_EVENT (); 800a532: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a536: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800a53a: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a53e: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a542: f8c2 3084 str.w r3, [r2, #132] @ 0x84 } #endif /* !defined (DUAL_CORE) */ /* Rising edge configuration */ if ((sConfigAVD->Mode & AVD_RISING_EDGE) == AVD_RISING_EDGE) 800a546: 687b ldr r3, [r7, #4] 800a548: 685b ldr r3, [r3, #4] 800a54a: f003 0301 and.w r3, r3, #1 800a54e: 2b00 cmp r3, #0 800a550: d007 beq.n 800a562 { __HAL_PWR_AVD_EXTI_ENABLE_RISING_EDGE (); 800a552: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a556: 681b ldr r3, [r3, #0] 800a558: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a55c: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a560: 6013 str r3, [r2, #0] } /* Falling edge configuration */ if ((sConfigAVD->Mode & AVD_FALLING_EDGE) == AVD_FALLING_EDGE) 800a562: 687b ldr r3, [r7, #4] 800a564: 685b ldr r3, [r3, #4] 800a566: f003 0302 and.w r3, r3, #2 800a56a: 2b00 cmp r3, #0 800a56c: d007 beq.n 800a57e { __HAL_PWR_AVD_EXTI_ENABLE_FALLING_EDGE (); 800a56e: f04f 43b0 mov.w r3, #1476395008 @ 0x58000000 800a572: 685b ldr r3, [r3, #4] 800a574: f04f 42b0 mov.w r2, #1476395008 @ 0x58000000 800a578: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a57c: 6053 str r3, [r2, #4] } } 800a57e: bf00 nop 800a580: 370c adds r7, #12 800a582: 46bd mov sp, r7 800a584: f85d 7b04 ldr.w r7, [sp], #4 800a588: 4770 bx lr 800a58a: bf00 nop 800a58c: 58024800 .word 0x58024800 0800a590 : /** * @brief Enable the Analog Voltage Detector (AVD). * @retval None. */ void HAL_PWREx_EnableAVD (void) { 800a590: b480 push {r7} 800a592: af00 add r7, sp, #0 /* Enable the Analog Voltage Detector */ SET_BIT (PWR->CR1, PWR_CR1_AVDEN); 800a594: 4b05 ldr r3, [pc, #20] @ (800a5ac ) 800a596: 681b ldr r3, [r3, #0] 800a598: 4a04 ldr r2, [pc, #16] @ (800a5ac ) 800a59a: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a59e: 6013 str r3, [r2, #0] } 800a5a0: bf00 nop 800a5a2: 46bd mov sp, r7 800a5a4: f85d 7b04 ldr.w r7, [sp], #4 800a5a8: 4770 bx lr 800a5aa: bf00 nop 800a5ac: 58024800 .word 0x58024800 0800a5b0 : * 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) { 800a5b0: b580 push {r7, lr} 800a5b2: b08c sub sp, #48 @ 0x30 800a5b4: af00 add r7, sp, #0 800a5b6: 6078 str r0, [r7, #4] uint32_t tickstart; uint32_t temp1_pllckcfg, temp2_pllckcfg; /* Check Null pointer */ if (RCC_OscInitStruct == NULL) 800a5b8: 687b ldr r3, [r7, #4] 800a5ba: 2b00 cmp r3, #0 800a5bc: d102 bne.n 800a5c4 { return HAL_ERROR; 800a5be: 2301 movs r3, #1 800a5c0: f000 bc48 b.w 800ae54 } /* Check the parameters */ assert_param(IS_RCC_OSCILLATORTYPE(RCC_OscInitStruct->OscillatorType)); /*------------------------------- HSE Configuration ------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSE) == RCC_OSCILLATORTYPE_HSE) 800a5c4: 687b ldr r3, [r7, #4] 800a5c6: 681b ldr r3, [r3, #0] 800a5c8: f003 0301 and.w r3, r3, #1 800a5cc: 2b00 cmp r3, #0 800a5ce: f000 8088 beq.w 800a6e2 { /* Check the parameters */ assert_param(IS_RCC_HSE(RCC_OscInitStruct->HSEState)); const uint32_t temp_sysclksrc = __HAL_RCC_GET_SYSCLK_SOURCE(); 800a5d2: 4b99 ldr r3, [pc, #612] @ (800a838 ) 800a5d4: 691b ldr r3, [r3, #16] 800a5d6: f003 0338 and.w r3, r3, #56 @ 0x38 800a5da: 62fb str r3, [r7, #44] @ 0x2c const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800a5dc: 4b96 ldr r3, [pc, #600] @ (800a838 ) 800a5de: 6a9b ldr r3, [r3, #40] @ 0x28 800a5e0: 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))) 800a5e2: 6afb ldr r3, [r7, #44] @ 0x2c 800a5e4: 2b10 cmp r3, #16 800a5e6: d007 beq.n 800a5f8 800a5e8: 6afb ldr r3, [r7, #44] @ 0x2c 800a5ea: 2b18 cmp r3, #24 800a5ec: d111 bne.n 800a612 800a5ee: 6abb ldr r3, [r7, #40] @ 0x28 800a5f0: f003 0303 and.w r3, r3, #3 800a5f4: 2b02 cmp r3, #2 800a5f6: d10c bne.n 800a612 { if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 800a5f8: 4b8f ldr r3, [pc, #572] @ (800a838 ) 800a5fa: 681b ldr r3, [r3, #0] 800a5fc: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a600: 2b00 cmp r3, #0 800a602: d06d beq.n 800a6e0 800a604: 687b ldr r3, [r7, #4] 800a606: 685b ldr r3, [r3, #4] 800a608: 2b00 cmp r3, #0 800a60a: d169 bne.n 800a6e0 { return HAL_ERROR; 800a60c: 2301 movs r3, #1 800a60e: f000 bc21 b.w 800ae54 } } else { /* Set the new HSE configuration ---------------------------------------*/ __HAL_RCC_HSE_CONFIG(RCC_OscInitStruct->HSEState); 800a612: 687b ldr r3, [r7, #4] 800a614: 685b ldr r3, [r3, #4] 800a616: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800a61a: d106 bne.n 800a62a 800a61c: 4b86 ldr r3, [pc, #536] @ (800a838 ) 800a61e: 681b ldr r3, [r3, #0] 800a620: 4a85 ldr r2, [pc, #532] @ (800a838 ) 800a622: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a626: 6013 str r3, [r2, #0] 800a628: e02e b.n 800a688 800a62a: 687b ldr r3, [r7, #4] 800a62c: 685b ldr r3, [r3, #4] 800a62e: 2b00 cmp r3, #0 800a630: d10c bne.n 800a64c 800a632: 4b81 ldr r3, [pc, #516] @ (800a838 ) 800a634: 681b ldr r3, [r3, #0] 800a636: 4a80 ldr r2, [pc, #512] @ (800a838 ) 800a638: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a63c: 6013 str r3, [r2, #0] 800a63e: 4b7e ldr r3, [pc, #504] @ (800a838 ) 800a640: 681b ldr r3, [r3, #0] 800a642: 4a7d ldr r2, [pc, #500] @ (800a838 ) 800a644: f423 2380 bic.w r3, r3, #262144 @ 0x40000 800a648: 6013 str r3, [r2, #0] 800a64a: e01d b.n 800a688 800a64c: 687b ldr r3, [r7, #4] 800a64e: 685b ldr r3, [r3, #4] 800a650: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800a654: d10c bne.n 800a670 800a656: 4b78 ldr r3, [pc, #480] @ (800a838 ) 800a658: 681b ldr r3, [r3, #0] 800a65a: 4a77 ldr r2, [pc, #476] @ (800a838 ) 800a65c: f443 2380 orr.w r3, r3, #262144 @ 0x40000 800a660: 6013 str r3, [r2, #0] 800a662: 4b75 ldr r3, [pc, #468] @ (800a838 ) 800a664: 681b ldr r3, [r3, #0] 800a666: 4a74 ldr r2, [pc, #464] @ (800a838 ) 800a668: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800a66c: 6013 str r3, [r2, #0] 800a66e: e00b b.n 800a688 800a670: 4b71 ldr r3, [pc, #452] @ (800a838 ) 800a672: 681b ldr r3, [r3, #0] 800a674: 4a70 ldr r2, [pc, #448] @ (800a838 ) 800a676: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800a67a: 6013 str r3, [r2, #0] 800a67c: 4b6e ldr r3, [pc, #440] @ (800a838 ) 800a67e: 681b ldr r3, [r3, #0] 800a680: 4a6d ldr r2, [pc, #436] @ (800a838 ) 800a682: f423 2380 bic.w r3, r3, #262144 @ 0x40000 800a686: 6013 str r3, [r2, #0] /* Check the HSE State */ if (RCC_OscInitStruct->HSEState != RCC_HSE_OFF) 800a688: 687b ldr r3, [r7, #4] 800a68a: 685b ldr r3, [r3, #4] 800a68c: 2b00 cmp r3, #0 800a68e: d013 beq.n 800a6b8 { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a690: f7fb f8d4 bl 800583c 800a694: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 800a696: e008 b.n 800a6aa { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 800a698: f7fb f8d0 bl 800583c 800a69c: 4602 mov r2, r0 800a69e: 6a7b ldr r3, [r7, #36] @ 0x24 800a6a0: 1ad3 subs r3, r2, r3 800a6a2: 2b64 cmp r3, #100 @ 0x64 800a6a4: d901 bls.n 800a6aa { return HAL_TIMEOUT; 800a6a6: 2303 movs r3, #3 800a6a8: e3d4 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 800a6aa: 4b63 ldr r3, [pc, #396] @ (800a838 ) 800a6ac: 681b ldr r3, [r3, #0] 800a6ae: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a6b2: 2b00 cmp r3, #0 800a6b4: d0f0 beq.n 800a698 800a6b6: e014 b.n 800a6e2 } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a6b8: f7fb f8c0 bl 800583c 800a6bc: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 800a6be: e008 b.n 800a6d2 { if ((uint32_t)(HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE) 800a6c0: f7fb f8bc bl 800583c 800a6c4: 4602 mov r2, r0 800a6c6: 6a7b ldr r3, [r7, #36] @ 0x24 800a6c8: 1ad3 subs r3, r2, r3 800a6ca: 2b64 cmp r3, #100 @ 0x64 800a6cc: d901 bls.n 800a6d2 { return HAL_TIMEOUT; 800a6ce: 2303 movs r3, #3 800a6d0: e3c0 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) 800a6d2: 4b59 ldr r3, [pc, #356] @ (800a838 ) 800a6d4: 681b ldr r3, [r3, #0] 800a6d6: f403 3300 and.w r3, r3, #131072 @ 0x20000 800a6da: 2b00 cmp r3, #0 800a6dc: d1f0 bne.n 800a6c0 800a6de: e000 b.n 800a6e2 if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) != 0U) && (RCC_OscInitStruct->HSEState == RCC_HSE_OFF)) 800a6e0: bf00 nop } } } } /*----------------------------- HSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI) == RCC_OSCILLATORTYPE_HSI) 800a6e2: 687b ldr r3, [r7, #4] 800a6e4: 681b ldr r3, [r3, #0] 800a6e6: f003 0302 and.w r3, r3, #2 800a6ea: 2b00 cmp r3, #0 800a6ec: f000 80ca beq.w 800a884 /* 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(); 800a6f0: 4b51 ldr r3, [pc, #324] @ (800a838 ) 800a6f2: 691b ldr r3, [r3, #16] 800a6f4: f003 0338 and.w r3, r3, #56 @ 0x38 800a6f8: 623b str r3, [r7, #32] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800a6fa: 4b4f ldr r3, [pc, #316] @ (800a838 ) 800a6fc: 6a9b ldr r3, [r3, #40] @ 0x28 800a6fe: 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))) 800a700: 6a3b ldr r3, [r7, #32] 800a702: 2b00 cmp r3, #0 800a704: d007 beq.n 800a716 800a706: 6a3b ldr r3, [r7, #32] 800a708: 2b18 cmp r3, #24 800a70a: d156 bne.n 800a7ba 800a70c: 69fb ldr r3, [r7, #28] 800a70e: f003 0303 and.w r3, r3, #3 800a712: 2b00 cmp r3, #0 800a714: d151 bne.n 800a7ba { /* 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)) 800a716: 4b48 ldr r3, [pc, #288] @ (800a838 ) 800a718: 681b ldr r3, [r3, #0] 800a71a: f003 0304 and.w r3, r3, #4 800a71e: 2b00 cmp r3, #0 800a720: d005 beq.n 800a72e 800a722: 687b ldr r3, [r7, #4] 800a724: 68db ldr r3, [r3, #12] 800a726: 2b00 cmp r3, #0 800a728: d101 bne.n 800a72e { return HAL_ERROR; 800a72a: 2301 movs r3, #1 800a72c: e392 b.n 800ae54 } /* 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); 800a72e: 4b42 ldr r3, [pc, #264] @ (800a838 ) 800a730: 681b ldr r3, [r3, #0] 800a732: f023 0219 bic.w r2, r3, #25 800a736: 687b ldr r3, [r7, #4] 800a738: 68db ldr r3, [r3, #12] 800a73a: 493f ldr r1, [pc, #252] @ (800a838 ) 800a73c: 4313 orrs r3, r2 800a73e: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a740: f7fb f87c bl 800583c 800a744: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a746: e008 b.n 800a75a { if ((uint32_t)(HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800a748: f7fb f878 bl 800583c 800a74c: 4602 mov r2, r0 800a74e: 6a7b ldr r3, [r7, #36] @ 0x24 800a750: 1ad3 subs r3, r2, r3 800a752: 2b02 cmp r3, #2 800a754: d901 bls.n 800a75a { return HAL_TIMEOUT; 800a756: 2303 movs r3, #3 800a758: e37c b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a75a: 4b37 ldr r3, [pc, #220] @ (800a838 ) 800a75c: 681b ldr r3, [r3, #0] 800a75e: f003 0304 and.w r3, r3, #4 800a762: 2b00 cmp r3, #0 800a764: d0f0 beq.n 800a748 } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a766: f7fb f899 bl 800589c 800a76a: 4603 mov r3, r0 800a76c: f241 0203 movw r2, #4099 @ 0x1003 800a770: 4293 cmp r3, r2 800a772: d817 bhi.n 800a7a4 800a774: 687b ldr r3, [r7, #4] 800a776: 691b ldr r3, [r3, #16] 800a778: 2b40 cmp r3, #64 @ 0x40 800a77a: d108 bne.n 800a78e 800a77c: 4b2e ldr r3, [pc, #184] @ (800a838 ) 800a77e: 685b ldr r3, [r3, #4] 800a780: f423 337c bic.w r3, r3, #258048 @ 0x3f000 800a784: 4a2c ldr r2, [pc, #176] @ (800a838 ) 800a786: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800a78a: 6053 str r3, [r2, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800a78c: e07a b.n 800a884 __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a78e: 4b2a ldr r3, [pc, #168] @ (800a838 ) 800a790: 685b ldr r3, [r3, #4] 800a792: f423 327c bic.w r2, r3, #258048 @ 0x3f000 800a796: 687b ldr r3, [r7, #4] 800a798: 691b ldr r3, [r3, #16] 800a79a: 031b lsls r3, r3, #12 800a79c: 4926 ldr r1, [pc, #152] @ (800a838 ) 800a79e: 4313 orrs r3, r2 800a7a0: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800a7a2: e06f b.n 800a884 __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a7a4: 4b24 ldr r3, [pc, #144] @ (800a838 ) 800a7a6: 685b ldr r3, [r3, #4] 800a7a8: f023 42fe bic.w r2, r3, #2130706432 @ 0x7f000000 800a7ac: 687b ldr r3, [r7, #4] 800a7ae: 691b ldr r3, [r3, #16] 800a7b0: 061b lsls r3, r3, #24 800a7b2: 4921 ldr r1, [pc, #132] @ (800a838 ) 800a7b4: 4313 orrs r3, r2 800a7b6: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) && (RCC_OscInitStruct->HSIState == RCC_HSI_OFF)) 800a7b8: e064 b.n 800a884 } else { /* Check the HSI State */ if ((RCC_OscInitStruct->HSIState) != RCC_HSI_OFF) 800a7ba: 687b ldr r3, [r7, #4] 800a7bc: 68db ldr r3, [r3, #12] 800a7be: 2b00 cmp r3, #0 800a7c0: d047 beq.n 800a852 { /* Enable the Internal High Speed oscillator (HSI, HSIDIV2,HSIDIV4, or HSIDIV8) */ __HAL_RCC_HSI_CONFIG(RCC_OscInitStruct->HSIState); 800a7c2: 4b1d ldr r3, [pc, #116] @ (800a838 ) 800a7c4: 681b ldr r3, [r3, #0] 800a7c6: f023 0219 bic.w r2, r3, #25 800a7ca: 687b ldr r3, [r7, #4] 800a7cc: 68db ldr r3, [r3, #12] 800a7ce: 491a ldr r1, [pc, #104] @ (800a838 ) 800a7d0: 4313 orrs r3, r2 800a7d2: 600b str r3, [r1, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a7d4: f7fb f832 bl 800583c 800a7d8: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a7da: e008 b.n 800a7ee { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800a7dc: f7fb f82e bl 800583c 800a7e0: 4602 mov r2, r0 800a7e2: 6a7b ldr r3, [r7, #36] @ 0x24 800a7e4: 1ad3 subs r3, r2, r3 800a7e6: 2b02 cmp r3, #2 800a7e8: d901 bls.n 800a7ee { return HAL_TIMEOUT; 800a7ea: 2303 movs r3, #3 800a7ec: e332 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800a7ee: 4b12 ldr r3, [pc, #72] @ (800a838 ) 800a7f0: 681b ldr r3, [r3, #0] 800a7f2: f003 0304 and.w r3, r3, #4 800a7f6: 2b00 cmp r3, #0 800a7f8: d0f0 beq.n 800a7dc } } /* Adjusts the Internal High Speed oscillator (HSI) calibration value.*/ __HAL_RCC_HSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->HSICalibrationValue); 800a7fa: f7fb f84f bl 800589c 800a7fe: 4603 mov r3, r0 800a800: f241 0203 movw r2, #4099 @ 0x1003 800a804: 4293 cmp r3, r2 800a806: d819 bhi.n 800a83c 800a808: 687b ldr r3, [r7, #4] 800a80a: 691b ldr r3, [r3, #16] 800a80c: 2b40 cmp r3, #64 @ 0x40 800a80e: d108 bne.n 800a822 800a810: 4b09 ldr r3, [pc, #36] @ (800a838 ) 800a812: 685b ldr r3, [r3, #4] 800a814: f423 337c bic.w r3, r3, #258048 @ 0x3f000 800a818: 4a07 ldr r2, [pc, #28] @ (800a838 ) 800a81a: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800a81e: 6053 str r3, [r2, #4] 800a820: e030 b.n 800a884 800a822: 4b05 ldr r3, [pc, #20] @ (800a838 ) 800a824: 685b ldr r3, [r3, #4] 800a826: f423 327c bic.w r2, r3, #258048 @ 0x3f000 800a82a: 687b ldr r3, [r7, #4] 800a82c: 691b ldr r3, [r3, #16] 800a82e: 031b lsls r3, r3, #12 800a830: 4901 ldr r1, [pc, #4] @ (800a838 ) 800a832: 4313 orrs r3, r2 800a834: 604b str r3, [r1, #4] 800a836: e025 b.n 800a884 800a838: 58024400 .word 0x58024400 800a83c: 4b9a ldr r3, [pc, #616] @ (800aaa8 ) 800a83e: 685b ldr r3, [r3, #4] 800a840: f023 42fe bic.w r2, r3, #2130706432 @ 0x7f000000 800a844: 687b ldr r3, [r7, #4] 800a846: 691b ldr r3, [r3, #16] 800a848: 061b lsls r3, r3, #24 800a84a: 4997 ldr r1, [pc, #604] @ (800aaa8 ) 800a84c: 4313 orrs r3, r2 800a84e: 604b str r3, [r1, #4] 800a850: e018 b.n 800a884 } else { /* Disable the Internal High Speed oscillator (HSI). */ __HAL_RCC_HSI_DISABLE(); 800a852: 4b95 ldr r3, [pc, #596] @ (800aaa8 ) 800a854: 681b ldr r3, [r3, #0] 800a856: 4a94 ldr r2, [pc, #592] @ (800aaa8 ) 800a858: f023 0301 bic.w r3, r3, #1 800a85c: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a85e: f7fa ffed bl 800583c 800a862: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 800a864: e008 b.n 800a878 { if ((HAL_GetTick() - tickstart) > HSI_TIMEOUT_VALUE) 800a866: f7fa ffe9 bl 800583c 800a86a: 4602 mov r2, r0 800a86c: 6a7b ldr r3, [r7, #36] @ 0x24 800a86e: 1ad3 subs r3, r2, r3 800a870: 2b02 cmp r3, #2 800a872: d901 bls.n 800a878 { return HAL_TIMEOUT; 800a874: 2303 movs r3, #3 800a876: e2ed b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) != 0U) 800a878: 4b8b ldr r3, [pc, #556] @ (800aaa8 ) 800a87a: 681b ldr r3, [r3, #0] 800a87c: f003 0304 and.w r3, r3, #4 800a880: 2b00 cmp r3, #0 800a882: d1f0 bne.n 800a866 } } } } /*----------------------------- CSI Configuration --------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_CSI) == RCC_OSCILLATORTYPE_CSI) 800a884: 687b ldr r3, [r7, #4] 800a886: 681b ldr r3, [r3, #0] 800a888: f003 0310 and.w r3, r3, #16 800a88c: 2b00 cmp r3, #0 800a88e: f000 80a9 beq.w 800a9e4 /* 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(); 800a892: 4b85 ldr r3, [pc, #532] @ (800aaa8 ) 800a894: 691b ldr r3, [r3, #16] 800a896: f003 0338 and.w r3, r3, #56 @ 0x38 800a89a: 61bb str r3, [r7, #24] const uint32_t temp_pllckselr = RCC->PLLCKSELR; 800a89c: 4b82 ldr r3, [pc, #520] @ (800aaa8 ) 800a89e: 6a9b ldr r3, [r3, #40] @ 0x28 800a8a0: 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))) 800a8a2: 69bb ldr r3, [r7, #24] 800a8a4: 2b08 cmp r3, #8 800a8a6: d007 beq.n 800a8b8 800a8a8: 69bb ldr r3, [r7, #24] 800a8aa: 2b18 cmp r3, #24 800a8ac: d13a bne.n 800a924 800a8ae: 697b ldr r3, [r7, #20] 800a8b0: f003 0303 and.w r3, r3, #3 800a8b4: 2b01 cmp r3, #1 800a8b6: d135 bne.n 800a924 { /* 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)) 800a8b8: 4b7b ldr r3, [pc, #492] @ (800aaa8 ) 800a8ba: 681b ldr r3, [r3, #0] 800a8bc: f403 7380 and.w r3, r3, #256 @ 0x100 800a8c0: 2b00 cmp r3, #0 800a8c2: d005 beq.n 800a8d0 800a8c4: 687b ldr r3, [r7, #4] 800a8c6: 69db ldr r3, [r3, #28] 800a8c8: 2b80 cmp r3, #128 @ 0x80 800a8ca: d001 beq.n 800a8d0 { return HAL_ERROR; 800a8cc: 2301 movs r3, #1 800a8ce: e2c1 b.n 800ae54 } /* Otherwise, just the calibration is allowed */ else { /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a8d0: f7fa ffe4 bl 800589c 800a8d4: 4603 mov r3, r0 800a8d6: f241 0203 movw r2, #4099 @ 0x1003 800a8da: 4293 cmp r3, r2 800a8dc: d817 bhi.n 800a90e 800a8de: 687b ldr r3, [r7, #4] 800a8e0: 6a1b ldr r3, [r3, #32] 800a8e2: 2b20 cmp r3, #32 800a8e4: d108 bne.n 800a8f8 800a8e6: 4b70 ldr r3, [pc, #448] @ (800aaa8 ) 800a8e8: 685b ldr r3, [r3, #4] 800a8ea: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 800a8ee: 4a6e ldr r2, [pc, #440] @ (800aaa8 ) 800a8f0: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 800a8f4: 6053 str r3, [r2, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 800a8f6: e075 b.n 800a9e4 __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a8f8: 4b6b ldr r3, [pc, #428] @ (800aaa8 ) 800a8fa: 685b ldr r3, [r3, #4] 800a8fc: f023 42f8 bic.w r2, r3, #2080374784 @ 0x7c000000 800a900: 687b ldr r3, [r7, #4] 800a902: 6a1b ldr r3, [r3, #32] 800a904: 069b lsls r3, r3, #26 800a906: 4968 ldr r1, [pc, #416] @ (800aaa8 ) 800a908: 4313 orrs r3, r2 800a90a: 604b str r3, [r1, #4] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 800a90c: e06a b.n 800a9e4 __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a90e: 4b66 ldr r3, [pc, #408] @ (800aaa8 ) 800a910: 68db ldr r3, [r3, #12] 800a912: f023 527c bic.w r2, r3, #1056964608 @ 0x3f000000 800a916: 687b ldr r3, [r7, #4] 800a918: 6a1b ldr r3, [r3, #32] 800a91a: 061b lsls r3, r3, #24 800a91c: 4962 ldr r1, [pc, #392] @ (800aaa8 ) 800a91e: 4313 orrs r3, r2 800a920: 60cb str r3, [r1, #12] if ((__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) && (RCC_OscInitStruct->CSIState != RCC_CSI_ON)) 800a922: e05f b.n 800a9e4 } } else { /* Check the CSI State */ if ((RCC_OscInitStruct->CSIState) != RCC_CSI_OFF) 800a924: 687b ldr r3, [r7, #4] 800a926: 69db ldr r3, [r3, #28] 800a928: 2b00 cmp r3, #0 800a92a: d042 beq.n 800a9b2 { /* Enable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_ENABLE(); 800a92c: 4b5e ldr r3, [pc, #376] @ (800aaa8 ) 800a92e: 681b ldr r3, [r3, #0] 800a930: 4a5d ldr r2, [pc, #372] @ (800aaa8 ) 800a932: f043 0380 orr.w r3, r3, #128 @ 0x80 800a936: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a938: f7fa ff80 bl 800583c 800a93c: 6278 str r0, [r7, #36] @ 0x24 /* Wait till CSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800a93e: e008 b.n 800a952 { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 800a940: f7fa ff7c bl 800583c 800a944: 4602 mov r2, r0 800a946: 6a7b ldr r3, [r7, #36] @ 0x24 800a948: 1ad3 subs r3, r2, r3 800a94a: 2b02 cmp r3, #2 800a94c: d901 bls.n 800a952 { return HAL_TIMEOUT; 800a94e: 2303 movs r3, #3 800a950: e280 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800a952: 4b55 ldr r3, [pc, #340] @ (800aaa8 ) 800a954: 681b ldr r3, [r3, #0] 800a956: f403 7380 and.w r3, r3, #256 @ 0x100 800a95a: 2b00 cmp r3, #0 800a95c: d0f0 beq.n 800a940 } } /* Adjusts the Internal High Speed oscillator (CSI) calibration value.*/ __HAL_RCC_CSI_CALIBRATIONVALUE_ADJUST(RCC_OscInitStruct->CSICalibrationValue); 800a95e: f7fa ff9d bl 800589c 800a962: 4603 mov r3, r0 800a964: f241 0203 movw r2, #4099 @ 0x1003 800a968: 4293 cmp r3, r2 800a96a: d817 bhi.n 800a99c 800a96c: 687b ldr r3, [r7, #4] 800a96e: 6a1b ldr r3, [r3, #32] 800a970: 2b20 cmp r3, #32 800a972: d108 bne.n 800a986 800a974: 4b4c ldr r3, [pc, #304] @ (800aaa8 ) 800a976: 685b ldr r3, [r3, #4] 800a978: f023 43f8 bic.w r3, r3, #2080374784 @ 0x7c000000 800a97c: 4a4a ldr r2, [pc, #296] @ (800aaa8 ) 800a97e: f043 4380 orr.w r3, r3, #1073741824 @ 0x40000000 800a982: 6053 str r3, [r2, #4] 800a984: e02e b.n 800a9e4 800a986: 4b48 ldr r3, [pc, #288] @ (800aaa8 ) 800a988: 685b ldr r3, [r3, #4] 800a98a: f023 42f8 bic.w r2, r3, #2080374784 @ 0x7c000000 800a98e: 687b ldr r3, [r7, #4] 800a990: 6a1b ldr r3, [r3, #32] 800a992: 069b lsls r3, r3, #26 800a994: 4944 ldr r1, [pc, #272] @ (800aaa8 ) 800a996: 4313 orrs r3, r2 800a998: 604b str r3, [r1, #4] 800a99a: e023 b.n 800a9e4 800a99c: 4b42 ldr r3, [pc, #264] @ (800aaa8 ) 800a99e: 68db ldr r3, [r3, #12] 800a9a0: f023 527c bic.w r2, r3, #1056964608 @ 0x3f000000 800a9a4: 687b ldr r3, [r7, #4] 800a9a6: 6a1b ldr r3, [r3, #32] 800a9a8: 061b lsls r3, r3, #24 800a9aa: 493f ldr r1, [pc, #252] @ (800aaa8 ) 800a9ac: 4313 orrs r3, r2 800a9ae: 60cb str r3, [r1, #12] 800a9b0: e018 b.n 800a9e4 } else { /* Disable the Internal High Speed oscillator (CSI). */ __HAL_RCC_CSI_DISABLE(); 800a9b2: 4b3d ldr r3, [pc, #244] @ (800aaa8 ) 800a9b4: 681b ldr r3, [r3, #0] 800a9b6: 4a3c ldr r2, [pc, #240] @ (800aaa8 ) 800a9b8: f023 0380 bic.w r3, r3, #128 @ 0x80 800a9bc: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800a9be: f7fa ff3d bl 800583c 800a9c2: 6278 str r0, [r7, #36] @ 0x24 /* Wait till CSI is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 800a9c4: e008 b.n 800a9d8 { if ((HAL_GetTick() - tickstart) > CSI_TIMEOUT_VALUE) 800a9c6: f7fa ff39 bl 800583c 800a9ca: 4602 mov r2, r0 800a9cc: 6a7b ldr r3, [r7, #36] @ 0x24 800a9ce: 1ad3 subs r3, r2, r3 800a9d0: 2b02 cmp r3, #2 800a9d2: d901 bls.n 800a9d8 { return HAL_TIMEOUT; 800a9d4: 2303 movs r3, #3 800a9d6: e23d b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) != 0U) 800a9d8: 4b33 ldr r3, [pc, #204] @ (800aaa8 ) 800a9da: 681b ldr r3, [r3, #0] 800a9dc: f403 7380 and.w r3, r3, #256 @ 0x100 800a9e0: 2b00 cmp r3, #0 800a9e2: d1f0 bne.n 800a9c6 } } } } /*------------------------------ LSI Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSI) == RCC_OSCILLATORTYPE_LSI) 800a9e4: 687b ldr r3, [r7, #4] 800a9e6: 681b ldr r3, [r3, #0] 800a9e8: f003 0308 and.w r3, r3, #8 800a9ec: 2b00 cmp r3, #0 800a9ee: d036 beq.n 800aa5e { /* Check the parameters */ assert_param(IS_RCC_LSI(RCC_OscInitStruct->LSIState)); /* Check the LSI State */ if ((RCC_OscInitStruct->LSIState) != RCC_LSI_OFF) 800a9f0: 687b ldr r3, [r7, #4] 800a9f2: 695b ldr r3, [r3, #20] 800a9f4: 2b00 cmp r3, #0 800a9f6: d019 beq.n 800aa2c { /* Enable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_ENABLE(); 800a9f8: 4b2b ldr r3, [pc, #172] @ (800aaa8 ) 800a9fa: 6f5b ldr r3, [r3, #116] @ 0x74 800a9fc: 4a2a ldr r2, [pc, #168] @ (800aaa8 ) 800a9fe: f043 0301 orr.w r3, r3, #1 800aa02: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 800aa04: f7fa ff1a bl 800583c 800aa08: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 800aa0a: e008 b.n 800aa1e { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 800aa0c: f7fa ff16 bl 800583c 800aa10: 4602 mov r2, r0 800aa12: 6a7b ldr r3, [r7, #36] @ 0x24 800aa14: 1ad3 subs r3, r2, r3 800aa16: 2b02 cmp r3, #2 800aa18: d901 bls.n 800aa1e { return HAL_TIMEOUT; 800aa1a: 2303 movs r3, #3 800aa1c: e21a b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) == 0U) 800aa1e: 4b22 ldr r3, [pc, #136] @ (800aaa8 ) 800aa20: 6f5b ldr r3, [r3, #116] @ 0x74 800aa22: f003 0302 and.w r3, r3, #2 800aa26: 2b00 cmp r3, #0 800aa28: d0f0 beq.n 800aa0c 800aa2a: e018 b.n 800aa5e } } else { /* Disable the Internal Low Speed oscillator (LSI). */ __HAL_RCC_LSI_DISABLE(); 800aa2c: 4b1e ldr r3, [pc, #120] @ (800aaa8 ) 800aa2e: 6f5b ldr r3, [r3, #116] @ 0x74 800aa30: 4a1d ldr r2, [pc, #116] @ (800aaa8 ) 800aa32: f023 0301 bic.w r3, r3, #1 800aa36: 6753 str r3, [r2, #116] @ 0x74 /* Get Start Tick*/ tickstart = HAL_GetTick(); 800aa38: f7fa ff00 bl 800583c 800aa3c: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSI is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 800aa3e: e008 b.n 800aa52 { if ((HAL_GetTick() - tickstart) > LSI_TIMEOUT_VALUE) 800aa40: f7fa fefc bl 800583c 800aa44: 4602 mov r2, r0 800aa46: 6a7b ldr r3, [r7, #36] @ 0x24 800aa48: 1ad3 subs r3, r2, r3 800aa4a: 2b02 cmp r3, #2 800aa4c: d901 bls.n 800aa52 { return HAL_TIMEOUT; 800aa4e: 2303 movs r3, #3 800aa50: e200 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSIRDY) != 0U) 800aa52: 4b15 ldr r3, [pc, #84] @ (800aaa8 ) 800aa54: 6f5b ldr r3, [r3, #116] @ 0x74 800aa56: f003 0302 and.w r3, r3, #2 800aa5a: 2b00 cmp r3, #0 800aa5c: d1f0 bne.n 800aa40 } } } /*------------------------------ HSI48 Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_HSI48) == RCC_OSCILLATORTYPE_HSI48) 800aa5e: 687b ldr r3, [r7, #4] 800aa60: 681b ldr r3, [r3, #0] 800aa62: f003 0320 and.w r3, r3, #32 800aa66: 2b00 cmp r3, #0 800aa68: d039 beq.n 800aade { /* Check the parameters */ assert_param(IS_RCC_HSI48(RCC_OscInitStruct->HSI48State)); /* Check the HSI48 State */ if ((RCC_OscInitStruct->HSI48State) != RCC_HSI48_OFF) 800aa6a: 687b ldr r3, [r7, #4] 800aa6c: 699b ldr r3, [r3, #24] 800aa6e: 2b00 cmp r3, #0 800aa70: d01c beq.n 800aaac { /* Enable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_ENABLE(); 800aa72: 4b0d ldr r3, [pc, #52] @ (800aaa8 ) 800aa74: 681b ldr r3, [r3, #0] 800aa76: 4a0c ldr r2, [pc, #48] @ (800aaa8 ) 800aa78: f443 5380 orr.w r3, r3, #4096 @ 0x1000 800aa7c: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 800aa7e: f7fa fedd bl 800583c 800aa82: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 800aa84: e008 b.n 800aa98 { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 800aa86: f7fa fed9 bl 800583c 800aa8a: 4602 mov r2, r0 800aa8c: 6a7b ldr r3, [r7, #36] @ 0x24 800aa8e: 1ad3 subs r3, r2, r3 800aa90: 2b02 cmp r3, #2 800aa92: d901 bls.n 800aa98 { return HAL_TIMEOUT; 800aa94: 2303 movs r3, #3 800aa96: e1dd b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) == 0U) 800aa98: 4b03 ldr r3, [pc, #12] @ (800aaa8 ) 800aa9a: 681b ldr r3, [r3, #0] 800aa9c: f403 5300 and.w r3, r3, #8192 @ 0x2000 800aaa0: 2b00 cmp r3, #0 800aaa2: d0f0 beq.n 800aa86 800aaa4: e01b b.n 800aade 800aaa6: bf00 nop 800aaa8: 58024400 .word 0x58024400 } } else { /* Disable the Internal Low Speed oscillator (HSI48). */ __HAL_RCC_HSI48_DISABLE(); 800aaac: 4b9b ldr r3, [pc, #620] @ (800ad1c ) 800aaae: 681b ldr r3, [r3, #0] 800aab0: 4a9a ldr r2, [pc, #616] @ (800ad1c ) 800aab2: f423 5380 bic.w r3, r3, #4096 @ 0x1000 800aab6: 6013 str r3, [r2, #0] /* Get time-out */ tickstart = HAL_GetTick(); 800aab8: f7fa fec0 bl 800583c 800aabc: 6278 str r0, [r7, #36] @ 0x24 /* Wait till HSI48 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 800aabe: e008 b.n 800aad2 { if ((HAL_GetTick() - tickstart) > HSI48_TIMEOUT_VALUE) 800aac0: f7fa febc bl 800583c 800aac4: 4602 mov r2, r0 800aac6: 6a7b ldr r3, [r7, #36] @ 0x24 800aac8: 1ad3 subs r3, r2, r3 800aaca: 2b02 cmp r3, #2 800aacc: d901 bls.n 800aad2 { return HAL_TIMEOUT; 800aace: 2303 movs r3, #3 800aad0: e1c0 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSI48RDY) != 0U) 800aad2: 4b92 ldr r3, [pc, #584] @ (800ad1c ) 800aad4: 681b ldr r3, [r3, #0] 800aad6: f403 5300 and.w r3, r3, #8192 @ 0x2000 800aada: 2b00 cmp r3, #0 800aadc: d1f0 bne.n 800aac0 } } } } /*------------------------------ LSE Configuration -------------------------*/ if (((RCC_OscInitStruct->OscillatorType) & RCC_OSCILLATORTYPE_LSE) == RCC_OSCILLATORTYPE_LSE) 800aade: 687b ldr r3, [r7, #4] 800aae0: 681b ldr r3, [r3, #0] 800aae2: f003 0304 and.w r3, r3, #4 800aae6: 2b00 cmp r3, #0 800aae8: f000 8081 beq.w 800abee { /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_OscInitStruct->LSEState)); /* Enable write access to Backup domain */ PWR->CR1 |= PWR_CR1_DBP; 800aaec: 4b8c ldr r3, [pc, #560] @ (800ad20 ) 800aaee: 681b ldr r3, [r3, #0] 800aaf0: 4a8b ldr r2, [pc, #556] @ (800ad20 ) 800aaf2: f443 7380 orr.w r3, r3, #256 @ 0x100 800aaf6: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 800aaf8: f7fa fea0 bl 800583c 800aafc: 6278 str r0, [r7, #36] @ 0x24 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800aafe: e008 b.n 800ab12 { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 800ab00: f7fa fe9c bl 800583c 800ab04: 4602 mov r2, r0 800ab06: 6a7b ldr r3, [r7, #36] @ 0x24 800ab08: 1ad3 subs r3, r2, r3 800ab0a: 2b64 cmp r3, #100 @ 0x64 800ab0c: d901 bls.n 800ab12 { return HAL_TIMEOUT; 800ab0e: 2303 movs r3, #3 800ab10: e1a0 b.n 800ae54 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800ab12: 4b83 ldr r3, [pc, #524] @ (800ad20 ) 800ab14: 681b ldr r3, [r3, #0] 800ab16: f403 7380 and.w r3, r3, #256 @ 0x100 800ab1a: 2b00 cmp r3, #0 800ab1c: d0f0 beq.n 800ab00 } } /* Set the new LSE configuration -----------------------------------------*/ __HAL_RCC_LSE_CONFIG(RCC_OscInitStruct->LSEState); 800ab1e: 687b ldr r3, [r7, #4] 800ab20: 689b ldr r3, [r3, #8] 800ab22: 2b01 cmp r3, #1 800ab24: d106 bne.n 800ab34 800ab26: 4b7d ldr r3, [pc, #500] @ (800ad1c ) 800ab28: 6f1b ldr r3, [r3, #112] @ 0x70 800ab2a: 4a7c ldr r2, [pc, #496] @ (800ad1c ) 800ab2c: f043 0301 orr.w r3, r3, #1 800ab30: 6713 str r3, [r2, #112] @ 0x70 800ab32: e02d b.n 800ab90 800ab34: 687b ldr r3, [r7, #4] 800ab36: 689b ldr r3, [r3, #8] 800ab38: 2b00 cmp r3, #0 800ab3a: d10c bne.n 800ab56 800ab3c: 4b77 ldr r3, [pc, #476] @ (800ad1c ) 800ab3e: 6f1b ldr r3, [r3, #112] @ 0x70 800ab40: 4a76 ldr r2, [pc, #472] @ (800ad1c ) 800ab42: f023 0301 bic.w r3, r3, #1 800ab46: 6713 str r3, [r2, #112] @ 0x70 800ab48: 4b74 ldr r3, [pc, #464] @ (800ad1c ) 800ab4a: 6f1b ldr r3, [r3, #112] @ 0x70 800ab4c: 4a73 ldr r2, [pc, #460] @ (800ad1c ) 800ab4e: f023 0304 bic.w r3, r3, #4 800ab52: 6713 str r3, [r2, #112] @ 0x70 800ab54: e01c b.n 800ab90 800ab56: 687b ldr r3, [r7, #4] 800ab58: 689b ldr r3, [r3, #8] 800ab5a: 2b05 cmp r3, #5 800ab5c: d10c bne.n 800ab78 800ab5e: 4b6f ldr r3, [pc, #444] @ (800ad1c ) 800ab60: 6f1b ldr r3, [r3, #112] @ 0x70 800ab62: 4a6e ldr r2, [pc, #440] @ (800ad1c ) 800ab64: f043 0304 orr.w r3, r3, #4 800ab68: 6713 str r3, [r2, #112] @ 0x70 800ab6a: 4b6c ldr r3, [pc, #432] @ (800ad1c ) 800ab6c: 6f1b ldr r3, [r3, #112] @ 0x70 800ab6e: 4a6b ldr r2, [pc, #428] @ (800ad1c ) 800ab70: f043 0301 orr.w r3, r3, #1 800ab74: 6713 str r3, [r2, #112] @ 0x70 800ab76: e00b b.n 800ab90 800ab78: 4b68 ldr r3, [pc, #416] @ (800ad1c ) 800ab7a: 6f1b ldr r3, [r3, #112] @ 0x70 800ab7c: 4a67 ldr r2, [pc, #412] @ (800ad1c ) 800ab7e: f023 0301 bic.w r3, r3, #1 800ab82: 6713 str r3, [r2, #112] @ 0x70 800ab84: 4b65 ldr r3, [pc, #404] @ (800ad1c ) 800ab86: 6f1b ldr r3, [r3, #112] @ 0x70 800ab88: 4a64 ldr r2, [pc, #400] @ (800ad1c ) 800ab8a: f023 0304 bic.w r3, r3, #4 800ab8e: 6713 str r3, [r2, #112] @ 0x70 /* Check the LSE State */ if ((RCC_OscInitStruct->LSEState) != RCC_LSE_OFF) 800ab90: 687b ldr r3, [r7, #4] 800ab92: 689b ldr r3, [r3, #8] 800ab94: 2b00 cmp r3, #0 800ab96: d015 beq.n 800abc4 { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800ab98: f7fa fe50 bl 800583c 800ab9c: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800ab9e: e00a b.n 800abb6 { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800aba0: f7fa fe4c bl 800583c 800aba4: 4602 mov r2, r0 800aba6: 6a7b ldr r3, [r7, #36] @ 0x24 800aba8: 1ad3 subs r3, r2, r3 800abaa: f241 3288 movw r2, #5000 @ 0x1388 800abae: 4293 cmp r3, r2 800abb0: d901 bls.n 800abb6 { return HAL_TIMEOUT; 800abb2: 2303 movs r3, #3 800abb4: e14e b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800abb6: 4b59 ldr r3, [pc, #356] @ (800ad1c ) 800abb8: 6f1b ldr r3, [r3, #112] @ 0x70 800abba: f003 0302 and.w r3, r3, #2 800abbe: 2b00 cmp r3, #0 800abc0: d0ee beq.n 800aba0 800abc2: e014 b.n 800abee } } else { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800abc4: f7fa fe3a bl 800583c 800abc8: 6278 str r0, [r7, #36] @ 0x24 /* Wait till LSE is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 800abca: e00a b.n 800abe2 { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800abcc: f7fa fe36 bl 800583c 800abd0: 4602 mov r2, r0 800abd2: 6a7b ldr r3, [r7, #36] @ 0x24 800abd4: 1ad3 subs r3, r2, r3 800abd6: f241 3288 movw r2, #5000 @ 0x1388 800abda: 4293 cmp r3, r2 800abdc: d901 bls.n 800abe2 { return HAL_TIMEOUT; 800abde: 2303 movs r3, #3 800abe0: e138 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) != 0U) 800abe2: 4b4e ldr r3, [pc, #312] @ (800ad1c ) 800abe4: 6f1b ldr r3, [r3, #112] @ 0x70 800abe6: f003 0302 and.w r3, r3, #2 800abea: 2b00 cmp r3, #0 800abec: d1ee bne.n 800abcc } } /*-------------------------------- PLL Configuration -----------------------*/ /* Check the parameters */ assert_param(IS_RCC_PLL(RCC_OscInitStruct->PLL.PLLState)); if ((RCC_OscInitStruct->PLL.PLLState) != RCC_PLL_NONE) 800abee: 687b ldr r3, [r7, #4] 800abf0: 6a5b ldr r3, [r3, #36] @ 0x24 800abf2: 2b00 cmp r3, #0 800abf4: f000 812d beq.w 800ae52 { /* Check if the PLL is used as system clock or not */ if (__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL1) 800abf8: 4b48 ldr r3, [pc, #288] @ (800ad1c ) 800abfa: 691b ldr r3, [r3, #16] 800abfc: f003 0338 and.w r3, r3, #56 @ 0x38 800ac00: 2b18 cmp r3, #24 800ac02: f000 80bd beq.w 800ad80 { if ((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_ON) 800ac06: 687b ldr r3, [r7, #4] 800ac08: 6a5b ldr r3, [r3, #36] @ 0x24 800ac0a: 2b02 cmp r3, #2 800ac0c: f040 809e bne.w 800ad4c 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(); 800ac10: 4b42 ldr r3, [pc, #264] @ (800ad1c ) 800ac12: 681b ldr r3, [r3, #0] 800ac14: 4a41 ldr r2, [pc, #260] @ (800ad1c ) 800ac16: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 800ac1a: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800ac1c: f7fa fe0e bl 800583c 800ac20: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800ac22: e008 b.n 800ac36 { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800ac24: f7fa fe0a bl 800583c 800ac28: 4602 mov r2, r0 800ac2a: 6a7b ldr r3, [r7, #36] @ 0x24 800ac2c: 1ad3 subs r3, r2, r3 800ac2e: 2b02 cmp r3, #2 800ac30: d901 bls.n 800ac36 { return HAL_TIMEOUT; 800ac32: 2303 movs r3, #3 800ac34: e10e b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800ac36: 4b39 ldr r3, [pc, #228] @ (800ad1c ) 800ac38: 681b ldr r3, [r3, #0] 800ac3a: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800ac3e: 2b00 cmp r3, #0 800ac40: d1f0 bne.n 800ac24 } } /* Configure the main PLL clock source, multiplication and division factors. */ __HAL_RCC_PLL_CONFIG(RCC_OscInitStruct->PLL.PLLSource, 800ac42: 4b36 ldr r3, [pc, #216] @ (800ad1c ) 800ac44: 6a9a ldr r2, [r3, #40] @ 0x28 800ac46: 4b37 ldr r3, [pc, #220] @ (800ad24 ) 800ac48: 4013 ands r3, r2 800ac4a: 687a ldr r2, [r7, #4] 800ac4c: 6a91 ldr r1, [r2, #40] @ 0x28 800ac4e: 687a ldr r2, [r7, #4] 800ac50: 6ad2 ldr r2, [r2, #44] @ 0x2c 800ac52: 0112 lsls r2, r2, #4 800ac54: 430a orrs r2, r1 800ac56: 4931 ldr r1, [pc, #196] @ (800ad1c ) 800ac58: 4313 orrs r3, r2 800ac5a: 628b str r3, [r1, #40] @ 0x28 800ac5c: 687b ldr r3, [r7, #4] 800ac5e: 6b1b ldr r3, [r3, #48] @ 0x30 800ac60: 3b01 subs r3, #1 800ac62: f3c3 0208 ubfx r2, r3, #0, #9 800ac66: 687b ldr r3, [r7, #4] 800ac68: 6b5b ldr r3, [r3, #52] @ 0x34 800ac6a: 3b01 subs r3, #1 800ac6c: 025b lsls r3, r3, #9 800ac6e: b29b uxth r3, r3 800ac70: 431a orrs r2, r3 800ac72: 687b ldr r3, [r7, #4] 800ac74: 6b9b ldr r3, [r3, #56] @ 0x38 800ac76: 3b01 subs r3, #1 800ac78: 041b lsls r3, r3, #16 800ac7a: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800ac7e: 431a orrs r2, r3 800ac80: 687b ldr r3, [r7, #4] 800ac82: 6bdb ldr r3, [r3, #60] @ 0x3c 800ac84: 3b01 subs r3, #1 800ac86: 061b lsls r3, r3, #24 800ac88: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800ac8c: 4923 ldr r1, [pc, #140] @ (800ad1c ) 800ac8e: 4313 orrs r3, r2 800ac90: 630b str r3, [r1, #48] @ 0x30 RCC_OscInitStruct->PLL.PLLP, RCC_OscInitStruct->PLL.PLLQ, RCC_OscInitStruct->PLL.PLLR); /* Disable PLLFRACN . */ __HAL_RCC_PLLFRACN_DISABLE(); 800ac92: 4b22 ldr r3, [pc, #136] @ (800ad1c ) 800ac94: 6adb ldr r3, [r3, #44] @ 0x2c 800ac96: 4a21 ldr r2, [pc, #132] @ (800ad1c ) 800ac98: f023 0301 bic.w r3, r3, #1 800ac9c: 62d3 str r3, [r2, #44] @ 0x2c /* Configure PLL PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 800ac9e: 4b1f ldr r3, [pc, #124] @ (800ad1c ) 800aca0: 6b5a ldr r2, [r3, #52] @ 0x34 800aca2: 4b21 ldr r3, [pc, #132] @ (800ad28 ) 800aca4: 4013 ands r3, r2 800aca6: 687a ldr r2, [r7, #4] 800aca8: 6c92 ldr r2, [r2, #72] @ 0x48 800acaa: 00d2 lsls r2, r2, #3 800acac: 491b ldr r1, [pc, #108] @ (800ad1c ) 800acae: 4313 orrs r3, r2 800acb0: 634b str r3, [r1, #52] @ 0x34 /* Select PLL1 input reference frequency range: VCI */ __HAL_RCC_PLL_VCIRANGE(RCC_OscInitStruct->PLL.PLLRGE) ; 800acb2: 4b1a ldr r3, [pc, #104] @ (800ad1c ) 800acb4: 6adb ldr r3, [r3, #44] @ 0x2c 800acb6: f023 020c bic.w r2, r3, #12 800acba: 687b ldr r3, [r7, #4] 800acbc: 6c1b ldr r3, [r3, #64] @ 0x40 800acbe: 4917 ldr r1, [pc, #92] @ (800ad1c ) 800acc0: 4313 orrs r3, r2 800acc2: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL1 output frequency range : VCO */ __HAL_RCC_PLL_VCORANGE(RCC_OscInitStruct->PLL.PLLVCOSEL) ; 800acc4: 4b15 ldr r3, [pc, #84] @ (800ad1c ) 800acc6: 6adb ldr r3, [r3, #44] @ 0x2c 800acc8: f023 0202 bic.w r2, r3, #2 800accc: 687b ldr r3, [r7, #4] 800acce: 6c5b ldr r3, [r3, #68] @ 0x44 800acd0: 4912 ldr r1, [pc, #72] @ (800ad1c ) 800acd2: 4313 orrs r3, r2 800acd4: 62cb str r3, [r1, #44] @ 0x2c /* Enable PLL System Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVP); 800acd6: 4b11 ldr r3, [pc, #68] @ (800ad1c ) 800acd8: 6adb ldr r3, [r3, #44] @ 0x2c 800acda: 4a10 ldr r2, [pc, #64] @ (800ad1c ) 800acdc: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800ace0: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1Q Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVQ); 800ace2: 4b0e ldr r3, [pc, #56] @ (800ad1c ) 800ace4: 6adb ldr r3, [r3, #44] @ 0x2c 800ace6: 4a0d ldr r2, [pc, #52] @ (800ad1c ) 800ace8: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800acec: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1R Clock output. */ __HAL_RCC_PLLCLKOUT_ENABLE(RCC_PLL1_DIVR); 800acee: 4b0b ldr r3, [pc, #44] @ (800ad1c ) 800acf0: 6adb ldr r3, [r3, #44] @ 0x2c 800acf2: 4a0a ldr r2, [pc, #40] @ (800ad1c ) 800acf4: f443 2380 orr.w r3, r3, #262144 @ 0x40000 800acf8: 62d3 str r3, [r2, #44] @ 0x2c /* Enable PLL1FRACN . */ __HAL_RCC_PLLFRACN_ENABLE(); 800acfa: 4b08 ldr r3, [pc, #32] @ (800ad1c ) 800acfc: 6adb ldr r3, [r3, #44] @ 0x2c 800acfe: 4a07 ldr r2, [pc, #28] @ (800ad1c ) 800ad00: f043 0301 orr.w r3, r3, #1 800ad04: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the main PLL. */ __HAL_RCC_PLL_ENABLE(); 800ad06: 4b05 ldr r3, [pc, #20] @ (800ad1c ) 800ad08: 681b ldr r3, [r3, #0] 800ad0a: 4a04 ldr r2, [pc, #16] @ (800ad1c ) 800ad0c: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 800ad10: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800ad12: f7fa fd93 bl 800583c 800ad16: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800ad18: e011 b.n 800ad3e 800ad1a: bf00 nop 800ad1c: 58024400 .word 0x58024400 800ad20: 58024800 .word 0x58024800 800ad24: fffffc0c .word 0xfffffc0c 800ad28: ffff0007 .word 0xffff0007 { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800ad2c: f7fa fd86 bl 800583c 800ad30: 4602 mov r2, r0 800ad32: 6a7b ldr r3, [r7, #36] @ 0x24 800ad34: 1ad3 subs r3, r2, r3 800ad36: 2b02 cmp r3, #2 800ad38: d901 bls.n 800ad3e { return HAL_TIMEOUT; 800ad3a: 2303 movs r3, #3 800ad3c: e08a b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800ad3e: 4b47 ldr r3, [pc, #284] @ (800ae5c ) 800ad40: 681b ldr r3, [r3, #0] 800ad42: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800ad46: 2b00 cmp r3, #0 800ad48: d0f0 beq.n 800ad2c 800ad4a: e082 b.n 800ae52 } } else { /* Disable the main PLL. */ __HAL_RCC_PLL_DISABLE(); 800ad4c: 4b43 ldr r3, [pc, #268] @ (800ae5c ) 800ad4e: 681b ldr r3, [r3, #0] 800ad50: 4a42 ldr r2, [pc, #264] @ (800ae5c ) 800ad52: f023 7380 bic.w r3, r3, #16777216 @ 0x1000000 800ad56: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800ad58: f7fa fd70 bl 800583c 800ad5c: 6278 str r0, [r7, #36] @ 0x24 /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800ad5e: e008 b.n 800ad72 { if ((HAL_GetTick() - tickstart) > PLL_TIMEOUT_VALUE) 800ad60: f7fa fd6c bl 800583c 800ad64: 4602 mov r2, r0 800ad66: 6a7b ldr r3, [r7, #36] @ 0x24 800ad68: 1ad3 subs r3, r2, r3 800ad6a: 2b02 cmp r3, #2 800ad6c: d901 bls.n 800ad72 { return HAL_TIMEOUT; 800ad6e: 2303 movs r3, #3 800ad70: e070 b.n 800ae54 while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != 0U) 800ad72: 4b3a ldr r3, [pc, #232] @ (800ae5c ) 800ad74: 681b ldr r3, [r3, #0] 800ad76: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800ad7a: 2b00 cmp r3, #0 800ad7c: d1f0 bne.n 800ad60 800ad7e: e068 b.n 800ae52 } } else { /* Do not return HAL_ERROR if request repeats the current configuration */ temp1_pllckcfg = RCC->PLLCKSELR; 800ad80: 4b36 ldr r3, [pc, #216] @ (800ae5c ) 800ad82: 6a9b ldr r3, [r3, #40] @ 0x28 800ad84: 613b str r3, [r7, #16] temp2_pllckcfg = RCC->PLL1DIVR; 800ad86: 4b35 ldr r3, [pc, #212] @ (800ae5c ) 800ad88: 6b1b ldr r3, [r3, #48] @ 0x30 800ad8a: 60fb str r3, [r7, #12] if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800ad8c: 687b ldr r3, [r7, #4] 800ad8e: 6a5b ldr r3, [r3, #36] @ 0x24 800ad90: 2b01 cmp r3, #1 800ad92: d031 beq.n 800adf8 (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800ad94: 693b ldr r3, [r7, #16] 800ad96: f003 0203 and.w r2, r3, #3 800ad9a: 687b ldr r3, [r7, #4] 800ad9c: 6a9b ldr r3, [r3, #40] @ 0x28 if (((RCC_OscInitStruct->PLL.PLLState) == RCC_PLL_OFF) || 800ad9e: 429a cmp r2, r3 800ada0: d12a bne.n 800adf8 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 800ada2: 693b ldr r3, [r7, #16] 800ada4: 091b lsrs r3, r3, #4 800ada6: f003 023f and.w r2, r3, #63 @ 0x3f 800adaa: 687b ldr r3, [r7, #4] 800adac: 6adb ldr r3, [r3, #44] @ 0x2c (READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_PLLSRC) != RCC_OscInitStruct->PLL.PLLSource) || 800adae: 429a cmp r2, r3 800adb0: d122 bne.n 800adf8 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 800adb2: 68fb ldr r3, [r7, #12] 800adb4: f3c3 0208 ubfx r2, r3, #0, #9 800adb8: 687b ldr r3, [r7, #4] 800adba: 6b1b ldr r3, [r3, #48] @ 0x30 800adbc: 3b01 subs r3, #1 ((READ_BIT(temp1_pllckcfg, RCC_PLLCKSELR_DIVM1) >> RCC_PLLCKSELR_DIVM1_Pos) != RCC_OscInitStruct->PLL.PLLM) || 800adbe: 429a cmp r2, r3 800adc0: d11a bne.n 800adf8 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 800adc2: 68fb ldr r3, [r7, #12] 800adc4: 0a5b lsrs r3, r3, #9 800adc6: f003 027f and.w r2, r3, #127 @ 0x7f 800adca: 687b ldr r3, [r7, #4] 800adcc: 6b5b ldr r3, [r3, #52] @ 0x34 800adce: 3b01 subs r3, #1 (READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_N1) != (RCC_OscInitStruct->PLL.PLLN - 1U)) || 800add0: 429a cmp r2, r3 800add2: d111 bne.n 800adf8 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 800add4: 68fb ldr r3, [r7, #12] 800add6: 0c1b lsrs r3, r3, #16 800add8: f003 027f and.w r2, r3, #127 @ 0x7f 800addc: 687b ldr r3, [r7, #4] 800adde: 6b9b ldr r3, [r3, #56] @ 0x38 800ade0: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_P1) >> RCC_PLL1DIVR_P1_Pos) != (RCC_OscInitStruct->PLL.PLLP - 1U)) || 800ade2: 429a cmp r2, r3 800ade4: d108 bne.n 800adf8 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_R1) >> RCC_PLL1DIVR_R1_Pos) != (RCC_OscInitStruct->PLL.PLLR - 1U))) 800ade6: 68fb ldr r3, [r7, #12] 800ade8: 0e1b lsrs r3, r3, #24 800adea: f003 027f and.w r2, r3, #127 @ 0x7f 800adee: 687b ldr r3, [r7, #4] 800adf0: 6bdb ldr r3, [r3, #60] @ 0x3c 800adf2: 3b01 subs r3, #1 ((READ_BIT(temp2_pllckcfg, RCC_PLL1DIVR_Q1) >> RCC_PLL1DIVR_Q1_Pos) != (RCC_OscInitStruct->PLL.PLLQ - 1U)) || 800adf4: 429a cmp r2, r3 800adf6: d001 beq.n 800adfc { return HAL_ERROR; 800adf8: 2301 movs r3, #1 800adfa: e02b b.n 800ae54 } else { /* Check if only fractional part needs to be updated */ temp1_pllckcfg = ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> RCC_PLL1FRACR_FRACN1_Pos); 800adfc: 4b17 ldr r3, [pc, #92] @ (800ae5c ) 800adfe: 6b5b ldr r3, [r3, #52] @ 0x34 800ae00: 08db lsrs r3, r3, #3 800ae02: f3c3 030c ubfx r3, r3, #0, #13 800ae06: 613b str r3, [r7, #16] if (RCC_OscInitStruct->PLL.PLLFRACN != temp1_pllckcfg) 800ae08: 687b ldr r3, [r7, #4] 800ae0a: 6c9b ldr r3, [r3, #72] @ 0x48 800ae0c: 693a ldr r2, [r7, #16] 800ae0e: 429a cmp r2, r3 800ae10: d01f beq.n 800ae52 { assert_param(IS_RCC_PLLFRACN_VALUE(RCC_OscInitStruct->PLL.PLLFRACN)); /* Disable PLL1FRACEN */ __HAL_RCC_PLLFRACN_DISABLE(); 800ae12: 4b12 ldr r3, [pc, #72] @ (800ae5c ) 800ae14: 6adb ldr r3, [r3, #44] @ 0x2c 800ae16: 4a11 ldr r2, [pc, #68] @ (800ae5c ) 800ae18: f023 0301 bic.w r3, r3, #1 800ae1c: 62d3 str r3, [r2, #44] @ 0x2c /* Get Start Tick*/ tickstart = HAL_GetTick(); 800ae1e: f7fa fd0d bl 800583c 800ae22: 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) 800ae24: bf00 nop 800ae26: f7fa fd09 bl 800583c 800ae2a: 4602 mov r2, r0 800ae2c: 6a7b ldr r3, [r7, #36] @ 0x24 800ae2e: 4293 cmp r3, r2 800ae30: d0f9 beq.n 800ae26 { } /* Configure PLL1 PLL1FRACN */ __HAL_RCC_PLLFRACN_CONFIG(RCC_OscInitStruct->PLL.PLLFRACN); 800ae32: 4b0a ldr r3, [pc, #40] @ (800ae5c ) 800ae34: 6b5a ldr r2, [r3, #52] @ 0x34 800ae36: 4b0a ldr r3, [pc, #40] @ (800ae60 ) 800ae38: 4013 ands r3, r2 800ae3a: 687a ldr r2, [r7, #4] 800ae3c: 6c92 ldr r2, [r2, #72] @ 0x48 800ae3e: 00d2 lsls r2, r2, #3 800ae40: 4906 ldr r1, [pc, #24] @ (800ae5c ) 800ae42: 4313 orrs r3, r2 800ae44: 634b str r3, [r1, #52] @ 0x34 /* Enable PLL1FRACEN to latch new value. */ __HAL_RCC_PLLFRACN_ENABLE(); 800ae46: 4b05 ldr r3, [pc, #20] @ (800ae5c ) 800ae48: 6adb ldr r3, [r3, #44] @ 0x2c 800ae4a: 4a04 ldr r2, [pc, #16] @ (800ae5c ) 800ae4c: f043 0301 orr.w r3, r3, #1 800ae50: 62d3 str r3, [r2, #44] @ 0x2c } } } } return HAL_OK; 800ae52: 2300 movs r3, #0 } 800ae54: 4618 mov r0, r3 800ae56: 3730 adds r7, #48 @ 0x30 800ae58: 46bd mov sp, r7 800ae5a: bd80 pop {r7, pc} 800ae5c: 58024400 .word 0x58024400 800ae60: ffff0007 .word 0xffff0007 0800ae64 : * 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) { 800ae64: b580 push {r7, lr} 800ae66: b086 sub sp, #24 800ae68: af00 add r7, sp, #0 800ae6a: 6078 str r0, [r7, #4] 800ae6c: 6039 str r1, [r7, #0] HAL_StatusTypeDef halstatus; uint32_t tickstart; uint32_t common_system_clock; /* Check Null pointer */ if (RCC_ClkInitStruct == NULL) 800ae6e: 687b ldr r3, [r7, #4] 800ae70: 2b00 cmp r3, #0 800ae72: d101 bne.n 800ae78 { return HAL_ERROR; 800ae74: 2301 movs r3, #1 800ae76: e19c b.n 800b1b2 /* 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()) 800ae78: 4b8a ldr r3, [pc, #552] @ (800b0a4 ) 800ae7a: 681b ldr r3, [r3, #0] 800ae7c: f003 030f and.w r3, r3, #15 800ae80: 683a ldr r2, [r7, #0] 800ae82: 429a cmp r2, r3 800ae84: d910 bls.n 800aea8 { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 800ae86: 4b87 ldr r3, [pc, #540] @ (800b0a4 ) 800ae88: 681b ldr r3, [r3, #0] 800ae8a: f023 020f bic.w r2, r3, #15 800ae8e: 4985 ldr r1, [pc, #532] @ (800b0a4 ) 800ae90: 683b ldr r3, [r7, #0] 800ae92: 4313 orrs r3, r2 800ae94: 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) 800ae96: 4b83 ldr r3, [pc, #524] @ (800b0a4 ) 800ae98: 681b ldr r3, [r3, #0] 800ae9a: f003 030f and.w r3, r3, #15 800ae9e: 683a ldr r2, [r7, #0] 800aea0: 429a cmp r2, r3 800aea2: d001 beq.n 800aea8 { return HAL_ERROR; 800aea4: 2301 movs r3, #1 800aea6: e184 b.n 800b1b2 } /* Increasing the BUS frequency divider */ /*-------------------------- D1PCLK1/CDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 800aea8: 687b ldr r3, [r7, #4] 800aeaa: 681b ldr r3, [r3, #0] 800aeac: f003 0304 and.w r3, r3, #4 800aeb0: 2b00 cmp r3, #0 800aeb2: d010 beq.n 800aed6 { #if defined (RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 800aeb4: 687b ldr r3, [r7, #4] 800aeb6: 691a ldr r2, [r3, #16] 800aeb8: 4b7b ldr r3, [pc, #492] @ (800b0a8 ) 800aeba: 699b ldr r3, [r3, #24] 800aebc: f003 0370 and.w r3, r3, #112 @ 0x70 800aec0: 429a cmp r2, r3 800aec2: d908 bls.n 800aed6 { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 800aec4: 4b78 ldr r3, [pc, #480] @ (800b0a8 ) 800aec6: 699b ldr r3, [r3, #24] 800aec8: f023 0270 bic.w r2, r3, #112 @ 0x70 800aecc: 687b ldr r3, [r7, #4] 800aece: 691b ldr r3, [r3, #16] 800aed0: 4975 ldr r1, [pc, #468] @ (800b0a8 ) 800aed2: 4313 orrs r3, r2 800aed4: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 800aed6: 687b ldr r3, [r7, #4] 800aed8: 681b ldr r3, [r3, #0] 800aeda: f003 0308 and.w r3, r3, #8 800aede: 2b00 cmp r3, #0 800aee0: d010 beq.n 800af04 { #if defined (RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 800aee2: 687b ldr r3, [r7, #4] 800aee4: 695a ldr r2, [r3, #20] 800aee6: 4b70 ldr r3, [pc, #448] @ (800b0a8 ) 800aee8: 69db ldr r3, [r3, #28] 800aeea: f003 0370 and.w r3, r3, #112 @ 0x70 800aeee: 429a cmp r2, r3 800aef0: d908 bls.n 800af04 { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 800aef2: 4b6d ldr r3, [pc, #436] @ (800b0a8 ) 800aef4: 69db ldr r3, [r3, #28] 800aef6: f023 0270 bic.w r2, r3, #112 @ 0x70 800aefa: 687b ldr r3, [r7, #4] 800aefc: 695b ldr r3, [r3, #20] 800aefe: 496a ldr r1, [pc, #424] @ (800b0a8 ) 800af00: 4313 orrs r3, r2 800af02: 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) 800af04: 687b ldr r3, [r7, #4] 800af06: 681b ldr r3, [r3, #0] 800af08: f003 0310 and.w r3, r3, #16 800af0c: 2b00 cmp r3, #0 800af0e: d010 beq.n 800af32 { #if defined(RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) > (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 800af10: 687b ldr r3, [r7, #4] 800af12: 699a ldr r2, [r3, #24] 800af14: 4b64 ldr r3, [pc, #400] @ (800b0a8 ) 800af16: 69db ldr r3, [r3, #28] 800af18: f403 63e0 and.w r3, r3, #1792 @ 0x700 800af1c: 429a cmp r2, r3 800af1e: d908 bls.n 800af32 { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 800af20: 4b61 ldr r3, [pc, #388] @ (800b0a8 ) 800af22: 69db ldr r3, [r3, #28] 800af24: f423 62e0 bic.w r2, r3, #1792 @ 0x700 800af28: 687b ldr r3, [r7, #4] 800af2a: 699b ldr r3, [r3, #24] 800af2c: 495e ldr r1, [pc, #376] @ (800b0a8 ) 800af2e: 4313 orrs r3, r2 800af30: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 800af32: 687b ldr r3, [r7, #4] 800af34: 681b ldr r3, [r3, #0] 800af36: f003 0320 and.w r3, r3, #32 800af3a: 2b00 cmp r3, #0 800af3c: d010 beq.n 800af60 { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) > (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 800af3e: 687b ldr r3, [r7, #4] 800af40: 69da ldr r2, [r3, #28] 800af42: 4b59 ldr r3, [pc, #356] @ (800b0a8 ) 800af44: 6a1b ldr r3, [r3, #32] 800af46: f003 0370 and.w r3, r3, #112 @ 0x70 800af4a: 429a cmp r2, r3 800af4c: d908 bls.n 800af60 { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 800af4e: 4b56 ldr r3, [pc, #344] @ (800b0a8 ) 800af50: 6a1b ldr r3, [r3, #32] 800af52: f023 0270 bic.w r2, r3, #112 @ 0x70 800af56: 687b ldr r3, [r7, #4] 800af58: 69db ldr r3, [r3, #28] 800af5a: 4953 ldr r1, [pc, #332] @ (800b0a8 ) 800af5c: 4313 orrs r3, r2 800af5e: 620b str r3, [r1, #32] } #endif } /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 800af60: 687b ldr r3, [r7, #4] 800af62: 681b ldr r3, [r3, #0] 800af64: f003 0302 and.w r3, r3, #2 800af68: 2b00 cmp r3, #0 800af6a: d010 beq.n 800af8e { #if defined (RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) > (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 800af6c: 687b ldr r3, [r7, #4] 800af6e: 68da ldr r2, [r3, #12] 800af70: 4b4d ldr r3, [pc, #308] @ (800b0a8 ) 800af72: 699b ldr r3, [r3, #24] 800af74: f003 030f and.w r3, r3, #15 800af78: 429a cmp r2, r3 800af7a: d908 bls.n 800af8e { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 800af7c: 4b4a ldr r3, [pc, #296] @ (800b0a8 ) 800af7e: 699b ldr r3, [r3, #24] 800af80: f023 020f bic.w r2, r3, #15 800af84: 687b ldr r3, [r7, #4] 800af86: 68db ldr r3, [r3, #12] 800af88: 4947 ldr r1, [pc, #284] @ (800b0a8 ) 800af8a: 4313 orrs r3, r2 800af8c: 618b str r3, [r1, #24] } #endif } /*------------------------- SYSCLK Configuration -------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_SYSCLK) == RCC_CLOCKTYPE_SYSCLK) 800af8e: 687b ldr r3, [r7, #4] 800af90: 681b ldr r3, [r3, #0] 800af92: f003 0301 and.w r3, r3, #1 800af96: 2b00 cmp r3, #0 800af98: d055 beq.n 800b046 { 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); 800af9a: 4b43 ldr r3, [pc, #268] @ (800b0a8 ) 800af9c: 699b ldr r3, [r3, #24] 800af9e: f423 6270 bic.w r2, r3, #3840 @ 0xf00 800afa2: 687b ldr r3, [r7, #4] 800afa4: 689b ldr r3, [r3, #8] 800afa6: 4940 ldr r1, [pc, #256] @ (800b0a8 ) 800afa8: 4313 orrs r3, r2 800afaa: 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) 800afac: 687b ldr r3, [r7, #4] 800afae: 685b ldr r3, [r3, #4] 800afb0: 2b02 cmp r3, #2 800afb2: d107 bne.n 800afc4 { /* Check the HSE ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == 0U) 800afb4: 4b3c ldr r3, [pc, #240] @ (800b0a8 ) 800afb6: 681b ldr r3, [r3, #0] 800afb8: f403 3300 and.w r3, r3, #131072 @ 0x20000 800afbc: 2b00 cmp r3, #0 800afbe: d121 bne.n 800b004 { return HAL_ERROR; 800afc0: 2301 movs r3, #1 800afc2: e0f6 b.n 800b1b2 } } /* PLL is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_PLLCLK) 800afc4: 687b ldr r3, [r7, #4] 800afc6: 685b ldr r3, [r3, #4] 800afc8: 2b03 cmp r3, #3 800afca: d107 bne.n 800afdc { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == 0U) 800afcc: 4b36 ldr r3, [pc, #216] @ (800b0a8 ) 800afce: 681b ldr r3, [r3, #0] 800afd0: f003 7300 and.w r3, r3, #33554432 @ 0x2000000 800afd4: 2b00 cmp r3, #0 800afd6: d115 bne.n 800b004 { return HAL_ERROR; 800afd8: 2301 movs r3, #1 800afda: e0ea b.n 800b1b2 } } /* CSI is selected as System Clock Source */ else if (RCC_ClkInitStruct->SYSCLKSource == RCC_SYSCLKSOURCE_CSI) 800afdc: 687b ldr r3, [r7, #4] 800afde: 685b ldr r3, [r3, #4] 800afe0: 2b01 cmp r3, #1 800afe2: d107 bne.n 800aff4 { /* Check the PLL ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_CSIRDY) == 0U) 800afe4: 4b30 ldr r3, [pc, #192] @ (800b0a8 ) 800afe6: 681b ldr r3, [r3, #0] 800afe8: f403 7380 and.w r3, r3, #256 @ 0x100 800afec: 2b00 cmp r3, #0 800afee: d109 bne.n 800b004 { return HAL_ERROR; 800aff0: 2301 movs r3, #1 800aff2: e0de b.n 800b1b2 } /* HSI is selected as System Clock Source */ else { /* Check the HSI ready flag */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIRDY) == 0U) 800aff4: 4b2c ldr r3, [pc, #176] @ (800b0a8 ) 800aff6: 681b ldr r3, [r3, #0] 800aff8: f003 0304 and.w r3, r3, #4 800affc: 2b00 cmp r3, #0 800affe: d101 bne.n 800b004 { return HAL_ERROR; 800b000: 2301 movs r3, #1 800b002: e0d6 b.n 800b1b2 } } MODIFY_REG(RCC->CFGR, RCC_CFGR_SW, RCC_ClkInitStruct->SYSCLKSource); 800b004: 4b28 ldr r3, [pc, #160] @ (800b0a8 ) 800b006: 691b ldr r3, [r3, #16] 800b008: f023 0207 bic.w r2, r3, #7 800b00c: 687b ldr r3, [r7, #4] 800b00e: 685b ldr r3, [r3, #4] 800b010: 4925 ldr r1, [pc, #148] @ (800b0a8 ) 800b012: 4313 orrs r3, r2 800b014: 610b str r3, [r1, #16] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800b016: f7fa fc11 bl 800583c 800b01a: 6178 str r0, [r7, #20] while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 800b01c: e00a b.n 800b034 { if ((HAL_GetTick() - tickstart) > CLOCKSWITCH_TIMEOUT_VALUE) 800b01e: f7fa fc0d bl 800583c 800b022: 4602 mov r2, r0 800b024: 697b ldr r3, [r7, #20] 800b026: 1ad3 subs r3, r2, r3 800b028: f241 3288 movw r2, #5000 @ 0x1388 800b02c: 4293 cmp r3, r2 800b02e: d901 bls.n 800b034 { return HAL_TIMEOUT; 800b030: 2303 movs r3, #3 800b032: e0be b.n 800b1b2 while (__HAL_RCC_GET_SYSCLK_SOURCE() != (RCC_ClkInitStruct->SYSCLKSource << RCC_CFGR_SWS_Pos)) 800b034: 4b1c ldr r3, [pc, #112] @ (800b0a8 ) 800b036: 691b ldr r3, [r3, #16] 800b038: f003 0238 and.w r2, r3, #56 @ 0x38 800b03c: 687b ldr r3, [r7, #4] 800b03e: 685b ldr r3, [r3, #4] 800b040: 00db lsls r3, r3, #3 800b042: 429a cmp r2, r3 800b044: d1eb bne.n 800b01e } /* Decreasing the BUS frequency divider */ /*-------------------------- HCLK Configuration --------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_HCLK) == RCC_CLOCKTYPE_HCLK) 800b046: 687b ldr r3, [r7, #4] 800b048: 681b ldr r3, [r3, #0] 800b04a: f003 0302 and.w r3, r3, #2 800b04e: 2b00 cmp r3, #0 800b050: d010 beq.n 800b074 { #if defined(RCC_D1CFGR_HPRE) if ((RCC_ClkInitStruct->AHBCLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_HPRE)) 800b052: 687b ldr r3, [r7, #4] 800b054: 68da ldr r2, [r3, #12] 800b056: 4b14 ldr r3, [pc, #80] @ (800b0a8 ) 800b058: 699b ldr r3, [r3, #24] 800b05a: f003 030f and.w r3, r3, #15 800b05e: 429a cmp r2, r3 800b060: d208 bcs.n 800b074 { /* Set the new HCLK clock divider */ assert_param(IS_RCC_HCLK(RCC_ClkInitStruct->AHBCLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_HPRE, RCC_ClkInitStruct->AHBCLKDivider); 800b062: 4b11 ldr r3, [pc, #68] @ (800b0a8 ) 800b064: 699b ldr r3, [r3, #24] 800b066: f023 020f bic.w r2, r3, #15 800b06a: 687b ldr r3, [r7, #4] 800b06c: 68db ldr r3, [r3, #12] 800b06e: 490e ldr r1, [pc, #56] @ (800b0a8 ) 800b070: 4313 orrs r3, r2 800b072: 618b str r3, [r1, #24] } #endif } /* Decreasing the number of wait states because of lower CPU frequency */ if (FLatency < __HAL_FLASH_GET_LATENCY()) 800b074: 4b0b ldr r3, [pc, #44] @ (800b0a4 ) 800b076: 681b ldr r3, [r3, #0] 800b078: f003 030f and.w r3, r3, #15 800b07c: 683a ldr r2, [r7, #0] 800b07e: 429a cmp r2, r3 800b080: d214 bcs.n 800b0ac { /* Program the new number of wait states to the LATENCY bits in the FLASH_ACR register */ __HAL_FLASH_SET_LATENCY(FLatency); 800b082: 4b08 ldr r3, [pc, #32] @ (800b0a4 ) 800b084: 681b ldr r3, [r3, #0] 800b086: f023 020f bic.w r2, r3, #15 800b08a: 4906 ldr r1, [pc, #24] @ (800b0a4 ) 800b08c: 683b ldr r3, [r7, #0] 800b08e: 4313 orrs r3, r2 800b090: 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) 800b092: 4b04 ldr r3, [pc, #16] @ (800b0a4 ) 800b094: 681b ldr r3, [r3, #0] 800b096: f003 030f and.w r3, r3, #15 800b09a: 683a ldr r2, [r7, #0] 800b09c: 429a cmp r2, r3 800b09e: d005 beq.n 800b0ac { return HAL_ERROR; 800b0a0: 2301 movs r3, #1 800b0a2: e086 b.n 800b1b2 800b0a4: 52002000 .word 0x52002000 800b0a8: 58024400 .word 0x58024400 } } /*-------------------------- D1PCLK1/CDPCLK Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D1PCLK1) == RCC_CLOCKTYPE_D1PCLK1) 800b0ac: 687b ldr r3, [r7, #4] 800b0ae: 681b ldr r3, [r3, #0] 800b0b0: f003 0304 and.w r3, r3, #4 800b0b4: 2b00 cmp r3, #0 800b0b6: d010 beq.n 800b0da { #if defined(RCC_D1CFGR_D1PPRE) if ((RCC_ClkInitStruct->APB3CLKDivider) < (RCC->D1CFGR & RCC_D1CFGR_D1PPRE)) 800b0b8: 687b ldr r3, [r7, #4] 800b0ba: 691a ldr r2, [r3, #16] 800b0bc: 4b3f ldr r3, [pc, #252] @ (800b1bc ) 800b0be: 699b ldr r3, [r3, #24] 800b0c0: f003 0370 and.w r3, r3, #112 @ 0x70 800b0c4: 429a cmp r2, r3 800b0c6: d208 bcs.n 800b0da { assert_param(IS_RCC_D1PCLK1(RCC_ClkInitStruct->APB3CLKDivider)); MODIFY_REG(RCC->D1CFGR, RCC_D1CFGR_D1PPRE, RCC_ClkInitStruct->APB3CLKDivider); 800b0c8: 4b3c ldr r3, [pc, #240] @ (800b1bc ) 800b0ca: 699b ldr r3, [r3, #24] 800b0cc: f023 0270 bic.w r2, r3, #112 @ 0x70 800b0d0: 687b ldr r3, [r7, #4] 800b0d2: 691b ldr r3, [r3, #16] 800b0d4: 4939 ldr r1, [pc, #228] @ (800b1bc ) 800b0d6: 4313 orrs r3, r2 800b0d8: 618b str r3, [r1, #24] } #endif } /*-------------------------- PCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK1) == RCC_CLOCKTYPE_PCLK1) 800b0da: 687b ldr r3, [r7, #4] 800b0dc: 681b ldr r3, [r3, #0] 800b0de: f003 0308 and.w r3, r3, #8 800b0e2: 2b00 cmp r3, #0 800b0e4: d010 beq.n 800b108 { #if defined(RCC_D2CFGR_D2PPRE1) if ((RCC_ClkInitStruct->APB1CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE1)) 800b0e6: 687b ldr r3, [r7, #4] 800b0e8: 695a ldr r2, [r3, #20] 800b0ea: 4b34 ldr r3, [pc, #208] @ (800b1bc ) 800b0ec: 69db ldr r3, [r3, #28] 800b0ee: f003 0370 and.w r3, r3, #112 @ 0x70 800b0f2: 429a cmp r2, r3 800b0f4: d208 bcs.n 800b108 { assert_param(IS_RCC_PCLK1(RCC_ClkInitStruct->APB1CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE1, (RCC_ClkInitStruct->APB1CLKDivider)); 800b0f6: 4b31 ldr r3, [pc, #196] @ (800b1bc ) 800b0f8: 69db ldr r3, [r3, #28] 800b0fa: f023 0270 bic.w r2, r3, #112 @ 0x70 800b0fe: 687b ldr r3, [r7, #4] 800b100: 695b ldr r3, [r3, #20] 800b102: 492e ldr r1, [pc, #184] @ (800b1bc ) 800b104: 4313 orrs r3, r2 800b106: 61cb str r3, [r1, #28] } #endif } /*-------------------------- PCLK2 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_PCLK2) == RCC_CLOCKTYPE_PCLK2) 800b108: 687b ldr r3, [r7, #4] 800b10a: 681b ldr r3, [r3, #0] 800b10c: f003 0310 and.w r3, r3, #16 800b110: 2b00 cmp r3, #0 800b112: d010 beq.n 800b136 { #if defined (RCC_D2CFGR_D2PPRE2) if ((RCC_ClkInitStruct->APB2CLKDivider) < (RCC->D2CFGR & RCC_D2CFGR_D2PPRE2)) 800b114: 687b ldr r3, [r7, #4] 800b116: 699a ldr r2, [r3, #24] 800b118: 4b28 ldr r3, [pc, #160] @ (800b1bc ) 800b11a: 69db ldr r3, [r3, #28] 800b11c: f403 63e0 and.w r3, r3, #1792 @ 0x700 800b120: 429a cmp r2, r3 800b122: d208 bcs.n 800b136 { assert_param(IS_RCC_PCLK2(RCC_ClkInitStruct->APB2CLKDivider)); MODIFY_REG(RCC->D2CFGR, RCC_D2CFGR_D2PPRE2, (RCC_ClkInitStruct->APB2CLKDivider)); 800b124: 4b25 ldr r3, [pc, #148] @ (800b1bc ) 800b126: 69db ldr r3, [r3, #28] 800b128: f423 62e0 bic.w r2, r3, #1792 @ 0x700 800b12c: 687b ldr r3, [r7, #4] 800b12e: 699b ldr r3, [r3, #24] 800b130: 4922 ldr r1, [pc, #136] @ (800b1bc ) 800b132: 4313 orrs r3, r2 800b134: 61cb str r3, [r1, #28] } #endif } /*-------------------------- D3PCLK1/SRDPCLK1 Configuration ---------------------------*/ if (((RCC_ClkInitStruct->ClockType) & RCC_CLOCKTYPE_D3PCLK1) == RCC_CLOCKTYPE_D3PCLK1) 800b136: 687b ldr r3, [r7, #4] 800b138: 681b ldr r3, [r3, #0] 800b13a: f003 0320 and.w r3, r3, #32 800b13e: 2b00 cmp r3, #0 800b140: d010 beq.n 800b164 { #if defined(RCC_D3CFGR_D3PPRE) if ((RCC_ClkInitStruct->APB4CLKDivider) < (RCC->D3CFGR & RCC_D3CFGR_D3PPRE)) 800b142: 687b ldr r3, [r7, #4] 800b144: 69da ldr r2, [r3, #28] 800b146: 4b1d ldr r3, [pc, #116] @ (800b1bc ) 800b148: 6a1b ldr r3, [r3, #32] 800b14a: f003 0370 and.w r3, r3, #112 @ 0x70 800b14e: 429a cmp r2, r3 800b150: d208 bcs.n 800b164 { assert_param(IS_RCC_D3PCLK1(RCC_ClkInitStruct->APB4CLKDivider)); MODIFY_REG(RCC->D3CFGR, RCC_D3CFGR_D3PPRE, (RCC_ClkInitStruct->APB4CLKDivider)); 800b152: 4b1a ldr r3, [pc, #104] @ (800b1bc ) 800b154: 6a1b ldr r3, [r3, #32] 800b156: f023 0270 bic.w r2, r3, #112 @ 0x70 800b15a: 687b ldr r3, [r7, #4] 800b15c: 69db ldr r3, [r3, #28] 800b15e: 4917 ldr r1, [pc, #92] @ (800b1bc ) 800b160: 4313 orrs r3, r2 800b162: 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); 800b164: f000 f834 bl 800b1d0 800b168: 4602 mov r2, r0 800b16a: 4b14 ldr r3, [pc, #80] @ (800b1bc ) 800b16c: 699b ldr r3, [r3, #24] 800b16e: 0a1b lsrs r3, r3, #8 800b170: f003 030f and.w r3, r3, #15 800b174: 4912 ldr r1, [pc, #72] @ (800b1c0 ) 800b176: 5ccb ldrb r3, [r1, r3] 800b178: f003 031f and.w r3, r3, #31 800b17c: fa22 f303 lsr.w r3, r2, r3 800b180: 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)); 800b182: 4b0e ldr r3, [pc, #56] @ (800b1bc ) 800b184: 699b ldr r3, [r3, #24] 800b186: f003 030f and.w r3, r3, #15 800b18a: 4a0d ldr r2, [pc, #52] @ (800b1c0 ) 800b18c: 5cd3 ldrb r3, [r2, r3] 800b18e: f003 031f and.w r3, r3, #31 800b192: 693a ldr r2, [r7, #16] 800b194: fa22 f303 lsr.w r3, r2, r3 800b198: 4a0a ldr r2, [pc, #40] @ (800b1c4 ) 800b19a: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 800b19c: 4a0a ldr r2, [pc, #40] @ (800b1c8 ) 800b19e: 693b ldr r3, [r7, #16] 800b1a0: 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); 800b1a2: 4b0a ldr r3, [pc, #40] @ (800b1cc ) 800b1a4: 681b ldr r3, [r3, #0] 800b1a6: 4618 mov r0, r3 800b1a8: f7f8 ff4e bl 8004048 800b1ac: 4603 mov r3, r0 800b1ae: 73fb strb r3, [r7, #15] return halstatus; 800b1b0: 7bfb ldrb r3, [r7, #15] } 800b1b2: 4618 mov r0, r3 800b1b4: 3718 adds r7, #24 800b1b6: 46bd mov sp, r7 800b1b8: bd80 pop {r7, pc} 800b1ba: bf00 nop 800b1bc: 58024400 .word 0x58024400 800b1c0: 08031abc .word 0x08031abc 800b1c4: 24000010 .word 0x24000010 800b1c8: 2400000c .word 0x2400000c 800b1cc: 2400002c .word 0x2400002c 0800b1d0 : * * * @retval SYSCLK frequency */ uint32_t HAL_RCC_GetSysClockFreq(void) { 800b1d0: b480 push {r7} 800b1d2: b089 sub sp, #36 @ 0x24 800b1d4: af00 add r7, sp, #0 float_t fracn1, pllvco; uint32_t sysclockfreq; /* Get SYSCLK source -------------------------------------------------------*/ switch (RCC->CFGR & RCC_CFGR_SWS) 800b1d6: 4bb3 ldr r3, [pc, #716] @ (800b4a4 ) 800b1d8: 691b ldr r3, [r3, #16] 800b1da: f003 0338 and.w r3, r3, #56 @ 0x38 800b1de: 2b18 cmp r3, #24 800b1e0: f200 8155 bhi.w 800b48e 800b1e4: a201 add r2, pc, #4 @ (adr r2, 800b1ec ) 800b1e6: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b1ea: bf00 nop 800b1ec: 0800b251 .word 0x0800b251 800b1f0: 0800b48f .word 0x0800b48f 800b1f4: 0800b48f .word 0x0800b48f 800b1f8: 0800b48f .word 0x0800b48f 800b1fc: 0800b48f .word 0x0800b48f 800b200: 0800b48f .word 0x0800b48f 800b204: 0800b48f .word 0x0800b48f 800b208: 0800b48f .word 0x0800b48f 800b20c: 0800b277 .word 0x0800b277 800b210: 0800b48f .word 0x0800b48f 800b214: 0800b48f .word 0x0800b48f 800b218: 0800b48f .word 0x0800b48f 800b21c: 0800b48f .word 0x0800b48f 800b220: 0800b48f .word 0x0800b48f 800b224: 0800b48f .word 0x0800b48f 800b228: 0800b48f .word 0x0800b48f 800b22c: 0800b27d .word 0x0800b27d 800b230: 0800b48f .word 0x0800b48f 800b234: 0800b48f .word 0x0800b48f 800b238: 0800b48f .word 0x0800b48f 800b23c: 0800b48f .word 0x0800b48f 800b240: 0800b48f .word 0x0800b48f 800b244: 0800b48f .word 0x0800b48f 800b248: 0800b48f .word 0x0800b48f 800b24c: 0800b283 .word 0x0800b283 { case RCC_CFGR_SWS_HSI: /* HSI used as system clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800b250: 4b94 ldr r3, [pc, #592] @ (800b4a4 ) 800b252: 681b ldr r3, [r3, #0] 800b254: f003 0320 and.w r3, r3, #32 800b258: 2b00 cmp r3, #0 800b25a: d009 beq.n 800b270 { sysclockfreq = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800b25c: 4b91 ldr r3, [pc, #580] @ (800b4a4 ) 800b25e: 681b ldr r3, [r3, #0] 800b260: 08db lsrs r3, r3, #3 800b262: f003 0303 and.w r3, r3, #3 800b266: 4a90 ldr r2, [pc, #576] @ (800b4a8 ) 800b268: fa22 f303 lsr.w r3, r2, r3 800b26c: 61bb str r3, [r7, #24] else { sysclockfreq = (uint32_t) HSI_VALUE; } break; 800b26e: e111 b.n 800b494 sysclockfreq = (uint32_t) HSI_VALUE; 800b270: 4b8d ldr r3, [pc, #564] @ (800b4a8 ) 800b272: 61bb str r3, [r7, #24] break; 800b274: e10e b.n 800b494 case RCC_CFGR_SWS_CSI: /* CSI used as system clock source */ sysclockfreq = CSI_VALUE; 800b276: 4b8d ldr r3, [pc, #564] @ (800b4ac ) 800b278: 61bb str r3, [r7, #24] break; 800b27a: e10b b.n 800b494 case RCC_CFGR_SWS_HSE: /* HSE used as system clock source */ sysclockfreq = HSE_VALUE; 800b27c: 4b8c ldr r3, [pc, #560] @ (800b4b0 ) 800b27e: 61bb str r3, [r7, #24] break; 800b280: e108 b.n 800b494 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); 800b282: 4b88 ldr r3, [pc, #544] @ (800b4a4 ) 800b284: 6a9b ldr r3, [r3, #40] @ 0x28 800b286: f003 0303 and.w r3, r3, #3 800b28a: 617b str r3, [r7, #20] pllm = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM1) >> 4) ; 800b28c: 4b85 ldr r3, [pc, #532] @ (800b4a4 ) 800b28e: 6a9b ldr r3, [r3, #40] @ 0x28 800b290: 091b lsrs r3, r3, #4 800b292: f003 033f and.w r3, r3, #63 @ 0x3f 800b296: 613b str r3, [r7, #16] pllfracen = ((RCC-> PLLCFGR & RCC_PLLCFGR_PLL1FRACEN) >> RCC_PLLCFGR_PLL1FRACEN_Pos); 800b298: 4b82 ldr r3, [pc, #520] @ (800b4a4 ) 800b29a: 6adb ldr r3, [r3, #44] @ 0x2c 800b29c: f003 0301 and.w r3, r3, #1 800b2a0: 60fb str r3, [r7, #12] fracn1 = (float_t)(uint32_t)(pllfracen * ((RCC->PLL1FRACR & RCC_PLL1FRACR_FRACN1) >> 3)); 800b2a2: 4b80 ldr r3, [pc, #512] @ (800b4a4 ) 800b2a4: 6b5b ldr r3, [r3, #52] @ 0x34 800b2a6: 08db lsrs r3, r3, #3 800b2a8: f3c3 030c ubfx r3, r3, #0, #13 800b2ac: 68fa ldr r2, [r7, #12] 800b2ae: fb02 f303 mul.w r3, r2, r3 800b2b2: ee07 3a90 vmov s15, r3 800b2b6: eef8 7a67 vcvt.f32.u32 s15, s15 800b2ba: edc7 7a02 vstr s15, [r7, #8] if (pllm != 0U) 800b2be: 693b ldr r3, [r7, #16] 800b2c0: 2b00 cmp r3, #0 800b2c2: f000 80e1 beq.w 800b488 800b2c6: 697b ldr r3, [r7, #20] 800b2c8: 2b02 cmp r3, #2 800b2ca: f000 8083 beq.w 800b3d4 800b2ce: 697b ldr r3, [r7, #20] 800b2d0: 2b02 cmp r3, #2 800b2d2: f200 80a1 bhi.w 800b418 800b2d6: 697b ldr r3, [r7, #20] 800b2d8: 2b00 cmp r3, #0 800b2da: d003 beq.n 800b2e4 800b2dc: 697b ldr r3, [r7, #20] 800b2de: 2b01 cmp r3, #1 800b2e0: d056 beq.n 800b390 800b2e2: e099 b.n 800b418 { switch (pllsource) { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800b2e4: 4b6f ldr r3, [pc, #444] @ (800b4a4 ) 800b2e6: 681b ldr r3, [r3, #0] 800b2e8: f003 0320 and.w r3, r3, #32 800b2ec: 2b00 cmp r3, #0 800b2ee: d02d beq.n 800b34c { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800b2f0: 4b6c ldr r3, [pc, #432] @ (800b4a4 ) 800b2f2: 681b ldr r3, [r3, #0] 800b2f4: 08db lsrs r3, r3, #3 800b2f6: f003 0303 and.w r3, r3, #3 800b2fa: 4a6b ldr r2, [pc, #428] @ (800b4a8 ) 800b2fc: fa22 f303 lsr.w r3, r2, r3 800b300: 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); 800b302: 687b ldr r3, [r7, #4] 800b304: ee07 3a90 vmov s15, r3 800b308: eef8 6a67 vcvt.f32.u32 s13, s15 800b30c: 693b ldr r3, [r7, #16] 800b30e: ee07 3a90 vmov s15, r3 800b312: eef8 7a67 vcvt.f32.u32 s15, s15 800b316: ee86 7aa7 vdiv.f32 s14, s13, s15 800b31a: 4b62 ldr r3, [pc, #392] @ (800b4a4 ) 800b31c: 6b1b ldr r3, [r3, #48] @ 0x30 800b31e: f3c3 0308 ubfx r3, r3, #0, #9 800b322: ee07 3a90 vmov s15, r3 800b326: eef8 6a67 vcvt.f32.u32 s13, s15 800b32a: ed97 6a02 vldr s12, [r7, #8] 800b32e: eddf 5a61 vldr s11, [pc, #388] @ 800b4b4 800b332: eec6 7a25 vdiv.f32 s15, s12, s11 800b336: ee76 7aa7 vadd.f32 s15, s13, s15 800b33a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b33e: ee77 7aa6 vadd.f32 s15, s15, s13 800b342: ee67 7a27 vmul.f32 s15, s14, s15 800b346: 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; 800b34a: e087 b.n 800b45c pllvco = ((float_t)HSI_VALUE / (float_t)pllm) * ((float_t)(uint32_t)(RCC->PLL1DIVR & RCC_PLL1DIVR_N1) + (fracn1 / (float_t)0x2000) + (float_t)1); 800b34c: 693b ldr r3, [r7, #16] 800b34e: ee07 3a90 vmov s15, r3 800b352: eef8 7a67 vcvt.f32.u32 s15, s15 800b356: eddf 6a58 vldr s13, [pc, #352] @ 800b4b8 800b35a: ee86 7aa7 vdiv.f32 s14, s13, s15 800b35e: 4b51 ldr r3, [pc, #324] @ (800b4a4 ) 800b360: 6b1b ldr r3, [r3, #48] @ 0x30 800b362: f3c3 0308 ubfx r3, r3, #0, #9 800b366: ee07 3a90 vmov s15, r3 800b36a: eef8 6a67 vcvt.f32.u32 s13, s15 800b36e: ed97 6a02 vldr s12, [r7, #8] 800b372: eddf 5a50 vldr s11, [pc, #320] @ 800b4b4 800b376: eec6 7a25 vdiv.f32 s15, s12, s11 800b37a: ee76 7aa7 vadd.f32 s15, s13, s15 800b37e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b382: ee77 7aa6 vadd.f32 s15, s15, s13 800b386: ee67 7a27 vmul.f32 s15, s14, s15 800b38a: edc7 7a07 vstr s15, [r7, #28] break; 800b38e: e065 b.n 800b45c 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); 800b390: 693b ldr r3, [r7, #16] 800b392: ee07 3a90 vmov s15, r3 800b396: eef8 7a67 vcvt.f32.u32 s15, s15 800b39a: eddf 6a48 vldr s13, [pc, #288] @ 800b4bc 800b39e: ee86 7aa7 vdiv.f32 s14, s13, s15 800b3a2: 4b40 ldr r3, [pc, #256] @ (800b4a4 ) 800b3a4: 6b1b ldr r3, [r3, #48] @ 0x30 800b3a6: f3c3 0308 ubfx r3, r3, #0, #9 800b3aa: ee07 3a90 vmov s15, r3 800b3ae: eef8 6a67 vcvt.f32.u32 s13, s15 800b3b2: ed97 6a02 vldr s12, [r7, #8] 800b3b6: eddf 5a3f vldr s11, [pc, #252] @ 800b4b4 800b3ba: eec6 7a25 vdiv.f32 s15, s12, s11 800b3be: ee76 7aa7 vadd.f32 s15, s13, s15 800b3c2: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b3c6: ee77 7aa6 vadd.f32 s15, s15, s13 800b3ca: ee67 7a27 vmul.f32 s15, s14, s15 800b3ce: edc7 7a07 vstr s15, [r7, #28] break; 800b3d2: e043 b.n 800b45c 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); 800b3d4: 693b ldr r3, [r7, #16] 800b3d6: ee07 3a90 vmov s15, r3 800b3da: eef8 7a67 vcvt.f32.u32 s15, s15 800b3de: eddf 6a38 vldr s13, [pc, #224] @ 800b4c0 800b3e2: ee86 7aa7 vdiv.f32 s14, s13, s15 800b3e6: 4b2f ldr r3, [pc, #188] @ (800b4a4 ) 800b3e8: 6b1b ldr r3, [r3, #48] @ 0x30 800b3ea: f3c3 0308 ubfx r3, r3, #0, #9 800b3ee: ee07 3a90 vmov s15, r3 800b3f2: eef8 6a67 vcvt.f32.u32 s13, s15 800b3f6: ed97 6a02 vldr s12, [r7, #8] 800b3fa: eddf 5a2e vldr s11, [pc, #184] @ 800b4b4 800b3fe: eec6 7a25 vdiv.f32 s15, s12, s11 800b402: ee76 7aa7 vadd.f32 s15, s13, s15 800b406: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b40a: ee77 7aa6 vadd.f32 s15, s15, s13 800b40e: ee67 7a27 vmul.f32 s15, s14, s15 800b412: edc7 7a07 vstr s15, [r7, #28] break; 800b416: e021 b.n 800b45c 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); 800b418: 693b ldr r3, [r7, #16] 800b41a: ee07 3a90 vmov s15, r3 800b41e: eef8 7a67 vcvt.f32.u32 s15, s15 800b422: eddf 6a26 vldr s13, [pc, #152] @ 800b4bc 800b426: ee86 7aa7 vdiv.f32 s14, s13, s15 800b42a: 4b1e ldr r3, [pc, #120] @ (800b4a4 ) 800b42c: 6b1b ldr r3, [r3, #48] @ 0x30 800b42e: f3c3 0308 ubfx r3, r3, #0, #9 800b432: ee07 3a90 vmov s15, r3 800b436: eef8 6a67 vcvt.f32.u32 s13, s15 800b43a: ed97 6a02 vldr s12, [r7, #8] 800b43e: eddf 5a1d vldr s11, [pc, #116] @ 800b4b4 800b442: eec6 7a25 vdiv.f32 s15, s12, s11 800b446: ee76 7aa7 vadd.f32 s15, s13, s15 800b44a: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800b44e: ee77 7aa6 vadd.f32 s15, s15, s13 800b452: ee67 7a27 vmul.f32 s15, s14, s15 800b456: edc7 7a07 vstr s15, [r7, #28] break; 800b45a: bf00 nop } pllp = (((RCC->PLL1DIVR & RCC_PLL1DIVR_P1) >> 9) + 1U) ; 800b45c: 4b11 ldr r3, [pc, #68] @ (800b4a4 ) 800b45e: 6b1b ldr r3, [r3, #48] @ 0x30 800b460: 0a5b lsrs r3, r3, #9 800b462: f003 037f and.w r3, r3, #127 @ 0x7f 800b466: 3301 adds r3, #1 800b468: 603b str r3, [r7, #0] sysclockfreq = (uint32_t)(float_t)(pllvco / (float_t)pllp); 800b46a: 683b ldr r3, [r7, #0] 800b46c: ee07 3a90 vmov s15, r3 800b470: eeb8 7a67 vcvt.f32.u32 s14, s15 800b474: edd7 6a07 vldr s13, [r7, #28] 800b478: eec6 7a87 vdiv.f32 s15, s13, s14 800b47c: eefc 7ae7 vcvt.u32.f32 s15, s15 800b480: ee17 3a90 vmov r3, s15 800b484: 61bb str r3, [r7, #24] } else { sysclockfreq = 0U; } break; 800b486: e005 b.n 800b494 sysclockfreq = 0U; 800b488: 2300 movs r3, #0 800b48a: 61bb str r3, [r7, #24] break; 800b48c: e002 b.n 800b494 default: sysclockfreq = CSI_VALUE; 800b48e: 4b07 ldr r3, [pc, #28] @ (800b4ac ) 800b490: 61bb str r3, [r7, #24] break; 800b492: bf00 nop } return sysclockfreq; 800b494: 69bb ldr r3, [r7, #24] } 800b496: 4618 mov r0, r3 800b498: 3724 adds r7, #36 @ 0x24 800b49a: 46bd mov sp, r7 800b49c: f85d 7b04 ldr.w r7, [sp], #4 800b4a0: 4770 bx lr 800b4a2: bf00 nop 800b4a4: 58024400 .word 0x58024400 800b4a8: 03d09000 .word 0x03d09000 800b4ac: 003d0900 .word 0x003d0900 800b4b0: 017d7840 .word 0x017d7840 800b4b4: 46000000 .word 0x46000000 800b4b8: 4c742400 .word 0x4c742400 800b4bc: 4a742400 .word 0x4a742400 800b4c0: 4bbebc20 .word 0x4bbebc20 0800b4c4 : * @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) { 800b4c4: b580 push {r7, lr} 800b4c6: b082 sub sp, #8 800b4c8: 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); 800b4ca: f7ff fe81 bl 800b1d0 800b4ce: 4602 mov r2, r0 800b4d0: 4b10 ldr r3, [pc, #64] @ (800b514 ) 800b4d2: 699b ldr r3, [r3, #24] 800b4d4: 0a1b lsrs r3, r3, #8 800b4d6: f003 030f and.w r3, r3, #15 800b4da: 490f ldr r1, [pc, #60] @ (800b518 ) 800b4dc: 5ccb ldrb r3, [r1, r3] 800b4de: f003 031f and.w r3, r3, #31 800b4e2: fa22 f303 lsr.w r3, r2, r3 800b4e6: 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)); 800b4e8: 4b0a ldr r3, [pc, #40] @ (800b514 ) 800b4ea: 699b ldr r3, [r3, #24] 800b4ec: f003 030f and.w r3, r3, #15 800b4f0: 4a09 ldr r2, [pc, #36] @ (800b518 ) 800b4f2: 5cd3 ldrb r3, [r2, r3] 800b4f4: f003 031f and.w r3, r3, #31 800b4f8: 687a ldr r2, [r7, #4] 800b4fa: fa22 f303 lsr.w r3, r2, r3 800b4fe: 4a07 ldr r2, [pc, #28] @ (800b51c ) 800b500: 6013 str r3, [r2, #0] #endif #if defined(DUAL_CORE) && defined(CORE_CM4) SystemCoreClock = SystemD2Clock; #else SystemCoreClock = common_system_clock; 800b502: 4a07 ldr r2, [pc, #28] @ (800b520 ) 800b504: 687b ldr r3, [r7, #4] 800b506: 6013 str r3, [r2, #0] #endif /* DUAL_CORE && CORE_CM4 */ return SystemD2Clock; 800b508: 4b04 ldr r3, [pc, #16] @ (800b51c ) 800b50a: 681b ldr r3, [r3, #0] } 800b50c: 4618 mov r0, r3 800b50e: 3708 adds r7, #8 800b510: 46bd mov sp, r7 800b512: bd80 pop {r7, pc} 800b514: 58024400 .word 0x58024400 800b518: 08031abc .word 0x08031abc 800b51c: 24000010 .word 0x24000010 800b520: 2400000c .word 0x2400000c 0800b524 : * @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) { 800b524: b580 push {r7, lr} 800b526: 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)); 800b528: f7ff ffcc bl 800b4c4 800b52c: 4602 mov r2, r0 800b52e: 4b06 ldr r3, [pc, #24] @ (800b548 ) 800b530: 69db ldr r3, [r3, #28] 800b532: 091b lsrs r3, r3, #4 800b534: f003 0307 and.w r3, r3, #7 800b538: 4904 ldr r1, [pc, #16] @ (800b54c ) 800b53a: 5ccb ldrb r3, [r1, r3] 800b53c: f003 031f and.w r3, r3, #31 800b540: 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 } 800b544: 4618 mov r0, r3 800b546: bd80 pop {r7, pc} 800b548: 58024400 .word 0x58024400 800b54c: 08031abc .word 0x08031abc 0800b550 : * @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) { 800b550: b580 push {r7, lr} 800b552: 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)); 800b554: f7ff ffb6 bl 800b4c4 800b558: 4602 mov r2, r0 800b55a: 4b06 ldr r3, [pc, #24] @ (800b574 ) 800b55c: 69db ldr r3, [r3, #28] 800b55e: 0a1b lsrs r3, r3, #8 800b560: f003 0307 and.w r3, r3, #7 800b564: 4904 ldr r1, [pc, #16] @ (800b578 ) 800b566: 5ccb ldrb r3, [r1, r3] 800b568: f003 031f and.w r3, r3, #31 800b56c: fa22 f303 lsr.w r3, r2, r3 #else return (HAL_RCC_GetHCLKFreq() >> ((D1CorePrescTable[(RCC->CDCFGR2 & RCC_CDCFGR2_CDPPRE2) >> RCC_CDCFGR2_CDPPRE2_Pos]) & 0x1FU)); #endif } 800b570: 4618 mov r0, r3 800b572: bd80 pop {r7, pc} 800b574: 58024400 .word 0x58024400 800b578: 08031abc .word 0x08031abc 0800b57c : * will be configured. * @param pFLatency: Pointer on the Flash Latency. * @retval None */ void HAL_RCC_GetClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t *pFLatency) { 800b57c: b480 push {r7} 800b57e: b083 sub sp, #12 800b580: af00 add r7, sp, #0 800b582: 6078 str r0, [r7, #4] 800b584: 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 | 800b586: 687b ldr r3, [r7, #4] 800b588: 223f movs r2, #63 @ 0x3f 800b58a: 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); 800b58c: 4b1a ldr r3, [pc, #104] @ (800b5f8 ) 800b58e: 691b ldr r3, [r3, #16] 800b590: f003 0207 and.w r2, r3, #7 800b594: 687b ldr r3, [r7, #4] 800b596: 605a str r2, [r3, #4] #if defined(RCC_D1CFGR_D1CPRE) /* Get the SYSCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->SYSCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1CPRE); 800b598: 4b17 ldr r3, [pc, #92] @ (800b5f8 ) 800b59a: 699b ldr r3, [r3, #24] 800b59c: f403 6270 and.w r2, r3, #3840 @ 0xf00 800b5a0: 687b ldr r3, [r7, #4] 800b5a2: 609a str r2, [r3, #8] /* Get the D1HCLK configuration ----------------------------------------------*/ RCC_ClkInitStruct->AHBCLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_HPRE); 800b5a4: 4b14 ldr r3, [pc, #80] @ (800b5f8 ) 800b5a6: 699b ldr r3, [r3, #24] 800b5a8: f003 020f and.w r2, r3, #15 800b5ac: 687b ldr r3, [r7, #4] 800b5ae: 60da str r2, [r3, #12] /* Get the APB3 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB3CLKDivider = (uint32_t)(RCC->D1CFGR & RCC_D1CFGR_D1PPRE); 800b5b0: 4b11 ldr r3, [pc, #68] @ (800b5f8 ) 800b5b2: 699b ldr r3, [r3, #24] 800b5b4: f003 0270 and.w r2, r3, #112 @ 0x70 800b5b8: 687b ldr r3, [r7, #4] 800b5ba: 611a str r2, [r3, #16] /* Get the APB1 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB1CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE1); 800b5bc: 4b0e ldr r3, [pc, #56] @ (800b5f8 ) 800b5be: 69db ldr r3, [r3, #28] 800b5c0: f003 0270 and.w r2, r3, #112 @ 0x70 800b5c4: 687b ldr r3, [r7, #4] 800b5c6: 615a str r2, [r3, #20] /* Get the APB2 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB2CLKDivider = (uint32_t)(RCC->D2CFGR & RCC_D2CFGR_D2PPRE2); 800b5c8: 4b0b ldr r3, [pc, #44] @ (800b5f8 ) 800b5ca: 69db ldr r3, [r3, #28] 800b5cc: f403 62e0 and.w r2, r3, #1792 @ 0x700 800b5d0: 687b ldr r3, [r7, #4] 800b5d2: 619a str r2, [r3, #24] /* Get the APB4 configuration ----------------------------------------------*/ RCC_ClkInitStruct->APB4CLKDivider = (uint32_t)(RCC->D3CFGR & RCC_D3CFGR_D3PPRE); 800b5d4: 4b08 ldr r3, [pc, #32] @ (800b5f8 ) 800b5d6: 6a1b ldr r3, [r3, #32] 800b5d8: f003 0270 and.w r2, r3, #112 @ 0x70 800b5dc: 687b ldr r3, [r7, #4] 800b5de: 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); 800b5e0: 4b06 ldr r3, [pc, #24] @ (800b5fc ) 800b5e2: 681b ldr r3, [r3, #0] 800b5e4: f003 020f and.w r2, r3, #15 800b5e8: 683b ldr r3, [r7, #0] 800b5ea: 601a str r2, [r3, #0] } 800b5ec: bf00 nop 800b5ee: 370c adds r7, #12 800b5f0: 46bd mov sp, r7 800b5f2: f85d 7b04 ldr.w r7, [sp], #4 800b5f6: 4770 bx lr 800b5f8: 58024400 .word 0x58024400 800b5fc: 52002000 .word 0x52002000 0800b600 : * (*) : Available on some STM32H7 lines only. * * @retval HAL status */ HAL_StatusTypeDef HAL_RCCEx_PeriphCLKConfig(RCC_PeriphCLKInitTypeDef *PeriphClkInit) { 800b600: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} 800b604: b0c8 sub sp, #288 @ 0x120 800b606: af00 add r7, sp, #0 800b608: f8c7 010c str.w r0, [r7, #268] @ 0x10c uint32_t tmpreg; uint32_t tickstart; HAL_StatusTypeDef ret = HAL_OK; /* Intermediate status */ 800b60c: 2300 movs r3, #0 800b60e: f887 311f strb.w r3, [r7, #287] @ 0x11f HAL_StatusTypeDef status = HAL_OK; /* Final status */ 800b612: 2300 movs r3, #0 800b614: f887 311e strb.w r3, [r7, #286] @ 0x11e /*---------------------------- SPDIFRX configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPDIFRX) == RCC_PERIPHCLK_SPDIFRX) 800b618: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b61c: e9d3 2300 ldrd r2, r3, [r3] 800b620: f002 6400 and.w r4, r2, #134217728 @ 0x8000000 800b624: 2500 movs r5, #0 800b626: ea54 0305 orrs.w r3, r4, r5 800b62a: d049 beq.n 800b6c0 { switch (PeriphClkInit->SpdifrxClockSelection) 800b62c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b630: 6e9b ldr r3, [r3, #104] @ 0x68 800b632: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800b636: d02f beq.n 800b698 800b638: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800b63c: d828 bhi.n 800b690 800b63e: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800b642: d01a beq.n 800b67a 800b644: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800b648: d822 bhi.n 800b690 800b64a: 2b00 cmp r3, #0 800b64c: d003 beq.n 800b656 800b64e: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800b652: d007 beq.n 800b664 800b654: e01c b.n 800b690 { 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); 800b656: 4bb8 ldr r3, [pc, #736] @ (800b938 ) 800b658: 6adb ldr r3, [r3, #44] @ 0x2c 800b65a: 4ab7 ldr r2, [pc, #732] @ (800b938 ) 800b65c: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b660: 62d3 str r3, [r2, #44] @ 0x2c /* SPDIFRX clock source configuration done later after clock selection check */ break; 800b662: e01a b.n 800b69a case RCC_SPDIFRXCLKSOURCE_PLL2: /* PLL2 is used as clock source for SPDIFRX*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800b664: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b668: 3308 adds r3, #8 800b66a: 2102 movs r1, #2 800b66c: 4618 mov r0, r3 800b66e: f001 fc73 bl 800cf58 800b672: 4603 mov r3, r0 800b674: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPDIFRX clock source configuration done later after clock selection check */ break; 800b678: e00f b.n 800b69a case RCC_SPDIFRXCLKSOURCE_PLL3: /* PLL3 is used as clock source for SPDIFRX*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800b67a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b67e: 3328 adds r3, #40 @ 0x28 800b680: 2102 movs r1, #2 800b682: 4618 mov r0, r3 800b684: f001 fd1a bl 800d0bc 800b688: 4603 mov r3, r0 800b68a: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPDIFRX clock source configuration done later after clock selection check */ break; 800b68e: e004 b.n 800b69a /* 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; 800b690: 2301 movs r3, #1 800b692: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b696: e000 b.n 800b69a break; 800b698: bf00 nop } if (ret == HAL_OK) 800b69a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b69e: 2b00 cmp r3, #0 800b6a0: d10a bne.n 800b6b8 { /* Set the source of SPDIFRX clock*/ __HAL_RCC_SPDIFRX_CONFIG(PeriphClkInit->SpdifrxClockSelection); 800b6a2: 4ba5 ldr r3, [pc, #660] @ (800b938 ) 800b6a4: 6d1b ldr r3, [r3, #80] @ 0x50 800b6a6: f423 1140 bic.w r1, r3, #3145728 @ 0x300000 800b6aa: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6ae: 6e9b ldr r3, [r3, #104] @ 0x68 800b6b0: 4aa1 ldr r2, [pc, #644] @ (800b938 ) 800b6b2: 430b orrs r3, r1 800b6b4: 6513 str r3, [r2, #80] @ 0x50 800b6b6: e003 b.n 800b6c0 } else { /* set overall return value */ status = ret; 800b6b8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b6bc: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SAI1 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI1) == RCC_PERIPHCLK_SAI1) 800b6c0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6c4: e9d3 2300 ldrd r2, r3, [r3] 800b6c8: f402 7880 and.w r8, r2, #256 @ 0x100 800b6cc: f04f 0900 mov.w r9, #0 800b6d0: ea58 0309 orrs.w r3, r8, r9 800b6d4: d047 beq.n 800b766 { switch (PeriphClkInit->Sai1ClockSelection) 800b6d6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b6da: 6d9b ldr r3, [r3, #88] @ 0x58 800b6dc: 2b04 cmp r3, #4 800b6de: d82a bhi.n 800b736 800b6e0: a201 add r2, pc, #4 @ (adr r2, 800b6e8 ) 800b6e2: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800b6e6: bf00 nop 800b6e8: 0800b6fd .word 0x0800b6fd 800b6ec: 0800b70b .word 0x0800b70b 800b6f0: 0800b721 .word 0x0800b721 800b6f4: 0800b73f .word 0x0800b73f 800b6f8: 0800b73f .word 0x0800b73f { 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); 800b6fc: 4b8e ldr r3, [pc, #568] @ (800b938 ) 800b6fe: 6adb ldr r3, [r3, #44] @ 0x2c 800b700: 4a8d ldr r2, [pc, #564] @ (800b938 ) 800b702: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b706: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800b708: e01a b.n 800b740 case RCC_SAI1CLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI1*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b70a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b70e: 3308 adds r3, #8 800b710: 2100 movs r1, #0 800b712: 4618 mov r0, r3 800b714: f001 fc20 bl 800cf58 800b718: 4603 mov r3, r0 800b71a: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b71e: e00f b.n 800b740 case RCC_SAI1CLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI1*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b720: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b724: 3328 adds r3, #40 @ 0x28 800b726: 2100 movs r1, #0 800b728: 4618 mov r0, r3 800b72a: f001 fcc7 bl 800d0bc 800b72e: 4603 mov r3, r0 800b730: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b734: e004 b.n 800b740 /* 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; 800b736: 2301 movs r3, #1 800b738: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b73c: e000 b.n 800b740 break; 800b73e: bf00 nop } if (ret == HAL_OK) 800b740: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b744: 2b00 cmp r3, #0 800b746: d10a bne.n 800b75e { /* Set the source of SAI1 clock*/ __HAL_RCC_SAI1_CONFIG(PeriphClkInit->Sai1ClockSelection); 800b748: 4b7b ldr r3, [pc, #492] @ (800b938 ) 800b74a: 6d1b ldr r3, [r3, #80] @ 0x50 800b74c: f023 0107 bic.w r1, r3, #7 800b750: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b754: 6d9b ldr r3, [r3, #88] @ 0x58 800b756: 4a78 ldr r2, [pc, #480] @ (800b938 ) 800b758: 430b orrs r3, r1 800b75a: 6513 str r3, [r2, #80] @ 0x50 800b75c: e003 b.n 800b766 } else { /* set overall return value */ status = ret; 800b75e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b762: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #if defined(SAI3) /*---------------------------- SAI2/3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI23) == RCC_PERIPHCLK_SAI23) 800b766: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b76a: e9d3 2300 ldrd r2, r3, [r3] 800b76e: f402 7a00 and.w sl, r2, #512 @ 0x200 800b772: f04f 0b00 mov.w fp, #0 800b776: ea5a 030b orrs.w r3, sl, fp 800b77a: d04c beq.n 800b816 { switch (PeriphClkInit->Sai23ClockSelection) 800b77c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b780: 6ddb ldr r3, [r3, #92] @ 0x5c 800b782: f5b3 7f80 cmp.w r3, #256 @ 0x100 800b786: d030 beq.n 800b7ea 800b788: f5b3 7f80 cmp.w r3, #256 @ 0x100 800b78c: d829 bhi.n 800b7e2 800b78e: 2bc0 cmp r3, #192 @ 0xc0 800b790: d02d beq.n 800b7ee 800b792: 2bc0 cmp r3, #192 @ 0xc0 800b794: d825 bhi.n 800b7e2 800b796: 2b80 cmp r3, #128 @ 0x80 800b798: d018 beq.n 800b7cc 800b79a: 2b80 cmp r3, #128 @ 0x80 800b79c: d821 bhi.n 800b7e2 800b79e: 2b00 cmp r3, #0 800b7a0: d002 beq.n 800b7a8 800b7a2: 2b40 cmp r3, #64 @ 0x40 800b7a4: d007 beq.n 800b7b6 800b7a6: e01c b.n 800b7e2 { 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); 800b7a8: 4b63 ldr r3, [pc, #396] @ (800b938 ) 800b7aa: 6adb ldr r3, [r3, #44] @ 0x2c 800b7ac: 4a62 ldr r2, [pc, #392] @ (800b938 ) 800b7ae: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b7b2: 62d3 str r3, [r2, #44] @ 0x2c /* SAI2/3 clock source configuration done later after clock selection check */ break; 800b7b4: e01c b.n 800b7f0 case RCC_SAI23CLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2/3 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b7b6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b7ba: 3308 adds r3, #8 800b7bc: 2100 movs r1, #0 800b7be: 4618 mov r0, r3 800b7c0: f001 fbca bl 800cf58 800b7c4: 4603 mov r3, r0 800b7c6: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2/3 clock source configuration done later after clock selection check */ break; 800b7ca: e011 b.n 800b7f0 case RCC_SAI23CLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2/3 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b7cc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b7d0: 3328 adds r3, #40 @ 0x28 800b7d2: 2100 movs r1, #0 800b7d4: 4618 mov r0, r3 800b7d6: f001 fc71 bl 800d0bc 800b7da: 4603 mov r3, r0 800b7dc: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2/3 clock source configuration done later after clock selection check */ break; 800b7e0: e006 b.n 800b7f0 /* 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; 800b7e2: 2301 movs r3, #1 800b7e4: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b7e8: e002 b.n 800b7f0 break; 800b7ea: bf00 nop 800b7ec: e000 b.n 800b7f0 break; 800b7ee: bf00 nop } if (ret == HAL_OK) 800b7f0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b7f4: 2b00 cmp r3, #0 800b7f6: d10a bne.n 800b80e { /* Set the source of SAI2/3 clock*/ __HAL_RCC_SAI23_CONFIG(PeriphClkInit->Sai23ClockSelection); 800b7f8: 4b4f ldr r3, [pc, #316] @ (800b938 ) 800b7fa: 6d1b ldr r3, [r3, #80] @ 0x50 800b7fc: f423 71e0 bic.w r1, r3, #448 @ 0x1c0 800b800: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b804: 6ddb ldr r3, [r3, #92] @ 0x5c 800b806: 4a4c ldr r2, [pc, #304] @ (800b938 ) 800b808: 430b orrs r3, r1 800b80a: 6513 str r3, [r2, #80] @ 0x50 800b80c: e003 b.n 800b816 } else { /* set overall return value */ status = ret; 800b80e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b812: f887 311e strb.w r3, [r7, #286] @ 0x11e } #endif /*SAI2B*/ #if defined(SAI4) /*---------------------------- SAI4A configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI4A) == RCC_PERIPHCLK_SAI4A) 800b816: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b81a: e9d3 2300 ldrd r2, r3, [r3] 800b81e: f402 6380 and.w r3, r2, #1024 @ 0x400 800b822: f8c7 3100 str.w r3, [r7, #256] @ 0x100 800b826: 2300 movs r3, #0 800b828: f8c7 3104 str.w r3, [r7, #260] @ 0x104 800b82c: e9d7 1240 ldrd r1, r2, [r7, #256] @ 0x100 800b830: 460b mov r3, r1 800b832: 4313 orrs r3, r2 800b834: d053 beq.n 800b8de { switch (PeriphClkInit->Sai4AClockSelection) 800b836: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b83a: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8 800b83e: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 800b842: d035 beq.n 800b8b0 800b844: f5b3 0f00 cmp.w r3, #8388608 @ 0x800000 800b848: d82e bhi.n 800b8a8 800b84a: f5b3 0fc0 cmp.w r3, #6291456 @ 0x600000 800b84e: d031 beq.n 800b8b4 800b850: f5b3 0fc0 cmp.w r3, #6291456 @ 0x600000 800b854: d828 bhi.n 800b8a8 800b856: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000 800b85a: d01a beq.n 800b892 800b85c: f5b3 0f80 cmp.w r3, #4194304 @ 0x400000 800b860: d822 bhi.n 800b8a8 800b862: 2b00 cmp r3, #0 800b864: d003 beq.n 800b86e 800b866: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800b86a: d007 beq.n 800b87c 800b86c: e01c b.n 800b8a8 { 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); 800b86e: 4b32 ldr r3, [pc, #200] @ (800b938 ) 800b870: 6adb ldr r3, [r3, #44] @ 0x2c 800b872: 4a31 ldr r2, [pc, #196] @ (800b938 ) 800b874: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b878: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800b87a: e01c b.n 800b8b6 case RCC_SAI4ACLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b87c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b880: 3308 adds r3, #8 800b882: 2100 movs r1, #0 800b884: 4618 mov r0, r3 800b886: f001 fb67 bl 800cf58 800b88a: 4603 mov r3, r0 800b88c: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2 clock source configuration done later after clock selection check */ break; 800b890: e011 b.n 800b8b6 case RCC_SAI4ACLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b892: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b896: 3328 adds r3, #40 @ 0x28 800b898: 2100 movs r1, #0 800b89a: 4618 mov r0, r3 800b89c: f001 fc0e bl 800d0bc 800b8a0: 4603 mov r3, r0 800b8a2: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b8a6: e006 b.n 800b8b6 /* SAI4A clock source configuration done later after clock selection check */ break; #endif /* RCC_VER_3_0 */ default: ret = HAL_ERROR; 800b8a8: 2301 movs r3, #1 800b8aa: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b8ae: e002 b.n 800b8b6 break; 800b8b0: bf00 nop 800b8b2: e000 b.n 800b8b6 break; 800b8b4: bf00 nop } if (ret == HAL_OK) 800b8b6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b8ba: 2b00 cmp r3, #0 800b8bc: d10b bne.n 800b8d6 { /* Set the source of SAI4A clock*/ __HAL_RCC_SAI4A_CONFIG(PeriphClkInit->Sai4AClockSelection); 800b8be: 4b1e ldr r3, [pc, #120] @ (800b938 ) 800b8c0: 6d9b ldr r3, [r3, #88] @ 0x58 800b8c2: f423 0160 bic.w r1, r3, #14680064 @ 0xe00000 800b8c6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8ca: f8d3 30a8 ldr.w r3, [r3, #168] @ 0xa8 800b8ce: 4a1a ldr r2, [pc, #104] @ (800b938 ) 800b8d0: 430b orrs r3, r1 800b8d2: 6593 str r3, [r2, #88] @ 0x58 800b8d4: e003 b.n 800b8de } else { /* set overall return value */ status = ret; 800b8d6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b8da: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SAI4B configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SAI4B) == RCC_PERIPHCLK_SAI4B) 800b8de: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b8e2: e9d3 2300 ldrd r2, r3, [r3] 800b8e6: f402 6300 and.w r3, r2, #2048 @ 0x800 800b8ea: f8c7 30f8 str.w r3, [r7, #248] @ 0xf8 800b8ee: 2300 movs r3, #0 800b8f0: f8c7 30fc str.w r3, [r7, #252] @ 0xfc 800b8f4: e9d7 123e ldrd r1, r2, [r7, #248] @ 0xf8 800b8f8: 460b mov r3, r1 800b8fa: 4313 orrs r3, r2 800b8fc: d056 beq.n 800b9ac { switch (PeriphClkInit->Sai4BClockSelection) 800b8fe: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b902: f8d3 30ac ldr.w r3, [r3, #172] @ 0xac 800b906: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000 800b90a: d038 beq.n 800b97e 800b90c: f1b3 6f80 cmp.w r3, #67108864 @ 0x4000000 800b910: d831 bhi.n 800b976 800b912: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000 800b916: d034 beq.n 800b982 800b918: f1b3 7f40 cmp.w r3, #50331648 @ 0x3000000 800b91c: d82b bhi.n 800b976 800b91e: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000 800b922: d01d beq.n 800b960 800b924: f1b3 7f00 cmp.w r3, #33554432 @ 0x2000000 800b928: d825 bhi.n 800b976 800b92a: 2b00 cmp r3, #0 800b92c: d006 beq.n 800b93c 800b92e: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 800b932: d00a beq.n 800b94a 800b934: e01f b.n 800b976 800b936: bf00 nop 800b938: 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); 800b93c: 4ba2 ldr r3, [pc, #648] @ (800bbc8 ) 800b93e: 6adb ldr r3, [r3, #44] @ 0x2c 800b940: 4aa1 ldr r2, [pc, #644] @ (800bbc8 ) 800b942: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b946: 62d3 str r3, [r2, #44] @ 0x2c /* SAI1 clock source configuration done later after clock selection check */ break; 800b948: e01c b.n 800b984 case RCC_SAI4BCLKSOURCE_PLL2: /* PLL2 is used as clock source for SAI2*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800b94a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b94e: 3308 adds r3, #8 800b950: 2100 movs r1, #0 800b952: 4618 mov r0, r3 800b954: f001 fb00 bl 800cf58 800b958: 4603 mov r3, r0 800b95a: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI2 clock source configuration done later after clock selection check */ break; 800b95e: e011 b.n 800b984 case RCC_SAI4BCLKSOURCE_PLL3: /* PLL3 is used as clock source for SAI2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800b960: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b964: 3328 adds r3, #40 @ 0x28 800b966: 2100 movs r1, #0 800b968: 4618 mov r0, r3 800b96a: f001 fba7 bl 800d0bc 800b96e: 4603 mov r3, r0 800b970: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SAI1 clock source configuration done later after clock selection check */ break; 800b974: e006 b.n 800b984 /* SAI4B clock source configuration done later after clock selection check */ break; #endif /* RCC_VER_3_0 */ default: ret = HAL_ERROR; 800b976: 2301 movs r3, #1 800b978: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800b97c: e002 b.n 800b984 break; 800b97e: bf00 nop 800b980: e000 b.n 800b984 break; 800b982: bf00 nop } if (ret == HAL_OK) 800b984: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b988: 2b00 cmp r3, #0 800b98a: d10b bne.n 800b9a4 { /* Set the source of SAI4B clock*/ __HAL_RCC_SAI4B_CONFIG(PeriphClkInit->Sai4BClockSelection); 800b98c: 4b8e ldr r3, [pc, #568] @ (800bbc8 ) 800b98e: 6d9b ldr r3, [r3, #88] @ 0x58 800b990: f023 61e0 bic.w r1, r3, #117440512 @ 0x7000000 800b994: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b998: f8d3 30ac ldr.w r3, [r3, #172] @ 0xac 800b99c: 4a8a ldr r2, [pc, #552] @ (800bbc8 ) 800b99e: 430b orrs r3, r1 800b9a0: 6593 str r3, [r2, #88] @ 0x58 800b9a2: e003 b.n 800b9ac } else { /* set overall return value */ status = ret; 800b9a4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800b9a8: f887 311e strb.w r3, [r7, #286] @ 0x11e } #endif /*SAI4*/ #if defined(QUADSPI) /*---------------------------- QSPI configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_QSPI) == RCC_PERIPHCLK_QSPI) 800b9ac: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9b0: e9d3 2300 ldrd r2, r3, [r3] 800b9b4: f002 7300 and.w r3, r2, #33554432 @ 0x2000000 800b9b8: f8c7 30f0 str.w r3, [r7, #240] @ 0xf0 800b9bc: 2300 movs r3, #0 800b9be: f8c7 30f4 str.w r3, [r7, #244] @ 0xf4 800b9c2: e9d7 123c ldrd r1, r2, [r7, #240] @ 0xf0 800b9c6: 460b mov r3, r1 800b9c8: 4313 orrs r3, r2 800b9ca: d03a beq.n 800ba42 { switch (PeriphClkInit->QspiClockSelection) 800b9cc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9d0: 6cdb ldr r3, [r3, #76] @ 0x4c 800b9d2: 2b30 cmp r3, #48 @ 0x30 800b9d4: d01f beq.n 800ba16 800b9d6: 2b30 cmp r3, #48 @ 0x30 800b9d8: d819 bhi.n 800ba0e 800b9da: 2b20 cmp r3, #32 800b9dc: d00c beq.n 800b9f8 800b9de: 2b20 cmp r3, #32 800b9e0: d815 bhi.n 800ba0e 800b9e2: 2b00 cmp r3, #0 800b9e4: d019 beq.n 800ba1a 800b9e6: 2b10 cmp r3, #16 800b9e8: d111 bne.n 800ba0e { 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); 800b9ea: 4b77 ldr r3, [pc, #476] @ (800bbc8 ) 800b9ec: 6adb ldr r3, [r3, #44] @ 0x2c 800b9ee: 4a76 ldr r2, [pc, #472] @ (800bbc8 ) 800b9f0: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800b9f4: 62d3 str r3, [r2, #44] @ 0x2c /* QSPI clock source configuration done later after clock selection check */ break; 800b9f6: e011 b.n 800ba1c case RCC_QSPICLKSOURCE_PLL2: /* PLL2 is used as clock source for QSPI*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800b9f8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800b9fc: 3308 adds r3, #8 800b9fe: 2102 movs r1, #2 800ba00: 4618 mov r0, r3 800ba02: f001 faa9 bl 800cf58 800ba06: 4603 mov r3, r0 800ba08: f887 311f strb.w r3, [r7, #287] @ 0x11f /* QSPI clock source configuration done later after clock selection check */ break; 800ba0c: e006 b.n 800ba1c case RCC_QSPICLKSOURCE_D1HCLK: /* Domain1 HCLK clock selected as QSPI kernel peripheral clock */ break; default: ret = HAL_ERROR; 800ba0e: 2301 movs r3, #1 800ba10: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800ba14: e002 b.n 800ba1c break; 800ba16: bf00 nop 800ba18: e000 b.n 800ba1c break; 800ba1a: bf00 nop } if (ret == HAL_OK) 800ba1c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ba20: 2b00 cmp r3, #0 800ba22: d10a bne.n 800ba3a { /* Set the source of QSPI clock*/ __HAL_RCC_QSPI_CONFIG(PeriphClkInit->QspiClockSelection); 800ba24: 4b68 ldr r3, [pc, #416] @ (800bbc8 ) 800ba26: 6cdb ldr r3, [r3, #76] @ 0x4c 800ba28: f023 0130 bic.w r1, r3, #48 @ 0x30 800ba2c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba30: 6cdb ldr r3, [r3, #76] @ 0x4c 800ba32: 4a65 ldr r2, [pc, #404] @ (800bbc8 ) 800ba34: 430b orrs r3, r1 800ba36: 64d3 str r3, [r2, #76] @ 0x4c 800ba38: e003 b.n 800ba42 } else { /* set overall return value */ status = ret; 800ba3a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800ba3e: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /*OCTOSPI*/ /*---------------------------- SPI1/2/3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI123) == RCC_PERIPHCLK_SPI123) 800ba42: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba46: e9d3 2300 ldrd r2, r3, [r3] 800ba4a: f402 5380 and.w r3, r2, #4096 @ 0x1000 800ba4e: f8c7 30e8 str.w r3, [r7, #232] @ 0xe8 800ba52: 2300 movs r3, #0 800ba54: f8c7 30ec str.w r3, [r7, #236] @ 0xec 800ba58: e9d7 123a ldrd r1, r2, [r7, #232] @ 0xe8 800ba5c: 460b mov r3, r1 800ba5e: 4313 orrs r3, r2 800ba60: d051 beq.n 800bb06 { switch (PeriphClkInit->Spi123ClockSelection) 800ba62: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800ba66: 6e1b ldr r3, [r3, #96] @ 0x60 800ba68: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800ba6c: d035 beq.n 800bada 800ba6e: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800ba72: d82e bhi.n 800bad2 800ba74: f5b3 5f40 cmp.w r3, #12288 @ 0x3000 800ba78: d031 beq.n 800bade 800ba7a: f5b3 5f40 cmp.w r3, #12288 @ 0x3000 800ba7e: d828 bhi.n 800bad2 800ba80: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800ba84: d01a beq.n 800babc 800ba86: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800ba8a: d822 bhi.n 800bad2 800ba8c: 2b00 cmp r3, #0 800ba8e: d003 beq.n 800ba98 800ba90: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800ba94: d007 beq.n 800baa6 800ba96: e01c b.n 800bad2 { 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); 800ba98: 4b4b ldr r3, [pc, #300] @ (800bbc8 ) 800ba9a: 6adb ldr r3, [r3, #44] @ 0x2c 800ba9c: 4a4a ldr r2, [pc, #296] @ (800bbc8 ) 800ba9e: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800baa2: 62d3 str r3, [r2, #44] @ 0x2c /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800baa4: e01c b.n 800bae0 case RCC_SPI123CLKSOURCE_PLL2: /* PLL2 is used as clock source for SPI1/2/3 */ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800baa6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800baaa: 3308 adds r3, #8 800baac: 2100 movs r1, #0 800baae: 4618 mov r0, r3 800bab0: f001 fa52 bl 800cf58 800bab4: 4603 mov r3, r0 800bab6: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800baba: e011 b.n 800bae0 case RCC_SPI123CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI1/2/3 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800babc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bac0: 3328 adds r3, #40 @ 0x28 800bac2: 2100 movs r1, #0 800bac4: 4618 mov r0, r3 800bac6: f001 faf9 bl 800d0bc 800baca: 4603 mov r3, r0 800bacc: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI1/2/3 clock source configuration done later after clock selection check */ break; 800bad0: e006 b.n 800bae0 /* 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; 800bad2: 2301 movs r3, #1 800bad4: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bad8: e002 b.n 800bae0 break; 800bada: bf00 nop 800badc: e000 b.n 800bae0 break; 800bade: bf00 nop } if (ret == HAL_OK) 800bae0: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bae4: 2b00 cmp r3, #0 800bae6: d10a bne.n 800bafe { /* Set the source of SPI1/2/3 clock*/ __HAL_RCC_SPI123_CONFIG(PeriphClkInit->Spi123ClockSelection); 800bae8: 4b37 ldr r3, [pc, #220] @ (800bbc8 ) 800baea: 6d1b ldr r3, [r3, #80] @ 0x50 800baec: f423 41e0 bic.w r1, r3, #28672 @ 0x7000 800baf0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800baf4: 6e1b ldr r3, [r3, #96] @ 0x60 800baf6: 4a34 ldr r2, [pc, #208] @ (800bbc8 ) 800baf8: 430b orrs r3, r1 800bafa: 6513 str r3, [r2, #80] @ 0x50 800bafc: e003 b.n 800bb06 } else { /* set overall return value */ status = ret; 800bafe: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bb02: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SPI4/5 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI45) == RCC_PERIPHCLK_SPI45) 800bb06: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb0a: e9d3 2300 ldrd r2, r3, [r3] 800bb0e: f402 5300 and.w r3, r2, #8192 @ 0x2000 800bb12: f8c7 30e0 str.w r3, [r7, #224] @ 0xe0 800bb16: 2300 movs r3, #0 800bb18: f8c7 30e4 str.w r3, [r7, #228] @ 0xe4 800bb1c: e9d7 1238 ldrd r1, r2, [r7, #224] @ 0xe0 800bb20: 460b mov r3, r1 800bb22: 4313 orrs r3, r2 800bb24: d056 beq.n 800bbd4 { switch (PeriphClkInit->Spi45ClockSelection) 800bb26: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb2a: 6e5b ldr r3, [r3, #100] @ 0x64 800bb2c: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800bb30: d033 beq.n 800bb9a 800bb32: f5b3 2fa0 cmp.w r3, #327680 @ 0x50000 800bb36: d82c bhi.n 800bb92 800bb38: f5b3 2f80 cmp.w r3, #262144 @ 0x40000 800bb3c: d02f beq.n 800bb9e 800bb3e: f5b3 2f80 cmp.w r3, #262144 @ 0x40000 800bb42: d826 bhi.n 800bb92 800bb44: f5b3 3f40 cmp.w r3, #196608 @ 0x30000 800bb48: d02b beq.n 800bba2 800bb4a: f5b3 3f40 cmp.w r3, #196608 @ 0x30000 800bb4e: d820 bhi.n 800bb92 800bb50: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800bb54: d012 beq.n 800bb7c 800bb56: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800bb5a: d81a bhi.n 800bb92 800bb5c: 2b00 cmp r3, #0 800bb5e: d022 beq.n 800bba6 800bb60: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800bb64: d115 bne.n 800bb92 /* 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); 800bb66: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb6a: 3308 adds r3, #8 800bb6c: 2101 movs r1, #1 800bb6e: 4618 mov r0, r3 800bb70: f001 f9f2 bl 800cf58 800bb74: 4603 mov r3, r0 800bb76: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI4/5 clock source configuration done later after clock selection check */ break; 800bb7a: e015 b.n 800bba8 case RCC_SPI45CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI4/5 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800bb7c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bb80: 3328 adds r3, #40 @ 0x28 800bb82: 2101 movs r1, #1 800bb84: 4618 mov r0, r3 800bb86: f001 fa99 bl 800d0bc 800bb8a: 4603 mov r3, r0 800bb8c: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI4/5 clock source configuration done later after clock selection check */ break; 800bb90: e00a b.n 800bba8 /* 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; 800bb92: 2301 movs r3, #1 800bb94: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bb98: e006 b.n 800bba8 break; 800bb9a: bf00 nop 800bb9c: e004 b.n 800bba8 break; 800bb9e: bf00 nop 800bba0: e002 b.n 800bba8 break; 800bba2: bf00 nop 800bba4: e000 b.n 800bba8 break; 800bba6: bf00 nop } if (ret == HAL_OK) 800bba8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bbac: 2b00 cmp r3, #0 800bbae: d10d bne.n 800bbcc { /* Set the source of SPI4/5 clock*/ __HAL_RCC_SPI45_CONFIG(PeriphClkInit->Spi45ClockSelection); 800bbb0: 4b05 ldr r3, [pc, #20] @ (800bbc8 ) 800bbb2: 6d1b ldr r3, [r3, #80] @ 0x50 800bbb4: f423 21e0 bic.w r1, r3, #458752 @ 0x70000 800bbb8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bbbc: 6e5b ldr r3, [r3, #100] @ 0x64 800bbbe: 4a02 ldr r2, [pc, #8] @ (800bbc8 ) 800bbc0: 430b orrs r3, r1 800bbc2: 6513 str r3, [r2, #80] @ 0x50 800bbc4: e006 b.n 800bbd4 800bbc6: bf00 nop 800bbc8: 58024400 .word 0x58024400 } else { /* set overall return value */ status = ret; 800bbcc: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bbd0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- SPI6 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SPI6) == RCC_PERIPHCLK_SPI6) 800bbd4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bbd8: e9d3 2300 ldrd r2, r3, [r3] 800bbdc: f402 4380 and.w r3, r2, #16384 @ 0x4000 800bbe0: f8c7 30d8 str.w r3, [r7, #216] @ 0xd8 800bbe4: 2300 movs r3, #0 800bbe6: f8c7 30dc str.w r3, [r7, #220] @ 0xdc 800bbea: e9d7 1236 ldrd r1, r2, [r7, #216] @ 0xd8 800bbee: 460b mov r3, r1 800bbf0: 4313 orrs r3, r2 800bbf2: d055 beq.n 800bca0 { switch (PeriphClkInit->Spi6ClockSelection) 800bbf4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bbf8: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 800bbfc: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800bc00: d033 beq.n 800bc6a 800bc02: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800bc06: d82c bhi.n 800bc62 800bc08: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800bc0c: d02f beq.n 800bc6e 800bc0e: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800bc12: d826 bhi.n 800bc62 800bc14: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800bc18: d02b beq.n 800bc72 800bc1a: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800bc1e: d820 bhi.n 800bc62 800bc20: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800bc24: d012 beq.n 800bc4c 800bc26: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800bc2a: d81a bhi.n 800bc62 800bc2c: 2b00 cmp r3, #0 800bc2e: d022 beq.n 800bc76 800bc30: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800bc34: d115 bne.n 800bc62 /* 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); 800bc36: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc3a: 3308 adds r3, #8 800bc3c: 2101 movs r1, #1 800bc3e: 4618 mov r0, r3 800bc40: f001 f98a bl 800cf58 800bc44: 4603 mov r3, r0 800bc46: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI6 clock source configuration done later after clock selection check */ break; 800bc4a: e015 b.n 800bc78 case RCC_SPI6CLKSOURCE_PLL3: /* PLL3 is used as clock source for SPI6*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800bc4c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc50: 3328 adds r3, #40 @ 0x28 800bc52: 2101 movs r1, #1 800bc54: 4618 mov r0, r3 800bc56: f001 fa31 bl 800d0bc 800bc5a: 4603 mov r3, r0 800bc5c: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SPI6 clock source configuration done later after clock selection check */ break; 800bc60: e00a b.n 800bc78 /* SPI6 clock source configuration done later after clock selection check */ break; #endif default: ret = HAL_ERROR; 800bc62: 2301 movs r3, #1 800bc64: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bc68: e006 b.n 800bc78 break; 800bc6a: bf00 nop 800bc6c: e004 b.n 800bc78 break; 800bc6e: bf00 nop 800bc70: e002 b.n 800bc78 break; 800bc72: bf00 nop 800bc74: e000 b.n 800bc78 break; 800bc76: bf00 nop } if (ret == HAL_OK) 800bc78: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bc7c: 2b00 cmp r3, #0 800bc7e: d10b bne.n 800bc98 { /* Set the source of SPI6 clock*/ __HAL_RCC_SPI6_CONFIG(PeriphClkInit->Spi6ClockSelection); 800bc80: 4ba3 ldr r3, [pc, #652] @ (800bf10 ) 800bc82: 6d9b ldr r3, [r3, #88] @ 0x58 800bc84: f023 41e0 bic.w r1, r3, #1879048192 @ 0x70000000 800bc88: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bc8c: f8d3 30b0 ldr.w r3, [r3, #176] @ 0xb0 800bc90: 4a9f ldr r2, [pc, #636] @ (800bf10 ) 800bc92: 430b orrs r3, r1 800bc94: 6593 str r3, [r2, #88] @ 0x58 800bc96: e003 b.n 800bca0 } else { /* set overall return value */ status = ret; 800bc98: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bc9c: 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) 800bca0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bca4: e9d3 2300 ldrd r2, r3, [r3] 800bca8: f402 4300 and.w r3, r2, #32768 @ 0x8000 800bcac: f8c7 30d0 str.w r3, [r7, #208] @ 0xd0 800bcb0: 2300 movs r3, #0 800bcb2: f8c7 30d4 str.w r3, [r7, #212] @ 0xd4 800bcb6: e9d7 1234 ldrd r1, r2, [r7, #208] @ 0xd0 800bcba: 460b mov r3, r1 800bcbc: 4313 orrs r3, r2 800bcbe: d037 beq.n 800bd30 { switch (PeriphClkInit->FdcanClockSelection) 800bcc0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bcc4: 6f1b ldr r3, [r3, #112] @ 0x70 800bcc6: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800bcca: d00e beq.n 800bcea 800bccc: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800bcd0: d816 bhi.n 800bd00 800bcd2: 2b00 cmp r3, #0 800bcd4: d018 beq.n 800bd08 800bcd6: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800bcda: d111 bne.n 800bd00 { 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); 800bcdc: 4b8c ldr r3, [pc, #560] @ (800bf10 ) 800bcde: 6adb ldr r3, [r3, #44] @ 0x2c 800bce0: 4a8b ldr r2, [pc, #556] @ (800bf10 ) 800bce2: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800bce6: 62d3 str r3, [r2, #44] @ 0x2c /* FDCAN clock source configuration done later after clock selection check */ break; 800bce8: e00f b.n 800bd0a case RCC_FDCANCLKSOURCE_PLL2: /* PLL2 is used as clock source for FDCAN*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800bcea: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bcee: 3308 adds r3, #8 800bcf0: 2101 movs r1, #1 800bcf2: 4618 mov r0, r3 800bcf4: f001 f930 bl 800cf58 800bcf8: 4603 mov r3, r0 800bcfa: f887 311f strb.w r3, [r7, #287] @ 0x11f /* FDCAN clock source configuration done later after clock selection check */ break; 800bcfe: e004 b.n 800bd0a /* HSE is used as clock source for FDCAN*/ /* FDCAN clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800bd00: 2301 movs r3, #1 800bd02: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bd06: e000 b.n 800bd0a break; 800bd08: bf00 nop } if (ret == HAL_OK) 800bd0a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bd0e: 2b00 cmp r3, #0 800bd10: d10a bne.n 800bd28 { /* Set the source of FDCAN clock*/ __HAL_RCC_FDCAN_CONFIG(PeriphClkInit->FdcanClockSelection); 800bd12: 4b7f ldr r3, [pc, #508] @ (800bf10 ) 800bd14: 6d1b ldr r3, [r3, #80] @ 0x50 800bd16: f023 5140 bic.w r1, r3, #805306368 @ 0x30000000 800bd1a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd1e: 6f1b ldr r3, [r3, #112] @ 0x70 800bd20: 4a7b ldr r2, [pc, #492] @ (800bf10 ) 800bd22: 430b orrs r3, r1 800bd24: 6513 str r3, [r2, #80] @ 0x50 800bd26: e003 b.n 800bd30 } else { /* set overall return value */ status = ret; 800bd28: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bd2c: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /*FDCAN1 || FDCAN2*/ /*---------------------------- FMC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_FMC) == RCC_PERIPHCLK_FMC) 800bd30: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd34: e9d3 2300 ldrd r2, r3, [r3] 800bd38: f002 7380 and.w r3, r2, #16777216 @ 0x1000000 800bd3c: f8c7 30c8 str.w r3, [r7, #200] @ 0xc8 800bd40: 2300 movs r3, #0 800bd42: f8c7 30cc str.w r3, [r7, #204] @ 0xcc 800bd46: e9d7 1232 ldrd r1, r2, [r7, #200] @ 0xc8 800bd4a: 460b mov r3, r1 800bd4c: 4313 orrs r3, r2 800bd4e: d039 beq.n 800bdc4 { switch (PeriphClkInit->FmcClockSelection) 800bd50: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd54: 6c9b ldr r3, [r3, #72] @ 0x48 800bd56: 2b03 cmp r3, #3 800bd58: d81c bhi.n 800bd94 800bd5a: a201 add r2, pc, #4 @ (adr r2, 800bd60 ) 800bd5c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800bd60: 0800bd9d .word 0x0800bd9d 800bd64: 0800bd71 .word 0x0800bd71 800bd68: 0800bd7f .word 0x0800bd7f 800bd6c: 0800bd9d .word 0x0800bd9d { 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); 800bd70: 4b67 ldr r3, [pc, #412] @ (800bf10 ) 800bd72: 6adb ldr r3, [r3, #44] @ 0x2c 800bd74: 4a66 ldr r2, [pc, #408] @ (800bf10 ) 800bd76: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800bd7a: 62d3 str r3, [r2, #44] @ 0x2c /* FMC clock source configuration done later after clock selection check */ break; 800bd7c: e00f b.n 800bd9e case RCC_FMCCLKSOURCE_PLL2: /* PLL2 is used as clock source for FMC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800bd7e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bd82: 3308 adds r3, #8 800bd84: 2102 movs r1, #2 800bd86: 4618 mov r0, r3 800bd88: f001 f8e6 bl 800cf58 800bd8c: 4603 mov r3, r0 800bd8e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* FMC clock source configuration done later after clock selection check */ break; 800bd92: e004 b.n 800bd9e case RCC_FMCCLKSOURCE_HCLK: /* D1/CD HCLK clock selected as FMC kernel peripheral clock */ break; default: ret = HAL_ERROR; 800bd94: 2301 movs r3, #1 800bd96: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800bd9a: e000 b.n 800bd9e break; 800bd9c: bf00 nop } if (ret == HAL_OK) 800bd9e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bda2: 2b00 cmp r3, #0 800bda4: d10a bne.n 800bdbc { /* Set the source of FMC clock*/ __HAL_RCC_FMC_CONFIG(PeriphClkInit->FmcClockSelection); 800bda6: 4b5a ldr r3, [pc, #360] @ (800bf10 ) 800bda8: 6cdb ldr r3, [r3, #76] @ 0x4c 800bdaa: f023 0103 bic.w r1, r3, #3 800bdae: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bdb2: 6c9b ldr r3, [r3, #72] @ 0x48 800bdb4: 4a56 ldr r2, [pc, #344] @ (800bf10 ) 800bdb6: 430b orrs r3, r1 800bdb8: 64d3 str r3, [r2, #76] @ 0x4c 800bdba: e003 b.n 800bdc4 } else { /* set overall return value */ status = ret; 800bdbc: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bdc0: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- RTC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RTC) == RCC_PERIPHCLK_RTC) 800bdc4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bdc8: e9d3 2300 ldrd r2, r3, [r3] 800bdcc: f402 0380 and.w r3, r2, #4194304 @ 0x400000 800bdd0: f8c7 30c0 str.w r3, [r7, #192] @ 0xc0 800bdd4: 2300 movs r3, #0 800bdd6: f8c7 30c4 str.w r3, [r7, #196] @ 0xc4 800bdda: e9d7 1230 ldrd r1, r2, [r7, #192] @ 0xc0 800bdde: 460b mov r3, r1 800bde0: 4313 orrs r3, r2 800bde2: f000 809f beq.w 800bf24 { /* 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); 800bde6: 4b4b ldr r3, [pc, #300] @ (800bf14 ) 800bde8: 681b ldr r3, [r3, #0] 800bdea: 4a4a ldr r2, [pc, #296] @ (800bf14 ) 800bdec: f443 7380 orr.w r3, r3, #256 @ 0x100 800bdf0: 6013 str r3, [r2, #0] /* Wait for Backup domain Write protection disable */ tickstart = HAL_GetTick(); 800bdf2: f7f9 fd23 bl 800583c 800bdf6: f8c7 0118 str.w r0, [r7, #280] @ 0x118 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800bdfa: e00b b.n 800be14 { if ((HAL_GetTick() - tickstart) > RCC_DBP_TIMEOUT_VALUE) 800bdfc: f7f9 fd1e bl 800583c 800be00: 4602 mov r2, r0 800be02: f8d7 3118 ldr.w r3, [r7, #280] @ 0x118 800be06: 1ad3 subs r3, r2, r3 800be08: 2b64 cmp r3, #100 @ 0x64 800be0a: d903 bls.n 800be14 { ret = HAL_TIMEOUT; 800be0c: 2303 movs r3, #3 800be0e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800be12: e005 b.n 800be20 while ((PWR->CR1 & PWR_CR1_DBP) == 0U) 800be14: 4b3f ldr r3, [pc, #252] @ (800bf14 ) 800be16: 681b ldr r3, [r3, #0] 800be18: f403 7380 and.w r3, r3, #256 @ 0x100 800be1c: 2b00 cmp r3, #0 800be1e: d0ed beq.n 800bdfc } } if (ret == HAL_OK) 800be20: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800be24: 2b00 cmp r3, #0 800be26: d179 bne.n 800bf1c { /* Reset the Backup domain only if the RTC Clock source selection is modified */ if ((RCC->BDCR & RCC_BDCR_RTCSEL) != (PeriphClkInit->RTCClockSelection & RCC_BDCR_RTCSEL)) 800be28: 4b39 ldr r3, [pc, #228] @ (800bf10 ) 800be2a: 6f1a ldr r2, [r3, #112] @ 0x70 800be2c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be30: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800be34: 4053 eors r3, r2 800be36: f403 7340 and.w r3, r3, #768 @ 0x300 800be3a: 2b00 cmp r3, #0 800be3c: d015 beq.n 800be6a { /* Store the content of BDCR register before the reset of Backup Domain */ tmpreg = (RCC->BDCR & ~(RCC_BDCR_RTCSEL)); 800be3e: 4b34 ldr r3, [pc, #208] @ (800bf10 ) 800be40: 6f1b ldr r3, [r3, #112] @ 0x70 800be42: f423 7340 bic.w r3, r3, #768 @ 0x300 800be46: 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(); 800be4a: 4b31 ldr r3, [pc, #196] @ (800bf10 ) 800be4c: 6f1b ldr r3, [r3, #112] @ 0x70 800be4e: 4a30 ldr r2, [pc, #192] @ (800bf10 ) 800be50: f443 3380 orr.w r3, r3, #65536 @ 0x10000 800be54: 6713 str r3, [r2, #112] @ 0x70 __HAL_RCC_BACKUPRESET_RELEASE(); 800be56: 4b2e ldr r3, [pc, #184] @ (800bf10 ) 800be58: 6f1b ldr r3, [r3, #112] @ 0x70 800be5a: 4a2d ldr r2, [pc, #180] @ (800bf10 ) 800be5c: f423 3380 bic.w r3, r3, #65536 @ 0x10000 800be60: 6713 str r3, [r2, #112] @ 0x70 /* Restore the Content of BDCR register */ RCC->BDCR = tmpreg; 800be62: 4a2b ldr r2, [pc, #172] @ (800bf10 ) 800be64: f8d7 3114 ldr.w r3, [r7, #276] @ 0x114 800be68: 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) 800be6a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800be6e: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800be72: f5b3 7f80 cmp.w r3, #256 @ 0x100 800be76: d118 bne.n 800beaa { /* Get Start Tick*/ tickstart = HAL_GetTick(); 800be78: f7f9 fce0 bl 800583c 800be7c: f8c7 0118 str.w r0, [r7, #280] @ 0x118 /* Wait till LSE is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800be80: e00d b.n 800be9e { if ((HAL_GetTick() - tickstart) > RCC_LSE_TIMEOUT_VALUE) 800be82: f7f9 fcdb bl 800583c 800be86: 4602 mov r2, r0 800be88: f8d7 3118 ldr.w r3, [r7, #280] @ 0x118 800be8c: 1ad2 subs r2, r2, r3 800be8e: f241 3388 movw r3, #5000 @ 0x1388 800be92: 429a cmp r2, r3 800be94: d903 bls.n 800be9e { ret = HAL_TIMEOUT; 800be96: 2303 movs r3, #3 800be98: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800be9c: e005 b.n 800beaa while (__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == 0U) 800be9e: 4b1c ldr r3, [pc, #112] @ (800bf10 ) 800bea0: 6f1b ldr r3, [r3, #112] @ 0x70 800bea2: f003 0302 and.w r3, r3, #2 800bea6: 2b00 cmp r3, #0 800bea8: d0eb beq.n 800be82 } } } if (ret == HAL_OK) 800beaa: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800beae: 2b00 cmp r3, #0 800beb0: d129 bne.n 800bf06 { __HAL_RCC_RTC_CONFIG(PeriphClkInit->RTCClockSelection); 800beb2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800beb6: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800beba: f403 7340 and.w r3, r3, #768 @ 0x300 800bebe: f5b3 7f40 cmp.w r3, #768 @ 0x300 800bec2: d10e bne.n 800bee2 800bec4: 4b12 ldr r3, [pc, #72] @ (800bf10 ) 800bec6: 691b ldr r3, [r3, #16] 800bec8: f423 517c bic.w r1, r3, #16128 @ 0x3f00 800becc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bed0: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800bed4: 091a lsrs r2, r3, #4 800bed6: 4b10 ldr r3, [pc, #64] @ (800bf18 ) 800bed8: 4013 ands r3, r2 800beda: 4a0d ldr r2, [pc, #52] @ (800bf10 ) 800bedc: 430b orrs r3, r1 800bede: 6113 str r3, [r2, #16] 800bee0: e005 b.n 800beee 800bee2: 4b0b ldr r3, [pc, #44] @ (800bf10 ) 800bee4: 691b ldr r3, [r3, #16] 800bee6: 4a0a ldr r2, [pc, #40] @ (800bf10 ) 800bee8: f423 537c bic.w r3, r3, #16128 @ 0x3f00 800beec: 6113 str r3, [r2, #16] 800beee: 4b08 ldr r3, [pc, #32] @ (800bf10 ) 800bef0: 6f19 ldr r1, [r3, #112] @ 0x70 800bef2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bef6: f8d3 30b4 ldr.w r3, [r3, #180] @ 0xb4 800befa: f3c3 030b ubfx r3, r3, #0, #12 800befe: 4a04 ldr r2, [pc, #16] @ (800bf10 ) 800bf00: 430b orrs r3, r1 800bf02: 6713 str r3, [r2, #112] @ 0x70 800bf04: e00e b.n 800bf24 } else { /* set overall return value */ status = ret; 800bf06: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bf0a: f887 311e strb.w r3, [r7, #286] @ 0x11e 800bf0e: e009 b.n 800bf24 800bf10: 58024400 .word 0x58024400 800bf14: 58024800 .word 0x58024800 800bf18: 00ffffcf .word 0x00ffffcf } } else { /* set overall return value */ status = ret; 800bf1c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800bf20: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- USART1/6 configuration --------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART16) == RCC_PERIPHCLK_USART16) 800bf24: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bf28: e9d3 2300 ldrd r2, r3, [r3] 800bf2c: f002 0301 and.w r3, r2, #1 800bf30: f8c7 30b8 str.w r3, [r7, #184] @ 0xb8 800bf34: 2300 movs r3, #0 800bf36: f8c7 30bc str.w r3, [r7, #188] @ 0xbc 800bf3a: e9d7 122e ldrd r1, r2, [r7, #184] @ 0xb8 800bf3e: 460b mov r3, r1 800bf40: 4313 orrs r3, r2 800bf42: f000 8089 beq.w 800c058 { switch (PeriphClkInit->Usart16ClockSelection) 800bf46: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800bf4a: 6fdb ldr r3, [r3, #124] @ 0x7c 800bf4c: 2b28 cmp r3, #40 @ 0x28 800bf4e: d86b bhi.n 800c028 800bf50: a201 add r2, pc, #4 @ (adr r2, 800bf58 ) 800bf52: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800bf56: bf00 nop 800bf58: 0800c031 .word 0x0800c031 800bf5c: 0800c029 .word 0x0800c029 800bf60: 0800c029 .word 0x0800c029 800bf64: 0800c029 .word 0x0800c029 800bf68: 0800c029 .word 0x0800c029 800bf6c: 0800c029 .word 0x0800c029 800bf70: 0800c029 .word 0x0800c029 800bf74: 0800c029 .word 0x0800c029 800bf78: 0800bffd .word 0x0800bffd 800bf7c: 0800c029 .word 0x0800c029 800bf80: 0800c029 .word 0x0800c029 800bf84: 0800c029 .word 0x0800c029 800bf88: 0800c029 .word 0x0800c029 800bf8c: 0800c029 .word 0x0800c029 800bf90: 0800c029 .word 0x0800c029 800bf94: 0800c029 .word 0x0800c029 800bf98: 0800c013 .word 0x0800c013 800bf9c: 0800c029 .word 0x0800c029 800bfa0: 0800c029 .word 0x0800c029 800bfa4: 0800c029 .word 0x0800c029 800bfa8: 0800c029 .word 0x0800c029 800bfac: 0800c029 .word 0x0800c029 800bfb0: 0800c029 .word 0x0800c029 800bfb4: 0800c029 .word 0x0800c029 800bfb8: 0800c031 .word 0x0800c031 800bfbc: 0800c029 .word 0x0800c029 800bfc0: 0800c029 .word 0x0800c029 800bfc4: 0800c029 .word 0x0800c029 800bfc8: 0800c029 .word 0x0800c029 800bfcc: 0800c029 .word 0x0800c029 800bfd0: 0800c029 .word 0x0800c029 800bfd4: 0800c029 .word 0x0800c029 800bfd8: 0800c031 .word 0x0800c031 800bfdc: 0800c029 .word 0x0800c029 800bfe0: 0800c029 .word 0x0800c029 800bfe4: 0800c029 .word 0x0800c029 800bfe8: 0800c029 .word 0x0800c029 800bfec: 0800c029 .word 0x0800c029 800bff0: 0800c029 .word 0x0800c029 800bff4: 0800c029 .word 0x0800c029 800bff8: 0800c031 .word 0x0800c031 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); 800bffc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c000: 3308 adds r3, #8 800c002: 2101 movs r1, #1 800c004: 4618 mov r0, r3 800c006: f000 ffa7 bl 800cf58 800c00a: 4603 mov r3, r0 800c00c: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART1/6 clock source configuration done later after clock selection check */ break; 800c010: e00f b.n 800c032 case RCC_USART16CLKSOURCE_PLL3: /* PLL3 is used as clock source for USART1/6 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800c012: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c016: 3328 adds r3, #40 @ 0x28 800c018: 2101 movs r1, #1 800c01a: 4618 mov r0, r3 800c01c: f001 f84e bl 800d0bc 800c020: 4603 mov r3, r0 800c022: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART1/6 clock source configuration done later after clock selection check */ break; 800c026: e004 b.n 800c032 /* 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; 800c028: 2301 movs r3, #1 800c02a: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c02e: e000 b.n 800c032 break; 800c030: bf00 nop } if (ret == HAL_OK) 800c032: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c036: 2b00 cmp r3, #0 800c038: d10a bne.n 800c050 { /* Set the source of USART1/6 clock */ __HAL_RCC_USART16_CONFIG(PeriphClkInit->Usart16ClockSelection); 800c03a: 4bbf ldr r3, [pc, #764] @ (800c338 ) 800c03c: 6d5b ldr r3, [r3, #84] @ 0x54 800c03e: f023 0138 bic.w r1, r3, #56 @ 0x38 800c042: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c046: 6fdb ldr r3, [r3, #124] @ 0x7c 800c048: 4abb ldr r2, [pc, #748] @ (800c338 ) 800c04a: 430b orrs r3, r1 800c04c: 6553 str r3, [r2, #84] @ 0x54 800c04e: e003 b.n 800c058 } else { /* set overall return value */ status = ret; 800c050: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c054: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- USART2/3/4/5/7/8 Configuration --------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USART234578) == RCC_PERIPHCLK_USART234578) 800c058: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c05c: e9d3 2300 ldrd r2, r3, [r3] 800c060: f002 0302 and.w r3, r2, #2 800c064: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0 800c068: 2300 movs r3, #0 800c06a: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 800c06e: e9d7 122c ldrd r1, r2, [r7, #176] @ 0xb0 800c072: 460b mov r3, r1 800c074: 4313 orrs r3, r2 800c076: d041 beq.n 800c0fc { switch (PeriphClkInit->Usart234578ClockSelection) 800c078: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c07c: 6f9b ldr r3, [r3, #120] @ 0x78 800c07e: 2b05 cmp r3, #5 800c080: d824 bhi.n 800c0cc 800c082: a201 add r2, pc, #4 @ (adr r2, 800c088 ) 800c084: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800c088: 0800c0d5 .word 0x0800c0d5 800c08c: 0800c0a1 .word 0x0800c0a1 800c090: 0800c0b7 .word 0x0800c0b7 800c094: 0800c0d5 .word 0x0800c0d5 800c098: 0800c0d5 .word 0x0800c0d5 800c09c: 0800c0d5 .word 0x0800c0d5 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); 800c0a0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c0a4: 3308 adds r3, #8 800c0a6: 2101 movs r1, #1 800c0a8: 4618 mov r0, r3 800c0aa: f000 ff55 bl 800cf58 800c0ae: 4603 mov r3, r0 800c0b0: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; 800c0b4: e00f b.n 800c0d6 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); 800c0b6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c0ba: 3328 adds r3, #40 @ 0x28 800c0bc: 2101 movs r1, #1 800c0be: 4618 mov r0, r3 800c0c0: f000 fffc bl 800d0bc 800c0c4: 4603 mov r3, r0 800c0c6: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USART2/3/4/5/7/8 clock source configuration done later after clock selection check */ break; 800c0ca: e004 b.n 800c0d6 /* 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; 800c0cc: 2301 movs r3, #1 800c0ce: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c0d2: e000 b.n 800c0d6 break; 800c0d4: bf00 nop } if (ret == HAL_OK) 800c0d6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c0da: 2b00 cmp r3, #0 800c0dc: d10a bne.n 800c0f4 { /* Set the source of USART2/3/4/5/7/8 clock */ __HAL_RCC_USART234578_CONFIG(PeriphClkInit->Usart234578ClockSelection); 800c0de: 4b96 ldr r3, [pc, #600] @ (800c338 ) 800c0e0: 6d5b ldr r3, [r3, #84] @ 0x54 800c0e2: f023 0107 bic.w r1, r3, #7 800c0e6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c0ea: 6f9b ldr r3, [r3, #120] @ 0x78 800c0ec: 4a92 ldr r2, [pc, #584] @ (800c338 ) 800c0ee: 430b orrs r3, r1 800c0f0: 6553 str r3, [r2, #84] @ 0x54 800c0f2: e003 b.n 800c0fc } else { /* set overall return value */ status = ret; 800c0f4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c0f8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*-------------------------- LPUART1 Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPUART1) == RCC_PERIPHCLK_LPUART1) 800c0fc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c100: e9d3 2300 ldrd r2, r3, [r3] 800c104: f002 0304 and.w r3, r2, #4 800c108: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 800c10c: 2300 movs r3, #0 800c10e: f8c7 30ac str.w r3, [r7, #172] @ 0xac 800c112: e9d7 122a ldrd r1, r2, [r7, #168] @ 0xa8 800c116: 460b mov r3, r1 800c118: 4313 orrs r3, r2 800c11a: d044 beq.n 800c1a6 { switch (PeriphClkInit->Lpuart1ClockSelection) 800c11c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c120: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 800c124: 2b05 cmp r3, #5 800c126: d825 bhi.n 800c174 800c128: a201 add r2, pc, #4 @ (adr r2, 800c130 ) 800c12a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800c12e: bf00 nop 800c130: 0800c17d .word 0x0800c17d 800c134: 0800c149 .word 0x0800c149 800c138: 0800c15f .word 0x0800c15f 800c13c: 0800c17d .word 0x0800c17d 800c140: 0800c17d .word 0x0800c17d 800c144: 0800c17d .word 0x0800c17d 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); 800c148: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c14c: 3308 adds r3, #8 800c14e: 2101 movs r1, #1 800c150: 4618 mov r0, r3 800c152: f000 ff01 bl 800cf58 800c156: 4603 mov r3, r0 800c158: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPUART1 clock source configuration done later after clock selection check */ break; 800c15c: e00f b.n 800c17e case RCC_LPUART1CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPUART1 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800c15e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c162: 3328 adds r3, #40 @ 0x28 800c164: 2101 movs r1, #1 800c166: 4618 mov r0, r3 800c168: f000 ffa8 bl 800d0bc 800c16c: 4603 mov r3, r0 800c16e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPUART1 clock source configuration done later after clock selection check */ break; 800c172: e004 b.n 800c17e /* LSE, oscillator is used as source of LPUART1 clock */ /* LPUART1 clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c174: 2301 movs r3, #1 800c176: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c17a: e000 b.n 800c17e break; 800c17c: bf00 nop } if (ret == HAL_OK) 800c17e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c182: 2b00 cmp r3, #0 800c184: d10b bne.n 800c19e { /* Set the source of LPUART1 clock */ __HAL_RCC_LPUART1_CONFIG(PeriphClkInit->Lpuart1ClockSelection); 800c186: 4b6c ldr r3, [pc, #432] @ (800c338 ) 800c188: 6d9b ldr r3, [r3, #88] @ 0x58 800c18a: f023 0107 bic.w r1, r3, #7 800c18e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c192: f8d3 3094 ldr.w r3, [r3, #148] @ 0x94 800c196: 4a68 ldr r2, [pc, #416] @ (800c338 ) 800c198: 430b orrs r3, r1 800c19a: 6593 str r3, [r2, #88] @ 0x58 800c19c: e003 b.n 800c1a6 } else { /* set overall return value */ status = ret; 800c19e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c1a2: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM1 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM1) == RCC_PERIPHCLK_LPTIM1) 800c1a6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c1aa: e9d3 2300 ldrd r2, r3, [r3] 800c1ae: f002 0320 and.w r3, r2, #32 800c1b2: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 800c1b6: 2300 movs r3, #0 800c1b8: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 800c1bc: e9d7 1228 ldrd r1, r2, [r7, #160] @ 0xa0 800c1c0: 460b mov r3, r1 800c1c2: 4313 orrs r3, r2 800c1c4: d055 beq.n 800c272 { switch (PeriphClkInit->Lptim1ClockSelection) 800c1c6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c1ca: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800c1ce: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800c1d2: d033 beq.n 800c23c 800c1d4: f1b3 4fa0 cmp.w r3, #1342177280 @ 0x50000000 800c1d8: d82c bhi.n 800c234 800c1da: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800c1de: d02f beq.n 800c240 800c1e0: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800c1e4: d826 bhi.n 800c234 800c1e6: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800c1ea: d02b beq.n 800c244 800c1ec: f1b3 5f40 cmp.w r3, #805306368 @ 0x30000000 800c1f0: d820 bhi.n 800c234 800c1f2: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800c1f6: d012 beq.n 800c21e 800c1f8: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800c1fc: d81a bhi.n 800c234 800c1fe: 2b00 cmp r3, #0 800c200: d022 beq.n 800c248 800c202: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800c206: d115 bne.n 800c234 /* 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); 800c208: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c20c: 3308 adds r3, #8 800c20e: 2100 movs r1, #0 800c210: 4618 mov r0, r3 800c212: f000 fea1 bl 800cf58 800c216: 4603 mov r3, r0 800c218: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM1 clock source configuration done later after clock selection check */ break; 800c21c: e015 b.n 800c24a case RCC_LPTIM1CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM1*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c21e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c222: 3328 adds r3, #40 @ 0x28 800c224: 2102 movs r1, #2 800c226: 4618 mov r0, r3 800c228: f000 ff48 bl 800d0bc 800c22c: 4603 mov r3, r0 800c22e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM1 clock source configuration done later after clock selection check */ break; 800c232: e00a b.n 800c24a /* 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; 800c234: 2301 movs r3, #1 800c236: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c23a: e006 b.n 800c24a break; 800c23c: bf00 nop 800c23e: e004 b.n 800c24a break; 800c240: bf00 nop 800c242: e002 b.n 800c24a break; 800c244: bf00 nop 800c246: e000 b.n 800c24a break; 800c248: bf00 nop } if (ret == HAL_OK) 800c24a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c24e: 2b00 cmp r3, #0 800c250: d10b bne.n 800c26a { /* Set the source of LPTIM1 clock*/ __HAL_RCC_LPTIM1_CONFIG(PeriphClkInit->Lptim1ClockSelection); 800c252: 4b39 ldr r3, [pc, #228] @ (800c338 ) 800c254: 6d5b ldr r3, [r3, #84] @ 0x54 800c256: f023 41e0 bic.w r1, r3, #1879048192 @ 0x70000000 800c25a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c25e: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800c262: 4a35 ldr r2, [pc, #212] @ (800c338 ) 800c264: 430b orrs r3, r1 800c266: 6553 str r3, [r2, #84] @ 0x54 800c268: e003 b.n 800c272 } else { /* set overall return value */ status = ret; 800c26a: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c26e: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM2 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM2) == RCC_PERIPHCLK_LPTIM2) 800c272: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c276: e9d3 2300 ldrd r2, r3, [r3] 800c27a: f002 0340 and.w r3, r2, #64 @ 0x40 800c27e: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800c282: 2300 movs r3, #0 800c284: f8c7 309c str.w r3, [r7, #156] @ 0x9c 800c288: e9d7 1226 ldrd r1, r2, [r7, #152] @ 0x98 800c28c: 460b mov r3, r1 800c28e: 4313 orrs r3, r2 800c290: d058 beq.n 800c344 { switch (PeriphClkInit->Lptim2ClockSelection) 800c292: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c296: f8d3 309c ldr.w r3, [r3, #156] @ 0x9c 800c29a: f5b3 5fa0 cmp.w r3, #5120 @ 0x1400 800c29e: d033 beq.n 800c308 800c2a0: f5b3 5fa0 cmp.w r3, #5120 @ 0x1400 800c2a4: d82c bhi.n 800c300 800c2a6: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800c2aa: d02f beq.n 800c30c 800c2ac: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800c2b0: d826 bhi.n 800c300 800c2b2: f5b3 6f40 cmp.w r3, #3072 @ 0xc00 800c2b6: d02b beq.n 800c310 800c2b8: f5b3 6f40 cmp.w r3, #3072 @ 0xc00 800c2bc: d820 bhi.n 800c300 800c2be: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800c2c2: d012 beq.n 800c2ea 800c2c4: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800c2c8: d81a bhi.n 800c300 800c2ca: 2b00 cmp r3, #0 800c2cc: d022 beq.n 800c314 800c2ce: f5b3 6f80 cmp.w r3, #1024 @ 0x400 800c2d2: d115 bne.n 800c300 /* 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); 800c2d4: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c2d8: 3308 adds r3, #8 800c2da: 2100 movs r1, #0 800c2dc: 4618 mov r0, r3 800c2de: f000 fe3b bl 800cf58 800c2e2: 4603 mov r3, r0 800c2e4: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM2 clock source configuration done later after clock selection check */ break; 800c2e8: e015 b.n 800c316 case RCC_LPTIM2CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM2*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c2ea: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c2ee: 3328 adds r3, #40 @ 0x28 800c2f0: 2102 movs r1, #2 800c2f2: 4618 mov r0, r3 800c2f4: f000 fee2 bl 800d0bc 800c2f8: 4603 mov r3, r0 800c2fa: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM2 clock source configuration done later after clock selection check */ break; 800c2fe: e00a b.n 800c316 /* 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; 800c300: 2301 movs r3, #1 800c302: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c306: e006 b.n 800c316 break; 800c308: bf00 nop 800c30a: e004 b.n 800c316 break; 800c30c: bf00 nop 800c30e: e002 b.n 800c316 break; 800c310: bf00 nop 800c312: e000 b.n 800c316 break; 800c314: bf00 nop } if (ret == HAL_OK) 800c316: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c31a: 2b00 cmp r3, #0 800c31c: d10e bne.n 800c33c { /* Set the source of LPTIM2 clock*/ __HAL_RCC_LPTIM2_CONFIG(PeriphClkInit->Lptim2ClockSelection); 800c31e: 4b06 ldr r3, [pc, #24] @ (800c338 ) 800c320: 6d9b ldr r3, [r3, #88] @ 0x58 800c322: f423 51e0 bic.w r1, r3, #7168 @ 0x1c00 800c326: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c32a: f8d3 309c ldr.w r3, [r3, #156] @ 0x9c 800c32e: 4a02 ldr r2, [pc, #8] @ (800c338 ) 800c330: 430b orrs r3, r1 800c332: 6593 str r3, [r2, #88] @ 0x58 800c334: e006 b.n 800c344 800c336: bf00 nop 800c338: 58024400 .word 0x58024400 } else { /* set overall return value */ status = ret; 800c33c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c340: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- LPTIM345 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_LPTIM345) == RCC_PERIPHCLK_LPTIM345) 800c344: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c348: e9d3 2300 ldrd r2, r3, [r3] 800c34c: f002 0380 and.w r3, r2, #128 @ 0x80 800c350: f8c7 3090 str.w r3, [r7, #144] @ 0x90 800c354: 2300 movs r3, #0 800c356: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800c35a: e9d7 1224 ldrd r1, r2, [r7, #144] @ 0x90 800c35e: 460b mov r3, r1 800c360: 4313 orrs r3, r2 800c362: d055 beq.n 800c410 { switch (PeriphClkInit->Lptim345ClockSelection) 800c364: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c368: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 800c36c: f5b3 4f20 cmp.w r3, #40960 @ 0xa000 800c370: d033 beq.n 800c3da 800c372: f5b3 4f20 cmp.w r3, #40960 @ 0xa000 800c376: d82c bhi.n 800c3d2 800c378: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800c37c: d02f beq.n 800c3de 800c37e: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800c382: d826 bhi.n 800c3d2 800c384: f5b3 4fc0 cmp.w r3, #24576 @ 0x6000 800c388: d02b beq.n 800c3e2 800c38a: f5b3 4fc0 cmp.w r3, #24576 @ 0x6000 800c38e: d820 bhi.n 800c3d2 800c390: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800c394: d012 beq.n 800c3bc 800c396: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 800c39a: d81a bhi.n 800c3d2 800c39c: 2b00 cmp r3, #0 800c39e: d022 beq.n 800c3e6 800c3a0: f5b3 5f00 cmp.w r3, #8192 @ 0x2000 800c3a4: d115 bne.n 800c3d2 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); 800c3a6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c3aa: 3308 adds r3, #8 800c3ac: 2100 movs r1, #0 800c3ae: 4618 mov r0, r3 800c3b0: f000 fdd2 bl 800cf58 800c3b4: 4603 mov r3, r0 800c3b6: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; 800c3ba: e015 b.n 800c3e8 case RCC_LPTIM345CLKSOURCE_PLL3: /* PLL3 is used as clock source for LPTIM3/4/5 */ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c3bc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c3c0: 3328 adds r3, #40 @ 0x28 800c3c2: 2102 movs r1, #2 800c3c4: 4618 mov r0, r3 800c3c6: f000 fe79 bl 800d0bc 800c3ca: 4603 mov r3, r0 800c3cc: f887 311f strb.w r3, [r7, #287] @ 0x11f /* LPTIM3/4/5 clock source configuration done later after clock selection check */ break; 800c3d0: e00a b.n 800c3e8 /* 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; 800c3d2: 2301 movs r3, #1 800c3d4: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c3d8: e006 b.n 800c3e8 break; 800c3da: bf00 nop 800c3dc: e004 b.n 800c3e8 break; 800c3de: bf00 nop 800c3e0: e002 b.n 800c3e8 break; 800c3e2: bf00 nop 800c3e4: e000 b.n 800c3e8 break; 800c3e6: bf00 nop } if (ret == HAL_OK) 800c3e8: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c3ec: 2b00 cmp r3, #0 800c3ee: d10b bne.n 800c408 { /* Set the source of LPTIM3/4/5 clock */ __HAL_RCC_LPTIM345_CONFIG(PeriphClkInit->Lptim345ClockSelection); 800c3f0: 4bbb ldr r3, [pc, #748] @ (800c6e0 ) 800c3f2: 6d9b ldr r3, [r3, #88] @ 0x58 800c3f4: f423 4160 bic.w r1, r3, #57344 @ 0xe000 800c3f8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c3fc: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 800c400: 4ab7 ldr r2, [pc, #732] @ (800c6e0 ) 800c402: 430b orrs r3, r1 800c404: 6593 str r3, [r2, #88] @ 0x58 800c406: e003 b.n 800c410 } else { /* set overall return value */ status = ret; 800c408: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c40c: f887 311e strb.w r3, [r7, #286] @ 0x11e __HAL_RCC_I2C1235_CONFIG(PeriphClkInit->I2c1235ClockSelection); } #else if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C123) == RCC_PERIPHCLK_I2C123) 800c410: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c414: e9d3 2300 ldrd r2, r3, [r3] 800c418: f002 0308 and.w r3, r2, #8 800c41c: f8c7 3088 str.w r3, [r7, #136] @ 0x88 800c420: 2300 movs r3, #0 800c422: f8c7 308c str.w r3, [r7, #140] @ 0x8c 800c426: e9d7 1222 ldrd r1, r2, [r7, #136] @ 0x88 800c42a: 460b mov r3, r1 800c42c: 4313 orrs r3, r2 800c42e: d01e beq.n 800c46e { /* Check the parameters */ assert_param(IS_RCC_I2C123CLKSOURCE(PeriphClkInit->I2c123ClockSelection)); if ((PeriphClkInit->I2c123ClockSelection) == RCC_I2C123CLKSOURCE_PLL3) 800c430: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c434: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800c438: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800c43c: d10c bne.n 800c458 { if (RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE) != HAL_OK) 800c43e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c442: 3328 adds r3, #40 @ 0x28 800c444: 2102 movs r1, #2 800c446: 4618 mov r0, r3 800c448: f000 fe38 bl 800d0bc 800c44c: 4603 mov r3, r0 800c44e: 2b00 cmp r3, #0 800c450: d002 beq.n 800c458 { status = HAL_ERROR; 800c452: 2301 movs r3, #1 800c454: f887 311e strb.w r3, [r7, #286] @ 0x11e } } __HAL_RCC_I2C123_CONFIG(PeriphClkInit->I2c123ClockSelection); 800c458: 4ba1 ldr r3, [pc, #644] @ (800c6e0 ) 800c45a: 6d5b ldr r3, [r3, #84] @ 0x54 800c45c: f423 5140 bic.w r1, r3, #12288 @ 0x3000 800c460: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c464: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 800c468: 4a9d ldr r2, [pc, #628] @ (800c6e0 ) 800c46a: 430b orrs r3, r1 800c46c: 6553 str r3, [r2, #84] @ 0x54 } #endif /* I2C5 */ /*------------------------------ I2C4 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_I2C4) == RCC_PERIPHCLK_I2C4) 800c46e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c472: e9d3 2300 ldrd r2, r3, [r3] 800c476: f002 0310 and.w r3, r2, #16 800c47a: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800c47e: 2300 movs r3, #0 800c480: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800c484: e9d7 1220 ldrd r1, r2, [r7, #128] @ 0x80 800c488: 460b mov r3, r1 800c48a: 4313 orrs r3, r2 800c48c: d01e beq.n 800c4cc { /* Check the parameters */ assert_param(IS_RCC_I2C4CLKSOURCE(PeriphClkInit->I2c4ClockSelection)); if ((PeriphClkInit->I2c4ClockSelection) == RCC_I2C4CLKSOURCE_PLL3) 800c48e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c492: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 800c496: f5b3 7f80 cmp.w r3, #256 @ 0x100 800c49a: d10c bne.n 800c4b6 { if (RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE) != HAL_OK) 800c49c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c4a0: 3328 adds r3, #40 @ 0x28 800c4a2: 2102 movs r1, #2 800c4a4: 4618 mov r0, r3 800c4a6: f000 fe09 bl 800d0bc 800c4aa: 4603 mov r3, r0 800c4ac: 2b00 cmp r3, #0 800c4ae: d002 beq.n 800c4b6 { status = HAL_ERROR; 800c4b0: 2301 movs r3, #1 800c4b2: f887 311e strb.w r3, [r7, #286] @ 0x11e } } __HAL_RCC_I2C4_CONFIG(PeriphClkInit->I2c4ClockSelection); 800c4b6: 4b8a ldr r3, [pc, #552] @ (800c6e0 ) 800c4b8: 6d9b ldr r3, [r3, #88] @ 0x58 800c4ba: f423 7140 bic.w r1, r3, #768 @ 0x300 800c4be: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c4c2: f8d3 3098 ldr.w r3, [r3, #152] @ 0x98 800c4c6: 4a86 ldr r2, [pc, #536] @ (800c6e0 ) 800c4c8: 430b orrs r3, r1 800c4ca: 6593 str r3, [r2, #88] @ 0x58 } /*---------------------------- ADC configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_ADC) == RCC_PERIPHCLK_ADC) 800c4cc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c4d0: e9d3 2300 ldrd r2, r3, [r3] 800c4d4: f402 2300 and.w r3, r2, #524288 @ 0x80000 800c4d8: 67bb str r3, [r7, #120] @ 0x78 800c4da: 2300 movs r3, #0 800c4dc: 67fb str r3, [r7, #124] @ 0x7c 800c4de: e9d7 121e ldrd r1, r2, [r7, #120] @ 0x78 800c4e2: 460b mov r3, r1 800c4e4: 4313 orrs r3, r2 800c4e6: d03e beq.n 800c566 { switch (PeriphClkInit->AdcClockSelection) 800c4e8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c4ec: f8d3 30a4 ldr.w r3, [r3, #164] @ 0xa4 800c4f0: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800c4f4: d022 beq.n 800c53c 800c4f6: f5b3 3f00 cmp.w r3, #131072 @ 0x20000 800c4fa: d81b bhi.n 800c534 800c4fc: 2b00 cmp r3, #0 800c4fe: d003 beq.n 800c508 800c500: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800c504: d00b beq.n 800c51e 800c506: e015 b.n 800c534 { case RCC_ADCCLKSOURCE_PLL2: /* PLL2 is used as clock source for ADC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800c508: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c50c: 3308 adds r3, #8 800c50e: 2100 movs r1, #0 800c510: 4618 mov r0, r3 800c512: f000 fd21 bl 800cf58 800c516: 4603 mov r3, r0 800c518: f887 311f strb.w r3, [r7, #287] @ 0x11f /* ADC clock source configuration done later after clock selection check */ break; 800c51c: e00f b.n 800c53e case RCC_ADCCLKSOURCE_PLL3: /* PLL3 is used as clock source for ADC*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c51e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c522: 3328 adds r3, #40 @ 0x28 800c524: 2102 movs r1, #2 800c526: 4618 mov r0, r3 800c528: f000 fdc8 bl 800d0bc 800c52c: 4603 mov r3, r0 800c52e: f887 311f strb.w r3, [r7, #287] @ 0x11f /* ADC clock source configuration done later after clock selection check */ break; 800c532: e004 b.n 800c53e /* 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; 800c534: 2301 movs r3, #1 800c536: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c53a: e000 b.n 800c53e break; 800c53c: bf00 nop } if (ret == HAL_OK) 800c53e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c542: 2b00 cmp r3, #0 800c544: d10b bne.n 800c55e { /* Set the source of ADC clock*/ __HAL_RCC_ADC_CONFIG(PeriphClkInit->AdcClockSelection); 800c546: 4b66 ldr r3, [pc, #408] @ (800c6e0 ) 800c548: 6d9b ldr r3, [r3, #88] @ 0x58 800c54a: f423 3140 bic.w r1, r3, #196608 @ 0x30000 800c54e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c552: f8d3 30a4 ldr.w r3, [r3, #164] @ 0xa4 800c556: 4a62 ldr r2, [pc, #392] @ (800c6e0 ) 800c558: 430b orrs r3, r1 800c55a: 6593 str r3, [r2, #88] @ 0x58 800c55c: e003 b.n 800c566 } else { /* set overall return value */ status = ret; 800c55e: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c562: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------ USB Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_USB) == RCC_PERIPHCLK_USB) 800c566: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c56a: e9d3 2300 ldrd r2, r3, [r3] 800c56e: f402 2380 and.w r3, r2, #262144 @ 0x40000 800c572: 673b str r3, [r7, #112] @ 0x70 800c574: 2300 movs r3, #0 800c576: 677b str r3, [r7, #116] @ 0x74 800c578: e9d7 121c ldrd r1, r2, [r7, #112] @ 0x70 800c57c: 460b mov r3, r1 800c57e: 4313 orrs r3, r2 800c580: d03b beq.n 800c5fa { switch (PeriphClkInit->UsbClockSelection) 800c582: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c586: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800c58a: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800c58e: d01f beq.n 800c5d0 800c590: f5b3 1f40 cmp.w r3, #3145728 @ 0x300000 800c594: d818 bhi.n 800c5c8 800c596: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800c59a: d003 beq.n 800c5a4 800c59c: f5b3 1f00 cmp.w r3, #2097152 @ 0x200000 800c5a0: d007 beq.n 800c5b2 800c5a2: e011 b.n 800c5c8 { 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); 800c5a4: 4b4e ldr r3, [pc, #312] @ (800c6e0 ) 800c5a6: 6adb ldr r3, [r3, #44] @ 0x2c 800c5a8: 4a4d ldr r2, [pc, #308] @ (800c6e0 ) 800c5aa: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800c5ae: 62d3 str r3, [r2, #44] @ 0x2c /* USB clock source configuration done later after clock selection check */ break; 800c5b0: e00f b.n 800c5d2 case RCC_USBCLKSOURCE_PLL3: /* PLL3 is used as clock source for USB*/ ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800c5b2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c5b6: 3328 adds r3, #40 @ 0x28 800c5b8: 2101 movs r1, #1 800c5ba: 4618 mov r0, r3 800c5bc: f000 fd7e bl 800d0bc 800c5c0: 4603 mov r3, r0 800c5c2: f887 311f strb.w r3, [r7, #287] @ 0x11f /* USB clock source configuration done later after clock selection check */ break; 800c5c6: e004 b.n 800c5d2 /* HSI48 oscillator is used as source of USB clock */ /* USB clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c5c8: 2301 movs r3, #1 800c5ca: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c5ce: e000 b.n 800c5d2 break; 800c5d0: bf00 nop } if (ret == HAL_OK) 800c5d2: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c5d6: 2b00 cmp r3, #0 800c5d8: d10b bne.n 800c5f2 { /* Set the source of USB clock*/ __HAL_RCC_USB_CONFIG(PeriphClkInit->UsbClockSelection); 800c5da: 4b41 ldr r3, [pc, #260] @ (800c6e0 ) 800c5dc: 6d5b ldr r3, [r3, #84] @ 0x54 800c5de: f423 1140 bic.w r1, r3, #3145728 @ 0x300000 800c5e2: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c5e6: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800c5ea: 4a3d ldr r2, [pc, #244] @ (800c6e0 ) 800c5ec: 430b orrs r3, r1 800c5ee: 6553 str r3, [r2, #84] @ 0x54 800c5f0: e003 b.n 800c5fa } else { /* set overall return value */ status = ret; 800c5f2: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c5f6: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------------- SDMMC Configuration ------------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SDMMC) == RCC_PERIPHCLK_SDMMC) 800c5fa: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c5fe: e9d3 2300 ldrd r2, r3, [r3] 800c602: f402 3380 and.w r3, r2, #65536 @ 0x10000 800c606: 66bb str r3, [r7, #104] @ 0x68 800c608: 2300 movs r3, #0 800c60a: 66fb str r3, [r7, #108] @ 0x6c 800c60c: e9d7 121a ldrd r1, r2, [r7, #104] @ 0x68 800c610: 460b mov r3, r1 800c612: 4313 orrs r3, r2 800c614: d031 beq.n 800c67a { /* Check the parameters */ assert_param(IS_RCC_SDMMC(PeriphClkInit->SdmmcClockSelection)); switch (PeriphClkInit->SdmmcClockSelection) 800c616: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c61a: 6d1b ldr r3, [r3, #80] @ 0x50 800c61c: 2b00 cmp r3, #0 800c61e: d003 beq.n 800c628 800c620: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800c624: d007 beq.n 800c636 800c626: e011 b.n 800c64c { 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); 800c628: 4b2d ldr r3, [pc, #180] @ (800c6e0 ) 800c62a: 6adb ldr r3, [r3, #44] @ 0x2c 800c62c: 4a2c ldr r2, [pc, #176] @ (800c6e0 ) 800c62e: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800c632: 62d3 str r3, [r2, #44] @ 0x2c /* SDMMC clock source configuration done later after clock selection check */ break; 800c634: e00e b.n 800c654 case RCC_SDMMCCLKSOURCE_PLL2: /* PLL2 is used as clock source for SDMMC*/ ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800c636: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c63a: 3308 adds r3, #8 800c63c: 2102 movs r1, #2 800c63e: 4618 mov r0, r3 800c640: f000 fc8a bl 800cf58 800c644: 4603 mov r3, r0 800c646: f887 311f strb.w r3, [r7, #287] @ 0x11f /* SDMMC clock source configuration done later after clock selection check */ break; 800c64a: e003 b.n 800c654 default: ret = HAL_ERROR; 800c64c: 2301 movs r3, #1 800c64e: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c652: bf00 nop } if (ret == HAL_OK) 800c654: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c658: 2b00 cmp r3, #0 800c65a: d10a bne.n 800c672 { /* Set the source of SDMMC clock*/ __HAL_RCC_SDMMC_CONFIG(PeriphClkInit->SdmmcClockSelection); 800c65c: 4b20 ldr r3, [pc, #128] @ (800c6e0 ) 800c65e: 6cdb ldr r3, [r3, #76] @ 0x4c 800c660: f423 3180 bic.w r1, r3, #65536 @ 0x10000 800c664: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c668: 6d1b ldr r3, [r3, #80] @ 0x50 800c66a: 4a1d ldr r2, [pc, #116] @ (800c6e0 ) 800c66c: 430b orrs r3, r1 800c66e: 64d3 str r3, [r2, #76] @ 0x4c 800c670: e003 b.n 800c67a } else { /* set overall return value */ status = ret; 800c672: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c676: f887 311e strb.w r3, [r7, #286] @ 0x11e } } #endif /* LTDC */ /*------------------------------ RNG Configuration -------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_RNG) == RCC_PERIPHCLK_RNG) 800c67a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c67e: e9d3 2300 ldrd r2, r3, [r3] 800c682: f402 3300 and.w r3, r2, #131072 @ 0x20000 800c686: 663b str r3, [r7, #96] @ 0x60 800c688: 2300 movs r3, #0 800c68a: 667b str r3, [r7, #100] @ 0x64 800c68c: e9d7 1218 ldrd r1, r2, [r7, #96] @ 0x60 800c690: 460b mov r3, r1 800c692: 4313 orrs r3, r2 800c694: d03b beq.n 800c70e { switch (PeriphClkInit->RngClockSelection) 800c696: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c69a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800c69e: f5b3 7f40 cmp.w r3, #768 @ 0x300 800c6a2: d018 beq.n 800c6d6 800c6a4: f5b3 7f40 cmp.w r3, #768 @ 0x300 800c6a8: d811 bhi.n 800c6ce 800c6aa: f5b3 7f00 cmp.w r3, #512 @ 0x200 800c6ae: d014 beq.n 800c6da 800c6b0: f5b3 7f00 cmp.w r3, #512 @ 0x200 800c6b4: d80b bhi.n 800c6ce 800c6b6: 2b00 cmp r3, #0 800c6b8: d014 beq.n 800c6e4 800c6ba: f5b3 7f80 cmp.w r3, #256 @ 0x100 800c6be: d106 bne.n 800c6ce { 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); 800c6c0: 4b07 ldr r3, [pc, #28] @ (800c6e0 ) 800c6c2: 6adb ldr r3, [r3, #44] @ 0x2c 800c6c4: 4a06 ldr r2, [pc, #24] @ (800c6e0 ) 800c6c6: f443 3300 orr.w r3, r3, #131072 @ 0x20000 800c6ca: 62d3 str r3, [r2, #44] @ 0x2c /* RNG clock source configuration done later after clock selection check */ break; 800c6cc: e00b b.n 800c6e6 /* HSI48 oscillator is used as source of RNG clock */ /* RNG clock source configuration done later after clock selection check */ break; default: ret = HAL_ERROR; 800c6ce: 2301 movs r3, #1 800c6d0: f887 311f strb.w r3, [r7, #287] @ 0x11f break; 800c6d4: e007 b.n 800c6e6 break; 800c6d6: bf00 nop 800c6d8: e005 b.n 800c6e6 break; 800c6da: bf00 nop 800c6dc: e003 b.n 800c6e6 800c6de: bf00 nop 800c6e0: 58024400 .word 0x58024400 break; 800c6e4: bf00 nop } if (ret == HAL_OK) 800c6e6: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c6ea: 2b00 cmp r3, #0 800c6ec: d10b bne.n 800c706 { /* Set the source of RNG clock*/ __HAL_RCC_RNG_CONFIG(PeriphClkInit->RngClockSelection); 800c6ee: 4bba ldr r3, [pc, #744] @ (800c9d8 ) 800c6f0: 6d5b ldr r3, [r3, #84] @ 0x54 800c6f2: f423 7140 bic.w r1, r3, #768 @ 0x300 800c6f6: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c6fa: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800c6fe: 4ab6 ldr r2, [pc, #728] @ (800c9d8 ) 800c700: 430b orrs r3, r1 800c702: 6553 str r3, [r2, #84] @ 0x54 800c704: e003 b.n 800c70e } else { /* set overall return value */ status = ret; 800c706: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c70a: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*------------------------------ SWPMI1 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_SWPMI1) == RCC_PERIPHCLK_SWPMI1) 800c70e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c712: e9d3 2300 ldrd r2, r3, [r3] 800c716: f402 1380 and.w r3, r2, #1048576 @ 0x100000 800c71a: 65bb str r3, [r7, #88] @ 0x58 800c71c: 2300 movs r3, #0 800c71e: 65fb str r3, [r7, #92] @ 0x5c 800c720: e9d7 1216 ldrd r1, r2, [r7, #88] @ 0x58 800c724: 460b mov r3, r1 800c726: 4313 orrs r3, r2 800c728: d009 beq.n 800c73e { /* Check the parameters */ assert_param(IS_RCC_SWPMI1CLKSOURCE(PeriphClkInit->Swpmi1ClockSelection)); /* Configure the SWPMI1 interface clock source */ __HAL_RCC_SWPMI1_CONFIG(PeriphClkInit->Swpmi1ClockSelection); 800c72a: 4bab ldr r3, [pc, #684] @ (800c9d8 ) 800c72c: 6d1b ldr r3, [r3, #80] @ 0x50 800c72e: f023 4100 bic.w r1, r3, #2147483648 @ 0x80000000 800c732: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c736: 6f5b ldr r3, [r3, #116] @ 0x74 800c738: 4aa7 ldr r2, [pc, #668] @ (800c9d8 ) 800c73a: 430b orrs r3, r1 800c73c: 6513 str r3, [r2, #80] @ 0x50 } #if defined(HRTIM1) /*------------------------------ HRTIM1 clock Configuration ----------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_HRTIM1) == RCC_PERIPHCLK_HRTIM1) 800c73e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c742: e9d3 2300 ldrd r2, r3, [r3] 800c746: f002 5380 and.w r3, r2, #268435456 @ 0x10000000 800c74a: 653b str r3, [r7, #80] @ 0x50 800c74c: 2300 movs r3, #0 800c74e: 657b str r3, [r7, #84] @ 0x54 800c750: e9d7 1214 ldrd r1, r2, [r7, #80] @ 0x50 800c754: 460b mov r3, r1 800c756: 4313 orrs r3, r2 800c758: d00a beq.n 800c770 { /* Check the parameters */ assert_param(IS_RCC_HRTIM1CLKSOURCE(PeriphClkInit->Hrtim1ClockSelection)); /* Configure the HRTIM1 clock source */ __HAL_RCC_HRTIM1_CONFIG(PeriphClkInit->Hrtim1ClockSelection); 800c75a: 4b9f ldr r3, [pc, #636] @ (800c9d8 ) 800c75c: 691b ldr r3, [r3, #16] 800c75e: f423 4180 bic.w r1, r3, #16384 @ 0x4000 800c762: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c766: f8d3 30b8 ldr.w r3, [r3, #184] @ 0xb8 800c76a: 4a9b ldr r2, [pc, #620] @ (800c9d8 ) 800c76c: 430b orrs r3, r1 800c76e: 6113 str r3, [r2, #16] } #endif /*HRTIM1*/ /*------------------------------ DFSDM1 Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_DFSDM1) == RCC_PERIPHCLK_DFSDM1) 800c770: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c774: e9d3 2300 ldrd r2, r3, [r3] 800c778: f402 1300 and.w r3, r2, #2097152 @ 0x200000 800c77c: 64bb str r3, [r7, #72] @ 0x48 800c77e: 2300 movs r3, #0 800c780: 64fb str r3, [r7, #76] @ 0x4c 800c782: e9d7 1212 ldrd r1, r2, [r7, #72] @ 0x48 800c786: 460b mov r3, r1 800c788: 4313 orrs r3, r2 800c78a: d009 beq.n 800c7a0 { /* Check the parameters */ assert_param(IS_RCC_DFSDM1CLKSOURCE(PeriphClkInit->Dfsdm1ClockSelection)); /* Configure the DFSDM1 interface clock source */ __HAL_RCC_DFSDM1_CONFIG(PeriphClkInit->Dfsdm1ClockSelection); 800c78c: 4b92 ldr r3, [pc, #584] @ (800c9d8 ) 800c78e: 6d1b ldr r3, [r3, #80] @ 0x50 800c790: f023 7180 bic.w r1, r3, #16777216 @ 0x1000000 800c794: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c798: 6edb ldr r3, [r3, #108] @ 0x6c 800c79a: 4a8f ldr r2, [pc, #572] @ (800c9d8 ) 800c79c: 430b orrs r3, r1 800c79e: 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) 800c7a0: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c7a4: e9d3 2300 ldrd r2, r3, [r3] 800c7a8: f002 4380 and.w r3, r2, #1073741824 @ 0x40000000 800c7ac: 643b str r3, [r7, #64] @ 0x40 800c7ae: 2300 movs r3, #0 800c7b0: 647b str r3, [r7, #68] @ 0x44 800c7b2: e9d7 1210 ldrd r1, r2, [r7, #64] @ 0x40 800c7b6: 460b mov r3, r1 800c7b8: 4313 orrs r3, r2 800c7ba: d00e beq.n 800c7da { /* Check the parameters */ assert_param(IS_RCC_TIMPRES(PeriphClkInit->TIMPresSelection)); /* Configure Timer Prescaler */ __HAL_RCC_TIMCLKPRESCALER(PeriphClkInit->TIMPresSelection); 800c7bc: 4b86 ldr r3, [pc, #536] @ (800c9d8 ) 800c7be: 691b ldr r3, [r3, #16] 800c7c0: 4a85 ldr r2, [pc, #532] @ (800c9d8 ) 800c7c2: f423 4300 bic.w r3, r3, #32768 @ 0x8000 800c7c6: 6113 str r3, [r2, #16] 800c7c8: 4b83 ldr r3, [pc, #524] @ (800c9d8 ) 800c7ca: 6919 ldr r1, [r3, #16] 800c7cc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c7d0: f8d3 30bc ldr.w r3, [r3, #188] @ 0xbc 800c7d4: 4a80 ldr r2, [pc, #512] @ (800c9d8 ) 800c7d6: 430b orrs r3, r1 800c7d8: 6113 str r3, [r2, #16] } /*------------------------------------ CKPER configuration --------------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CKPER) == RCC_PERIPHCLK_CKPER) 800c7da: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c7de: e9d3 2300 ldrd r2, r3, [r3] 800c7e2: f002 4300 and.w r3, r2, #2147483648 @ 0x80000000 800c7e6: 63bb str r3, [r7, #56] @ 0x38 800c7e8: 2300 movs r3, #0 800c7ea: 63fb str r3, [r7, #60] @ 0x3c 800c7ec: e9d7 120e ldrd r1, r2, [r7, #56] @ 0x38 800c7f0: 460b mov r3, r1 800c7f2: 4313 orrs r3, r2 800c7f4: d009 beq.n 800c80a { /* Check the parameters */ assert_param(IS_RCC_CLKPSOURCE(PeriphClkInit->CkperClockSelection)); /* Configure the CKPER clock source */ __HAL_RCC_CLKP_CONFIG(PeriphClkInit->CkperClockSelection); 800c7f6: 4b78 ldr r3, [pc, #480] @ (800c9d8 ) 800c7f8: 6cdb ldr r3, [r3, #76] @ 0x4c 800c7fa: f023 5140 bic.w r1, r3, #805306368 @ 0x30000000 800c7fe: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c802: 6d5b ldr r3, [r3, #84] @ 0x54 800c804: 4a74 ldr r2, [pc, #464] @ (800c9d8 ) 800c806: 430b orrs r3, r1 800c808: 64d3 str r3, [r2, #76] @ 0x4c } /*------------------------------ CEC Configuration ------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_CEC) == RCC_PERIPHCLK_CEC) 800c80a: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c80e: e9d3 2300 ldrd r2, r3, [r3] 800c812: f402 0300 and.w r3, r2, #8388608 @ 0x800000 800c816: 633b str r3, [r7, #48] @ 0x30 800c818: 2300 movs r3, #0 800c81a: 637b str r3, [r7, #52] @ 0x34 800c81c: e9d7 120c ldrd r1, r2, [r7, #48] @ 0x30 800c820: 460b mov r3, r1 800c822: 4313 orrs r3, r2 800c824: d00a beq.n 800c83c { /* Check the parameters */ assert_param(IS_RCC_CECCLKSOURCE(PeriphClkInit->CecClockSelection)); /* Configure the CEC interface clock source */ __HAL_RCC_CEC_CONFIG(PeriphClkInit->CecClockSelection); 800c826: 4b6c ldr r3, [pc, #432] @ (800c9d8 ) 800c828: 6d5b ldr r3, [r3, #84] @ 0x54 800c82a: f423 0140 bic.w r1, r3, #12582912 @ 0xc00000 800c82e: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c832: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800c836: 4a68 ldr r2, [pc, #416] @ (800c9d8 ) 800c838: 430b orrs r3, r1 800c83a: 6553 str r3, [r2, #84] @ 0x54 } /*---------------------------- PLL2 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVP) == RCC_PERIPHCLK_PLL2_DIVP) 800c83c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c840: e9d3 2300 ldrd r2, r3, [r3] 800c844: 2100 movs r1, #0 800c846: 62b9 str r1, [r7, #40] @ 0x28 800c848: f003 0301 and.w r3, r3, #1 800c84c: 62fb str r3, [r7, #44] @ 0x2c 800c84e: e9d7 120a ldrd r1, r2, [r7, #40] @ 0x28 800c852: 460b mov r3, r1 800c854: 4313 orrs r3, r2 800c856: d011 beq.n 800c87c { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_P_UPDATE); 800c858: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c85c: 3308 adds r3, #8 800c85e: 2100 movs r1, #0 800c860: 4618 mov r0, r3 800c862: f000 fb79 bl 800cf58 800c866: 4603 mov r3, r0 800c868: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c86c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c870: 2b00 cmp r3, #0 800c872: d003 beq.n 800c87c /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c874: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c878: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVQ) == RCC_PERIPHCLK_PLL2_DIVQ) 800c87c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c880: e9d3 2300 ldrd r2, r3, [r3] 800c884: 2100 movs r1, #0 800c886: 6239 str r1, [r7, #32] 800c888: f003 0302 and.w r3, r3, #2 800c88c: 627b str r3, [r7, #36] @ 0x24 800c88e: e9d7 1208 ldrd r1, r2, [r7, #32] 800c892: 460b mov r3, r1 800c894: 4313 orrs r3, r2 800c896: d011 beq.n 800c8bc { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_Q_UPDATE); 800c898: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c89c: 3308 adds r3, #8 800c89e: 2101 movs r1, #1 800c8a0: 4618 mov r0, r3 800c8a2: f000 fb59 bl 800cf58 800c8a6: 4603 mov r3, r0 800c8a8: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c8ac: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c8b0: 2b00 cmp r3, #0 800c8b2: d003 beq.n 800c8bc /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c8b4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c8b8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL2_DIVR) == RCC_PERIPHCLK_PLL2_DIVR) 800c8bc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c8c0: e9d3 2300 ldrd r2, r3, [r3] 800c8c4: 2100 movs r1, #0 800c8c6: 61b9 str r1, [r7, #24] 800c8c8: f003 0304 and.w r3, r3, #4 800c8cc: 61fb str r3, [r7, #28] 800c8ce: e9d7 1206 ldrd r1, r2, [r7, #24] 800c8d2: 460b mov r3, r1 800c8d4: 4313 orrs r3, r2 800c8d6: d011 beq.n 800c8fc { ret = RCCEx_PLL2_Config(&(PeriphClkInit->PLL2), DIVIDER_R_UPDATE); 800c8d8: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c8dc: 3308 adds r3, #8 800c8de: 2102 movs r1, #2 800c8e0: 4618 mov r0, r3 800c8e2: f000 fb39 bl 800cf58 800c8e6: 4603 mov r3, r0 800c8e8: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c8ec: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c8f0: 2b00 cmp r3, #0 800c8f2: d003 beq.n 800c8fc /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c8f4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c8f8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } /*---------------------------- PLL3 configuration -------------------------------*/ if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVP) == RCC_PERIPHCLK_PLL3_DIVP) 800c8fc: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c900: e9d3 2300 ldrd r2, r3, [r3] 800c904: 2100 movs r1, #0 800c906: 6139 str r1, [r7, #16] 800c908: f003 0308 and.w r3, r3, #8 800c90c: 617b str r3, [r7, #20] 800c90e: e9d7 1204 ldrd r1, r2, [r7, #16] 800c912: 460b mov r3, r1 800c914: 4313 orrs r3, r2 800c916: d011 beq.n 800c93c { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_P_UPDATE); 800c918: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c91c: 3328 adds r3, #40 @ 0x28 800c91e: 2100 movs r1, #0 800c920: 4618 mov r0, r3 800c922: f000 fbcb bl 800d0bc 800c926: 4603 mov r3, r0 800c928: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c92c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c930: 2b00 cmp r3, #0 800c932: d003 beq.n 800c93c /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c934: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c938: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVQ) == RCC_PERIPHCLK_PLL3_DIVQ) 800c93c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c940: e9d3 2300 ldrd r2, r3, [r3] 800c944: 2100 movs r1, #0 800c946: 60b9 str r1, [r7, #8] 800c948: f003 0310 and.w r3, r3, #16 800c94c: 60fb str r3, [r7, #12] 800c94e: e9d7 1202 ldrd r1, r2, [r7, #8] 800c952: 460b mov r3, r1 800c954: 4313 orrs r3, r2 800c956: d011 beq.n 800c97c { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_Q_UPDATE); 800c958: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c95c: 3328 adds r3, #40 @ 0x28 800c95e: 2101 movs r1, #1 800c960: 4618 mov r0, r3 800c962: f000 fbab bl 800d0bc 800c966: 4603 mov r3, r0 800c968: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c96c: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c970: 2b00 cmp r3, #0 800c972: d003 beq.n 800c97c /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c974: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c978: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (((PeriphClkInit->PeriphClockSelection) & RCC_PERIPHCLK_PLL3_DIVR) == RCC_PERIPHCLK_PLL3_DIVR) 800c97c: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c980: e9d3 2300 ldrd r2, r3, [r3] 800c984: 2100 movs r1, #0 800c986: 6039 str r1, [r7, #0] 800c988: f003 0320 and.w r3, r3, #32 800c98c: 607b str r3, [r7, #4] 800c98e: e9d7 1200 ldrd r1, r2, [r7] 800c992: 460b mov r3, r1 800c994: 4313 orrs r3, r2 800c996: d011 beq.n 800c9bc { ret = RCCEx_PLL3_Config(&(PeriphClkInit->PLL3), DIVIDER_R_UPDATE); 800c998: f8d7 310c ldr.w r3, [r7, #268] @ 0x10c 800c99c: 3328 adds r3, #40 @ 0x28 800c99e: 2102 movs r1, #2 800c9a0: 4618 mov r0, r3 800c9a2: f000 fb8b bl 800d0bc 800c9a6: 4603 mov r3, r0 800c9a8: f887 311f strb.w r3, [r7, #287] @ 0x11f if (ret == HAL_OK) 800c9ac: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c9b0: 2b00 cmp r3, #0 800c9b2: d003 beq.n 800c9bc /*Nothing to do*/ } else { /* set overall return value */ status = ret; 800c9b4: f897 311f ldrb.w r3, [r7, #287] @ 0x11f 800c9b8: f887 311e strb.w r3, [r7, #286] @ 0x11e } } if (status == HAL_OK) 800c9bc: f897 311e ldrb.w r3, [r7, #286] @ 0x11e 800c9c0: 2b00 cmp r3, #0 800c9c2: d101 bne.n 800c9c8 { return HAL_OK; 800c9c4: 2300 movs r3, #0 800c9c6: e000 b.n 800c9ca } return HAL_ERROR; 800c9c8: 2301 movs r3, #1 } 800c9ca: 4618 mov r0, r3 800c9cc: f507 7790 add.w r7, r7, #288 @ 0x120 800c9d0: 46bd mov sp, r7 800c9d2: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} 800c9d6: bf00 nop 800c9d8: 58024400 .word 0x58024400 0800c9dc : * @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) { 800c9dc: b580 push {r7, lr} 800c9de: 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)); 800c9e0: f7fe fd70 bl 800b4c4 800c9e4: 4602 mov r2, r0 800c9e6: 4b06 ldr r3, [pc, #24] @ (800ca00 ) 800c9e8: 6a1b ldr r3, [r3, #32] 800c9ea: 091b lsrs r3, r3, #4 800c9ec: f003 0307 and.w r3, r3, #7 800c9f0: 4904 ldr r1, [pc, #16] @ (800ca04 ) 800c9f2: 5ccb ldrb r3, [r1, r3] 800c9f4: f003 031f and.w r3, r3, #31 800c9f8: 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 } 800c9fc: 4618 mov r0, r3 800c9fe: bd80 pop {r7, pc} 800ca00: 58024400 .word 0x58024400 800ca04: 08031abc .word 0x08031abc 0800ca08 : * 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) { 800ca08: b480 push {r7} 800ca0a: b089 sub sp, #36 @ 0x24 800ca0c: af00 add r7, sp, #0 800ca0e: 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); 800ca10: 4ba1 ldr r3, [pc, #644] @ (800cc98 ) 800ca12: 6a9b ldr r3, [r3, #40] @ 0x28 800ca14: f003 0303 and.w r3, r3, #3 800ca18: 61bb str r3, [r7, #24] pll2m = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM2) >> 12); 800ca1a: 4b9f ldr r3, [pc, #636] @ (800cc98 ) 800ca1c: 6a9b ldr r3, [r3, #40] @ 0x28 800ca1e: 0b1b lsrs r3, r3, #12 800ca20: f003 033f and.w r3, r3, #63 @ 0x3f 800ca24: 617b str r3, [r7, #20] pll2fracen = (RCC->PLLCFGR & RCC_PLLCFGR_PLL2FRACEN) >> RCC_PLLCFGR_PLL2FRACEN_Pos; 800ca26: 4b9c ldr r3, [pc, #624] @ (800cc98 ) 800ca28: 6adb ldr r3, [r3, #44] @ 0x2c 800ca2a: 091b lsrs r3, r3, #4 800ca2c: f003 0301 and.w r3, r3, #1 800ca30: 613b str r3, [r7, #16] fracn2 = (float_t)(uint32_t)(pll2fracen * ((RCC->PLL2FRACR & RCC_PLL2FRACR_FRACN2) >> 3)); 800ca32: 4b99 ldr r3, [pc, #612] @ (800cc98 ) 800ca34: 6bdb ldr r3, [r3, #60] @ 0x3c 800ca36: 08db lsrs r3, r3, #3 800ca38: f3c3 030c ubfx r3, r3, #0, #13 800ca3c: 693a ldr r2, [r7, #16] 800ca3e: fb02 f303 mul.w r3, r2, r3 800ca42: ee07 3a90 vmov s15, r3 800ca46: eef8 7a67 vcvt.f32.u32 s15, s15 800ca4a: edc7 7a03 vstr s15, [r7, #12] if (pll2m != 0U) 800ca4e: 697b ldr r3, [r7, #20] 800ca50: 2b00 cmp r3, #0 800ca52: f000 8111 beq.w 800cc78 { switch (pllsource) 800ca56: 69bb ldr r3, [r7, #24] 800ca58: 2b02 cmp r3, #2 800ca5a: f000 8083 beq.w 800cb64 800ca5e: 69bb ldr r3, [r7, #24] 800ca60: 2b02 cmp r3, #2 800ca62: f200 80a1 bhi.w 800cba8 800ca66: 69bb ldr r3, [r7, #24] 800ca68: 2b00 cmp r3, #0 800ca6a: d003 beq.n 800ca74 800ca6c: 69bb ldr r3, [r7, #24] 800ca6e: 2b01 cmp r3, #1 800ca70: d056 beq.n 800cb20 800ca72: e099 b.n 800cba8 { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800ca74: 4b88 ldr r3, [pc, #544] @ (800cc98 ) 800ca76: 681b ldr r3, [r3, #0] 800ca78: f003 0320 and.w r3, r3, #32 800ca7c: 2b00 cmp r3, #0 800ca7e: d02d beq.n 800cadc { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800ca80: 4b85 ldr r3, [pc, #532] @ (800cc98 ) 800ca82: 681b ldr r3, [r3, #0] 800ca84: 08db lsrs r3, r3, #3 800ca86: f003 0303 and.w r3, r3, #3 800ca8a: 4a84 ldr r2, [pc, #528] @ (800cc9c ) 800ca8c: fa22 f303 lsr.w r3, r2, r3 800ca90: 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); 800ca92: 68bb ldr r3, [r7, #8] 800ca94: ee07 3a90 vmov s15, r3 800ca98: eef8 6a67 vcvt.f32.u32 s13, s15 800ca9c: 697b ldr r3, [r7, #20] 800ca9e: ee07 3a90 vmov s15, r3 800caa2: eef8 7a67 vcvt.f32.u32 s15, s15 800caa6: ee86 7aa7 vdiv.f32 s14, s13, s15 800caaa: 4b7b ldr r3, [pc, #492] @ (800cc98 ) 800caac: 6b9b ldr r3, [r3, #56] @ 0x38 800caae: f3c3 0308 ubfx r3, r3, #0, #9 800cab2: ee07 3a90 vmov s15, r3 800cab6: eef8 6a67 vcvt.f32.u32 s13, s15 800caba: ed97 6a03 vldr s12, [r7, #12] 800cabe: eddf 5a78 vldr s11, [pc, #480] @ 800cca0 800cac2: eec6 7a25 vdiv.f32 s15, s12, s11 800cac6: ee76 7aa7 vadd.f32 s15, s13, s15 800caca: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cace: ee77 7aa6 vadd.f32 s15, s15, s13 800cad2: ee67 7a27 vmul.f32 s15, s14, s15 800cad6: 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; 800cada: e087 b.n 800cbec pll2vco = ((float_t)HSI_VALUE / (float_t)pll2m) * ((float_t)(uint32_t)(RCC->PLL2DIVR & RCC_PLL2DIVR_N2) + (fracn2 / (float_t)0x2000) + (float_t)1); 800cadc: 697b ldr r3, [r7, #20] 800cade: ee07 3a90 vmov s15, r3 800cae2: eef8 7a67 vcvt.f32.u32 s15, s15 800cae6: eddf 6a6f vldr s13, [pc, #444] @ 800cca4 800caea: ee86 7aa7 vdiv.f32 s14, s13, s15 800caee: 4b6a ldr r3, [pc, #424] @ (800cc98 ) 800caf0: 6b9b ldr r3, [r3, #56] @ 0x38 800caf2: f3c3 0308 ubfx r3, r3, #0, #9 800caf6: ee07 3a90 vmov s15, r3 800cafa: eef8 6a67 vcvt.f32.u32 s13, s15 800cafe: ed97 6a03 vldr s12, [r7, #12] 800cb02: eddf 5a67 vldr s11, [pc, #412] @ 800cca0 800cb06: eec6 7a25 vdiv.f32 s15, s12, s11 800cb0a: ee76 7aa7 vadd.f32 s15, s13, s15 800cb0e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cb12: ee77 7aa6 vadd.f32 s15, s15, s13 800cb16: ee67 7a27 vmul.f32 s15, s14, s15 800cb1a: edc7 7a07 vstr s15, [r7, #28] break; 800cb1e: e065 b.n 800cbec 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); 800cb20: 697b ldr r3, [r7, #20] 800cb22: ee07 3a90 vmov s15, r3 800cb26: eef8 7a67 vcvt.f32.u32 s15, s15 800cb2a: eddf 6a5f vldr s13, [pc, #380] @ 800cca8 800cb2e: ee86 7aa7 vdiv.f32 s14, s13, s15 800cb32: 4b59 ldr r3, [pc, #356] @ (800cc98 ) 800cb34: 6b9b ldr r3, [r3, #56] @ 0x38 800cb36: f3c3 0308 ubfx r3, r3, #0, #9 800cb3a: ee07 3a90 vmov s15, r3 800cb3e: eef8 6a67 vcvt.f32.u32 s13, s15 800cb42: ed97 6a03 vldr s12, [r7, #12] 800cb46: eddf 5a56 vldr s11, [pc, #344] @ 800cca0 800cb4a: eec6 7a25 vdiv.f32 s15, s12, s11 800cb4e: ee76 7aa7 vadd.f32 s15, s13, s15 800cb52: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cb56: ee77 7aa6 vadd.f32 s15, s15, s13 800cb5a: ee67 7a27 vmul.f32 s15, s14, s15 800cb5e: edc7 7a07 vstr s15, [r7, #28] break; 800cb62: e043 b.n 800cbec 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); 800cb64: 697b ldr r3, [r7, #20] 800cb66: ee07 3a90 vmov s15, r3 800cb6a: eef8 7a67 vcvt.f32.u32 s15, s15 800cb6e: eddf 6a4f vldr s13, [pc, #316] @ 800ccac 800cb72: ee86 7aa7 vdiv.f32 s14, s13, s15 800cb76: 4b48 ldr r3, [pc, #288] @ (800cc98 ) 800cb78: 6b9b ldr r3, [r3, #56] @ 0x38 800cb7a: f3c3 0308 ubfx r3, r3, #0, #9 800cb7e: ee07 3a90 vmov s15, r3 800cb82: eef8 6a67 vcvt.f32.u32 s13, s15 800cb86: ed97 6a03 vldr s12, [r7, #12] 800cb8a: eddf 5a45 vldr s11, [pc, #276] @ 800cca0 800cb8e: eec6 7a25 vdiv.f32 s15, s12, s11 800cb92: ee76 7aa7 vadd.f32 s15, s13, s15 800cb96: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cb9a: ee77 7aa6 vadd.f32 s15, s15, s13 800cb9e: ee67 7a27 vmul.f32 s15, s14, s15 800cba2: edc7 7a07 vstr s15, [r7, #28] break; 800cba6: e021 b.n 800cbec 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); 800cba8: 697b ldr r3, [r7, #20] 800cbaa: ee07 3a90 vmov s15, r3 800cbae: eef8 7a67 vcvt.f32.u32 s15, s15 800cbb2: eddf 6a3d vldr s13, [pc, #244] @ 800cca8 800cbb6: ee86 7aa7 vdiv.f32 s14, s13, s15 800cbba: 4b37 ldr r3, [pc, #220] @ (800cc98 ) 800cbbc: 6b9b ldr r3, [r3, #56] @ 0x38 800cbbe: f3c3 0308 ubfx r3, r3, #0, #9 800cbc2: ee07 3a90 vmov s15, r3 800cbc6: eef8 6a67 vcvt.f32.u32 s13, s15 800cbca: ed97 6a03 vldr s12, [r7, #12] 800cbce: eddf 5a34 vldr s11, [pc, #208] @ 800cca0 800cbd2: eec6 7a25 vdiv.f32 s15, s12, s11 800cbd6: ee76 7aa7 vadd.f32 s15, s13, s15 800cbda: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cbde: ee77 7aa6 vadd.f32 s15, s15, s13 800cbe2: ee67 7a27 vmul.f32 s15, s14, s15 800cbe6: edc7 7a07 vstr s15, [r7, #28] break; 800cbea: 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)) ; 800cbec: 4b2a ldr r3, [pc, #168] @ (800cc98 ) 800cbee: 6b9b ldr r3, [r3, #56] @ 0x38 800cbf0: 0a5b lsrs r3, r3, #9 800cbf2: f003 037f and.w r3, r3, #127 @ 0x7f 800cbf6: ee07 3a90 vmov s15, r3 800cbfa: eef8 7a67 vcvt.f32.u32 s15, s15 800cbfe: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cc02: ee37 7a87 vadd.f32 s14, s15, s14 800cc06: edd7 6a07 vldr s13, [r7, #28] 800cc0a: eec6 7a87 vdiv.f32 s15, s13, s14 800cc0e: eefc 7ae7 vcvt.u32.f32 s15, s15 800cc12: ee17 2a90 vmov r2, s15 800cc16: 687b ldr r3, [r7, #4] 800cc18: 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)) ; 800cc1a: 4b1f ldr r3, [pc, #124] @ (800cc98 ) 800cc1c: 6b9b ldr r3, [r3, #56] @ 0x38 800cc1e: 0c1b lsrs r3, r3, #16 800cc20: f003 037f and.w r3, r3, #127 @ 0x7f 800cc24: ee07 3a90 vmov s15, r3 800cc28: eef8 7a67 vcvt.f32.u32 s15, s15 800cc2c: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cc30: ee37 7a87 vadd.f32 s14, s15, s14 800cc34: edd7 6a07 vldr s13, [r7, #28] 800cc38: eec6 7a87 vdiv.f32 s15, s13, s14 800cc3c: eefc 7ae7 vcvt.u32.f32 s15, s15 800cc40: ee17 2a90 vmov r2, s15 800cc44: 687b ldr r3, [r7, #4] 800cc46: 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)) ; 800cc48: 4b13 ldr r3, [pc, #76] @ (800cc98 ) 800cc4a: 6b9b ldr r3, [r3, #56] @ 0x38 800cc4c: 0e1b lsrs r3, r3, #24 800cc4e: f003 037f and.w r3, r3, #127 @ 0x7f 800cc52: ee07 3a90 vmov s15, r3 800cc56: eef8 7a67 vcvt.f32.u32 s15, s15 800cc5a: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cc5e: ee37 7a87 vadd.f32 s14, s15, s14 800cc62: edd7 6a07 vldr s13, [r7, #28] 800cc66: eec6 7a87 vdiv.f32 s15, s13, s14 800cc6a: eefc 7ae7 vcvt.u32.f32 s15, s15 800cc6e: ee17 2a90 vmov r2, s15 800cc72: 687b ldr r3, [r7, #4] 800cc74: 609a str r2, [r3, #8] { PLL2_Clocks->PLL2_P_Frequency = 0U; PLL2_Clocks->PLL2_Q_Frequency = 0U; PLL2_Clocks->PLL2_R_Frequency = 0U; } } 800cc76: e008 b.n 800cc8a PLL2_Clocks->PLL2_P_Frequency = 0U; 800cc78: 687b ldr r3, [r7, #4] 800cc7a: 2200 movs r2, #0 800cc7c: 601a str r2, [r3, #0] PLL2_Clocks->PLL2_Q_Frequency = 0U; 800cc7e: 687b ldr r3, [r7, #4] 800cc80: 2200 movs r2, #0 800cc82: 605a str r2, [r3, #4] PLL2_Clocks->PLL2_R_Frequency = 0U; 800cc84: 687b ldr r3, [r7, #4] 800cc86: 2200 movs r2, #0 800cc88: 609a str r2, [r3, #8] } 800cc8a: bf00 nop 800cc8c: 3724 adds r7, #36 @ 0x24 800cc8e: 46bd mov sp, r7 800cc90: f85d 7b04 ldr.w r7, [sp], #4 800cc94: 4770 bx lr 800cc96: bf00 nop 800cc98: 58024400 .word 0x58024400 800cc9c: 03d09000 .word 0x03d09000 800cca0: 46000000 .word 0x46000000 800cca4: 4c742400 .word 0x4c742400 800cca8: 4a742400 .word 0x4a742400 800ccac: 4bbebc20 .word 0x4bbebc20 0800ccb0 : * 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) { 800ccb0: b480 push {r7} 800ccb2: b089 sub sp, #36 @ 0x24 800ccb4: af00 add r7, sp, #0 800ccb6: 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); 800ccb8: 4ba1 ldr r3, [pc, #644] @ (800cf40 ) 800ccba: 6a9b ldr r3, [r3, #40] @ 0x28 800ccbc: f003 0303 and.w r3, r3, #3 800ccc0: 61bb str r3, [r7, #24] pll3m = ((RCC->PLLCKSELR & RCC_PLLCKSELR_DIVM3) >> 20) ; 800ccc2: 4b9f ldr r3, [pc, #636] @ (800cf40 ) 800ccc4: 6a9b ldr r3, [r3, #40] @ 0x28 800ccc6: 0d1b lsrs r3, r3, #20 800ccc8: f003 033f and.w r3, r3, #63 @ 0x3f 800cccc: 617b str r3, [r7, #20] pll3fracen = (RCC->PLLCFGR & RCC_PLLCFGR_PLL3FRACEN) >> RCC_PLLCFGR_PLL3FRACEN_Pos; 800ccce: 4b9c ldr r3, [pc, #624] @ (800cf40 ) 800ccd0: 6adb ldr r3, [r3, #44] @ 0x2c 800ccd2: 0a1b lsrs r3, r3, #8 800ccd4: f003 0301 and.w r3, r3, #1 800ccd8: 613b str r3, [r7, #16] fracn3 = (float_t)(uint32_t)(pll3fracen * ((RCC->PLL3FRACR & RCC_PLL3FRACR_FRACN3) >> 3)); 800ccda: 4b99 ldr r3, [pc, #612] @ (800cf40 ) 800ccdc: 6c5b ldr r3, [r3, #68] @ 0x44 800ccde: 08db lsrs r3, r3, #3 800cce0: f3c3 030c ubfx r3, r3, #0, #13 800cce4: 693a ldr r2, [r7, #16] 800cce6: fb02 f303 mul.w r3, r2, r3 800ccea: ee07 3a90 vmov s15, r3 800ccee: eef8 7a67 vcvt.f32.u32 s15, s15 800ccf2: edc7 7a03 vstr s15, [r7, #12] if (pll3m != 0U) 800ccf6: 697b ldr r3, [r7, #20] 800ccf8: 2b00 cmp r3, #0 800ccfa: f000 8111 beq.w 800cf20 { switch (pllsource) 800ccfe: 69bb ldr r3, [r7, #24] 800cd00: 2b02 cmp r3, #2 800cd02: f000 8083 beq.w 800ce0c 800cd06: 69bb ldr r3, [r7, #24] 800cd08: 2b02 cmp r3, #2 800cd0a: f200 80a1 bhi.w 800ce50 800cd0e: 69bb ldr r3, [r7, #24] 800cd10: 2b00 cmp r3, #0 800cd12: d003 beq.n 800cd1c 800cd14: 69bb ldr r3, [r7, #24] 800cd16: 2b01 cmp r3, #1 800cd18: d056 beq.n 800cdc8 800cd1a: e099 b.n 800ce50 { case RCC_PLLSOURCE_HSI: /* HSI used as PLL clock source */ if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800cd1c: 4b88 ldr r3, [pc, #544] @ (800cf40 ) 800cd1e: 681b ldr r3, [r3, #0] 800cd20: f003 0320 and.w r3, r3, #32 800cd24: 2b00 cmp r3, #0 800cd26: d02d beq.n 800cd84 { hsivalue = (HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3)); 800cd28: 4b85 ldr r3, [pc, #532] @ (800cf40 ) 800cd2a: 681b ldr r3, [r3, #0] 800cd2c: 08db lsrs r3, r3, #3 800cd2e: f003 0303 and.w r3, r3, #3 800cd32: 4a84 ldr r2, [pc, #528] @ (800cf44 ) 800cd34: fa22 f303 lsr.w r3, r2, r3 800cd38: 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); 800cd3a: 68bb ldr r3, [r7, #8] 800cd3c: ee07 3a90 vmov s15, r3 800cd40: eef8 6a67 vcvt.f32.u32 s13, s15 800cd44: 697b ldr r3, [r7, #20] 800cd46: ee07 3a90 vmov s15, r3 800cd4a: eef8 7a67 vcvt.f32.u32 s15, s15 800cd4e: ee86 7aa7 vdiv.f32 s14, s13, s15 800cd52: 4b7b ldr r3, [pc, #492] @ (800cf40 ) 800cd54: 6c1b ldr r3, [r3, #64] @ 0x40 800cd56: f3c3 0308 ubfx r3, r3, #0, #9 800cd5a: ee07 3a90 vmov s15, r3 800cd5e: eef8 6a67 vcvt.f32.u32 s13, s15 800cd62: ed97 6a03 vldr s12, [r7, #12] 800cd66: eddf 5a78 vldr s11, [pc, #480] @ 800cf48 800cd6a: eec6 7a25 vdiv.f32 s15, s12, s11 800cd6e: ee76 7aa7 vadd.f32 s15, s13, s15 800cd72: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cd76: ee77 7aa6 vadd.f32 s15, s15, s13 800cd7a: ee67 7a27 vmul.f32 s15, s14, s15 800cd7e: 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; 800cd82: e087 b.n 800ce94 pll3vco = ((float_t)HSI_VALUE / (float_t)pll3m) * ((float_t)(uint32_t)(RCC->PLL3DIVR & RCC_PLL3DIVR_N3) + (fracn3 / (float_t)0x2000) + (float_t)1); 800cd84: 697b ldr r3, [r7, #20] 800cd86: ee07 3a90 vmov s15, r3 800cd8a: eef8 7a67 vcvt.f32.u32 s15, s15 800cd8e: eddf 6a6f vldr s13, [pc, #444] @ 800cf4c 800cd92: ee86 7aa7 vdiv.f32 s14, s13, s15 800cd96: 4b6a ldr r3, [pc, #424] @ (800cf40 ) 800cd98: 6c1b ldr r3, [r3, #64] @ 0x40 800cd9a: f3c3 0308 ubfx r3, r3, #0, #9 800cd9e: ee07 3a90 vmov s15, r3 800cda2: eef8 6a67 vcvt.f32.u32 s13, s15 800cda6: ed97 6a03 vldr s12, [r7, #12] 800cdaa: eddf 5a67 vldr s11, [pc, #412] @ 800cf48 800cdae: eec6 7a25 vdiv.f32 s15, s12, s11 800cdb2: ee76 7aa7 vadd.f32 s15, s13, s15 800cdb6: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cdba: ee77 7aa6 vadd.f32 s15, s15, s13 800cdbe: ee67 7a27 vmul.f32 s15, s14, s15 800cdc2: edc7 7a07 vstr s15, [r7, #28] break; 800cdc6: e065 b.n 800ce94 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); 800cdc8: 697b ldr r3, [r7, #20] 800cdca: ee07 3a90 vmov s15, r3 800cdce: eef8 7a67 vcvt.f32.u32 s15, s15 800cdd2: eddf 6a5f vldr s13, [pc, #380] @ 800cf50 800cdd6: ee86 7aa7 vdiv.f32 s14, s13, s15 800cdda: 4b59 ldr r3, [pc, #356] @ (800cf40 ) 800cddc: 6c1b ldr r3, [r3, #64] @ 0x40 800cdde: f3c3 0308 ubfx r3, r3, #0, #9 800cde2: ee07 3a90 vmov s15, r3 800cde6: eef8 6a67 vcvt.f32.u32 s13, s15 800cdea: ed97 6a03 vldr s12, [r7, #12] 800cdee: eddf 5a56 vldr s11, [pc, #344] @ 800cf48 800cdf2: eec6 7a25 vdiv.f32 s15, s12, s11 800cdf6: ee76 7aa7 vadd.f32 s15, s13, s15 800cdfa: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800cdfe: ee77 7aa6 vadd.f32 s15, s15, s13 800ce02: ee67 7a27 vmul.f32 s15, s14, s15 800ce06: edc7 7a07 vstr s15, [r7, #28] break; 800ce0a: e043 b.n 800ce94 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); 800ce0c: 697b ldr r3, [r7, #20] 800ce0e: ee07 3a90 vmov s15, r3 800ce12: eef8 7a67 vcvt.f32.u32 s15, s15 800ce16: eddf 6a4f vldr s13, [pc, #316] @ 800cf54 800ce1a: ee86 7aa7 vdiv.f32 s14, s13, s15 800ce1e: 4b48 ldr r3, [pc, #288] @ (800cf40 ) 800ce20: 6c1b ldr r3, [r3, #64] @ 0x40 800ce22: f3c3 0308 ubfx r3, r3, #0, #9 800ce26: ee07 3a90 vmov s15, r3 800ce2a: eef8 6a67 vcvt.f32.u32 s13, s15 800ce2e: ed97 6a03 vldr s12, [r7, #12] 800ce32: eddf 5a45 vldr s11, [pc, #276] @ 800cf48 800ce36: eec6 7a25 vdiv.f32 s15, s12, s11 800ce3a: ee76 7aa7 vadd.f32 s15, s13, s15 800ce3e: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800ce42: ee77 7aa6 vadd.f32 s15, s15, s13 800ce46: ee67 7a27 vmul.f32 s15, s14, s15 800ce4a: edc7 7a07 vstr s15, [r7, #28] break; 800ce4e: e021 b.n 800ce94 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); 800ce50: 697b ldr r3, [r7, #20] 800ce52: ee07 3a90 vmov s15, r3 800ce56: eef8 7a67 vcvt.f32.u32 s15, s15 800ce5a: eddf 6a3d vldr s13, [pc, #244] @ 800cf50 800ce5e: ee86 7aa7 vdiv.f32 s14, s13, s15 800ce62: 4b37 ldr r3, [pc, #220] @ (800cf40 ) 800ce64: 6c1b ldr r3, [r3, #64] @ 0x40 800ce66: f3c3 0308 ubfx r3, r3, #0, #9 800ce6a: ee07 3a90 vmov s15, r3 800ce6e: eef8 6a67 vcvt.f32.u32 s13, s15 800ce72: ed97 6a03 vldr s12, [r7, #12] 800ce76: eddf 5a34 vldr s11, [pc, #208] @ 800cf48 800ce7a: eec6 7a25 vdiv.f32 s15, s12, s11 800ce7e: ee76 7aa7 vadd.f32 s15, s13, s15 800ce82: eef7 6a00 vmov.f32 s13, #112 @ 0x3f800000 1.0 800ce86: ee77 7aa6 vadd.f32 s15, s15, s13 800ce8a: ee67 7a27 vmul.f32 s15, s14, s15 800ce8e: edc7 7a07 vstr s15, [r7, #28] break; 800ce92: 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)) ; 800ce94: 4b2a ldr r3, [pc, #168] @ (800cf40 ) 800ce96: 6c1b ldr r3, [r3, #64] @ 0x40 800ce98: 0a5b lsrs r3, r3, #9 800ce9a: f003 037f and.w r3, r3, #127 @ 0x7f 800ce9e: ee07 3a90 vmov s15, r3 800cea2: eef8 7a67 vcvt.f32.u32 s15, s15 800cea6: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800ceaa: ee37 7a87 vadd.f32 s14, s15, s14 800ceae: edd7 6a07 vldr s13, [r7, #28] 800ceb2: eec6 7a87 vdiv.f32 s15, s13, s14 800ceb6: eefc 7ae7 vcvt.u32.f32 s15, s15 800ceba: ee17 2a90 vmov r2, s15 800cebe: 687b ldr r3, [r7, #4] 800cec0: 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)) ; 800cec2: 4b1f ldr r3, [pc, #124] @ (800cf40 ) 800cec4: 6c1b ldr r3, [r3, #64] @ 0x40 800cec6: 0c1b lsrs r3, r3, #16 800cec8: f003 037f and.w r3, r3, #127 @ 0x7f 800cecc: ee07 3a90 vmov s15, r3 800ced0: eef8 7a67 vcvt.f32.u32 s15, s15 800ced4: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800ced8: ee37 7a87 vadd.f32 s14, s15, s14 800cedc: edd7 6a07 vldr s13, [r7, #28] 800cee0: eec6 7a87 vdiv.f32 s15, s13, s14 800cee4: eefc 7ae7 vcvt.u32.f32 s15, s15 800cee8: ee17 2a90 vmov r2, s15 800ceec: 687b ldr r3, [r7, #4] 800ceee: 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)) ; 800cef0: 4b13 ldr r3, [pc, #76] @ (800cf40 ) 800cef2: 6c1b ldr r3, [r3, #64] @ 0x40 800cef4: 0e1b lsrs r3, r3, #24 800cef6: f003 037f and.w r3, r3, #127 @ 0x7f 800cefa: ee07 3a90 vmov s15, r3 800cefe: eef8 7a67 vcvt.f32.u32 s15, s15 800cf02: eeb7 7a00 vmov.f32 s14, #112 @ 0x3f800000 1.0 800cf06: ee37 7a87 vadd.f32 s14, s15, s14 800cf0a: edd7 6a07 vldr s13, [r7, #28] 800cf0e: eec6 7a87 vdiv.f32 s15, s13, s14 800cf12: eefc 7ae7 vcvt.u32.f32 s15, s15 800cf16: ee17 2a90 vmov r2, s15 800cf1a: 687b ldr r3, [r7, #4] 800cf1c: 609a str r2, [r3, #8] PLL3_Clocks->PLL3_P_Frequency = 0U; PLL3_Clocks->PLL3_Q_Frequency = 0U; PLL3_Clocks->PLL3_R_Frequency = 0U; } } 800cf1e: e008 b.n 800cf32 PLL3_Clocks->PLL3_P_Frequency = 0U; 800cf20: 687b ldr r3, [r7, #4] 800cf22: 2200 movs r2, #0 800cf24: 601a str r2, [r3, #0] PLL3_Clocks->PLL3_Q_Frequency = 0U; 800cf26: 687b ldr r3, [r7, #4] 800cf28: 2200 movs r2, #0 800cf2a: 605a str r2, [r3, #4] PLL3_Clocks->PLL3_R_Frequency = 0U; 800cf2c: 687b ldr r3, [r7, #4] 800cf2e: 2200 movs r2, #0 800cf30: 609a str r2, [r3, #8] } 800cf32: bf00 nop 800cf34: 3724 adds r7, #36 @ 0x24 800cf36: 46bd mov sp, r7 800cf38: f85d 7b04 ldr.w r7, [sp], #4 800cf3c: 4770 bx lr 800cf3e: bf00 nop 800cf40: 58024400 .word 0x58024400 800cf44: 03d09000 .word 0x03d09000 800cf48: 46000000 .word 0x46000000 800cf4c: 4c742400 .word 0x4c742400 800cf50: 4a742400 .word 0x4a742400 800cf54: 4bbebc20 .word 0x4bbebc20 0800cf58 : * @note PLL2 is temporary disabled to apply new parameters * * @retval HAL status */ static HAL_StatusTypeDef RCCEx_PLL2_Config(RCC_PLL2InitTypeDef *pll2, uint32_t Divider) { 800cf58: b580 push {r7, lr} 800cf5a: b084 sub sp, #16 800cf5c: af00 add r7, sp, #0 800cf5e: 6078 str r0, [r7, #4] 800cf60: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800cf62: 2300 movs r3, #0 800cf64: 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) 800cf66: 4b53 ldr r3, [pc, #332] @ (800d0b4 ) 800cf68: 6a9b ldr r3, [r3, #40] @ 0x28 800cf6a: f003 0303 and.w r3, r3, #3 800cf6e: 2b03 cmp r3, #3 800cf70: d101 bne.n 800cf76 { return HAL_ERROR; 800cf72: 2301 movs r3, #1 800cf74: e099 b.n 800d0aa else { /* Disable PLL2. */ __HAL_RCC_PLL2_DISABLE(); 800cf76: 4b4f ldr r3, [pc, #316] @ (800d0b4 ) 800cf78: 681b ldr r3, [r3, #0] 800cf7a: 4a4e ldr r2, [pc, #312] @ (800d0b4 ) 800cf7c: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800cf80: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800cf82: f7f8 fc5b bl 800583c 800cf86: 60b8 str r0, [r7, #8] /* Wait till PLL is disabled */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) != 0U) 800cf88: e008 b.n 800cf9c { if ((HAL_GetTick() - tickstart) > PLL2_TIMEOUT_VALUE) 800cf8a: f7f8 fc57 bl 800583c 800cf8e: 4602 mov r2, r0 800cf90: 68bb ldr r3, [r7, #8] 800cf92: 1ad3 subs r3, r2, r3 800cf94: 2b02 cmp r3, #2 800cf96: d901 bls.n 800cf9c { return HAL_TIMEOUT; 800cf98: 2303 movs r3, #3 800cf9a: e086 b.n 800d0aa while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) != 0U) 800cf9c: 4b45 ldr r3, [pc, #276] @ (800d0b4 ) 800cf9e: 681b ldr r3, [r3, #0] 800cfa0: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 800cfa4: 2b00 cmp r3, #0 800cfa6: d1f0 bne.n 800cf8a } } /* Configure PLL2 multiplication and division factors. */ __HAL_RCC_PLL2_CONFIG(pll2->PLL2M, 800cfa8: 4b42 ldr r3, [pc, #264] @ (800d0b4 ) 800cfaa: 6a9b ldr r3, [r3, #40] @ 0x28 800cfac: f423 327c bic.w r2, r3, #258048 @ 0x3f000 800cfb0: 687b ldr r3, [r7, #4] 800cfb2: 681b ldr r3, [r3, #0] 800cfb4: 031b lsls r3, r3, #12 800cfb6: 493f ldr r1, [pc, #252] @ (800d0b4 ) 800cfb8: 4313 orrs r3, r2 800cfba: 628b str r3, [r1, #40] @ 0x28 800cfbc: 687b ldr r3, [r7, #4] 800cfbe: 685b ldr r3, [r3, #4] 800cfc0: 3b01 subs r3, #1 800cfc2: f3c3 0208 ubfx r2, r3, #0, #9 800cfc6: 687b ldr r3, [r7, #4] 800cfc8: 689b ldr r3, [r3, #8] 800cfca: 3b01 subs r3, #1 800cfcc: 025b lsls r3, r3, #9 800cfce: b29b uxth r3, r3 800cfd0: 431a orrs r2, r3 800cfd2: 687b ldr r3, [r7, #4] 800cfd4: 68db ldr r3, [r3, #12] 800cfd6: 3b01 subs r3, #1 800cfd8: 041b lsls r3, r3, #16 800cfda: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800cfde: 431a orrs r2, r3 800cfe0: 687b ldr r3, [r7, #4] 800cfe2: 691b ldr r3, [r3, #16] 800cfe4: 3b01 subs r3, #1 800cfe6: 061b lsls r3, r3, #24 800cfe8: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800cfec: 4931 ldr r1, [pc, #196] @ (800d0b4 ) 800cfee: 4313 orrs r3, r2 800cff0: 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) ; 800cff2: 4b30 ldr r3, [pc, #192] @ (800d0b4 ) 800cff4: 6adb ldr r3, [r3, #44] @ 0x2c 800cff6: f023 02c0 bic.w r2, r3, #192 @ 0xc0 800cffa: 687b ldr r3, [r7, #4] 800cffc: 695b ldr r3, [r3, #20] 800cffe: 492d ldr r1, [pc, #180] @ (800d0b4 ) 800d000: 4313 orrs r3, r2 800d002: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL2 output frequency range : VCO */ __HAL_RCC_PLL2_VCORANGE(pll2->PLL2VCOSEL) ; 800d004: 4b2b ldr r3, [pc, #172] @ (800d0b4 ) 800d006: 6adb ldr r3, [r3, #44] @ 0x2c 800d008: f023 0220 bic.w r2, r3, #32 800d00c: 687b ldr r3, [r7, #4] 800d00e: 699b ldr r3, [r3, #24] 800d010: 4928 ldr r1, [pc, #160] @ (800d0b4 ) 800d012: 4313 orrs r3, r2 800d014: 62cb str r3, [r1, #44] @ 0x2c /* Disable PLL2FRACN . */ __HAL_RCC_PLL2FRACN_DISABLE(); 800d016: 4b27 ldr r3, [pc, #156] @ (800d0b4 ) 800d018: 6adb ldr r3, [r3, #44] @ 0x2c 800d01a: 4a26 ldr r2, [pc, #152] @ (800d0b4 ) 800d01c: f023 0310 bic.w r3, r3, #16 800d020: 62d3 str r3, [r2, #44] @ 0x2c /* Configures PLL2 clock Fractional Part Of The Multiplication Factor */ __HAL_RCC_PLL2FRACN_CONFIG(pll2->PLL2FRACN); 800d022: 4b24 ldr r3, [pc, #144] @ (800d0b4 ) 800d024: 6bda ldr r2, [r3, #60] @ 0x3c 800d026: 4b24 ldr r3, [pc, #144] @ (800d0b8 ) 800d028: 4013 ands r3, r2 800d02a: 687a ldr r2, [r7, #4] 800d02c: 69d2 ldr r2, [r2, #28] 800d02e: 00d2 lsls r2, r2, #3 800d030: 4920 ldr r1, [pc, #128] @ (800d0b4 ) 800d032: 4313 orrs r3, r2 800d034: 63cb str r3, [r1, #60] @ 0x3c /* Enable PLL2FRACN . */ __HAL_RCC_PLL2FRACN_ENABLE(); 800d036: 4b1f ldr r3, [pc, #124] @ (800d0b4 ) 800d038: 6adb ldr r3, [r3, #44] @ 0x2c 800d03a: 4a1e ldr r2, [pc, #120] @ (800d0b4 ) 800d03c: f043 0310 orr.w r3, r3, #16 800d040: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the PLL2 clock output */ if (Divider == DIVIDER_P_UPDATE) 800d042: 683b ldr r3, [r7, #0] 800d044: 2b00 cmp r3, #0 800d046: d106 bne.n 800d056 { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVP); 800d048: 4b1a ldr r3, [pc, #104] @ (800d0b4 ) 800d04a: 6adb ldr r3, [r3, #44] @ 0x2c 800d04c: 4a19 ldr r2, [pc, #100] @ (800d0b4 ) 800d04e: f443 2300 orr.w r3, r3, #524288 @ 0x80000 800d052: 62d3 str r3, [r2, #44] @ 0x2c 800d054: e00f b.n 800d076 } else if (Divider == DIVIDER_Q_UPDATE) 800d056: 683b ldr r3, [r7, #0] 800d058: 2b01 cmp r3, #1 800d05a: d106 bne.n 800d06a { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVQ); 800d05c: 4b15 ldr r3, [pc, #84] @ (800d0b4 ) 800d05e: 6adb ldr r3, [r3, #44] @ 0x2c 800d060: 4a14 ldr r2, [pc, #80] @ (800d0b4 ) 800d062: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 800d066: 62d3 str r3, [r2, #44] @ 0x2c 800d068: e005 b.n 800d076 } else { __HAL_RCC_PLL2CLKOUT_ENABLE(RCC_PLL2_DIVR); 800d06a: 4b12 ldr r3, [pc, #72] @ (800d0b4 ) 800d06c: 6adb ldr r3, [r3, #44] @ 0x2c 800d06e: 4a11 ldr r2, [pc, #68] @ (800d0b4 ) 800d070: f443 1300 orr.w r3, r3, #2097152 @ 0x200000 800d074: 62d3 str r3, [r2, #44] @ 0x2c } /* Enable PLL2. */ __HAL_RCC_PLL2_ENABLE(); 800d076: 4b0f ldr r3, [pc, #60] @ (800d0b4 ) 800d078: 681b ldr r3, [r3, #0] 800d07a: 4a0e ldr r2, [pc, #56] @ (800d0b4 ) 800d07c: f043 6380 orr.w r3, r3, #67108864 @ 0x4000000 800d080: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800d082: f7f8 fbdb bl 800583c 800d086: 60b8 str r0, [r7, #8] /* Wait till PLL2 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) == 0U) 800d088: e008 b.n 800d09c { if ((HAL_GetTick() - tickstart) > PLL2_TIMEOUT_VALUE) 800d08a: f7f8 fbd7 bl 800583c 800d08e: 4602 mov r2, r0 800d090: 68bb ldr r3, [r7, #8] 800d092: 1ad3 subs r3, r2, r3 800d094: 2b02 cmp r3, #2 800d096: d901 bls.n 800d09c { return HAL_TIMEOUT; 800d098: 2303 movs r3, #3 800d09a: e006 b.n 800d0aa while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL2RDY) == 0U) 800d09c: 4b05 ldr r3, [pc, #20] @ (800d0b4 ) 800d09e: 681b ldr r3, [r3, #0] 800d0a0: f003 6300 and.w r3, r3, #134217728 @ 0x8000000 800d0a4: 2b00 cmp r3, #0 800d0a6: d0f0 beq.n 800d08a } } return status; 800d0a8: 7bfb ldrb r3, [r7, #15] } 800d0aa: 4618 mov r0, r3 800d0ac: 3710 adds r7, #16 800d0ae: 46bd mov sp, r7 800d0b0: bd80 pop {r7, pc} 800d0b2: bf00 nop 800d0b4: 58024400 .word 0x58024400 800d0b8: ffff0007 .word 0xffff0007 0800d0bc : * @note PLL3 is temporary disabled to apply new parameters * * @retval HAL status */ static HAL_StatusTypeDef RCCEx_PLL3_Config(RCC_PLL3InitTypeDef *pll3, uint32_t Divider) { 800d0bc: b580 push {r7, lr} 800d0be: b084 sub sp, #16 800d0c0: af00 add r7, sp, #0 800d0c2: 6078 str r0, [r7, #4] 800d0c4: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800d0c6: 2300 movs r3, #0 800d0c8: 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) 800d0ca: 4b53 ldr r3, [pc, #332] @ (800d218 ) 800d0cc: 6a9b ldr r3, [r3, #40] @ 0x28 800d0ce: f003 0303 and.w r3, r3, #3 800d0d2: 2b03 cmp r3, #3 800d0d4: d101 bne.n 800d0da { return HAL_ERROR; 800d0d6: 2301 movs r3, #1 800d0d8: e099 b.n 800d20e else { /* Disable PLL3. */ __HAL_RCC_PLL3_DISABLE(); 800d0da: 4b4f ldr r3, [pc, #316] @ (800d218 ) 800d0dc: 681b ldr r3, [r3, #0] 800d0de: 4a4e ldr r2, [pc, #312] @ (800d218 ) 800d0e0: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 800d0e4: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800d0e6: f7f8 fba9 bl 800583c 800d0ea: 60b8 str r0, [r7, #8] /* Wait till PLL3 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) != 0U) 800d0ec: e008 b.n 800d100 { if ((HAL_GetTick() - tickstart) > PLL3_TIMEOUT_VALUE) 800d0ee: f7f8 fba5 bl 800583c 800d0f2: 4602 mov r2, r0 800d0f4: 68bb ldr r3, [r7, #8] 800d0f6: 1ad3 subs r3, r2, r3 800d0f8: 2b02 cmp r3, #2 800d0fa: d901 bls.n 800d100 { return HAL_TIMEOUT; 800d0fc: 2303 movs r3, #3 800d0fe: e086 b.n 800d20e while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) != 0U) 800d100: 4b45 ldr r3, [pc, #276] @ (800d218 ) 800d102: 681b ldr r3, [r3, #0] 800d104: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800d108: 2b00 cmp r3, #0 800d10a: d1f0 bne.n 800d0ee } } /* Configure the PLL3 multiplication and division factors. */ __HAL_RCC_PLL3_CONFIG(pll3->PLL3M, 800d10c: 4b42 ldr r3, [pc, #264] @ (800d218 ) 800d10e: 6a9b ldr r3, [r3, #40] @ 0x28 800d110: f023 727c bic.w r2, r3, #66060288 @ 0x3f00000 800d114: 687b ldr r3, [r7, #4] 800d116: 681b ldr r3, [r3, #0] 800d118: 051b lsls r3, r3, #20 800d11a: 493f ldr r1, [pc, #252] @ (800d218 ) 800d11c: 4313 orrs r3, r2 800d11e: 628b str r3, [r1, #40] @ 0x28 800d120: 687b ldr r3, [r7, #4] 800d122: 685b ldr r3, [r3, #4] 800d124: 3b01 subs r3, #1 800d126: f3c3 0208 ubfx r2, r3, #0, #9 800d12a: 687b ldr r3, [r7, #4] 800d12c: 689b ldr r3, [r3, #8] 800d12e: 3b01 subs r3, #1 800d130: 025b lsls r3, r3, #9 800d132: b29b uxth r3, r3 800d134: 431a orrs r2, r3 800d136: 687b ldr r3, [r7, #4] 800d138: 68db ldr r3, [r3, #12] 800d13a: 3b01 subs r3, #1 800d13c: 041b lsls r3, r3, #16 800d13e: f403 03fe and.w r3, r3, #8323072 @ 0x7f0000 800d142: 431a orrs r2, r3 800d144: 687b ldr r3, [r7, #4] 800d146: 691b ldr r3, [r3, #16] 800d148: 3b01 subs r3, #1 800d14a: 061b lsls r3, r3, #24 800d14c: f003 43fe and.w r3, r3, #2130706432 @ 0x7f000000 800d150: 4931 ldr r1, [pc, #196] @ (800d218 ) 800d152: 4313 orrs r3, r2 800d154: 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) ; 800d156: 4b30 ldr r3, [pc, #192] @ (800d218 ) 800d158: 6adb ldr r3, [r3, #44] @ 0x2c 800d15a: f423 6240 bic.w r2, r3, #3072 @ 0xc00 800d15e: 687b ldr r3, [r7, #4] 800d160: 695b ldr r3, [r3, #20] 800d162: 492d ldr r1, [pc, #180] @ (800d218 ) 800d164: 4313 orrs r3, r2 800d166: 62cb str r3, [r1, #44] @ 0x2c /* Select PLL3 output frequency range : VCO */ __HAL_RCC_PLL3_VCORANGE(pll3->PLL3VCOSEL) ; 800d168: 4b2b ldr r3, [pc, #172] @ (800d218 ) 800d16a: 6adb ldr r3, [r3, #44] @ 0x2c 800d16c: f423 7200 bic.w r2, r3, #512 @ 0x200 800d170: 687b ldr r3, [r7, #4] 800d172: 699b ldr r3, [r3, #24] 800d174: 4928 ldr r1, [pc, #160] @ (800d218 ) 800d176: 4313 orrs r3, r2 800d178: 62cb str r3, [r1, #44] @ 0x2c /* Disable PLL3FRACN . */ __HAL_RCC_PLL3FRACN_DISABLE(); 800d17a: 4b27 ldr r3, [pc, #156] @ (800d218 ) 800d17c: 6adb ldr r3, [r3, #44] @ 0x2c 800d17e: 4a26 ldr r2, [pc, #152] @ (800d218 ) 800d180: f423 7380 bic.w r3, r3, #256 @ 0x100 800d184: 62d3 str r3, [r2, #44] @ 0x2c /* Configures PLL3 clock Fractional Part Of The Multiplication Factor */ __HAL_RCC_PLL3FRACN_CONFIG(pll3->PLL3FRACN); 800d186: 4b24 ldr r3, [pc, #144] @ (800d218 ) 800d188: 6c5a ldr r2, [r3, #68] @ 0x44 800d18a: 4b24 ldr r3, [pc, #144] @ (800d21c ) 800d18c: 4013 ands r3, r2 800d18e: 687a ldr r2, [r7, #4] 800d190: 69d2 ldr r2, [r2, #28] 800d192: 00d2 lsls r2, r2, #3 800d194: 4920 ldr r1, [pc, #128] @ (800d218 ) 800d196: 4313 orrs r3, r2 800d198: 644b str r3, [r1, #68] @ 0x44 /* Enable PLL3FRACN . */ __HAL_RCC_PLL3FRACN_ENABLE(); 800d19a: 4b1f ldr r3, [pc, #124] @ (800d218 ) 800d19c: 6adb ldr r3, [r3, #44] @ 0x2c 800d19e: 4a1e ldr r2, [pc, #120] @ (800d218 ) 800d1a0: f443 7380 orr.w r3, r3, #256 @ 0x100 800d1a4: 62d3 str r3, [r2, #44] @ 0x2c /* Enable the PLL3 clock output */ if (Divider == DIVIDER_P_UPDATE) 800d1a6: 683b ldr r3, [r7, #0] 800d1a8: 2b00 cmp r3, #0 800d1aa: d106 bne.n 800d1ba { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVP); 800d1ac: 4b1a ldr r3, [pc, #104] @ (800d218 ) 800d1ae: 6adb ldr r3, [r3, #44] @ 0x2c 800d1b0: 4a19 ldr r2, [pc, #100] @ (800d218 ) 800d1b2: f443 0380 orr.w r3, r3, #4194304 @ 0x400000 800d1b6: 62d3 str r3, [r2, #44] @ 0x2c 800d1b8: e00f b.n 800d1da } else if (Divider == DIVIDER_Q_UPDATE) 800d1ba: 683b ldr r3, [r7, #0] 800d1bc: 2b01 cmp r3, #1 800d1be: d106 bne.n 800d1ce { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVQ); 800d1c0: 4b15 ldr r3, [pc, #84] @ (800d218 ) 800d1c2: 6adb ldr r3, [r3, #44] @ 0x2c 800d1c4: 4a14 ldr r2, [pc, #80] @ (800d218 ) 800d1c6: f443 0300 orr.w r3, r3, #8388608 @ 0x800000 800d1ca: 62d3 str r3, [r2, #44] @ 0x2c 800d1cc: e005 b.n 800d1da } else { __HAL_RCC_PLL3CLKOUT_ENABLE(RCC_PLL3_DIVR); 800d1ce: 4b12 ldr r3, [pc, #72] @ (800d218 ) 800d1d0: 6adb ldr r3, [r3, #44] @ 0x2c 800d1d2: 4a11 ldr r2, [pc, #68] @ (800d218 ) 800d1d4: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 800d1d8: 62d3 str r3, [r2, #44] @ 0x2c } /* Enable PLL3. */ __HAL_RCC_PLL3_ENABLE(); 800d1da: 4b0f ldr r3, [pc, #60] @ (800d218 ) 800d1dc: 681b ldr r3, [r3, #0] 800d1de: 4a0e ldr r2, [pc, #56] @ (800d218 ) 800d1e0: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 800d1e4: 6013 str r3, [r2, #0] /* Get Start Tick*/ tickstart = HAL_GetTick(); 800d1e6: f7f8 fb29 bl 800583c 800d1ea: 60b8 str r0, [r7, #8] /* Wait till PLL3 is ready */ while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) == 0U) 800d1ec: e008 b.n 800d200 { if ((HAL_GetTick() - tickstart) > PLL3_TIMEOUT_VALUE) 800d1ee: f7f8 fb25 bl 800583c 800d1f2: 4602 mov r2, r0 800d1f4: 68bb ldr r3, [r7, #8] 800d1f6: 1ad3 subs r3, r2, r3 800d1f8: 2b02 cmp r3, #2 800d1fa: d901 bls.n 800d200 { return HAL_TIMEOUT; 800d1fc: 2303 movs r3, #3 800d1fe: e006 b.n 800d20e while (__HAL_RCC_GET_FLAG(RCC_FLAG_PLL3RDY) == 0U) 800d200: 4b05 ldr r3, [pc, #20] @ (800d218 ) 800d202: 681b ldr r3, [r3, #0] 800d204: f003 5300 and.w r3, r3, #536870912 @ 0x20000000 800d208: 2b00 cmp r3, #0 800d20a: d0f0 beq.n 800d1ee } } return status; 800d20c: 7bfb ldrb r3, [r7, #15] } 800d20e: 4618 mov r0, r3 800d210: 3710 adds r7, #16 800d212: 46bd mov sp, r7 800d214: bd80 pop {r7, pc} 800d216: bf00 nop 800d218: 58024400 .word 0x58024400 800d21c: ffff0007 .word 0xffff0007 0800d220 : * @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) { 800d220: b580 push {r7, lr} 800d222: b084 sub sp, #16 800d224: af00 add r7, sp, #0 800d226: 6078 str r0, [r7, #4] uint32_t tickstart; /* Check the RNG handle allocation */ if (hrng == NULL) 800d228: 687b ldr r3, [r7, #4] 800d22a: 2b00 cmp r3, #0 800d22c: d101 bne.n 800d232 { return HAL_ERROR; 800d22e: 2301 movs r3, #1 800d230: e054 b.n 800d2dc /* Init the low level hardware */ hrng->MspInitCallback(hrng); } #else if (hrng->State == HAL_RNG_STATE_RESET) 800d232: 687b ldr r3, [r7, #4] 800d234: 7a5b ldrb r3, [r3, #9] 800d236: b2db uxtb r3, r3 800d238: 2b00 cmp r3, #0 800d23a: d105 bne.n 800d248 { /* Allocate lock resource and initialize it */ hrng->Lock = HAL_UNLOCKED; 800d23c: 687b ldr r3, [r7, #4] 800d23e: 2200 movs r2, #0 800d240: 721a strb r2, [r3, #8] /* Init the low level hardware */ HAL_RNG_MspInit(hrng); 800d242: 6878 ldr r0, [r7, #4] 800d244: f7f6 fc5a bl 8003afc } #endif /* USE_HAL_RNG_REGISTER_CALLBACKS */ /* Change RNG peripheral state */ hrng->State = HAL_RNG_STATE_BUSY; 800d248: 687b ldr r3, [r7, #4] 800d24a: 2202 movs r2, #2 800d24c: 725a strb r2, [r3, #9] } } } #else /* Clock Error Detection Configuration */ MODIFY_REG(hrng->Instance->CR, RNG_CR_CED, hrng->Init.ClockErrorDetection); 800d24e: 687b ldr r3, [r7, #4] 800d250: 681b ldr r3, [r3, #0] 800d252: 681b ldr r3, [r3, #0] 800d254: f023 0120 bic.w r1, r3, #32 800d258: 687b ldr r3, [r7, #4] 800d25a: 685a ldr r2, [r3, #4] 800d25c: 687b ldr r3, [r7, #4] 800d25e: 681b ldr r3, [r3, #0] 800d260: 430a orrs r2, r1 800d262: 601a str r2, [r3, #0] #endif /* RNG_CR_CONDRST */ /* Enable the RNG Peripheral */ __HAL_RNG_ENABLE(hrng); 800d264: 687b ldr r3, [r7, #4] 800d266: 681b ldr r3, [r3, #0] 800d268: 681a ldr r2, [r3, #0] 800d26a: 687b ldr r3, [r7, #4] 800d26c: 681b ldr r3, [r3, #0] 800d26e: f042 0204 orr.w r2, r2, #4 800d272: 601a str r2, [r3, #0] /* verify that no seed error */ if (__HAL_RNG_GET_IT(hrng, RNG_IT_SEI) != RESET) 800d274: 687b ldr r3, [r7, #4] 800d276: 681b ldr r3, [r3, #0] 800d278: 685b ldr r3, [r3, #4] 800d27a: f003 0340 and.w r3, r3, #64 @ 0x40 800d27e: 2b40 cmp r3, #64 @ 0x40 800d280: d104 bne.n 800d28c { hrng->State = HAL_RNG_STATE_ERROR; 800d282: 687b ldr r3, [r7, #4] 800d284: 2204 movs r2, #4 800d286: 725a strb r2, [r3, #9] return HAL_ERROR; 800d288: 2301 movs r3, #1 800d28a: e027 b.n 800d2dc } /* Get tick */ tickstart = HAL_GetTick(); 800d28c: f7f8 fad6 bl 800583c 800d290: 60f8 str r0, [r7, #12] /* Check if data register contains valid random data */ while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800d292: e015 b.n 800d2c0 { if ((HAL_GetTick() - tickstart) > RNG_TIMEOUT_VALUE) 800d294: f7f8 fad2 bl 800583c 800d298: 4602 mov r2, r0 800d29a: 68fb ldr r3, [r7, #12] 800d29c: 1ad3 subs r3, r2, r3 800d29e: 2b02 cmp r3, #2 800d2a0: d90e bls.n 800d2c0 { /* New check to avoid false timeout detection in case of preemption */ if (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800d2a2: 687b ldr r3, [r7, #4] 800d2a4: 681b ldr r3, [r3, #0] 800d2a6: 685b ldr r3, [r3, #4] 800d2a8: f003 0304 and.w r3, r3, #4 800d2ac: 2b04 cmp r3, #4 800d2ae: d107 bne.n 800d2c0 { hrng->State = HAL_RNG_STATE_ERROR; 800d2b0: 687b ldr r3, [r7, #4] 800d2b2: 2204 movs r2, #4 800d2b4: 725a strb r2, [r3, #9] hrng->ErrorCode = HAL_RNG_ERROR_TIMEOUT; 800d2b6: 687b ldr r3, [r7, #4] 800d2b8: 2202 movs r2, #2 800d2ba: 60da str r2, [r3, #12] return HAL_ERROR; 800d2bc: 2301 movs r3, #1 800d2be: e00d b.n 800d2dc while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_SECS) != RESET) 800d2c0: 687b ldr r3, [r7, #4] 800d2c2: 681b ldr r3, [r3, #0] 800d2c4: 685b ldr r3, [r3, #4] 800d2c6: f003 0304 and.w r3, r3, #4 800d2ca: 2b04 cmp r3, #4 800d2cc: d0e2 beq.n 800d294 } } } /* Initialize the RNG state */ hrng->State = HAL_RNG_STATE_READY; 800d2ce: 687b ldr r3, [r7, #4] 800d2d0: 2201 movs r2, #1 800d2d2: 725a strb r2, [r3, #9] /* Initialise the error code */ hrng->ErrorCode = HAL_RNG_ERROR_NONE; 800d2d4: 687b ldr r3, [r7, #4] 800d2d6: 2200 movs r2, #0 800d2d8: 60da str r2, [r3, #12] /* Return function status */ return HAL_OK; 800d2da: 2300 movs r3, #0 } 800d2dc: 4618 mov r0, r3 800d2de: 3710 adds r7, #16 800d2e0: 46bd mov sp, r7 800d2e2: bd80 pop {r7, pc} 0800d2e4 : * @param random32bit pointer to generated random number variable if successful. * @retval HAL status */ HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber(RNG_HandleTypeDef *hrng, uint32_t *random32bit) { 800d2e4: b580 push {r7, lr} 800d2e6: b084 sub sp, #16 800d2e8: af00 add r7, sp, #0 800d2ea: 6078 str r0, [r7, #4] 800d2ec: 6039 str r1, [r7, #0] uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; 800d2ee: 2300 movs r3, #0 800d2f0: 73fb strb r3, [r7, #15] /* Process Locked */ __HAL_LOCK(hrng); 800d2f2: 687b ldr r3, [r7, #4] 800d2f4: 7a1b ldrb r3, [r3, #8] 800d2f6: 2b01 cmp r3, #1 800d2f8: d101 bne.n 800d2fe 800d2fa: 2302 movs r3, #2 800d2fc: e044 b.n 800d388 800d2fe: 687b ldr r3, [r7, #4] 800d300: 2201 movs r2, #1 800d302: 721a strb r2, [r3, #8] /* Check RNG peripheral state */ if (hrng->State == HAL_RNG_STATE_READY) 800d304: 687b ldr r3, [r7, #4] 800d306: 7a5b ldrb r3, [r3, #9] 800d308: b2db uxtb r3, r3 800d30a: 2b01 cmp r3, #1 800d30c: d133 bne.n 800d376 { /* Change RNG peripheral state */ hrng->State = HAL_RNG_STATE_BUSY; 800d30e: 687b ldr r3, [r7, #4] 800d310: 2202 movs r2, #2 800d312: 725a strb r2, [r3, #9] } } #endif /* RNG_CR_CONDRST */ /* Get tick */ tickstart = HAL_GetTick(); 800d314: f7f8 fa92 bl 800583c 800d318: 60b8 str r0, [r7, #8] /* Check if data register contains valid random data */ while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800d31a: e018 b.n 800d34e { if ((HAL_GetTick() - tickstart) > RNG_TIMEOUT_VALUE) 800d31c: f7f8 fa8e bl 800583c 800d320: 4602 mov r2, r0 800d322: 68bb ldr r3, [r7, #8] 800d324: 1ad3 subs r3, r2, r3 800d326: 2b02 cmp r3, #2 800d328: d911 bls.n 800d34e { /* New check to avoid false timeout detection in case of preemption */ if (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800d32a: 687b ldr r3, [r7, #4] 800d32c: 681b ldr r3, [r3, #0] 800d32e: 685b ldr r3, [r3, #4] 800d330: f003 0301 and.w r3, r3, #1 800d334: 2b01 cmp r3, #1 800d336: d00a beq.n 800d34e { hrng->State = HAL_RNG_STATE_READY; 800d338: 687b ldr r3, [r7, #4] 800d33a: 2201 movs r2, #1 800d33c: 725a strb r2, [r3, #9] hrng->ErrorCode = HAL_RNG_ERROR_TIMEOUT; 800d33e: 687b ldr r3, [r7, #4] 800d340: 2202 movs r2, #2 800d342: 60da str r2, [r3, #12] /* Process Unlocked */ __HAL_UNLOCK(hrng); 800d344: 687b ldr r3, [r7, #4] 800d346: 2200 movs r2, #0 800d348: 721a strb r2, [r3, #8] return HAL_ERROR; 800d34a: 2301 movs r3, #1 800d34c: e01c b.n 800d388 while (__HAL_RNG_GET_FLAG(hrng, RNG_FLAG_DRDY) == RESET) 800d34e: 687b ldr r3, [r7, #4] 800d350: 681b ldr r3, [r3, #0] 800d352: 685b ldr r3, [r3, #4] 800d354: f003 0301 and.w r3, r3, #1 800d358: 2b01 cmp r3, #1 800d35a: d1df bne.n 800d31c } } } /* Get a 32bit Random number */ hrng->RandomNumber = hrng->Instance->DR; 800d35c: 687b ldr r3, [r7, #4] 800d35e: 681b ldr r3, [r3, #0] 800d360: 689a ldr r2, [r3, #8] 800d362: 687b ldr r3, [r7, #4] 800d364: 611a str r2, [r3, #16] else /* No seed error */ { *random32bit = hrng->RandomNumber; } #else *random32bit = hrng->RandomNumber; 800d366: 687b ldr r3, [r7, #4] 800d368: 691a ldr r2, [r3, #16] 800d36a: 683b ldr r3, [r7, #0] 800d36c: 601a str r2, [r3, #0] #endif /* RNG_CR_CONDRST */ hrng->State = HAL_RNG_STATE_READY; 800d36e: 687b ldr r3, [r7, #4] 800d370: 2201 movs r2, #1 800d372: 725a strb r2, [r3, #9] 800d374: e004 b.n 800d380 } else { hrng->ErrorCode = HAL_RNG_ERROR_BUSY; 800d376: 687b ldr r3, [r7, #4] 800d378: 2204 movs r2, #4 800d37a: 60da str r2, [r3, #12] status = HAL_ERROR; 800d37c: 2301 movs r3, #1 800d37e: 73fb strb r3, [r7, #15] } /* Process Unlocked */ __HAL_UNLOCK(hrng); 800d380: 687b ldr r3, [r7, #4] 800d382: 2200 movs r2, #0 800d384: 721a strb r2, [r3, #8] return status; 800d386: 7bfb ldrb r3, [r7, #15] } 800d388: 4618 mov r0, r3 800d38a: 3710 adds r7, #16 800d38c: 46bd mov sp, r7 800d38e: bd80 pop {r7, pc} 0800d390 : * 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) { 800d390: b580 push {r7, lr} 800d392: b082 sub sp, #8 800d394: af00 add r7, sp, #0 800d396: 6078 str r0, [r7, #4] /* Check the TIM handle allocation */ if (htim == NULL) 800d398: 687b ldr r3, [r7, #4] 800d39a: 2b00 cmp r3, #0 800d39c: d101 bne.n 800d3a2 { return HAL_ERROR; 800d39e: 2301 movs r3, #1 800d3a0: e049 b.n 800d436 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) 800d3a2: 687b ldr r3, [r7, #4] 800d3a4: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 800d3a8: b2db uxtb r3, r3 800d3aa: 2b00 cmp r3, #0 800d3ac: d106 bne.n 800d3bc { /* Allocate lock resource and initialize it */ htim->Lock = HAL_UNLOCKED; 800d3ae: 687b ldr r3, [r7, #4] 800d3b0: 2200 movs r2, #0 800d3b2: 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); 800d3b6: 6878 ldr r0, [r7, #4] 800d3b8: f000 f841 bl 800d43e #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; 800d3bc: 687b ldr r3, [r7, #4] 800d3be: 2202 movs r2, #2 800d3c0: f883 203d strb.w r2, [r3, #61] @ 0x3d /* Set the Time Base configuration */ TIM_Base_SetConfig(htim->Instance, &htim->Init); 800d3c4: 687b ldr r3, [r7, #4] 800d3c6: 681a ldr r2, [r3, #0] 800d3c8: 687b ldr r3, [r7, #4] 800d3ca: 3304 adds r3, #4 800d3cc: 4619 mov r1, r3 800d3ce: 4610 mov r0, r2 800d3d0: f000 f9e8 bl 800d7a4 /* Initialize the DMA burst operation state */ htim->DMABurstState = HAL_DMA_BURST_STATE_READY; 800d3d4: 687b ldr r3, [r7, #4] 800d3d6: 2201 movs r2, #1 800d3d8: f883 2048 strb.w r2, [r3, #72] @ 0x48 /* Initialize the TIM channels state */ TIM_CHANNEL_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 800d3dc: 687b ldr r3, [r7, #4] 800d3de: 2201 movs r2, #1 800d3e0: f883 203e strb.w r2, [r3, #62] @ 0x3e 800d3e4: 687b ldr r3, [r7, #4] 800d3e6: 2201 movs r2, #1 800d3e8: f883 203f strb.w r2, [r3, #63] @ 0x3f 800d3ec: 687b ldr r3, [r7, #4] 800d3ee: 2201 movs r2, #1 800d3f0: f883 2040 strb.w r2, [r3, #64] @ 0x40 800d3f4: 687b ldr r3, [r7, #4] 800d3f6: 2201 movs r2, #1 800d3f8: f883 2041 strb.w r2, [r3, #65] @ 0x41 800d3fc: 687b ldr r3, [r7, #4] 800d3fe: 2201 movs r2, #1 800d400: f883 2042 strb.w r2, [r3, #66] @ 0x42 800d404: 687b ldr r3, [r7, #4] 800d406: 2201 movs r2, #1 800d408: f883 2043 strb.w r2, [r3, #67] @ 0x43 TIM_CHANNEL_N_STATE_SET_ALL(htim, HAL_TIM_CHANNEL_STATE_READY); 800d40c: 687b ldr r3, [r7, #4] 800d40e: 2201 movs r2, #1 800d410: f883 2044 strb.w r2, [r3, #68] @ 0x44 800d414: 687b ldr r3, [r7, #4] 800d416: 2201 movs r2, #1 800d418: f883 2045 strb.w r2, [r3, #69] @ 0x45 800d41c: 687b ldr r3, [r7, #4] 800d41e: 2201 movs r2, #1 800d420: f883 2046 strb.w r2, [r3, #70] @ 0x46 800d424: 687b ldr r3, [r7, #4] 800d426: 2201 movs r2, #1 800d428: f883 2047 strb.w r2, [r3, #71] @ 0x47 /* Initialize the TIM state*/ htim->State = HAL_TIM_STATE_READY; 800d42c: 687b ldr r3, [r7, #4] 800d42e: 2201 movs r2, #1 800d430: f883 203d strb.w r2, [r3, #61] @ 0x3d return HAL_OK; 800d434: 2300 movs r3, #0 } 800d436: 4618 mov r0, r3 800d438: 3708 adds r7, #8 800d43a: 46bd mov sp, r7 800d43c: bd80 pop {r7, pc} 0800d43e : * @brief Initializes the TIM Base MSP. * @param htim TIM Base handle * @retval None */ __weak void HAL_TIM_Base_MspInit(TIM_HandleTypeDef *htim) { 800d43e: b480 push {r7} 800d440: b083 sub sp, #12 800d442: af00 add r7, sp, #0 800d444: 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 */ } 800d446: bf00 nop 800d448: 370c adds r7, #12 800d44a: 46bd mov sp, r7 800d44c: f85d 7b04 ldr.w r7, [sp], #4 800d450: 4770 bx lr ... 0800d454 : * @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) { 800d454: b480 push {r7} 800d456: b085 sub sp, #20 800d458: af00 add r7, sp, #0 800d45a: 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) 800d45c: 687b ldr r3, [r7, #4] 800d45e: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 800d462: b2db uxtb r3, r3 800d464: 2b01 cmp r3, #1 800d466: d001 beq.n 800d46c { return HAL_ERROR; 800d468: 2301 movs r3, #1 800d46a: e054 b.n 800d516 } /* Set the TIM state */ htim->State = HAL_TIM_STATE_BUSY; 800d46c: 687b ldr r3, [r7, #4] 800d46e: 2202 movs r2, #2 800d470: f883 203d strb.w r2, [r3, #61] @ 0x3d /* Enable the TIM Update interrupt */ __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE); 800d474: 687b ldr r3, [r7, #4] 800d476: 681b ldr r3, [r3, #0] 800d478: 68da ldr r2, [r3, #12] 800d47a: 687b ldr r3, [r7, #4] 800d47c: 681b ldr r3, [r3, #0] 800d47e: f042 0201 orr.w r2, r2, #1 800d482: 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)) 800d484: 687b ldr r3, [r7, #4] 800d486: 681b ldr r3, [r3, #0] 800d488: 4a26 ldr r2, [pc, #152] @ (800d524 ) 800d48a: 4293 cmp r3, r2 800d48c: d022 beq.n 800d4d4 800d48e: 687b ldr r3, [r7, #4] 800d490: 681b ldr r3, [r3, #0] 800d492: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800d496: d01d beq.n 800d4d4 800d498: 687b ldr r3, [r7, #4] 800d49a: 681b ldr r3, [r3, #0] 800d49c: 4a22 ldr r2, [pc, #136] @ (800d528 ) 800d49e: 4293 cmp r3, r2 800d4a0: d018 beq.n 800d4d4 800d4a2: 687b ldr r3, [r7, #4] 800d4a4: 681b ldr r3, [r3, #0] 800d4a6: 4a21 ldr r2, [pc, #132] @ (800d52c ) 800d4a8: 4293 cmp r3, r2 800d4aa: d013 beq.n 800d4d4 800d4ac: 687b ldr r3, [r7, #4] 800d4ae: 681b ldr r3, [r3, #0] 800d4b0: 4a1f ldr r2, [pc, #124] @ (800d530 ) 800d4b2: 4293 cmp r3, r2 800d4b4: d00e beq.n 800d4d4 800d4b6: 687b ldr r3, [r7, #4] 800d4b8: 681b ldr r3, [r3, #0] 800d4ba: 4a1e ldr r2, [pc, #120] @ (800d534 ) 800d4bc: 4293 cmp r3, r2 800d4be: d009 beq.n 800d4d4 800d4c0: 687b ldr r3, [r7, #4] 800d4c2: 681b ldr r3, [r3, #0] 800d4c4: 4a1c ldr r2, [pc, #112] @ (800d538 ) 800d4c6: 4293 cmp r3, r2 800d4c8: d004 beq.n 800d4d4 800d4ca: 687b ldr r3, [r7, #4] 800d4cc: 681b ldr r3, [r3, #0] 800d4ce: 4a1b ldr r2, [pc, #108] @ (800d53c ) 800d4d0: 4293 cmp r3, r2 800d4d2: d115 bne.n 800d500 { tmpsmcr = htim->Instance->SMCR & TIM_SMCR_SMS; 800d4d4: 687b ldr r3, [r7, #4] 800d4d6: 681b ldr r3, [r3, #0] 800d4d8: 689a ldr r2, [r3, #8] 800d4da: 4b19 ldr r3, [pc, #100] @ (800d540 ) 800d4dc: 4013 ands r3, r2 800d4de: 60fb str r3, [r7, #12] if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800d4e0: 68fb ldr r3, [r7, #12] 800d4e2: 2b06 cmp r3, #6 800d4e4: d015 beq.n 800d512 800d4e6: 68fb ldr r3, [r7, #12] 800d4e8: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800d4ec: d011 beq.n 800d512 { __HAL_TIM_ENABLE(htim); 800d4ee: 687b ldr r3, [r7, #4] 800d4f0: 681b ldr r3, [r3, #0] 800d4f2: 681a ldr r2, [r3, #0] 800d4f4: 687b ldr r3, [r7, #4] 800d4f6: 681b ldr r3, [r3, #0] 800d4f8: f042 0201 orr.w r2, r2, #1 800d4fc: 601a str r2, [r3, #0] if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800d4fe: e008 b.n 800d512 } } else { __HAL_TIM_ENABLE(htim); 800d500: 687b ldr r3, [r7, #4] 800d502: 681b ldr r3, [r3, #0] 800d504: 681a ldr r2, [r3, #0] 800d506: 687b ldr r3, [r7, #4] 800d508: 681b ldr r3, [r3, #0] 800d50a: f042 0201 orr.w r2, r2, #1 800d50e: 601a str r2, [r3, #0] 800d510: e000 b.n 800d514 if (!IS_TIM_SLAVEMODE_TRIGGER_ENABLED(tmpsmcr)) 800d512: bf00 nop } /* Return function status */ return HAL_OK; 800d514: 2300 movs r3, #0 } 800d516: 4618 mov r0, r3 800d518: 3714 adds r7, #20 800d51a: 46bd mov sp, r7 800d51c: f85d 7b04 ldr.w r7, [sp], #4 800d520: 4770 bx lr 800d522: bf00 nop 800d524: 40010000 .word 0x40010000 800d528: 40000400 .word 0x40000400 800d52c: 40000800 .word 0x40000800 800d530: 40000c00 .word 0x40000c00 800d534: 40010400 .word 0x40010400 800d538: 40001800 .word 0x40001800 800d53c: 40014000 .word 0x40014000 800d540: 00010007 .word 0x00010007 0800d544 : * @brief This function handles TIM interrupts requests. * @param htim TIM handle * @retval None */ void HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim) { 800d544: b580 push {r7, lr} 800d546: b084 sub sp, #16 800d548: af00 add r7, sp, #0 800d54a: 6078 str r0, [r7, #4] uint32_t itsource = htim->Instance->DIER; 800d54c: 687b ldr r3, [r7, #4] 800d54e: 681b ldr r3, [r3, #0] 800d550: 68db ldr r3, [r3, #12] 800d552: 60fb str r3, [r7, #12] uint32_t itflag = htim->Instance->SR; 800d554: 687b ldr r3, [r7, #4] 800d556: 681b ldr r3, [r3, #0] 800d558: 691b ldr r3, [r3, #16] 800d55a: 60bb str r3, [r7, #8] /* Capture compare 1 event */ if ((itflag & (TIM_FLAG_CC1)) == (TIM_FLAG_CC1)) 800d55c: 68bb ldr r3, [r7, #8] 800d55e: f003 0302 and.w r3, r3, #2 800d562: 2b00 cmp r3, #0 800d564: d020 beq.n 800d5a8 { if ((itsource & (TIM_IT_CC1)) == (TIM_IT_CC1)) 800d566: 68fb ldr r3, [r7, #12] 800d568: f003 0302 and.w r3, r3, #2 800d56c: 2b00 cmp r3, #0 800d56e: d01b beq.n 800d5a8 { { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC1); 800d570: 687b ldr r3, [r7, #4] 800d572: 681b ldr r3, [r3, #0] 800d574: f06f 0202 mvn.w r2, #2 800d578: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_1; 800d57a: 687b ldr r3, [r7, #4] 800d57c: 2201 movs r2, #1 800d57e: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR1 & TIM_CCMR1_CC1S) != 0x00U) 800d580: 687b ldr r3, [r7, #4] 800d582: 681b ldr r3, [r3, #0] 800d584: 699b ldr r3, [r3, #24] 800d586: f003 0303 and.w r3, r3, #3 800d58a: 2b00 cmp r3, #0 800d58c: d003 beq.n 800d596 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d58e: 6878 ldr r0, [r7, #4] 800d590: f000 f8e9 bl 800d766 800d594: e005 b.n 800d5a2 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d596: 6878 ldr r0, [r7, #4] 800d598: f000 f8db bl 800d752 HAL_TIM_PWM_PulseFinishedCallback(htim); 800d59c: 6878 ldr r0, [r7, #4] 800d59e: f000 f8ec bl 800d77a #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d5a2: 687b ldr r3, [r7, #4] 800d5a4: 2200 movs r2, #0 800d5a6: 771a strb r2, [r3, #28] } } } /* Capture compare 2 event */ if ((itflag & (TIM_FLAG_CC2)) == (TIM_FLAG_CC2)) 800d5a8: 68bb ldr r3, [r7, #8] 800d5aa: f003 0304 and.w r3, r3, #4 800d5ae: 2b00 cmp r3, #0 800d5b0: d020 beq.n 800d5f4 { if ((itsource & (TIM_IT_CC2)) == (TIM_IT_CC2)) 800d5b2: 68fb ldr r3, [r7, #12] 800d5b4: f003 0304 and.w r3, r3, #4 800d5b8: 2b00 cmp r3, #0 800d5ba: d01b beq.n 800d5f4 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC2); 800d5bc: 687b ldr r3, [r7, #4] 800d5be: 681b ldr r3, [r3, #0] 800d5c0: f06f 0204 mvn.w r2, #4 800d5c4: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_2; 800d5c6: 687b ldr r3, [r7, #4] 800d5c8: 2202 movs r2, #2 800d5ca: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR1 & TIM_CCMR1_CC2S) != 0x00U) 800d5cc: 687b ldr r3, [r7, #4] 800d5ce: 681b ldr r3, [r3, #0] 800d5d0: 699b ldr r3, [r3, #24] 800d5d2: f403 7340 and.w r3, r3, #768 @ 0x300 800d5d6: 2b00 cmp r3, #0 800d5d8: d003 beq.n 800d5e2 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d5da: 6878 ldr r0, [r7, #4] 800d5dc: f000 f8c3 bl 800d766 800d5e0: e005 b.n 800d5ee { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d5e2: 6878 ldr r0, [r7, #4] 800d5e4: f000 f8b5 bl 800d752 HAL_TIM_PWM_PulseFinishedCallback(htim); 800d5e8: 6878 ldr r0, [r7, #4] 800d5ea: f000 f8c6 bl 800d77a #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d5ee: 687b ldr r3, [r7, #4] 800d5f0: 2200 movs r2, #0 800d5f2: 771a strb r2, [r3, #28] } } /* Capture compare 3 event */ if ((itflag & (TIM_FLAG_CC3)) == (TIM_FLAG_CC3)) 800d5f4: 68bb ldr r3, [r7, #8] 800d5f6: f003 0308 and.w r3, r3, #8 800d5fa: 2b00 cmp r3, #0 800d5fc: d020 beq.n 800d640 { if ((itsource & (TIM_IT_CC3)) == (TIM_IT_CC3)) 800d5fe: 68fb ldr r3, [r7, #12] 800d600: f003 0308 and.w r3, r3, #8 800d604: 2b00 cmp r3, #0 800d606: d01b beq.n 800d640 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC3); 800d608: 687b ldr r3, [r7, #4] 800d60a: 681b ldr r3, [r3, #0] 800d60c: f06f 0208 mvn.w r2, #8 800d610: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_3; 800d612: 687b ldr r3, [r7, #4] 800d614: 2204 movs r2, #4 800d616: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR2 & TIM_CCMR2_CC3S) != 0x00U) 800d618: 687b ldr r3, [r7, #4] 800d61a: 681b ldr r3, [r3, #0] 800d61c: 69db ldr r3, [r3, #28] 800d61e: f003 0303 and.w r3, r3, #3 800d622: 2b00 cmp r3, #0 800d624: d003 beq.n 800d62e { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d626: 6878 ldr r0, [r7, #4] 800d628: f000 f89d bl 800d766 800d62c: e005 b.n 800d63a { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d62e: 6878 ldr r0, [r7, #4] 800d630: f000 f88f bl 800d752 HAL_TIM_PWM_PulseFinishedCallback(htim); 800d634: 6878 ldr r0, [r7, #4] 800d636: f000 f8a0 bl 800d77a #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d63a: 687b ldr r3, [r7, #4] 800d63c: 2200 movs r2, #0 800d63e: 771a strb r2, [r3, #28] } } /* Capture compare 4 event */ if ((itflag & (TIM_FLAG_CC4)) == (TIM_FLAG_CC4)) 800d640: 68bb ldr r3, [r7, #8] 800d642: f003 0310 and.w r3, r3, #16 800d646: 2b00 cmp r3, #0 800d648: d020 beq.n 800d68c { if ((itsource & (TIM_IT_CC4)) == (TIM_IT_CC4)) 800d64a: 68fb ldr r3, [r7, #12] 800d64c: f003 0310 and.w r3, r3, #16 800d650: 2b00 cmp r3, #0 800d652: d01b beq.n 800d68c { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_CC4); 800d654: 687b ldr r3, [r7, #4] 800d656: 681b ldr r3, [r3, #0] 800d658: f06f 0210 mvn.w r2, #16 800d65c: 611a str r2, [r3, #16] htim->Channel = HAL_TIM_ACTIVE_CHANNEL_4; 800d65e: 687b ldr r3, [r7, #4] 800d660: 2208 movs r2, #8 800d662: 771a strb r2, [r3, #28] /* Input capture event */ if ((htim->Instance->CCMR2 & TIM_CCMR2_CC4S) != 0x00U) 800d664: 687b ldr r3, [r7, #4] 800d666: 681b ldr r3, [r3, #0] 800d668: 69db ldr r3, [r3, #28] 800d66a: f403 7340 and.w r3, r3, #768 @ 0x300 800d66e: 2b00 cmp r3, #0 800d670: d003 beq.n 800d67a { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->IC_CaptureCallback(htim); #else HAL_TIM_IC_CaptureCallback(htim); 800d672: 6878 ldr r0, [r7, #4] 800d674: f000 f877 bl 800d766 800d678: e005 b.n 800d686 { #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->OC_DelayElapsedCallback(htim); htim->PWM_PulseFinishedCallback(htim); #else HAL_TIM_OC_DelayElapsedCallback(htim); 800d67a: 6878 ldr r0, [r7, #4] 800d67c: f000 f869 bl 800d752 HAL_TIM_PWM_PulseFinishedCallback(htim); 800d680: 6878 ldr r0, [r7, #4] 800d682: f000 f87a bl 800d77a #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } htim->Channel = HAL_TIM_ACTIVE_CHANNEL_CLEARED; 800d686: 687b ldr r3, [r7, #4] 800d688: 2200 movs r2, #0 800d68a: 771a strb r2, [r3, #28] } } /* TIM Update event */ if ((itflag & (TIM_FLAG_UPDATE)) == (TIM_FLAG_UPDATE)) 800d68c: 68bb ldr r3, [r7, #8] 800d68e: f003 0301 and.w r3, r3, #1 800d692: 2b00 cmp r3, #0 800d694: d00c beq.n 800d6b0 { if ((itsource & (TIM_IT_UPDATE)) == (TIM_IT_UPDATE)) 800d696: 68fb ldr r3, [r7, #12] 800d698: f003 0301 and.w r3, r3, #1 800d69c: 2b00 cmp r3, #0 800d69e: d007 beq.n 800d6b0 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE); 800d6a0: 687b ldr r3, [r7, #4] 800d6a2: 681b ldr r3, [r3, #0] 800d6a4: f06f 0201 mvn.w r2, #1 800d6a8: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->PeriodElapsedCallback(htim); #else HAL_TIM_PeriodElapsedCallback(htim); 800d6aa: 6878 ldr r0, [r7, #4] 800d6ac: f7f5 f832 bl 8002714 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Break input event */ if (((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK)) || \ 800d6b0: 68bb ldr r3, [r7, #8] 800d6b2: f003 0380 and.w r3, r3, #128 @ 0x80 800d6b6: 2b00 cmp r3, #0 800d6b8: d104 bne.n 800d6c4 ((itflag & (TIM_FLAG_SYSTEM_BREAK)) == (TIM_FLAG_SYSTEM_BREAK))) 800d6ba: 68bb ldr r3, [r7, #8] 800d6bc: f403 5300 and.w r3, r3, #8192 @ 0x2000 if (((itflag & (TIM_FLAG_BREAK)) == (TIM_FLAG_BREAK)) || \ 800d6c0: 2b00 cmp r3, #0 800d6c2: d00c beq.n 800d6de { if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK)) 800d6c4: 68fb ldr r3, [r7, #12] 800d6c6: f003 0380 and.w r3, r3, #128 @ 0x80 800d6ca: 2b00 cmp r3, #0 800d6cc: d007 beq.n 800d6de { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK | TIM_FLAG_SYSTEM_BREAK); 800d6ce: 687b ldr r3, [r7, #4] 800d6d0: 681b ldr r3, [r3, #0] 800d6d2: f46f 5202 mvn.w r2, #8320 @ 0x2080 800d6d6: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->BreakCallback(htim); #else HAL_TIMEx_BreakCallback(htim); 800d6d8: 6878 ldr r0, [r7, #4] 800d6da: f000 f913 bl 800d904 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Break2 input event */ if ((itflag & (TIM_FLAG_BREAK2)) == (TIM_FLAG_BREAK2)) 800d6de: 68bb ldr r3, [r7, #8] 800d6e0: f403 7380 and.w r3, r3, #256 @ 0x100 800d6e4: 2b00 cmp r3, #0 800d6e6: d00c beq.n 800d702 { if ((itsource & (TIM_IT_BREAK)) == (TIM_IT_BREAK)) 800d6e8: 68fb ldr r3, [r7, #12] 800d6ea: f003 0380 and.w r3, r3, #128 @ 0x80 800d6ee: 2b00 cmp r3, #0 800d6f0: d007 beq.n 800d702 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2); 800d6f2: 687b ldr r3, [r7, #4] 800d6f4: 681b ldr r3, [r3, #0] 800d6f6: f46f 7280 mvn.w r2, #256 @ 0x100 800d6fa: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->Break2Callback(htim); #else HAL_TIMEx_Break2Callback(htim); 800d6fc: 6878 ldr r0, [r7, #4] 800d6fe: f000 f90b bl 800d918 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM Trigger detection event */ if ((itflag & (TIM_FLAG_TRIGGER)) == (TIM_FLAG_TRIGGER)) 800d702: 68bb ldr r3, [r7, #8] 800d704: f003 0340 and.w r3, r3, #64 @ 0x40 800d708: 2b00 cmp r3, #0 800d70a: d00c beq.n 800d726 { if ((itsource & (TIM_IT_TRIGGER)) == (TIM_IT_TRIGGER)) 800d70c: 68fb ldr r3, [r7, #12] 800d70e: f003 0340 and.w r3, r3, #64 @ 0x40 800d712: 2b00 cmp r3, #0 800d714: d007 beq.n 800d726 { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_TRIGGER); 800d716: 687b ldr r3, [r7, #4] 800d718: 681b ldr r3, [r3, #0] 800d71a: f06f 0240 mvn.w r2, #64 @ 0x40 800d71e: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->TriggerCallback(htim); #else HAL_TIM_TriggerCallback(htim); 800d720: 6878 ldr r0, [r7, #4] 800d722: f000 f834 bl 800d78e #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } /* TIM commutation event */ if ((itflag & (TIM_FLAG_COM)) == (TIM_FLAG_COM)) 800d726: 68bb ldr r3, [r7, #8] 800d728: f003 0320 and.w r3, r3, #32 800d72c: 2b00 cmp r3, #0 800d72e: d00c beq.n 800d74a { if ((itsource & (TIM_IT_COM)) == (TIM_IT_COM)) 800d730: 68fb ldr r3, [r7, #12] 800d732: f003 0320 and.w r3, r3, #32 800d736: 2b00 cmp r3, #0 800d738: d007 beq.n 800d74a { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_COM); 800d73a: 687b ldr r3, [r7, #4] 800d73c: 681b ldr r3, [r3, #0] 800d73e: f06f 0220 mvn.w r2, #32 800d742: 611a str r2, [r3, #16] #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->CommutationCallback(htim); #else HAL_TIMEx_CommutCallback(htim); 800d744: 6878 ldr r0, [r7, #4] 800d746: f000 f8d3 bl 800d8f0 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } } } 800d74a: bf00 nop 800d74c: 3710 adds r7, #16 800d74e: 46bd mov sp, r7 800d750: bd80 pop {r7, pc} 0800d752 : * @brief Output Compare callback in non-blocking mode * @param htim TIM OC handle * @retval None */ __weak void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) { 800d752: b480 push {r7} 800d754: b083 sub sp, #12 800d756: af00 add r7, sp, #0 800d758: 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 */ } 800d75a: bf00 nop 800d75c: 370c adds r7, #12 800d75e: 46bd mov sp, r7 800d760: f85d 7b04 ldr.w r7, [sp], #4 800d764: 4770 bx lr 0800d766 : * @brief Input Capture callback in non-blocking mode * @param htim TIM IC handle * @retval None */ __weak void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) { 800d766: b480 push {r7} 800d768: b083 sub sp, #12 800d76a: af00 add r7, sp, #0 800d76c: 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 */ } 800d76e: bf00 nop 800d770: 370c adds r7, #12 800d772: 46bd mov sp, r7 800d774: f85d 7b04 ldr.w r7, [sp], #4 800d778: 4770 bx lr 0800d77a : * @brief PWM Pulse finished callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) { 800d77a: b480 push {r7} 800d77c: b083 sub sp, #12 800d77e: af00 add r7, sp, #0 800d780: 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 */ } 800d782: bf00 nop 800d784: 370c adds r7, #12 800d786: 46bd mov sp, r7 800d788: f85d 7b04 ldr.w r7, [sp], #4 800d78c: 4770 bx lr 0800d78e : * @brief Hall Trigger detection callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIM_TriggerCallback(TIM_HandleTypeDef *htim) { 800d78e: b480 push {r7} 800d790: b083 sub sp, #12 800d792: af00 add r7, sp, #0 800d794: 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 */ } 800d796: bf00 nop 800d798: 370c adds r7, #12 800d79a: 46bd mov sp, r7 800d79c: f85d 7b04 ldr.w r7, [sp], #4 800d7a0: 4770 bx lr ... 0800d7a4 : * @param TIMx TIM peripheral * @param Structure TIM Base configuration structure * @retval None */ void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure) { 800d7a4: b480 push {r7} 800d7a6: b085 sub sp, #20 800d7a8: af00 add r7, sp, #0 800d7aa: 6078 str r0, [r7, #4] 800d7ac: 6039 str r1, [r7, #0] uint32_t tmpcr1; tmpcr1 = TIMx->CR1; 800d7ae: 687b ldr r3, [r7, #4] 800d7b0: 681b ldr r3, [r3, #0] 800d7b2: 60fb str r3, [r7, #12] /* Set TIM Time Base Unit parameters ---------------------------------------*/ if (IS_TIM_COUNTER_MODE_SELECT_INSTANCE(TIMx)) 800d7b4: 687b ldr r3, [r7, #4] 800d7b6: 4a46 ldr r2, [pc, #280] @ (800d8d0 ) 800d7b8: 4293 cmp r3, r2 800d7ba: d013 beq.n 800d7e4 800d7bc: 687b ldr r3, [r7, #4] 800d7be: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800d7c2: d00f beq.n 800d7e4 800d7c4: 687b ldr r3, [r7, #4] 800d7c6: 4a43 ldr r2, [pc, #268] @ (800d8d4 ) 800d7c8: 4293 cmp r3, r2 800d7ca: d00b beq.n 800d7e4 800d7cc: 687b ldr r3, [r7, #4] 800d7ce: 4a42 ldr r2, [pc, #264] @ (800d8d8 ) 800d7d0: 4293 cmp r3, r2 800d7d2: d007 beq.n 800d7e4 800d7d4: 687b ldr r3, [r7, #4] 800d7d6: 4a41 ldr r2, [pc, #260] @ (800d8dc ) 800d7d8: 4293 cmp r3, r2 800d7da: d003 beq.n 800d7e4 800d7dc: 687b ldr r3, [r7, #4] 800d7de: 4a40 ldr r2, [pc, #256] @ (800d8e0 ) 800d7e0: 4293 cmp r3, r2 800d7e2: d108 bne.n 800d7f6 { /* Select the Counter Mode */ tmpcr1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS); 800d7e4: 68fb ldr r3, [r7, #12] 800d7e6: f023 0370 bic.w r3, r3, #112 @ 0x70 800d7ea: 60fb str r3, [r7, #12] tmpcr1 |= Structure->CounterMode; 800d7ec: 683b ldr r3, [r7, #0] 800d7ee: 685b ldr r3, [r3, #4] 800d7f0: 68fa ldr r2, [r7, #12] 800d7f2: 4313 orrs r3, r2 800d7f4: 60fb str r3, [r7, #12] } if (IS_TIM_CLOCK_DIVISION_INSTANCE(TIMx)) 800d7f6: 687b ldr r3, [r7, #4] 800d7f8: 4a35 ldr r2, [pc, #212] @ (800d8d0 ) 800d7fa: 4293 cmp r3, r2 800d7fc: d01f beq.n 800d83e 800d7fe: 687b ldr r3, [r7, #4] 800d800: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 800d804: d01b beq.n 800d83e 800d806: 687b ldr r3, [r7, #4] 800d808: 4a32 ldr r2, [pc, #200] @ (800d8d4 ) 800d80a: 4293 cmp r3, r2 800d80c: d017 beq.n 800d83e 800d80e: 687b ldr r3, [r7, #4] 800d810: 4a31 ldr r2, [pc, #196] @ (800d8d8 ) 800d812: 4293 cmp r3, r2 800d814: d013 beq.n 800d83e 800d816: 687b ldr r3, [r7, #4] 800d818: 4a30 ldr r2, [pc, #192] @ (800d8dc ) 800d81a: 4293 cmp r3, r2 800d81c: d00f beq.n 800d83e 800d81e: 687b ldr r3, [r7, #4] 800d820: 4a2f ldr r2, [pc, #188] @ (800d8e0 ) 800d822: 4293 cmp r3, r2 800d824: d00b beq.n 800d83e 800d826: 687b ldr r3, [r7, #4] 800d828: 4a2e ldr r2, [pc, #184] @ (800d8e4 ) 800d82a: 4293 cmp r3, r2 800d82c: d007 beq.n 800d83e 800d82e: 687b ldr r3, [r7, #4] 800d830: 4a2d ldr r2, [pc, #180] @ (800d8e8 ) 800d832: 4293 cmp r3, r2 800d834: d003 beq.n 800d83e 800d836: 687b ldr r3, [r7, #4] 800d838: 4a2c ldr r2, [pc, #176] @ (800d8ec ) 800d83a: 4293 cmp r3, r2 800d83c: d108 bne.n 800d850 { /* Set the clock division */ tmpcr1 &= ~TIM_CR1_CKD; 800d83e: 68fb ldr r3, [r7, #12] 800d840: f423 7340 bic.w r3, r3, #768 @ 0x300 800d844: 60fb str r3, [r7, #12] tmpcr1 |= (uint32_t)Structure->ClockDivision; 800d846: 683b ldr r3, [r7, #0] 800d848: 68db ldr r3, [r3, #12] 800d84a: 68fa ldr r2, [r7, #12] 800d84c: 4313 orrs r3, r2 800d84e: 60fb str r3, [r7, #12] } /* Set the auto-reload preload */ MODIFY_REG(tmpcr1, TIM_CR1_ARPE, Structure->AutoReloadPreload); 800d850: 68fb ldr r3, [r7, #12] 800d852: f023 0280 bic.w r2, r3, #128 @ 0x80 800d856: 683b ldr r3, [r7, #0] 800d858: 695b ldr r3, [r3, #20] 800d85a: 4313 orrs r3, r2 800d85c: 60fb str r3, [r7, #12] TIMx->CR1 = tmpcr1; 800d85e: 687b ldr r3, [r7, #4] 800d860: 68fa ldr r2, [r7, #12] 800d862: 601a str r2, [r3, #0] /* Set the Autoreload value */ TIMx->ARR = (uint32_t)Structure->Period ; 800d864: 683b ldr r3, [r7, #0] 800d866: 689a ldr r2, [r3, #8] 800d868: 687b ldr r3, [r7, #4] 800d86a: 62da str r2, [r3, #44] @ 0x2c /* Set the Prescaler value */ TIMx->PSC = Structure->Prescaler; 800d86c: 683b ldr r3, [r7, #0] 800d86e: 681a ldr r2, [r3, #0] 800d870: 687b ldr r3, [r7, #4] 800d872: 629a str r2, [r3, #40] @ 0x28 if (IS_TIM_REPETITION_COUNTER_INSTANCE(TIMx)) 800d874: 687b ldr r3, [r7, #4] 800d876: 4a16 ldr r2, [pc, #88] @ (800d8d0 ) 800d878: 4293 cmp r3, r2 800d87a: d00f beq.n 800d89c 800d87c: 687b ldr r3, [r7, #4] 800d87e: 4a18 ldr r2, [pc, #96] @ (800d8e0 ) 800d880: 4293 cmp r3, r2 800d882: d00b beq.n 800d89c 800d884: 687b ldr r3, [r7, #4] 800d886: 4a17 ldr r2, [pc, #92] @ (800d8e4 ) 800d888: 4293 cmp r3, r2 800d88a: d007 beq.n 800d89c 800d88c: 687b ldr r3, [r7, #4] 800d88e: 4a16 ldr r2, [pc, #88] @ (800d8e8 ) 800d890: 4293 cmp r3, r2 800d892: d003 beq.n 800d89c 800d894: 687b ldr r3, [r7, #4] 800d896: 4a15 ldr r2, [pc, #84] @ (800d8ec ) 800d898: 4293 cmp r3, r2 800d89a: d103 bne.n 800d8a4 { /* Set the Repetition Counter value */ TIMx->RCR = Structure->RepetitionCounter; 800d89c: 683b ldr r3, [r7, #0] 800d89e: 691a ldr r2, [r3, #16] 800d8a0: 687b ldr r3, [r7, #4] 800d8a2: 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; 800d8a4: 687b ldr r3, [r7, #4] 800d8a6: 2201 movs r2, #1 800d8a8: 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)) 800d8aa: 687b ldr r3, [r7, #4] 800d8ac: 691b ldr r3, [r3, #16] 800d8ae: f003 0301 and.w r3, r3, #1 800d8b2: 2b01 cmp r3, #1 800d8b4: d105 bne.n 800d8c2 { /* Clear the update flag */ CLEAR_BIT(TIMx->SR, TIM_FLAG_UPDATE); 800d8b6: 687b ldr r3, [r7, #4] 800d8b8: 691b ldr r3, [r3, #16] 800d8ba: f023 0201 bic.w r2, r3, #1 800d8be: 687b ldr r3, [r7, #4] 800d8c0: 611a str r2, [r3, #16] } } 800d8c2: bf00 nop 800d8c4: 3714 adds r7, #20 800d8c6: 46bd mov sp, r7 800d8c8: f85d 7b04 ldr.w r7, [sp], #4 800d8cc: 4770 bx lr 800d8ce: bf00 nop 800d8d0: 40010000 .word 0x40010000 800d8d4: 40000400 .word 0x40000400 800d8d8: 40000800 .word 0x40000800 800d8dc: 40000c00 .word 0x40000c00 800d8e0: 40010400 .word 0x40010400 800d8e4: 40014000 .word 0x40014000 800d8e8: 40014400 .word 0x40014400 800d8ec: 40014800 .word 0x40014800 0800d8f0 : * @brief Commutation callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIMEx_CommutCallback(TIM_HandleTypeDef *htim) { 800d8f0: b480 push {r7} 800d8f2: b083 sub sp, #12 800d8f4: af00 add r7, sp, #0 800d8f6: 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 */ } 800d8f8: bf00 nop 800d8fa: 370c adds r7, #12 800d8fc: 46bd mov sp, r7 800d8fe: f85d 7b04 ldr.w r7, [sp], #4 800d902: 4770 bx lr 0800d904 : * @brief Break detection callback in non-blocking mode * @param htim TIM handle * @retval None */ __weak void HAL_TIMEx_BreakCallback(TIM_HandleTypeDef *htim) { 800d904: b480 push {r7} 800d906: b083 sub sp, #12 800d908: af00 add r7, sp, #0 800d90a: 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 */ } 800d90c: bf00 nop 800d90e: 370c adds r7, #12 800d910: 46bd mov sp, r7 800d912: f85d 7b04 ldr.w r7, [sp], #4 800d916: 4770 bx lr 0800d918 : * @brief Break2 detection callback in non blocking mode * @param htim: TIM handle * @retval None */ __weak void HAL_TIMEx_Break2Callback(TIM_HandleTypeDef *htim) { 800d918: b480 push {r7} 800d91a: b083 sub sp, #12 800d91c: af00 add r7, sp, #0 800d91e: 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 */ } 800d920: bf00 nop 800d922: 370c adds r7, #12 800d924: 46bd mov sp, r7 800d926: f85d 7b04 ldr.w r7, [sp], #4 800d92a: 4770 bx lr 0800d92c : * 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) { 800d92c: b580 push {r7, lr} 800d92e: b082 sub sp, #8 800d930: af00 add r7, sp, #0 800d932: 6078 str r0, [r7, #4] /* Check the UART handle allocation */ if (huart == NULL) 800d934: 687b ldr r3, [r7, #4] 800d936: 2b00 cmp r3, #0 800d938: d101 bne.n 800d93e { return HAL_ERROR; 800d93a: 2301 movs r3, #1 800d93c: e042 b.n 800d9c4 { /* Check the parameters */ assert_param((IS_UART_INSTANCE(huart->Instance)) || (IS_LPUART_INSTANCE(huart->Instance))); } if (huart->gState == HAL_UART_STATE_RESET) 800d93e: 687b ldr r3, [r7, #4] 800d940: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800d944: 2b00 cmp r3, #0 800d946: d106 bne.n 800d956 { /* Allocate lock resource and initialize it */ huart->Lock = HAL_UNLOCKED; 800d948: 687b ldr r3, [r7, #4] 800d94a: 2200 movs r2, #0 800d94c: 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); 800d950: 6878 ldr r0, [r7, #4] 800d952: f7f6 f90d bl 8003b70 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } huart->gState = HAL_UART_STATE_BUSY; 800d956: 687b ldr r3, [r7, #4] 800d958: 2224 movs r2, #36 @ 0x24 800d95a: f8c3 2088 str.w r2, [r3, #136] @ 0x88 __HAL_UART_DISABLE(huart); 800d95e: 687b ldr r3, [r7, #4] 800d960: 681b ldr r3, [r3, #0] 800d962: 681a ldr r2, [r3, #0] 800d964: 687b ldr r3, [r7, #4] 800d966: 681b ldr r3, [r3, #0] 800d968: f022 0201 bic.w r2, r2, #1 800d96c: 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) 800d96e: 687b ldr r3, [r7, #4] 800d970: 6a9b ldr r3, [r3, #40] @ 0x28 800d972: 2b00 cmp r3, #0 800d974: d002 beq.n 800d97c { UART_AdvFeatureConfig(huart); 800d976: 6878 ldr r0, [r7, #4] 800d978: f001 f9e8 bl 800ed4c } /* Set the UART Communication parameters */ if (UART_SetConfig(huart) == HAL_ERROR) 800d97c: 6878 ldr r0, [r7, #4] 800d97e: f000 fc7d bl 800e27c 800d982: 4603 mov r3, r0 800d984: 2b01 cmp r3, #1 800d986: d101 bne.n 800d98c { return HAL_ERROR; 800d988: 2301 movs r3, #1 800d98a: e01b b.n 800d9c4 } /* 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)); 800d98c: 687b ldr r3, [r7, #4] 800d98e: 681b ldr r3, [r3, #0] 800d990: 685a ldr r2, [r3, #4] 800d992: 687b ldr r3, [r7, #4] 800d994: 681b ldr r3, [r3, #0] 800d996: f422 4290 bic.w r2, r2, #18432 @ 0x4800 800d99a: 605a str r2, [r3, #4] CLEAR_BIT(huart->Instance->CR3, (USART_CR3_SCEN | USART_CR3_HDSEL | USART_CR3_IREN)); 800d99c: 687b ldr r3, [r7, #4] 800d99e: 681b ldr r3, [r3, #0] 800d9a0: 689a ldr r2, [r3, #8] 800d9a2: 687b ldr r3, [r7, #4] 800d9a4: 681b ldr r3, [r3, #0] 800d9a6: f022 022a bic.w r2, r2, #42 @ 0x2a 800d9aa: 609a str r2, [r3, #8] __HAL_UART_ENABLE(huart); 800d9ac: 687b ldr r3, [r7, #4] 800d9ae: 681b ldr r3, [r3, #0] 800d9b0: 681a ldr r2, [r3, #0] 800d9b2: 687b ldr r3, [r7, #4] 800d9b4: 681b ldr r3, [r3, #0] 800d9b6: f042 0201 orr.w r2, r2, #1 800d9ba: 601a str r2, [r3, #0] /* TEACK and/or REACK to check before moving huart->gState and huart->RxState to Ready */ return (UART_CheckIdleState(huart)); 800d9bc: 6878 ldr r0, [r7, #4] 800d9be: f001 fa67 bl 800ee90 800d9c2: 4603 mov r3, r0 } 800d9c4: 4618 mov r0, r3 800d9c6: 3708 adds r7, #8 800d9c8: 46bd mov sp, r7 800d9ca: bd80 pop {r7, pc} 0800d9cc : * @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) { 800d9cc: b480 push {r7} 800d9ce: b091 sub sp, #68 @ 0x44 800d9d0: af00 add r7, sp, #0 800d9d2: 60f8 str r0, [r7, #12] 800d9d4: 60b9 str r1, [r7, #8] 800d9d6: 4613 mov r3, r2 800d9d8: 80fb strh r3, [r7, #6] /* Check that a Tx process is not already ongoing */ if (huart->gState == HAL_UART_STATE_READY) 800d9da: 68fb ldr r3, [r7, #12] 800d9dc: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800d9e0: 2b20 cmp r3, #32 800d9e2: d178 bne.n 800dad6 { if ((pData == NULL) || (Size == 0U)) 800d9e4: 68bb ldr r3, [r7, #8] 800d9e6: 2b00 cmp r3, #0 800d9e8: d002 beq.n 800d9f0 800d9ea: 88fb ldrh r3, [r7, #6] 800d9ec: 2b00 cmp r3, #0 800d9ee: d101 bne.n 800d9f4 { return HAL_ERROR; 800d9f0: 2301 movs r3, #1 800d9f2: e071 b.n 800dad8 } huart->pTxBuffPtr = pData; 800d9f4: 68fb ldr r3, [r7, #12] 800d9f6: 68ba ldr r2, [r7, #8] 800d9f8: 651a str r2, [r3, #80] @ 0x50 huart->TxXferSize = Size; 800d9fa: 68fb ldr r3, [r7, #12] 800d9fc: 88fa ldrh r2, [r7, #6] 800d9fe: f8a3 2054 strh.w r2, [r3, #84] @ 0x54 huart->TxXferCount = Size; 800da02: 68fb ldr r3, [r7, #12] 800da04: 88fa ldrh r2, [r7, #6] 800da06: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 huart->TxISR = NULL; 800da0a: 68fb ldr r3, [r7, #12] 800da0c: 2200 movs r2, #0 800da0e: 679a str r2, [r3, #120] @ 0x78 huart->ErrorCode = HAL_UART_ERROR_NONE; 800da10: 68fb ldr r3, [r7, #12] 800da12: 2200 movs r2, #0 800da14: f8c3 2090 str.w r2, [r3, #144] @ 0x90 huart->gState = HAL_UART_STATE_BUSY_TX; 800da18: 68fb ldr r3, [r7, #12] 800da1a: 2221 movs r2, #33 @ 0x21 800da1c: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Configure Tx interrupt processing */ if (huart->FifoMode == UART_FIFOMODE_ENABLE) 800da20: 68fb ldr r3, [r7, #12] 800da22: 6e5b ldr r3, [r3, #100] @ 0x64 800da24: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800da28: d12a bne.n 800da80 { /* 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)) 800da2a: 68fb ldr r3, [r7, #12] 800da2c: 689b ldr r3, [r3, #8] 800da2e: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800da32: d107 bne.n 800da44 800da34: 68fb ldr r3, [r7, #12] 800da36: 691b ldr r3, [r3, #16] 800da38: 2b00 cmp r3, #0 800da3a: d103 bne.n 800da44 { huart->TxISR = UART_TxISR_16BIT_FIFOEN; 800da3c: 68fb ldr r3, [r7, #12] 800da3e: 4a29 ldr r2, [pc, #164] @ (800dae4 ) 800da40: 679a str r2, [r3, #120] @ 0x78 800da42: e002 b.n 800da4a } else { huart->TxISR = UART_TxISR_8BIT_FIFOEN; 800da44: 68fb ldr r3, [r7, #12] 800da46: 4a28 ldr r2, [pc, #160] @ (800dae8 ) 800da48: 679a str r2, [r3, #120] @ 0x78 } /* Enable the TX FIFO threshold interrupt */ ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800da4a: 68fb ldr r3, [r7, #12] 800da4c: 681b ldr r3, [r3, #0] 800da4e: 3308 adds r3, #8 800da50: 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) ); 800da52: 6abb ldr r3, [r7, #40] @ 0x28 800da54: e853 3f00 ldrex r3, [r3] 800da58: 627b str r3, [r7, #36] @ 0x24 return(result); 800da5a: 6a7b ldr r3, [r7, #36] @ 0x24 800da5c: f443 0300 orr.w r3, r3, #8388608 @ 0x800000 800da60: 63bb str r3, [r7, #56] @ 0x38 800da62: 68fb ldr r3, [r7, #12] 800da64: 681b ldr r3, [r3, #0] 800da66: 3308 adds r3, #8 800da68: 6bba ldr r2, [r7, #56] @ 0x38 800da6a: 637a str r2, [r7, #52] @ 0x34 800da6c: 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) ); 800da6e: 6b39 ldr r1, [r7, #48] @ 0x30 800da70: 6b7a ldr r2, [r7, #52] @ 0x34 800da72: e841 2300 strex r3, r2, [r1] 800da76: 62fb str r3, [r7, #44] @ 0x2c return(result); 800da78: 6afb ldr r3, [r7, #44] @ 0x2c 800da7a: 2b00 cmp r3, #0 800da7c: d1e5 bne.n 800da4a 800da7e: e028 b.n 800dad2 } 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)) 800da80: 68fb ldr r3, [r7, #12] 800da82: 689b ldr r3, [r3, #8] 800da84: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800da88: d107 bne.n 800da9a 800da8a: 68fb ldr r3, [r7, #12] 800da8c: 691b ldr r3, [r3, #16] 800da8e: 2b00 cmp r3, #0 800da90: d103 bne.n 800da9a { huart->TxISR = UART_TxISR_16BIT; 800da92: 68fb ldr r3, [r7, #12] 800da94: 4a15 ldr r2, [pc, #84] @ (800daec ) 800da96: 679a str r2, [r3, #120] @ 0x78 800da98: e002 b.n 800daa0 } else { huart->TxISR = UART_TxISR_8BIT; 800da9a: 68fb ldr r3, [r7, #12] 800da9c: 4a14 ldr r2, [pc, #80] @ (800daf0 ) 800da9e: 679a str r2, [r3, #120] @ 0x78 } /* Enable the Transmit Data Register Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800daa0: 68fb ldr r3, [r7, #12] 800daa2: 681b ldr r3, [r3, #0] 800daa4: 617b str r3, [r7, #20] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800daa6: 697b ldr r3, [r7, #20] 800daa8: e853 3f00 ldrex r3, [r3] 800daac: 613b str r3, [r7, #16] return(result); 800daae: 693b ldr r3, [r7, #16] 800dab0: f043 0380 orr.w r3, r3, #128 @ 0x80 800dab4: 63fb str r3, [r7, #60] @ 0x3c 800dab6: 68fb ldr r3, [r7, #12] 800dab8: 681b ldr r3, [r3, #0] 800daba: 461a mov r2, r3 800dabc: 6bfb ldr r3, [r7, #60] @ 0x3c 800dabe: 623b str r3, [r7, #32] 800dac0: 61fa str r2, [r7, #28] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800dac2: 69f9 ldr r1, [r7, #28] 800dac4: 6a3a ldr r2, [r7, #32] 800dac6: e841 2300 strex r3, r2, [r1] 800daca: 61bb str r3, [r7, #24] return(result); 800dacc: 69bb ldr r3, [r7, #24] 800dace: 2b00 cmp r3, #0 800dad0: d1e6 bne.n 800daa0 } return HAL_OK; 800dad2: 2300 movs r3, #0 800dad4: e000 b.n 800dad8 } else { return HAL_BUSY; 800dad6: 2302 movs r3, #2 } } 800dad8: 4618 mov r0, r3 800dada: 3744 adds r7, #68 @ 0x44 800dadc: 46bd mov sp, r7 800dade: f85d 7b04 ldr.w r7, [sp], #4 800dae2: 4770 bx lr 800dae4: 0800f657 .word 0x0800f657 800dae8: 0800f577 .word 0x0800f577 800daec: 0800f4b5 .word 0x0800f4b5 800daf0: 0800f3fd .word 0x0800f3fd 0800daf4 : * @brief Handle UART interrupt request. * @param huart UART handle. * @retval None */ void HAL_UART_IRQHandler(UART_HandleTypeDef *huart) { 800daf4: b580 push {r7, lr} 800daf6: b0ba sub sp, #232 @ 0xe8 800daf8: af00 add r7, sp, #0 800dafa: 6078 str r0, [r7, #4] uint32_t isrflags = READ_REG(huart->Instance->ISR); 800dafc: 687b ldr r3, [r7, #4] 800dafe: 681b ldr r3, [r3, #0] 800db00: 69db ldr r3, [r3, #28] 800db02: f8c7 30e4 str.w r3, [r7, #228] @ 0xe4 uint32_t cr1its = READ_REG(huart->Instance->CR1); 800db06: 687b ldr r3, [r7, #4] 800db08: 681b ldr r3, [r3, #0] 800db0a: 681b ldr r3, [r3, #0] 800db0c: f8c7 30e0 str.w r3, [r7, #224] @ 0xe0 uint32_t cr3its = READ_REG(huart->Instance->CR3); 800db10: 687b ldr r3, [r7, #4] 800db12: 681b ldr r3, [r3, #0] 800db14: 689b ldr r3, [r3, #8] 800db16: 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)); 800db1a: f8d7 20e4 ldr.w r2, [r7, #228] @ 0xe4 800db1e: f640 030f movw r3, #2063 @ 0x80f 800db22: 4013 ands r3, r2 800db24: f8c7 30d8 str.w r3, [r7, #216] @ 0xd8 if (errorflags == 0U) 800db28: f8d7 30d8 ldr.w r3, [r7, #216] @ 0xd8 800db2c: 2b00 cmp r3, #0 800db2e: d11b bne.n 800db68 { /* UART in mode Receiver ---------------------------------------------------*/ if (((isrflags & USART_ISR_RXNE_RXFNE) != 0U) 800db30: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800db34: f003 0320 and.w r3, r3, #32 800db38: 2b00 cmp r3, #0 800db3a: d015 beq.n 800db68 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) 800db3c: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800db40: f003 0320 and.w r3, r3, #32 800db44: 2b00 cmp r3, #0 800db46: d105 bne.n 800db54 || ((cr3its & USART_CR3_RXFTIE) != 0U))) 800db48: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800db4c: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 800db50: 2b00 cmp r3, #0 800db52: d009 beq.n 800db68 { if (huart->RxISR != NULL) 800db54: 687b ldr r3, [r7, #4] 800db56: 6f5b ldr r3, [r3, #116] @ 0x74 800db58: 2b00 cmp r3, #0 800db5a: f000 8377 beq.w 800e24c { huart->RxISR(huart); 800db5e: 687b ldr r3, [r7, #4] 800db60: 6f5b ldr r3, [r3, #116] @ 0x74 800db62: 6878 ldr r0, [r7, #4] 800db64: 4798 blx r3 } return; 800db66: e371 b.n 800e24c } } /* If some errors occur */ if ((errorflags != 0U) 800db68: f8d7 30d8 ldr.w r3, [r7, #216] @ 0xd8 800db6c: 2b00 cmp r3, #0 800db6e: f000 8123 beq.w 800ddb8 && ((((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U) 800db72: f8d7 20dc ldr.w r2, [r7, #220] @ 0xdc 800db76: 4b8d ldr r3, [pc, #564] @ (800ddac ) 800db78: 4013 ands r3, r2 800db7a: 2b00 cmp r3, #0 800db7c: d106 bne.n 800db8c || ((cr1its & (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | USART_CR1_RTOIE)) != 0U)))) 800db7e: f8d7 20e0 ldr.w r2, [r7, #224] @ 0xe0 800db82: 4b8b ldr r3, [pc, #556] @ (800ddb0 ) 800db84: 4013 ands r3, r2 800db86: 2b00 cmp r3, #0 800db88: f000 8116 beq.w 800ddb8 { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800db8c: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800db90: f003 0301 and.w r3, r3, #1 800db94: 2b00 cmp r3, #0 800db96: d011 beq.n 800dbbc 800db98: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800db9c: f403 7380 and.w r3, r3, #256 @ 0x100 800dba0: 2b00 cmp r3, #0 800dba2: d00b beq.n 800dbbc { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800dba4: 687b ldr r3, [r7, #4] 800dba6: 681b ldr r3, [r3, #0] 800dba8: 2201 movs r2, #1 800dbaa: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800dbac: 687b ldr r3, [r7, #4] 800dbae: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dbb2: f043 0201 orr.w r2, r3, #1 800dbb6: 687b ldr r3, [r7, #4] 800dbb8: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800dbbc: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dbc0: f003 0302 and.w r3, r3, #2 800dbc4: 2b00 cmp r3, #0 800dbc6: d011 beq.n 800dbec 800dbc8: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800dbcc: f003 0301 and.w r3, r3, #1 800dbd0: 2b00 cmp r3, #0 800dbd2: d00b beq.n 800dbec { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800dbd4: 687b ldr r3, [r7, #4] 800dbd6: 681b ldr r3, [r3, #0] 800dbd8: 2202 movs r2, #2 800dbda: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800dbdc: 687b ldr r3, [r7, #4] 800dbde: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dbe2: f043 0204 orr.w r2, r3, #4 800dbe6: 687b ldr r3, [r7, #4] 800dbe8: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800dbec: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dbf0: f003 0304 and.w r3, r3, #4 800dbf4: 2b00 cmp r3, #0 800dbf6: d011 beq.n 800dc1c 800dbf8: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800dbfc: f003 0301 and.w r3, r3, #1 800dc00: 2b00 cmp r3, #0 800dc02: d00b beq.n 800dc1c { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800dc04: 687b ldr r3, [r7, #4] 800dc06: 681b ldr r3, [r3, #0] 800dc08: 2204 movs r2, #4 800dc0a: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800dc0c: 687b ldr r3, [r7, #4] 800dc0e: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dc12: f043 0202 orr.w r2, r3, #2 800dc16: 687b ldr r3, [r7, #4] 800dc18: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART Over-Run interrupt occurred -----------------------------------------*/ if (((isrflags & USART_ISR_ORE) != 0U) 800dc1c: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dc20: f003 0308 and.w r3, r3, #8 800dc24: 2b00 cmp r3, #0 800dc26: d017 beq.n 800dc58 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) || 800dc28: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800dc2c: f003 0320 and.w r3, r3, #32 800dc30: 2b00 cmp r3, #0 800dc32: d105 bne.n 800dc40 ((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U))) 800dc34: f8d7 20dc ldr.w r2, [r7, #220] @ 0xdc 800dc38: 4b5c ldr r3, [pc, #368] @ (800ddac ) 800dc3a: 4013 ands r3, r2 && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) || 800dc3c: 2b00 cmp r3, #0 800dc3e: d00b beq.n 800dc58 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); 800dc40: 687b ldr r3, [r7, #4] 800dc42: 681b ldr r3, [r3, #0] 800dc44: 2208 movs r2, #8 800dc46: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_ORE; 800dc48: 687b ldr r3, [r7, #4] 800dc4a: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dc4e: f043 0208 orr.w r2, r3, #8 800dc52: 687b ldr r3, [r7, #4] 800dc54: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART Receiver Timeout interrupt occurred ---------------------------------*/ if (((isrflags & USART_ISR_RTOF) != 0U) && ((cr1its & USART_CR1_RTOIE) != 0U)) 800dc58: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dc5c: f403 6300 and.w r3, r3, #2048 @ 0x800 800dc60: 2b00 cmp r3, #0 800dc62: d012 beq.n 800dc8a 800dc64: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800dc68: f003 6380 and.w r3, r3, #67108864 @ 0x4000000 800dc6c: 2b00 cmp r3, #0 800dc6e: d00c beq.n 800dc8a { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 800dc70: 687b ldr r3, [r7, #4] 800dc72: 681b ldr r3, [r3, #0] 800dc74: f44f 6200 mov.w r2, #2048 @ 0x800 800dc78: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_RTO; 800dc7a: 687b ldr r3, [r7, #4] 800dc7c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dc80: f043 0220 orr.w r2, r3, #32 800dc84: 687b ldr r3, [r7, #4] 800dc86: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800dc8a: 687b ldr r3, [r7, #4] 800dc8c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dc90: 2b00 cmp r3, #0 800dc92: f000 82dd beq.w 800e250 { /* UART in mode Receiver --------------------------------------------------*/ if (((isrflags & USART_ISR_RXNE_RXFNE) != 0U) 800dc96: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800dc9a: f003 0320 and.w r3, r3, #32 800dc9e: 2b00 cmp r3, #0 800dca0: d013 beq.n 800dcca && (((cr1its & USART_CR1_RXNEIE_RXFNEIE) != 0U) 800dca2: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800dca6: f003 0320 and.w r3, r3, #32 800dcaa: 2b00 cmp r3, #0 800dcac: d105 bne.n 800dcba || ((cr3its & USART_CR3_RXFTIE) != 0U))) 800dcae: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800dcb2: f003 5380 and.w r3, r3, #268435456 @ 0x10000000 800dcb6: 2b00 cmp r3, #0 800dcb8: d007 beq.n 800dcca { if (huart->RxISR != NULL) 800dcba: 687b ldr r3, [r7, #4] 800dcbc: 6f5b ldr r3, [r3, #116] @ 0x74 800dcbe: 2b00 cmp r3, #0 800dcc0: d003 beq.n 800dcca { huart->RxISR(huart); 800dcc2: 687b ldr r3, [r7, #4] 800dcc4: 6f5b ldr r3, [r3, #116] @ 0x74 800dcc6: 6878 ldr r0, [r7, #4] 800dcc8: 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; 800dcca: 687b ldr r3, [r7, #4] 800dccc: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800dcd0: f8c7 30d4 str.w r3, [r7, #212] @ 0xd4 if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) || 800dcd4: 687b ldr r3, [r7, #4] 800dcd6: 681b ldr r3, [r3, #0] 800dcd8: 689b ldr r3, [r3, #8] 800dcda: f003 0340 and.w r3, r3, #64 @ 0x40 800dcde: 2b40 cmp r3, #64 @ 0x40 800dce0: d005 beq.n 800dcee ((errorcode & (HAL_UART_ERROR_RTO | HAL_UART_ERROR_ORE)) != 0U)) 800dce2: f8d7 30d4 ldr.w r3, [r7, #212] @ 0xd4 800dce6: f003 0328 and.w r3, r3, #40 @ 0x28 if ((HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) || 800dcea: 2b00 cmp r3, #0 800dcec: d054 beq.n 800dd98 { /* 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); 800dcee: 6878 ldr r0, [r7, #4] 800dcf0: f001 fb08 bl 800f304 /* Abort the UART DMA Rx channel if enabled */ if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dcf4: 687b ldr r3, [r7, #4] 800dcf6: 681b ldr r3, [r3, #0] 800dcf8: 689b ldr r3, [r3, #8] 800dcfa: f003 0340 and.w r3, r3, #64 @ 0x40 800dcfe: 2b40 cmp r3, #64 @ 0x40 800dd00: d146 bne.n 800dd90 { /* Disable the UART DMA Rx request if enabled */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR); 800dd02: 687b ldr r3, [r7, #4] 800dd04: 681b ldr r3, [r3, #0] 800dd06: 3308 adds r3, #8 800dd08: f8c7 309c str.w r3, [r7, #156] @ 0x9c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800dd0c: f8d7 309c ldr.w r3, [r7, #156] @ 0x9c 800dd10: e853 3f00 ldrex r3, [r3] 800dd14: f8c7 3098 str.w r3, [r7, #152] @ 0x98 return(result); 800dd18: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800dd1c: f023 0340 bic.w r3, r3, #64 @ 0x40 800dd20: f8c7 30d0 str.w r3, [r7, #208] @ 0xd0 800dd24: 687b ldr r3, [r7, #4] 800dd26: 681b ldr r3, [r3, #0] 800dd28: 3308 adds r3, #8 800dd2a: f8d7 20d0 ldr.w r2, [r7, #208] @ 0xd0 800dd2e: f8c7 20a8 str.w r2, [r7, #168] @ 0xa8 800dd32: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800dd36: f8d7 10a4 ldr.w r1, [r7, #164] @ 0xa4 800dd3a: f8d7 20a8 ldr.w r2, [r7, #168] @ 0xa8 800dd3e: e841 2300 strex r3, r2, [r1] 800dd42: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 return(result); 800dd46: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800dd4a: 2b00 cmp r3, #0 800dd4c: d1d9 bne.n 800dd02 /* Abort the UART DMA Rx channel */ if (huart->hdmarx != NULL) 800dd4e: 687b ldr r3, [r7, #4] 800dd50: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd54: 2b00 cmp r3, #0 800dd56: d017 beq.n 800dd88 { /* Set the UART DMA Abort callback : will lead to call HAL_UART_ErrorCallback() at end of DMA abort procedure */ huart->hdmarx->XferAbortCallback = UART_DMAAbortOnError; 800dd58: 687b ldr r3, [r7, #4] 800dd5a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd5e: 4a15 ldr r2, [pc, #84] @ (800ddb4 ) 800dd60: 651a str r2, [r3, #80] @ 0x50 /* Abort DMA RX */ if (HAL_DMA_Abort_IT(huart->hdmarx) != HAL_OK) 800dd62: 687b ldr r3, [r7, #4] 800dd64: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd68: 4618 mov r0, r3 800dd6a: f7f8 ff8f bl 8006c8c 800dd6e: 4603 mov r3, r0 800dd70: 2b00 cmp r3, #0 800dd72: d019 beq.n 800dda8 { /* Call Directly huart->hdmarx->XferAbortCallback function in case of error */ huart->hdmarx->XferAbortCallback(huart->hdmarx); 800dd74: 687b ldr r3, [r7, #4] 800dd76: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dd7a: 6d1b ldr r3, [r3, #80] @ 0x50 800dd7c: 687a ldr r2, [r7, #4] 800dd7e: f8d2 2080 ldr.w r2, [r2, #128] @ 0x80 800dd82: 4610 mov r0, r2 800dd84: 4798 blx r3 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dd86: e00f b.n 800dda8 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800dd88: 6878 ldr r0, [r7, #4] 800dd8a: f000 fa6d bl 800e268 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dd8e: e00b b.n 800dda8 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800dd90: 6878 ldr r0, [r7, #4] 800dd92: f000 fa69 bl 800e268 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dd96: e007 b.n 800dda8 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800dd98: 6878 ldr r0, [r7, #4] 800dd9a: f000 fa65 bl 800e268 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800dd9e: 687b ldr r3, [r7, #4] 800dda0: 2200 movs r2, #0 800dda2: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } return; 800dda6: e253 b.n 800e250 if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dda8: bf00 nop return; 800ddaa: e251 b.n 800e250 800ddac: 10000001 .word 0x10000001 800ddb0: 04000120 .word 0x04000120 800ddb4: 0800f3d1 .word 0x0800f3d1 } /* End if some error occurs */ /* Check current reception Mode : If Reception till IDLE event has been selected : */ if ((huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800ddb8: 687b ldr r3, [r7, #4] 800ddba: 6edb ldr r3, [r3, #108] @ 0x6c 800ddbc: 2b01 cmp r3, #1 800ddbe: f040 81e7 bne.w 800e190 && ((isrflags & USART_ISR_IDLE) != 0U) 800ddc2: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800ddc6: f003 0310 and.w r3, r3, #16 800ddca: 2b00 cmp r3, #0 800ddcc: f000 81e0 beq.w 800e190 && ((cr1its & USART_ISR_IDLE) != 0U)) 800ddd0: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800ddd4: f003 0310 and.w r3, r3, #16 800ddd8: 2b00 cmp r3, #0 800ddda: f000 81d9 beq.w 800e190 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800ddde: 687b ldr r3, [r7, #4] 800dde0: 681b ldr r3, [r3, #0] 800dde2: 2210 movs r2, #16 800dde4: 621a str r2, [r3, #32] /* Check if DMA mode is enabled in UART */ if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) 800dde6: 687b ldr r3, [r7, #4] 800dde8: 681b ldr r3, [r3, #0] 800ddea: 689b ldr r3, [r3, #8] 800ddec: f003 0340 and.w r3, r3, #64 @ 0x40 800ddf0: 2b40 cmp r3, #64 @ 0x40 800ddf2: f040 8151 bne.w 800e098 { /* 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); 800ddf6: 687b ldr r3, [r7, #4] 800ddf8: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800ddfc: 681b ldr r3, [r3, #0] 800ddfe: 4a96 ldr r2, [pc, #600] @ (800e058 ) 800de00: 4293 cmp r3, r2 800de02: d068 beq.n 800ded6 800de04: 687b ldr r3, [r7, #4] 800de06: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de0a: 681b ldr r3, [r3, #0] 800de0c: 4a93 ldr r2, [pc, #588] @ (800e05c ) 800de0e: 4293 cmp r3, r2 800de10: d061 beq.n 800ded6 800de12: 687b ldr r3, [r7, #4] 800de14: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de18: 681b ldr r3, [r3, #0] 800de1a: 4a91 ldr r2, [pc, #580] @ (800e060 ) 800de1c: 4293 cmp r3, r2 800de1e: d05a beq.n 800ded6 800de20: 687b ldr r3, [r7, #4] 800de22: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de26: 681b ldr r3, [r3, #0] 800de28: 4a8e ldr r2, [pc, #568] @ (800e064 ) 800de2a: 4293 cmp r3, r2 800de2c: d053 beq.n 800ded6 800de2e: 687b ldr r3, [r7, #4] 800de30: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de34: 681b ldr r3, [r3, #0] 800de36: 4a8c ldr r2, [pc, #560] @ (800e068 ) 800de38: 4293 cmp r3, r2 800de3a: d04c beq.n 800ded6 800de3c: 687b ldr r3, [r7, #4] 800de3e: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de42: 681b ldr r3, [r3, #0] 800de44: 4a89 ldr r2, [pc, #548] @ (800e06c ) 800de46: 4293 cmp r3, r2 800de48: d045 beq.n 800ded6 800de4a: 687b ldr r3, [r7, #4] 800de4c: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de50: 681b ldr r3, [r3, #0] 800de52: 4a87 ldr r2, [pc, #540] @ (800e070 ) 800de54: 4293 cmp r3, r2 800de56: d03e beq.n 800ded6 800de58: 687b ldr r3, [r7, #4] 800de5a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de5e: 681b ldr r3, [r3, #0] 800de60: 4a84 ldr r2, [pc, #528] @ (800e074 ) 800de62: 4293 cmp r3, r2 800de64: d037 beq.n 800ded6 800de66: 687b ldr r3, [r7, #4] 800de68: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de6c: 681b ldr r3, [r3, #0] 800de6e: 4a82 ldr r2, [pc, #520] @ (800e078 ) 800de70: 4293 cmp r3, r2 800de72: d030 beq.n 800ded6 800de74: 687b ldr r3, [r7, #4] 800de76: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de7a: 681b ldr r3, [r3, #0] 800de7c: 4a7f ldr r2, [pc, #508] @ (800e07c ) 800de7e: 4293 cmp r3, r2 800de80: d029 beq.n 800ded6 800de82: 687b ldr r3, [r7, #4] 800de84: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de88: 681b ldr r3, [r3, #0] 800de8a: 4a7d ldr r2, [pc, #500] @ (800e080 ) 800de8c: 4293 cmp r3, r2 800de8e: d022 beq.n 800ded6 800de90: 687b ldr r3, [r7, #4] 800de92: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800de96: 681b ldr r3, [r3, #0] 800de98: 4a7a ldr r2, [pc, #488] @ (800e084 ) 800de9a: 4293 cmp r3, r2 800de9c: d01b beq.n 800ded6 800de9e: 687b ldr r3, [r7, #4] 800dea0: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dea4: 681b ldr r3, [r3, #0] 800dea6: 4a78 ldr r2, [pc, #480] @ (800e088 ) 800dea8: 4293 cmp r3, r2 800deaa: d014 beq.n 800ded6 800deac: 687b ldr r3, [r7, #4] 800deae: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800deb2: 681b ldr r3, [r3, #0] 800deb4: 4a75 ldr r2, [pc, #468] @ (800e08c ) 800deb6: 4293 cmp r3, r2 800deb8: d00d beq.n 800ded6 800deba: 687b ldr r3, [r7, #4] 800debc: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dec0: 681b ldr r3, [r3, #0] 800dec2: 4a73 ldr r2, [pc, #460] @ (800e090 ) 800dec4: 4293 cmp r3, r2 800dec6: d006 beq.n 800ded6 800dec8: 687b ldr r3, [r7, #4] 800deca: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dece: 681b ldr r3, [r3, #0] 800ded0: 4a70 ldr r2, [pc, #448] @ (800e094 ) 800ded2: 4293 cmp r3, r2 800ded4: d106 bne.n 800dee4 800ded6: 687b ldr r3, [r7, #4] 800ded8: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800dedc: 681b ldr r3, [r3, #0] 800dede: 685b ldr r3, [r3, #4] 800dee0: b29b uxth r3, r3 800dee2: e005 b.n 800def0 800dee4: 687b ldr r3, [r7, #4] 800dee6: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800deea: 681b ldr r3, [r3, #0] 800deec: 685b ldr r3, [r3, #4] 800deee: b29b uxth r3, r3 800def0: f8a7 30be strh.w r3, [r7, #190] @ 0xbe if ((nb_remaining_rx_data > 0U) 800def4: f8b7 30be ldrh.w r3, [r7, #190] @ 0xbe 800def8: 2b00 cmp r3, #0 800defa: f000 81ab beq.w 800e254 && (nb_remaining_rx_data < huart->RxXferSize)) 800defe: 687b ldr r3, [r7, #4] 800df00: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800df04: f8b7 20be ldrh.w r2, [r7, #190] @ 0xbe 800df08: 429a cmp r2, r3 800df0a: f080 81a3 bcs.w 800e254 { /* Reception is not complete */ huart->RxXferCount = nb_remaining_rx_data; 800df0e: 687b ldr r3, [r7, #4] 800df10: f8b7 20be ldrh.w r2, [r7, #190] @ 0xbe 800df14: 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) 800df18: 687b ldr r3, [r7, #4] 800df1a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800df1e: 69db ldr r3, [r3, #28] 800df20: f5b3 7f80 cmp.w r3, #256 @ 0x100 800df24: f000 8087 beq.w 800e036 { /* Disable PE and ERR (Frame error, noise error, overrun error) interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800df28: 687b ldr r3, [r7, #4] 800df2a: 681b ldr r3, [r3, #0] 800df2c: f8c7 3088 str.w r3, [r7, #136] @ 0x88 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800df30: f8d7 3088 ldr.w r3, [r7, #136] @ 0x88 800df34: e853 3f00 ldrex r3, [r3] 800df38: f8c7 3084 str.w r3, [r7, #132] @ 0x84 return(result); 800df3c: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 800df40: f423 7380 bic.w r3, r3, #256 @ 0x100 800df44: f8c7 30b8 str.w r3, [r7, #184] @ 0xb8 800df48: 687b ldr r3, [r7, #4] 800df4a: 681b ldr r3, [r3, #0] 800df4c: 461a mov r2, r3 800df4e: f8d7 30b8 ldr.w r3, [r7, #184] @ 0xb8 800df52: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800df56: f8c7 2090 str.w r2, [r7, #144] @ 0x90 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800df5a: f8d7 1090 ldr.w r1, [r7, #144] @ 0x90 800df5e: f8d7 2094 ldr.w r2, [r7, #148] @ 0x94 800df62: e841 2300 strex r3, r2, [r1] 800df66: f8c7 308c str.w r3, [r7, #140] @ 0x8c return(result); 800df6a: f8d7 308c ldr.w r3, [r7, #140] @ 0x8c 800df6e: 2b00 cmp r3, #0 800df70: d1da bne.n 800df28 ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800df72: 687b ldr r3, [r7, #4] 800df74: 681b ldr r3, [r3, #0] 800df76: 3308 adds r3, #8 800df78: 677b str r3, [r7, #116] @ 0x74 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800df7a: 6f7b ldr r3, [r7, #116] @ 0x74 800df7c: e853 3f00 ldrex r3, [r3] 800df80: 673b str r3, [r7, #112] @ 0x70 return(result); 800df82: 6f3b ldr r3, [r7, #112] @ 0x70 800df84: f023 0301 bic.w r3, r3, #1 800df88: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 800df8c: 687b ldr r3, [r7, #4] 800df8e: 681b ldr r3, [r3, #0] 800df90: 3308 adds r3, #8 800df92: f8d7 20b4 ldr.w r2, [r7, #180] @ 0xb4 800df96: f8c7 2080 str.w r2, [r7, #128] @ 0x80 800df9a: 67fb str r3, [r7, #124] @ 0x7c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800df9c: 6ff9 ldr r1, [r7, #124] @ 0x7c 800df9e: f8d7 2080 ldr.w r2, [r7, #128] @ 0x80 800dfa2: e841 2300 strex r3, r2, [r1] 800dfa6: 67bb str r3, [r7, #120] @ 0x78 return(result); 800dfa8: 6fbb ldr r3, [r7, #120] @ 0x78 800dfaa: 2b00 cmp r3, #0 800dfac: d1e1 bne.n 800df72 /* 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); 800dfae: 687b ldr r3, [r7, #4] 800dfb0: 681b ldr r3, [r3, #0] 800dfb2: 3308 adds r3, #8 800dfb4: 663b str r3, [r7, #96] @ 0x60 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800dfb6: 6e3b ldr r3, [r7, #96] @ 0x60 800dfb8: e853 3f00 ldrex r3, [r3] 800dfbc: 65fb str r3, [r7, #92] @ 0x5c return(result); 800dfbe: 6dfb ldr r3, [r7, #92] @ 0x5c 800dfc0: f023 0340 bic.w r3, r3, #64 @ 0x40 800dfc4: f8c7 30b0 str.w r3, [r7, #176] @ 0xb0 800dfc8: 687b ldr r3, [r7, #4] 800dfca: 681b ldr r3, [r3, #0] 800dfcc: 3308 adds r3, #8 800dfce: f8d7 20b0 ldr.w r2, [r7, #176] @ 0xb0 800dfd2: 66fa str r2, [r7, #108] @ 0x6c 800dfd4: 66bb str r3, [r7, #104] @ 0x68 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800dfd6: 6eb9 ldr r1, [r7, #104] @ 0x68 800dfd8: 6efa ldr r2, [r7, #108] @ 0x6c 800dfda: e841 2300 strex r3, r2, [r1] 800dfde: 667b str r3, [r7, #100] @ 0x64 return(result); 800dfe0: 6e7b ldr r3, [r7, #100] @ 0x64 800dfe2: 2b00 cmp r3, #0 800dfe4: d1e3 bne.n 800dfae /* At end of Rx process, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800dfe6: 687b ldr r3, [r7, #4] 800dfe8: 2220 movs r2, #32 800dfea: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800dfee: 687b ldr r3, [r7, #4] 800dff0: 2200 movs r2, #0 800dff2: 66da str r2, [r3, #108] @ 0x6c ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800dff4: 687b ldr r3, [r7, #4] 800dff6: 681b ldr r3, [r3, #0] 800dff8: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800dffa: 6cfb ldr r3, [r7, #76] @ 0x4c 800dffc: e853 3f00 ldrex r3, [r3] 800e000: 64bb str r3, [r7, #72] @ 0x48 return(result); 800e002: 6cbb ldr r3, [r7, #72] @ 0x48 800e004: f023 0310 bic.w r3, r3, #16 800e008: f8c7 30ac str.w r3, [r7, #172] @ 0xac 800e00c: 687b ldr r3, [r7, #4] 800e00e: 681b ldr r3, [r3, #0] 800e010: 461a mov r2, r3 800e012: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800e016: 65bb str r3, [r7, #88] @ 0x58 800e018: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e01a: 6d79 ldr r1, [r7, #84] @ 0x54 800e01c: 6dba ldr r2, [r7, #88] @ 0x58 800e01e: e841 2300 strex r3, r2, [r1] 800e022: 653b str r3, [r7, #80] @ 0x50 return(result); 800e024: 6d3b ldr r3, [r7, #80] @ 0x50 800e026: 2b00 cmp r3, #0 800e028: d1e4 bne.n 800dff4 /* Last bytes received, so no need as the abort is immediate */ (void)HAL_DMA_Abort(huart->hdmarx); 800e02a: 687b ldr r3, [r7, #4] 800e02c: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 800e030: 4618 mov r0, r3 800e032: f7f8 fb0d bl 8006650 } /* 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; 800e036: 687b ldr r3, [r7, #4] 800e038: 2202 movs r2, #2 800e03a: 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)); 800e03c: 687b ldr r3, [r7, #4] 800e03e: f8b3 205c ldrh.w r2, [r3, #92] @ 0x5c 800e042: 687b ldr r3, [r7, #4] 800e044: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800e048: b29b uxth r3, r3 800e04a: 1ad3 subs r3, r2, r3 800e04c: b29b uxth r3, r3 800e04e: 4619 mov r1, r3 800e050: 6878 ldr r0, [r7, #4] 800e052: f7f6 fb67 bl 8004724 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } return; 800e056: e0fd b.n 800e254 800e058: 40020010 .word 0x40020010 800e05c: 40020028 .word 0x40020028 800e060: 40020040 .word 0x40020040 800e064: 40020058 .word 0x40020058 800e068: 40020070 .word 0x40020070 800e06c: 40020088 .word 0x40020088 800e070: 400200a0 .word 0x400200a0 800e074: 400200b8 .word 0x400200b8 800e078: 40020410 .word 0x40020410 800e07c: 40020428 .word 0x40020428 800e080: 40020440 .word 0x40020440 800e084: 40020458 .word 0x40020458 800e088: 40020470 .word 0x40020470 800e08c: 40020488 .word 0x40020488 800e090: 400204a0 .word 0x400204a0 800e094: 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; 800e098: 687b ldr r3, [r7, #4] 800e09a: f8b3 205c ldrh.w r2, [r3, #92] @ 0x5c 800e09e: 687b ldr r3, [r7, #4] 800e0a0: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800e0a4: b29b uxth r3, r3 800e0a6: 1ad3 subs r3, r2, r3 800e0a8: f8a7 30ce strh.w r3, [r7, #206] @ 0xce if ((huart->RxXferCount > 0U) 800e0ac: 687b ldr r3, [r7, #4] 800e0ae: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800e0b2: b29b uxth r3, r3 800e0b4: 2b00 cmp r3, #0 800e0b6: f000 80cf beq.w 800e258 && (nb_rx_data > 0U)) 800e0ba: f8b7 30ce ldrh.w r3, [r7, #206] @ 0xce 800e0be: 2b00 cmp r3, #0 800e0c0: f000 80ca beq.w 800e258 { /* Disable the UART Parity Error Interrupt and RXNE interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800e0c4: 687b ldr r3, [r7, #4] 800e0c6: 681b ldr r3, [r3, #0] 800e0c8: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e0ca: 6bbb ldr r3, [r7, #56] @ 0x38 800e0cc: e853 3f00 ldrex r3, [r3] 800e0d0: 637b str r3, [r7, #52] @ 0x34 return(result); 800e0d2: 6b7b ldr r3, [r7, #52] @ 0x34 800e0d4: f423 7390 bic.w r3, r3, #288 @ 0x120 800e0d8: f8c7 30c8 str.w r3, [r7, #200] @ 0xc8 800e0dc: 687b ldr r3, [r7, #4] 800e0de: 681b ldr r3, [r3, #0] 800e0e0: 461a mov r2, r3 800e0e2: f8d7 30c8 ldr.w r3, [r7, #200] @ 0xc8 800e0e6: 647b str r3, [r7, #68] @ 0x44 800e0e8: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e0ea: 6c39 ldr r1, [r7, #64] @ 0x40 800e0ec: 6c7a ldr r2, [r7, #68] @ 0x44 800e0ee: e841 2300 strex r3, r2, [r1] 800e0f2: 63fb str r3, [r7, #60] @ 0x3c return(result); 800e0f4: 6bfb ldr r3, [r7, #60] @ 0x3c 800e0f6: 2b00 cmp r3, #0 800e0f8: d1e4 bne.n 800e0c4 /* 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)); 800e0fa: 687b ldr r3, [r7, #4] 800e0fc: 681b ldr r3, [r3, #0] 800e0fe: 3308 adds r3, #8 800e100: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e102: 6a7b ldr r3, [r7, #36] @ 0x24 800e104: e853 3f00 ldrex r3, [r3] 800e108: 623b str r3, [r7, #32] return(result); 800e10a: 6a3a ldr r2, [r7, #32] 800e10c: 4b55 ldr r3, [pc, #340] @ (800e264 ) 800e10e: 4013 ands r3, r2 800e110: f8c7 30c4 str.w r3, [r7, #196] @ 0xc4 800e114: 687b ldr r3, [r7, #4] 800e116: 681b ldr r3, [r3, #0] 800e118: 3308 adds r3, #8 800e11a: f8d7 20c4 ldr.w r2, [r7, #196] @ 0xc4 800e11e: 633a str r2, [r7, #48] @ 0x30 800e120: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e122: 6af9 ldr r1, [r7, #44] @ 0x2c 800e124: 6b3a ldr r2, [r7, #48] @ 0x30 800e126: e841 2300 strex r3, r2, [r1] 800e12a: 62bb str r3, [r7, #40] @ 0x28 return(result); 800e12c: 6abb ldr r3, [r7, #40] @ 0x28 800e12e: 2b00 cmp r3, #0 800e130: d1e3 bne.n 800e0fa /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800e132: 687b ldr r3, [r7, #4] 800e134: 2220 movs r2, #32 800e136: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800e13a: 687b ldr r3, [r7, #4] 800e13c: 2200 movs r2, #0 800e13e: 66da str r2, [r3, #108] @ 0x6c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800e140: 687b ldr r3, [r7, #4] 800e142: 2200 movs r2, #0 800e144: 675a str r2, [r3, #116] @ 0x74 ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800e146: 687b ldr r3, [r7, #4] 800e148: 681b ldr r3, [r3, #0] 800e14a: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800e14c: 693b ldr r3, [r7, #16] 800e14e: e853 3f00 ldrex r3, [r3] 800e152: 60fb str r3, [r7, #12] return(result); 800e154: 68fb ldr r3, [r7, #12] 800e156: f023 0310 bic.w r3, r3, #16 800e15a: f8c7 30c0 str.w r3, [r7, #192] @ 0xc0 800e15e: 687b ldr r3, [r7, #4] 800e160: 681b ldr r3, [r3, #0] 800e162: 461a mov r2, r3 800e164: f8d7 30c0 ldr.w r3, [r7, #192] @ 0xc0 800e168: 61fb str r3, [r7, #28] 800e16a: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800e16c: 69b9 ldr r1, [r7, #24] 800e16e: 69fa ldr r2, [r7, #28] 800e170: e841 2300 strex r3, r2, [r1] 800e174: 617b str r3, [r7, #20] return(result); 800e176: 697b ldr r3, [r7, #20] 800e178: 2b00 cmp r3, #0 800e17a: d1e4 bne.n 800e146 /* 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; 800e17c: 687b ldr r3, [r7, #4] 800e17e: 2202 movs r2, #2 800e180: 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); 800e182: f8b7 30ce ldrh.w r3, [r7, #206] @ 0xce 800e186: 4619 mov r1, r3 800e188: 6878 ldr r0, [r7, #4] 800e18a: f7f6 facb bl 8004724 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */ } return; 800e18e: e063 b.n 800e258 } } /* UART wakeup from Stop mode interrupt occurred ---------------------------*/ if (((isrflags & USART_ISR_WUF) != 0U) && ((cr3its & USART_CR3_WUFIE) != 0U)) 800e190: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e194: f403 1380 and.w r3, r3, #1048576 @ 0x100000 800e198: 2b00 cmp r3, #0 800e19a: d00e beq.n 800e1ba 800e19c: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800e1a0: f403 0380 and.w r3, r3, #4194304 @ 0x400000 800e1a4: 2b00 cmp r3, #0 800e1a6: d008 beq.n 800e1ba { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_WUF); 800e1a8: 687b ldr r3, [r7, #4] 800e1aa: 681b ldr r3, [r3, #0] 800e1ac: f44f 1280 mov.w r2, #1048576 @ 0x100000 800e1b0: 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); 800e1b2: 6878 ldr r0, [r7, #4] 800e1b4: f002 f80c bl 80101d0 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800e1b8: e051 b.n 800e25e } /* UART in mode Transmitter ------------------------------------------------*/ if (((isrflags & USART_ISR_TXE_TXFNF) != 0U) 800e1ba: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e1be: f003 0380 and.w r3, r3, #128 @ 0x80 800e1c2: 2b00 cmp r3, #0 800e1c4: d014 beq.n 800e1f0 && (((cr1its & USART_CR1_TXEIE_TXFNFIE) != 0U) 800e1c6: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e1ca: f003 0380 and.w r3, r3, #128 @ 0x80 800e1ce: 2b00 cmp r3, #0 800e1d0: d105 bne.n 800e1de || ((cr3its & USART_CR3_TXFTIE) != 0U))) 800e1d2: f8d7 30dc ldr.w r3, [r7, #220] @ 0xdc 800e1d6: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800e1da: 2b00 cmp r3, #0 800e1dc: d008 beq.n 800e1f0 { if (huart->TxISR != NULL) 800e1de: 687b ldr r3, [r7, #4] 800e1e0: 6f9b ldr r3, [r3, #120] @ 0x78 800e1e2: 2b00 cmp r3, #0 800e1e4: d03a beq.n 800e25c { huart->TxISR(huart); 800e1e6: 687b ldr r3, [r7, #4] 800e1e8: 6f9b ldr r3, [r3, #120] @ 0x78 800e1ea: 6878 ldr r0, [r7, #4] 800e1ec: 4798 blx r3 } return; 800e1ee: e035 b.n 800e25c } /* UART in mode Transmitter (transmission end) -----------------------------*/ if (((isrflags & USART_ISR_TC) != 0U) && ((cr1its & USART_CR1_TCIE) != 0U)) 800e1f0: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e1f4: f003 0340 and.w r3, r3, #64 @ 0x40 800e1f8: 2b00 cmp r3, #0 800e1fa: d009 beq.n 800e210 800e1fc: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e200: f003 0340 and.w r3, r3, #64 @ 0x40 800e204: 2b00 cmp r3, #0 800e206: d003 beq.n 800e210 { UART_EndTransmit_IT(huart); 800e208: 6878 ldr r0, [r7, #4] 800e20a: f001 fa99 bl 800f740 return; 800e20e: e026 b.n 800e25e } /* UART TX Fifo Empty occurred ----------------------------------------------*/ if (((isrflags & USART_ISR_TXFE) != 0U) && ((cr1its & USART_CR1_TXFEIE) != 0U)) 800e210: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e214: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800e218: 2b00 cmp r3, #0 800e21a: d009 beq.n 800e230 800e21c: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e220: f003 4380 and.w r3, r3, #1073741824 @ 0x40000000 800e224: 2b00 cmp r3, #0 800e226: d003 beq.n 800e230 #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); 800e228: 6878 ldr r0, [r7, #4] 800e22a: f001 ffe5 bl 80101f8 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800e22e: e016 b.n 800e25e } /* UART RX Fifo Full occurred ----------------------------------------------*/ if (((isrflags & USART_ISR_RXFF) != 0U) && ((cr1its & USART_CR1_RXFFIE) != 0U)) 800e230: f8d7 30e4 ldr.w r3, [r7, #228] @ 0xe4 800e234: f003 7380 and.w r3, r3, #16777216 @ 0x1000000 800e238: 2b00 cmp r3, #0 800e23a: d010 beq.n 800e25e 800e23c: f8d7 30e0 ldr.w r3, [r7, #224] @ 0xe0 800e240: 2b00 cmp r3, #0 800e242: da0c bge.n 800e25e #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); 800e244: 6878 ldr r0, [r7, #4] 800e246: f001 ffcd bl 80101e4 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ return; 800e24a: e008 b.n 800e25e return; 800e24c: bf00 nop 800e24e: e006 b.n 800e25e return; 800e250: bf00 nop 800e252: e004 b.n 800e25e return; 800e254: bf00 nop 800e256: e002 b.n 800e25e return; 800e258: bf00 nop 800e25a: e000 b.n 800e25e return; 800e25c: bf00 nop } } 800e25e: 37e8 adds r7, #232 @ 0xe8 800e260: 46bd mov sp, r7 800e262: bd80 pop {r7, pc} 800e264: effffffe .word 0xeffffffe 0800e268 : * @brief UART error callback. * @param huart UART handle. * @retval None */ __weak void HAL_UART_ErrorCallback(UART_HandleTypeDef *huart) { 800e268: b480 push {r7} 800e26a: b083 sub sp, #12 800e26c: af00 add r7, sp, #0 800e26e: 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. */ } 800e270: bf00 nop 800e272: 370c adds r7, #12 800e274: 46bd mov sp, r7 800e276: f85d 7b04 ldr.w r7, [sp], #4 800e27a: 4770 bx lr 0800e27c : * @brief Configure the UART peripheral. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef UART_SetConfig(UART_HandleTypeDef *huart) { 800e27c: e92d 4fb0 stmdb sp!, {r4, r5, r7, r8, r9, sl, fp, lr} 800e280: b092 sub sp, #72 @ 0x48 800e282: af00 add r7, sp, #0 800e284: 6178 str r0, [r7, #20] uint32_t tmpreg; uint16_t brrtemp; UART_ClockSourceTypeDef clocksource; uint32_t usartdiv; HAL_StatusTypeDef ret = HAL_OK; 800e286: 2300 movs r3, #0 800e288: 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 ; 800e28c: 697b ldr r3, [r7, #20] 800e28e: 689a ldr r2, [r3, #8] 800e290: 697b ldr r3, [r7, #20] 800e292: 691b ldr r3, [r3, #16] 800e294: 431a orrs r2, r3 800e296: 697b ldr r3, [r7, #20] 800e298: 695b ldr r3, [r3, #20] 800e29a: 431a orrs r2, r3 800e29c: 697b ldr r3, [r7, #20] 800e29e: 69db ldr r3, [r3, #28] 800e2a0: 4313 orrs r3, r2 800e2a2: 647b str r3, [r7, #68] @ 0x44 MODIFY_REG(huart->Instance->CR1, USART_CR1_FIELDS, tmpreg); 800e2a4: 697b ldr r3, [r7, #20] 800e2a6: 681b ldr r3, [r3, #0] 800e2a8: 681a ldr r2, [r3, #0] 800e2aa: 4bbe ldr r3, [pc, #760] @ (800e5a4 ) 800e2ac: 4013 ands r3, r2 800e2ae: 697a ldr r2, [r7, #20] 800e2b0: 6812 ldr r2, [r2, #0] 800e2b2: 6c79 ldr r1, [r7, #68] @ 0x44 800e2b4: 430b orrs r3, r1 800e2b6: 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); 800e2b8: 697b ldr r3, [r7, #20] 800e2ba: 681b ldr r3, [r3, #0] 800e2bc: 685b ldr r3, [r3, #4] 800e2be: f423 5140 bic.w r1, r3, #12288 @ 0x3000 800e2c2: 697b ldr r3, [r7, #20] 800e2c4: 68da ldr r2, [r3, #12] 800e2c6: 697b ldr r3, [r7, #20] 800e2c8: 681b ldr r3, [r3, #0] 800e2ca: 430a orrs r2, r1 800e2cc: 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; 800e2ce: 697b ldr r3, [r7, #20] 800e2d0: 699b ldr r3, [r3, #24] 800e2d2: 647b str r3, [r7, #68] @ 0x44 if (!(UART_INSTANCE_LOWPOWER(huart))) 800e2d4: 697b ldr r3, [r7, #20] 800e2d6: 681b ldr r3, [r3, #0] 800e2d8: 4ab3 ldr r2, [pc, #716] @ (800e5a8 ) 800e2da: 4293 cmp r3, r2 800e2dc: d004 beq.n 800e2e8 { tmpreg |= huart->Init.OneBitSampling; 800e2de: 697b ldr r3, [r7, #20] 800e2e0: 6a1b ldr r3, [r3, #32] 800e2e2: 6c7a ldr r2, [r7, #68] @ 0x44 800e2e4: 4313 orrs r3, r2 800e2e6: 647b str r3, [r7, #68] @ 0x44 } MODIFY_REG(huart->Instance->CR3, USART_CR3_FIELDS, tmpreg); 800e2e8: 697b ldr r3, [r7, #20] 800e2ea: 681b ldr r3, [r3, #0] 800e2ec: 689a ldr r2, [r3, #8] 800e2ee: 4baf ldr r3, [pc, #700] @ (800e5ac ) 800e2f0: 4013 ands r3, r2 800e2f2: 697a ldr r2, [r7, #20] 800e2f4: 6812 ldr r2, [r2, #0] 800e2f6: 6c79 ldr r1, [r7, #68] @ 0x44 800e2f8: 430b orrs r3, r1 800e2fa: 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); 800e2fc: 697b ldr r3, [r7, #20] 800e2fe: 681b ldr r3, [r3, #0] 800e300: 6adb ldr r3, [r3, #44] @ 0x2c 800e302: f023 010f bic.w r1, r3, #15 800e306: 697b ldr r3, [r7, #20] 800e308: 6a5a ldr r2, [r3, #36] @ 0x24 800e30a: 697b ldr r3, [r7, #20] 800e30c: 681b ldr r3, [r3, #0] 800e30e: 430a orrs r2, r1 800e310: 62da str r2, [r3, #44] @ 0x2c /*-------------------------- USART BRR Configuration -----------------------*/ UART_GETCLOCKSOURCE(huart, clocksource); 800e312: 697b ldr r3, [r7, #20] 800e314: 681b ldr r3, [r3, #0] 800e316: 4aa6 ldr r2, [pc, #664] @ (800e5b0 ) 800e318: 4293 cmp r3, r2 800e31a: d177 bne.n 800e40c 800e31c: 4ba5 ldr r3, [pc, #660] @ (800e5b4 ) 800e31e: 6d5b ldr r3, [r3, #84] @ 0x54 800e320: f003 0338 and.w r3, r3, #56 @ 0x38 800e324: 2b28 cmp r3, #40 @ 0x28 800e326: d86d bhi.n 800e404 800e328: a201 add r2, pc, #4 @ (adr r2, 800e330 ) 800e32a: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e32e: bf00 nop 800e330: 0800e3d5 .word 0x0800e3d5 800e334: 0800e405 .word 0x0800e405 800e338: 0800e405 .word 0x0800e405 800e33c: 0800e405 .word 0x0800e405 800e340: 0800e405 .word 0x0800e405 800e344: 0800e405 .word 0x0800e405 800e348: 0800e405 .word 0x0800e405 800e34c: 0800e405 .word 0x0800e405 800e350: 0800e3dd .word 0x0800e3dd 800e354: 0800e405 .word 0x0800e405 800e358: 0800e405 .word 0x0800e405 800e35c: 0800e405 .word 0x0800e405 800e360: 0800e405 .word 0x0800e405 800e364: 0800e405 .word 0x0800e405 800e368: 0800e405 .word 0x0800e405 800e36c: 0800e405 .word 0x0800e405 800e370: 0800e3e5 .word 0x0800e3e5 800e374: 0800e405 .word 0x0800e405 800e378: 0800e405 .word 0x0800e405 800e37c: 0800e405 .word 0x0800e405 800e380: 0800e405 .word 0x0800e405 800e384: 0800e405 .word 0x0800e405 800e388: 0800e405 .word 0x0800e405 800e38c: 0800e405 .word 0x0800e405 800e390: 0800e3ed .word 0x0800e3ed 800e394: 0800e405 .word 0x0800e405 800e398: 0800e405 .word 0x0800e405 800e39c: 0800e405 .word 0x0800e405 800e3a0: 0800e405 .word 0x0800e405 800e3a4: 0800e405 .word 0x0800e405 800e3a8: 0800e405 .word 0x0800e405 800e3ac: 0800e405 .word 0x0800e405 800e3b0: 0800e3f5 .word 0x0800e3f5 800e3b4: 0800e405 .word 0x0800e405 800e3b8: 0800e405 .word 0x0800e405 800e3bc: 0800e405 .word 0x0800e405 800e3c0: 0800e405 .word 0x0800e405 800e3c4: 0800e405 .word 0x0800e405 800e3c8: 0800e405 .word 0x0800e405 800e3cc: 0800e405 .word 0x0800e405 800e3d0: 0800e3fd .word 0x0800e3fd 800e3d4: 2301 movs r3, #1 800e3d6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3da: e222 b.n 800e822 800e3dc: 2304 movs r3, #4 800e3de: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3e2: e21e b.n 800e822 800e3e4: 2308 movs r3, #8 800e3e6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3ea: e21a b.n 800e822 800e3ec: 2310 movs r3, #16 800e3ee: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3f2: e216 b.n 800e822 800e3f4: 2320 movs r3, #32 800e3f6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e3fa: e212 b.n 800e822 800e3fc: 2340 movs r3, #64 @ 0x40 800e3fe: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e402: e20e b.n 800e822 800e404: 2380 movs r3, #128 @ 0x80 800e406: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e40a: e20a b.n 800e822 800e40c: 697b ldr r3, [r7, #20] 800e40e: 681b ldr r3, [r3, #0] 800e410: 4a69 ldr r2, [pc, #420] @ (800e5b8 ) 800e412: 4293 cmp r3, r2 800e414: d130 bne.n 800e478 800e416: 4b67 ldr r3, [pc, #412] @ (800e5b4 ) 800e418: 6d5b ldr r3, [r3, #84] @ 0x54 800e41a: f003 0307 and.w r3, r3, #7 800e41e: 2b05 cmp r3, #5 800e420: d826 bhi.n 800e470 800e422: a201 add r2, pc, #4 @ (adr r2, 800e428 ) 800e424: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e428: 0800e441 .word 0x0800e441 800e42c: 0800e449 .word 0x0800e449 800e430: 0800e451 .word 0x0800e451 800e434: 0800e459 .word 0x0800e459 800e438: 0800e461 .word 0x0800e461 800e43c: 0800e469 .word 0x0800e469 800e440: 2300 movs r3, #0 800e442: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e446: e1ec b.n 800e822 800e448: 2304 movs r3, #4 800e44a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e44e: e1e8 b.n 800e822 800e450: 2308 movs r3, #8 800e452: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e456: e1e4 b.n 800e822 800e458: 2310 movs r3, #16 800e45a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e45e: e1e0 b.n 800e822 800e460: 2320 movs r3, #32 800e462: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e466: e1dc b.n 800e822 800e468: 2340 movs r3, #64 @ 0x40 800e46a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e46e: e1d8 b.n 800e822 800e470: 2380 movs r3, #128 @ 0x80 800e472: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e476: e1d4 b.n 800e822 800e478: 697b ldr r3, [r7, #20] 800e47a: 681b ldr r3, [r3, #0] 800e47c: 4a4f ldr r2, [pc, #316] @ (800e5bc ) 800e47e: 4293 cmp r3, r2 800e480: d130 bne.n 800e4e4 800e482: 4b4c ldr r3, [pc, #304] @ (800e5b4 ) 800e484: 6d5b ldr r3, [r3, #84] @ 0x54 800e486: f003 0307 and.w r3, r3, #7 800e48a: 2b05 cmp r3, #5 800e48c: d826 bhi.n 800e4dc 800e48e: a201 add r2, pc, #4 @ (adr r2, 800e494 ) 800e490: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e494: 0800e4ad .word 0x0800e4ad 800e498: 0800e4b5 .word 0x0800e4b5 800e49c: 0800e4bd .word 0x0800e4bd 800e4a0: 0800e4c5 .word 0x0800e4c5 800e4a4: 0800e4cd .word 0x0800e4cd 800e4a8: 0800e4d5 .word 0x0800e4d5 800e4ac: 2300 movs r3, #0 800e4ae: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4b2: e1b6 b.n 800e822 800e4b4: 2304 movs r3, #4 800e4b6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4ba: e1b2 b.n 800e822 800e4bc: 2308 movs r3, #8 800e4be: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4c2: e1ae b.n 800e822 800e4c4: 2310 movs r3, #16 800e4c6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4ca: e1aa b.n 800e822 800e4cc: 2320 movs r3, #32 800e4ce: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4d2: e1a6 b.n 800e822 800e4d4: 2340 movs r3, #64 @ 0x40 800e4d6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4da: e1a2 b.n 800e822 800e4dc: 2380 movs r3, #128 @ 0x80 800e4de: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e4e2: e19e b.n 800e822 800e4e4: 697b ldr r3, [r7, #20] 800e4e6: 681b ldr r3, [r3, #0] 800e4e8: 4a35 ldr r2, [pc, #212] @ (800e5c0 ) 800e4ea: 4293 cmp r3, r2 800e4ec: d130 bne.n 800e550 800e4ee: 4b31 ldr r3, [pc, #196] @ (800e5b4 ) 800e4f0: 6d5b ldr r3, [r3, #84] @ 0x54 800e4f2: f003 0307 and.w r3, r3, #7 800e4f6: 2b05 cmp r3, #5 800e4f8: d826 bhi.n 800e548 800e4fa: a201 add r2, pc, #4 @ (adr r2, 800e500 ) 800e4fc: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e500: 0800e519 .word 0x0800e519 800e504: 0800e521 .word 0x0800e521 800e508: 0800e529 .word 0x0800e529 800e50c: 0800e531 .word 0x0800e531 800e510: 0800e539 .word 0x0800e539 800e514: 0800e541 .word 0x0800e541 800e518: 2300 movs r3, #0 800e51a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e51e: e180 b.n 800e822 800e520: 2304 movs r3, #4 800e522: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e526: e17c b.n 800e822 800e528: 2308 movs r3, #8 800e52a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e52e: e178 b.n 800e822 800e530: 2310 movs r3, #16 800e532: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e536: e174 b.n 800e822 800e538: 2320 movs r3, #32 800e53a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e53e: e170 b.n 800e822 800e540: 2340 movs r3, #64 @ 0x40 800e542: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e546: e16c b.n 800e822 800e548: 2380 movs r3, #128 @ 0x80 800e54a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e54e: e168 b.n 800e822 800e550: 697b ldr r3, [r7, #20] 800e552: 681b ldr r3, [r3, #0] 800e554: 4a1b ldr r2, [pc, #108] @ (800e5c4 ) 800e556: 4293 cmp r3, r2 800e558: d142 bne.n 800e5e0 800e55a: 4b16 ldr r3, [pc, #88] @ (800e5b4 ) 800e55c: 6d5b ldr r3, [r3, #84] @ 0x54 800e55e: f003 0307 and.w r3, r3, #7 800e562: 2b05 cmp r3, #5 800e564: d838 bhi.n 800e5d8 800e566: a201 add r2, pc, #4 @ (adr r2, 800e56c ) 800e568: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e56c: 0800e585 .word 0x0800e585 800e570: 0800e58d .word 0x0800e58d 800e574: 0800e595 .word 0x0800e595 800e578: 0800e59d .word 0x0800e59d 800e57c: 0800e5c9 .word 0x0800e5c9 800e580: 0800e5d1 .word 0x0800e5d1 800e584: 2300 movs r3, #0 800e586: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e58a: e14a b.n 800e822 800e58c: 2304 movs r3, #4 800e58e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e592: e146 b.n 800e822 800e594: 2308 movs r3, #8 800e596: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e59a: e142 b.n 800e822 800e59c: 2310 movs r3, #16 800e59e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e5a2: e13e b.n 800e822 800e5a4: cfff69f3 .word 0xcfff69f3 800e5a8: 58000c00 .word 0x58000c00 800e5ac: 11fff4ff .word 0x11fff4ff 800e5b0: 40011000 .word 0x40011000 800e5b4: 58024400 .word 0x58024400 800e5b8: 40004400 .word 0x40004400 800e5bc: 40004800 .word 0x40004800 800e5c0: 40004c00 .word 0x40004c00 800e5c4: 40005000 .word 0x40005000 800e5c8: 2320 movs r3, #32 800e5ca: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e5ce: e128 b.n 800e822 800e5d0: 2340 movs r3, #64 @ 0x40 800e5d2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e5d6: e124 b.n 800e822 800e5d8: 2380 movs r3, #128 @ 0x80 800e5da: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e5de: e120 b.n 800e822 800e5e0: 697b ldr r3, [r7, #20] 800e5e2: 681b ldr r3, [r3, #0] 800e5e4: 4acb ldr r2, [pc, #812] @ (800e914 ) 800e5e6: 4293 cmp r3, r2 800e5e8: d176 bne.n 800e6d8 800e5ea: 4bcb ldr r3, [pc, #812] @ (800e918 ) 800e5ec: 6d5b ldr r3, [r3, #84] @ 0x54 800e5ee: f003 0338 and.w r3, r3, #56 @ 0x38 800e5f2: 2b28 cmp r3, #40 @ 0x28 800e5f4: d86c bhi.n 800e6d0 800e5f6: a201 add r2, pc, #4 @ (adr r2, 800e5fc ) 800e5f8: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e5fc: 0800e6a1 .word 0x0800e6a1 800e600: 0800e6d1 .word 0x0800e6d1 800e604: 0800e6d1 .word 0x0800e6d1 800e608: 0800e6d1 .word 0x0800e6d1 800e60c: 0800e6d1 .word 0x0800e6d1 800e610: 0800e6d1 .word 0x0800e6d1 800e614: 0800e6d1 .word 0x0800e6d1 800e618: 0800e6d1 .word 0x0800e6d1 800e61c: 0800e6a9 .word 0x0800e6a9 800e620: 0800e6d1 .word 0x0800e6d1 800e624: 0800e6d1 .word 0x0800e6d1 800e628: 0800e6d1 .word 0x0800e6d1 800e62c: 0800e6d1 .word 0x0800e6d1 800e630: 0800e6d1 .word 0x0800e6d1 800e634: 0800e6d1 .word 0x0800e6d1 800e638: 0800e6d1 .word 0x0800e6d1 800e63c: 0800e6b1 .word 0x0800e6b1 800e640: 0800e6d1 .word 0x0800e6d1 800e644: 0800e6d1 .word 0x0800e6d1 800e648: 0800e6d1 .word 0x0800e6d1 800e64c: 0800e6d1 .word 0x0800e6d1 800e650: 0800e6d1 .word 0x0800e6d1 800e654: 0800e6d1 .word 0x0800e6d1 800e658: 0800e6d1 .word 0x0800e6d1 800e65c: 0800e6b9 .word 0x0800e6b9 800e660: 0800e6d1 .word 0x0800e6d1 800e664: 0800e6d1 .word 0x0800e6d1 800e668: 0800e6d1 .word 0x0800e6d1 800e66c: 0800e6d1 .word 0x0800e6d1 800e670: 0800e6d1 .word 0x0800e6d1 800e674: 0800e6d1 .word 0x0800e6d1 800e678: 0800e6d1 .word 0x0800e6d1 800e67c: 0800e6c1 .word 0x0800e6c1 800e680: 0800e6d1 .word 0x0800e6d1 800e684: 0800e6d1 .word 0x0800e6d1 800e688: 0800e6d1 .word 0x0800e6d1 800e68c: 0800e6d1 .word 0x0800e6d1 800e690: 0800e6d1 .word 0x0800e6d1 800e694: 0800e6d1 .word 0x0800e6d1 800e698: 0800e6d1 .word 0x0800e6d1 800e69c: 0800e6c9 .word 0x0800e6c9 800e6a0: 2301 movs r3, #1 800e6a2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6a6: e0bc b.n 800e822 800e6a8: 2304 movs r3, #4 800e6aa: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6ae: e0b8 b.n 800e822 800e6b0: 2308 movs r3, #8 800e6b2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6b6: e0b4 b.n 800e822 800e6b8: 2310 movs r3, #16 800e6ba: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6be: e0b0 b.n 800e822 800e6c0: 2320 movs r3, #32 800e6c2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6c6: e0ac b.n 800e822 800e6c8: 2340 movs r3, #64 @ 0x40 800e6ca: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6ce: e0a8 b.n 800e822 800e6d0: 2380 movs r3, #128 @ 0x80 800e6d2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e6d6: e0a4 b.n 800e822 800e6d8: 697b ldr r3, [r7, #20] 800e6da: 681b ldr r3, [r3, #0] 800e6dc: 4a8f ldr r2, [pc, #572] @ (800e91c ) 800e6de: 4293 cmp r3, r2 800e6e0: d130 bne.n 800e744 800e6e2: 4b8d ldr r3, [pc, #564] @ (800e918 ) 800e6e4: 6d5b ldr r3, [r3, #84] @ 0x54 800e6e6: f003 0307 and.w r3, r3, #7 800e6ea: 2b05 cmp r3, #5 800e6ec: d826 bhi.n 800e73c 800e6ee: a201 add r2, pc, #4 @ (adr r2, 800e6f4 ) 800e6f0: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e6f4: 0800e70d .word 0x0800e70d 800e6f8: 0800e715 .word 0x0800e715 800e6fc: 0800e71d .word 0x0800e71d 800e700: 0800e725 .word 0x0800e725 800e704: 0800e72d .word 0x0800e72d 800e708: 0800e735 .word 0x0800e735 800e70c: 2300 movs r3, #0 800e70e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e712: e086 b.n 800e822 800e714: 2304 movs r3, #4 800e716: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e71a: e082 b.n 800e822 800e71c: 2308 movs r3, #8 800e71e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e722: e07e b.n 800e822 800e724: 2310 movs r3, #16 800e726: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e72a: e07a b.n 800e822 800e72c: 2320 movs r3, #32 800e72e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e732: e076 b.n 800e822 800e734: 2340 movs r3, #64 @ 0x40 800e736: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e73a: e072 b.n 800e822 800e73c: 2380 movs r3, #128 @ 0x80 800e73e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e742: e06e b.n 800e822 800e744: 697b ldr r3, [r7, #20] 800e746: 681b ldr r3, [r3, #0] 800e748: 4a75 ldr r2, [pc, #468] @ (800e920 ) 800e74a: 4293 cmp r3, r2 800e74c: d130 bne.n 800e7b0 800e74e: 4b72 ldr r3, [pc, #456] @ (800e918 ) 800e750: 6d5b ldr r3, [r3, #84] @ 0x54 800e752: f003 0307 and.w r3, r3, #7 800e756: 2b05 cmp r3, #5 800e758: d826 bhi.n 800e7a8 800e75a: a201 add r2, pc, #4 @ (adr r2, 800e760 ) 800e75c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e760: 0800e779 .word 0x0800e779 800e764: 0800e781 .word 0x0800e781 800e768: 0800e789 .word 0x0800e789 800e76c: 0800e791 .word 0x0800e791 800e770: 0800e799 .word 0x0800e799 800e774: 0800e7a1 .word 0x0800e7a1 800e778: 2300 movs r3, #0 800e77a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e77e: e050 b.n 800e822 800e780: 2304 movs r3, #4 800e782: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e786: e04c b.n 800e822 800e788: 2308 movs r3, #8 800e78a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e78e: e048 b.n 800e822 800e790: 2310 movs r3, #16 800e792: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e796: e044 b.n 800e822 800e798: 2320 movs r3, #32 800e79a: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e79e: e040 b.n 800e822 800e7a0: 2340 movs r3, #64 @ 0x40 800e7a2: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7a6: e03c b.n 800e822 800e7a8: 2380 movs r3, #128 @ 0x80 800e7aa: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7ae: e038 b.n 800e822 800e7b0: 697b ldr r3, [r7, #20] 800e7b2: 681b ldr r3, [r3, #0] 800e7b4: 4a5b ldr r2, [pc, #364] @ (800e924 ) 800e7b6: 4293 cmp r3, r2 800e7b8: d130 bne.n 800e81c 800e7ba: 4b57 ldr r3, [pc, #348] @ (800e918 ) 800e7bc: 6d9b ldr r3, [r3, #88] @ 0x58 800e7be: f003 0307 and.w r3, r3, #7 800e7c2: 2b05 cmp r3, #5 800e7c4: d826 bhi.n 800e814 800e7c6: a201 add r2, pc, #4 @ (adr r2, 800e7cc ) 800e7c8: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e7cc: 0800e7e5 .word 0x0800e7e5 800e7d0: 0800e7ed .word 0x0800e7ed 800e7d4: 0800e7f5 .word 0x0800e7f5 800e7d8: 0800e7fd .word 0x0800e7fd 800e7dc: 0800e805 .word 0x0800e805 800e7e0: 0800e80d .word 0x0800e80d 800e7e4: 2302 movs r3, #2 800e7e6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7ea: e01a b.n 800e822 800e7ec: 2304 movs r3, #4 800e7ee: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7f2: e016 b.n 800e822 800e7f4: 2308 movs r3, #8 800e7f6: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e7fa: e012 b.n 800e822 800e7fc: 2310 movs r3, #16 800e7fe: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e802: e00e b.n 800e822 800e804: 2320 movs r3, #32 800e806: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e80a: e00a b.n 800e822 800e80c: 2340 movs r3, #64 @ 0x40 800e80e: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e812: e006 b.n 800e822 800e814: 2380 movs r3, #128 @ 0x80 800e816: f887 3043 strb.w r3, [r7, #67] @ 0x43 800e81a: e002 b.n 800e822 800e81c: 2380 movs r3, #128 @ 0x80 800e81e: f887 3043 strb.w r3, [r7, #67] @ 0x43 /* Check LPUART instance */ if (UART_INSTANCE_LOWPOWER(huart)) 800e822: 697b ldr r3, [r7, #20] 800e824: 681b ldr r3, [r3, #0] 800e826: 4a3f ldr r2, [pc, #252] @ (800e924 ) 800e828: 4293 cmp r3, r2 800e82a: f040 80f8 bne.w 800ea1e { /* Retrieve frequency clock */ switch (clocksource) 800e82e: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800e832: 2b20 cmp r3, #32 800e834: dc46 bgt.n 800e8c4 800e836: 2b02 cmp r3, #2 800e838: f2c0 8082 blt.w 800e940 800e83c: 3b02 subs r3, #2 800e83e: 2b1e cmp r3, #30 800e840: d87e bhi.n 800e940 800e842: a201 add r2, pc, #4 @ (adr r2, 800e848 ) 800e844: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800e848: 0800e8cb .word 0x0800e8cb 800e84c: 0800e941 .word 0x0800e941 800e850: 0800e8d3 .word 0x0800e8d3 800e854: 0800e941 .word 0x0800e941 800e858: 0800e941 .word 0x0800e941 800e85c: 0800e941 .word 0x0800e941 800e860: 0800e8e3 .word 0x0800e8e3 800e864: 0800e941 .word 0x0800e941 800e868: 0800e941 .word 0x0800e941 800e86c: 0800e941 .word 0x0800e941 800e870: 0800e941 .word 0x0800e941 800e874: 0800e941 .word 0x0800e941 800e878: 0800e941 .word 0x0800e941 800e87c: 0800e941 .word 0x0800e941 800e880: 0800e8f3 .word 0x0800e8f3 800e884: 0800e941 .word 0x0800e941 800e888: 0800e941 .word 0x0800e941 800e88c: 0800e941 .word 0x0800e941 800e890: 0800e941 .word 0x0800e941 800e894: 0800e941 .word 0x0800e941 800e898: 0800e941 .word 0x0800e941 800e89c: 0800e941 .word 0x0800e941 800e8a0: 0800e941 .word 0x0800e941 800e8a4: 0800e941 .word 0x0800e941 800e8a8: 0800e941 .word 0x0800e941 800e8ac: 0800e941 .word 0x0800e941 800e8b0: 0800e941 .word 0x0800e941 800e8b4: 0800e941 .word 0x0800e941 800e8b8: 0800e941 .word 0x0800e941 800e8bc: 0800e941 .word 0x0800e941 800e8c0: 0800e933 .word 0x0800e933 800e8c4: 2b40 cmp r3, #64 @ 0x40 800e8c6: d037 beq.n 800e938 800e8c8: e03a b.n 800e940 { case UART_CLOCKSOURCE_D3PCLK1: pclk = HAL_RCCEx_GetD3PCLK1Freq(); 800e8ca: f7fe f887 bl 800c9dc 800e8ce: 63f8 str r0, [r7, #60] @ 0x3c break; 800e8d0: e03c b.n 800e94c case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800e8d2: f107 0324 add.w r3, r7, #36 @ 0x24 800e8d6: 4618 mov r0, r3 800e8d8: f7fe f896 bl 800ca08 pclk = pll2_clocks.PLL2_Q_Frequency; 800e8dc: 6abb ldr r3, [r7, #40] @ 0x28 800e8de: 63fb str r3, [r7, #60] @ 0x3c break; 800e8e0: e034 b.n 800e94c case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800e8e2: f107 0318 add.w r3, r7, #24 800e8e6: 4618 mov r0, r3 800e8e8: f7fe f9e2 bl 800ccb0 pclk = pll3_clocks.PLL3_Q_Frequency; 800e8ec: 69fb ldr r3, [r7, #28] 800e8ee: 63fb str r3, [r7, #60] @ 0x3c break; 800e8f0: e02c b.n 800e94c case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800e8f2: 4b09 ldr r3, [pc, #36] @ (800e918 ) 800e8f4: 681b ldr r3, [r3, #0] 800e8f6: f003 0320 and.w r3, r3, #32 800e8fa: 2b00 cmp r3, #0 800e8fc: d016 beq.n 800e92c { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800e8fe: 4b06 ldr r3, [pc, #24] @ (800e918 ) 800e900: 681b ldr r3, [r3, #0] 800e902: 08db lsrs r3, r3, #3 800e904: f003 0303 and.w r3, r3, #3 800e908: 4a07 ldr r2, [pc, #28] @ (800e928 ) 800e90a: fa22 f303 lsr.w r3, r2, r3 800e90e: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800e910: e01c b.n 800e94c 800e912: bf00 nop 800e914: 40011400 .word 0x40011400 800e918: 58024400 .word 0x58024400 800e91c: 40007800 .word 0x40007800 800e920: 40007c00 .word 0x40007c00 800e924: 58000c00 .word 0x58000c00 800e928: 03d09000 .word 0x03d09000 pclk = (uint32_t) HSI_VALUE; 800e92c: 4b9d ldr r3, [pc, #628] @ (800eba4 ) 800e92e: 63fb str r3, [r7, #60] @ 0x3c break; 800e930: e00c b.n 800e94c case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800e932: 4b9d ldr r3, [pc, #628] @ (800eba8 ) 800e934: 63fb str r3, [r7, #60] @ 0x3c break; 800e936: e009 b.n 800e94c case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800e938: f44f 4300 mov.w r3, #32768 @ 0x8000 800e93c: 63fb str r3, [r7, #60] @ 0x3c break; 800e93e: e005 b.n 800e94c default: pclk = 0U; 800e940: 2300 movs r3, #0 800e942: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800e944: 2301 movs r3, #1 800e946: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800e94a: bf00 nop } /* If proper clock source reported */ if (pclk != 0U) 800e94c: 6bfb ldr r3, [r7, #60] @ 0x3c 800e94e: 2b00 cmp r3, #0 800e950: f000 81de beq.w 800ed10 { /* Compute clock after Prescaler */ lpuart_ker_ck_pres = (pclk / UARTPrescTable[huart->Init.ClockPrescaler]); 800e954: 697b ldr r3, [r7, #20] 800e956: 6a5b ldr r3, [r3, #36] @ 0x24 800e958: 4a94 ldr r2, [pc, #592] @ (800ebac ) 800e95a: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800e95e: 461a mov r2, r3 800e960: 6bfb ldr r3, [r7, #60] @ 0x3c 800e962: fbb3 f3f2 udiv r3, r3, r2 800e966: 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)) || 800e968: 697b ldr r3, [r7, #20] 800e96a: 685a ldr r2, [r3, #4] 800e96c: 4613 mov r3, r2 800e96e: 005b lsls r3, r3, #1 800e970: 4413 add r3, r2 800e972: 6b3a ldr r2, [r7, #48] @ 0x30 800e974: 429a cmp r2, r3 800e976: d305 bcc.n 800e984 (lpuart_ker_ck_pres > (4096U * huart->Init.BaudRate))) 800e978: 697b ldr r3, [r7, #20] 800e97a: 685b ldr r3, [r3, #4] 800e97c: 031b lsls r3, r3, #12 if ((lpuart_ker_ck_pres < (3U * huart->Init.BaudRate)) || 800e97e: 6b3a ldr r2, [r7, #48] @ 0x30 800e980: 429a cmp r2, r3 800e982: d903 bls.n 800e98c { ret = HAL_ERROR; 800e984: 2301 movs r3, #1 800e986: f887 3042 strb.w r3, [r7, #66] @ 0x42 800e98a: e1c1 b.n 800ed10 } 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)); 800e98c: 6bfb ldr r3, [r7, #60] @ 0x3c 800e98e: 2200 movs r2, #0 800e990: 60bb str r3, [r7, #8] 800e992: 60fa str r2, [r7, #12] 800e994: 697b ldr r3, [r7, #20] 800e996: 6a5b ldr r3, [r3, #36] @ 0x24 800e998: 4a84 ldr r2, [pc, #528] @ (800ebac ) 800e99a: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800e99e: b29b uxth r3, r3 800e9a0: 2200 movs r2, #0 800e9a2: 603b str r3, [r7, #0] 800e9a4: 607a str r2, [r7, #4] 800e9a6: e9d7 2300 ldrd r2, r3, [r7] 800e9aa: e9d7 0102 ldrd r0, r1, [r7, #8] 800e9ae: f7f1 febb bl 8000728 <__aeabi_uldivmod> 800e9b2: 4602 mov r2, r0 800e9b4: 460b mov r3, r1 800e9b6: 4610 mov r0, r2 800e9b8: 4619 mov r1, r3 800e9ba: f04f 0200 mov.w r2, #0 800e9be: f04f 0300 mov.w r3, #0 800e9c2: 020b lsls r3, r1, #8 800e9c4: ea43 6310 orr.w r3, r3, r0, lsr #24 800e9c8: 0202 lsls r2, r0, #8 800e9ca: 6979 ldr r1, [r7, #20] 800e9cc: 6849 ldr r1, [r1, #4] 800e9ce: 0849 lsrs r1, r1, #1 800e9d0: 2000 movs r0, #0 800e9d2: 460c mov r4, r1 800e9d4: 4605 mov r5, r0 800e9d6: eb12 0804 adds.w r8, r2, r4 800e9da: eb43 0905 adc.w r9, r3, r5 800e9de: 697b ldr r3, [r7, #20] 800e9e0: 685b ldr r3, [r3, #4] 800e9e2: 2200 movs r2, #0 800e9e4: 469a mov sl, r3 800e9e6: 4693 mov fp, r2 800e9e8: 4652 mov r2, sl 800e9ea: 465b mov r3, fp 800e9ec: 4640 mov r0, r8 800e9ee: 4649 mov r1, r9 800e9f0: f7f1 fe9a bl 8000728 <__aeabi_uldivmod> 800e9f4: 4602 mov r2, r0 800e9f6: 460b mov r3, r1 800e9f8: 4613 mov r3, r2 800e9fa: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= LPUART_BRR_MIN) && (usartdiv <= LPUART_BRR_MAX)) 800e9fc: 6bbb ldr r3, [r7, #56] @ 0x38 800e9fe: f5b3 7f40 cmp.w r3, #768 @ 0x300 800ea02: d308 bcc.n 800ea16 800ea04: 6bbb ldr r3, [r7, #56] @ 0x38 800ea06: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800ea0a: d204 bcs.n 800ea16 { huart->Instance->BRR = usartdiv; 800ea0c: 697b ldr r3, [r7, #20] 800ea0e: 681b ldr r3, [r3, #0] 800ea10: 6bba ldr r2, [r7, #56] @ 0x38 800ea12: 60da str r2, [r3, #12] 800ea14: e17c b.n 800ed10 } else { ret = HAL_ERROR; 800ea16: 2301 movs r3, #1 800ea18: f887 3042 strb.w r3, [r7, #66] @ 0x42 800ea1c: e178 b.n 800ed10 } /* 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) 800ea1e: 697b ldr r3, [r7, #20] 800ea20: 69db ldr r3, [r3, #28] 800ea22: f5b3 4f00 cmp.w r3, #32768 @ 0x8000 800ea26: f040 80c5 bne.w 800ebb4 { switch (clocksource) 800ea2a: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800ea2e: 2b20 cmp r3, #32 800ea30: dc48 bgt.n 800eac4 800ea32: 2b00 cmp r3, #0 800ea34: db7b blt.n 800eb2e 800ea36: 2b20 cmp r3, #32 800ea38: d879 bhi.n 800eb2e 800ea3a: a201 add r2, pc, #4 @ (adr r2, 800ea40 ) 800ea3c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800ea40: 0800eacb .word 0x0800eacb 800ea44: 0800ead3 .word 0x0800ead3 800ea48: 0800eb2f .word 0x0800eb2f 800ea4c: 0800eb2f .word 0x0800eb2f 800ea50: 0800eadb .word 0x0800eadb 800ea54: 0800eb2f .word 0x0800eb2f 800ea58: 0800eb2f .word 0x0800eb2f 800ea5c: 0800eb2f .word 0x0800eb2f 800ea60: 0800eaeb .word 0x0800eaeb 800ea64: 0800eb2f .word 0x0800eb2f 800ea68: 0800eb2f .word 0x0800eb2f 800ea6c: 0800eb2f .word 0x0800eb2f 800ea70: 0800eb2f .word 0x0800eb2f 800ea74: 0800eb2f .word 0x0800eb2f 800ea78: 0800eb2f .word 0x0800eb2f 800ea7c: 0800eb2f .word 0x0800eb2f 800ea80: 0800eafb .word 0x0800eafb 800ea84: 0800eb2f .word 0x0800eb2f 800ea88: 0800eb2f .word 0x0800eb2f 800ea8c: 0800eb2f .word 0x0800eb2f 800ea90: 0800eb2f .word 0x0800eb2f 800ea94: 0800eb2f .word 0x0800eb2f 800ea98: 0800eb2f .word 0x0800eb2f 800ea9c: 0800eb2f .word 0x0800eb2f 800eaa0: 0800eb2f .word 0x0800eb2f 800eaa4: 0800eb2f .word 0x0800eb2f 800eaa8: 0800eb2f .word 0x0800eb2f 800eaac: 0800eb2f .word 0x0800eb2f 800eab0: 0800eb2f .word 0x0800eb2f 800eab4: 0800eb2f .word 0x0800eb2f 800eab8: 0800eb2f .word 0x0800eb2f 800eabc: 0800eb2f .word 0x0800eb2f 800eac0: 0800eb21 .word 0x0800eb21 800eac4: 2b40 cmp r3, #64 @ 0x40 800eac6: d02e beq.n 800eb26 800eac8: e031 b.n 800eb2e { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); 800eaca: f7fc fd2b bl 800b524 800eace: 63f8 str r0, [r7, #60] @ 0x3c break; 800ead0: e033 b.n 800eb3a case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); 800ead2: f7fc fd3d bl 800b550 800ead6: 63f8 str r0, [r7, #60] @ 0x3c break; 800ead8: e02f b.n 800eb3a case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800eada: f107 0324 add.w r3, r7, #36 @ 0x24 800eade: 4618 mov r0, r3 800eae0: f7fd ff92 bl 800ca08 pclk = pll2_clocks.PLL2_Q_Frequency; 800eae4: 6abb ldr r3, [r7, #40] @ 0x28 800eae6: 63fb str r3, [r7, #60] @ 0x3c break; 800eae8: e027 b.n 800eb3a case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800eaea: f107 0318 add.w r3, r7, #24 800eaee: 4618 mov r0, r3 800eaf0: f7fe f8de bl 800ccb0 pclk = pll3_clocks.PLL3_Q_Frequency; 800eaf4: 69fb ldr r3, [r7, #28] 800eaf6: 63fb str r3, [r7, #60] @ 0x3c break; 800eaf8: e01f b.n 800eb3a case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800eafa: 4b2d ldr r3, [pc, #180] @ (800ebb0 ) 800eafc: 681b ldr r3, [r3, #0] 800eafe: f003 0320 and.w r3, r3, #32 800eb02: 2b00 cmp r3, #0 800eb04: d009 beq.n 800eb1a { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800eb06: 4b2a ldr r3, [pc, #168] @ (800ebb0 ) 800eb08: 681b ldr r3, [r3, #0] 800eb0a: 08db lsrs r3, r3, #3 800eb0c: f003 0303 and.w r3, r3, #3 800eb10: 4a24 ldr r2, [pc, #144] @ (800eba4 ) 800eb12: fa22 f303 lsr.w r3, r2, r3 800eb16: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800eb18: e00f b.n 800eb3a pclk = (uint32_t) HSI_VALUE; 800eb1a: 4b22 ldr r3, [pc, #136] @ (800eba4 ) 800eb1c: 63fb str r3, [r7, #60] @ 0x3c break; 800eb1e: e00c b.n 800eb3a case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800eb20: 4b21 ldr r3, [pc, #132] @ (800eba8 ) 800eb22: 63fb str r3, [r7, #60] @ 0x3c break; 800eb24: e009 b.n 800eb3a case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800eb26: f44f 4300 mov.w r3, #32768 @ 0x8000 800eb2a: 63fb str r3, [r7, #60] @ 0x3c break; 800eb2c: e005 b.n 800eb3a default: pclk = 0U; 800eb2e: 2300 movs r3, #0 800eb30: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800eb32: 2301 movs r3, #1 800eb34: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800eb38: bf00 nop } /* USARTDIV must be greater than or equal to 0d16 */ if (pclk != 0U) 800eb3a: 6bfb ldr r3, [r7, #60] @ 0x3c 800eb3c: 2b00 cmp r3, #0 800eb3e: f000 80e7 beq.w 800ed10 { usartdiv = (uint32_t)(UART_DIV_SAMPLING8(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); 800eb42: 697b ldr r3, [r7, #20] 800eb44: 6a5b ldr r3, [r3, #36] @ 0x24 800eb46: 4a19 ldr r2, [pc, #100] @ (800ebac ) 800eb48: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800eb4c: 461a mov r2, r3 800eb4e: 6bfb ldr r3, [r7, #60] @ 0x3c 800eb50: fbb3 f3f2 udiv r3, r3, r2 800eb54: 005a lsls r2, r3, #1 800eb56: 697b ldr r3, [r7, #20] 800eb58: 685b ldr r3, [r3, #4] 800eb5a: 085b lsrs r3, r3, #1 800eb5c: 441a add r2, r3 800eb5e: 697b ldr r3, [r7, #20] 800eb60: 685b ldr r3, [r3, #4] 800eb62: fbb2 f3f3 udiv r3, r2, r3 800eb66: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) 800eb68: 6bbb ldr r3, [r7, #56] @ 0x38 800eb6a: 2b0f cmp r3, #15 800eb6c: d916 bls.n 800eb9c 800eb6e: 6bbb ldr r3, [r7, #56] @ 0x38 800eb70: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800eb74: d212 bcs.n 800eb9c { brrtemp = (uint16_t)(usartdiv & 0xFFF0U); 800eb76: 6bbb ldr r3, [r7, #56] @ 0x38 800eb78: b29b uxth r3, r3 800eb7a: f023 030f bic.w r3, r3, #15 800eb7e: 86fb strh r3, [r7, #54] @ 0x36 brrtemp |= (uint16_t)((usartdiv & (uint16_t)0x000FU) >> 1U); 800eb80: 6bbb ldr r3, [r7, #56] @ 0x38 800eb82: 085b lsrs r3, r3, #1 800eb84: b29b uxth r3, r3 800eb86: f003 0307 and.w r3, r3, #7 800eb8a: b29a uxth r2, r3 800eb8c: 8efb ldrh r3, [r7, #54] @ 0x36 800eb8e: 4313 orrs r3, r2 800eb90: 86fb strh r3, [r7, #54] @ 0x36 huart->Instance->BRR = brrtemp; 800eb92: 697b ldr r3, [r7, #20] 800eb94: 681b ldr r3, [r3, #0] 800eb96: 8efa ldrh r2, [r7, #54] @ 0x36 800eb98: 60da str r2, [r3, #12] 800eb9a: e0b9 b.n 800ed10 } else { ret = HAL_ERROR; 800eb9c: 2301 movs r3, #1 800eb9e: f887 3042 strb.w r3, [r7, #66] @ 0x42 800eba2: e0b5 b.n 800ed10 800eba4: 03d09000 .word 0x03d09000 800eba8: 003d0900 .word 0x003d0900 800ebac: 08031ad4 .word 0x08031ad4 800ebb0: 58024400 .word 0x58024400 } } } else { switch (clocksource) 800ebb4: f897 3043 ldrb.w r3, [r7, #67] @ 0x43 800ebb8: 2b20 cmp r3, #32 800ebba: dc49 bgt.n 800ec50 800ebbc: 2b00 cmp r3, #0 800ebbe: db7c blt.n 800ecba 800ebc0: 2b20 cmp r3, #32 800ebc2: d87a bhi.n 800ecba 800ebc4: a201 add r2, pc, #4 @ (adr r2, 800ebcc ) 800ebc6: f852 f023 ldr.w pc, [r2, r3, lsl #2] 800ebca: bf00 nop 800ebcc: 0800ec57 .word 0x0800ec57 800ebd0: 0800ec5f .word 0x0800ec5f 800ebd4: 0800ecbb .word 0x0800ecbb 800ebd8: 0800ecbb .word 0x0800ecbb 800ebdc: 0800ec67 .word 0x0800ec67 800ebe0: 0800ecbb .word 0x0800ecbb 800ebe4: 0800ecbb .word 0x0800ecbb 800ebe8: 0800ecbb .word 0x0800ecbb 800ebec: 0800ec77 .word 0x0800ec77 800ebf0: 0800ecbb .word 0x0800ecbb 800ebf4: 0800ecbb .word 0x0800ecbb 800ebf8: 0800ecbb .word 0x0800ecbb 800ebfc: 0800ecbb .word 0x0800ecbb 800ec00: 0800ecbb .word 0x0800ecbb 800ec04: 0800ecbb .word 0x0800ecbb 800ec08: 0800ecbb .word 0x0800ecbb 800ec0c: 0800ec87 .word 0x0800ec87 800ec10: 0800ecbb .word 0x0800ecbb 800ec14: 0800ecbb .word 0x0800ecbb 800ec18: 0800ecbb .word 0x0800ecbb 800ec1c: 0800ecbb .word 0x0800ecbb 800ec20: 0800ecbb .word 0x0800ecbb 800ec24: 0800ecbb .word 0x0800ecbb 800ec28: 0800ecbb .word 0x0800ecbb 800ec2c: 0800ecbb .word 0x0800ecbb 800ec30: 0800ecbb .word 0x0800ecbb 800ec34: 0800ecbb .word 0x0800ecbb 800ec38: 0800ecbb .word 0x0800ecbb 800ec3c: 0800ecbb .word 0x0800ecbb 800ec40: 0800ecbb .word 0x0800ecbb 800ec44: 0800ecbb .word 0x0800ecbb 800ec48: 0800ecbb .word 0x0800ecbb 800ec4c: 0800ecad .word 0x0800ecad 800ec50: 2b40 cmp r3, #64 @ 0x40 800ec52: d02e beq.n 800ecb2 800ec54: e031 b.n 800ecba { case UART_CLOCKSOURCE_D2PCLK1: pclk = HAL_RCC_GetPCLK1Freq(); 800ec56: f7fc fc65 bl 800b524 800ec5a: 63f8 str r0, [r7, #60] @ 0x3c break; 800ec5c: e033 b.n 800ecc6 case UART_CLOCKSOURCE_D2PCLK2: pclk = HAL_RCC_GetPCLK2Freq(); 800ec5e: f7fc fc77 bl 800b550 800ec62: 63f8 str r0, [r7, #60] @ 0x3c break; 800ec64: e02f b.n 800ecc6 case UART_CLOCKSOURCE_PLL2: HAL_RCCEx_GetPLL2ClockFreq(&pll2_clocks); 800ec66: f107 0324 add.w r3, r7, #36 @ 0x24 800ec6a: 4618 mov r0, r3 800ec6c: f7fd fecc bl 800ca08 pclk = pll2_clocks.PLL2_Q_Frequency; 800ec70: 6abb ldr r3, [r7, #40] @ 0x28 800ec72: 63fb str r3, [r7, #60] @ 0x3c break; 800ec74: e027 b.n 800ecc6 case UART_CLOCKSOURCE_PLL3: HAL_RCCEx_GetPLL3ClockFreq(&pll3_clocks); 800ec76: f107 0318 add.w r3, r7, #24 800ec7a: 4618 mov r0, r3 800ec7c: f7fe f818 bl 800ccb0 pclk = pll3_clocks.PLL3_Q_Frequency; 800ec80: 69fb ldr r3, [r7, #28] 800ec82: 63fb str r3, [r7, #60] @ 0x3c break; 800ec84: e01f b.n 800ecc6 case UART_CLOCKSOURCE_HSI: if (__HAL_RCC_GET_FLAG(RCC_FLAG_HSIDIV) != 0U) 800ec86: 4b2d ldr r3, [pc, #180] @ (800ed3c ) 800ec88: 681b ldr r3, [r3, #0] 800ec8a: f003 0320 and.w r3, r3, #32 800ec8e: 2b00 cmp r3, #0 800ec90: d009 beq.n 800eca6 { pclk = (uint32_t)(HSI_VALUE >> (__HAL_RCC_GET_HSI_DIVIDER() >> 3U)); 800ec92: 4b2a ldr r3, [pc, #168] @ (800ed3c ) 800ec94: 681b ldr r3, [r3, #0] 800ec96: 08db lsrs r3, r3, #3 800ec98: f003 0303 and.w r3, r3, #3 800ec9c: 4a28 ldr r2, [pc, #160] @ (800ed40 ) 800ec9e: fa22 f303 lsr.w r3, r2, r3 800eca2: 63fb str r3, [r7, #60] @ 0x3c } else { pclk = (uint32_t) HSI_VALUE; } break; 800eca4: e00f b.n 800ecc6 pclk = (uint32_t) HSI_VALUE; 800eca6: 4b26 ldr r3, [pc, #152] @ (800ed40 ) 800eca8: 63fb str r3, [r7, #60] @ 0x3c break; 800ecaa: e00c b.n 800ecc6 case UART_CLOCKSOURCE_CSI: pclk = (uint32_t) CSI_VALUE; 800ecac: 4b25 ldr r3, [pc, #148] @ (800ed44 ) 800ecae: 63fb str r3, [r7, #60] @ 0x3c break; 800ecb0: e009 b.n 800ecc6 case UART_CLOCKSOURCE_LSE: pclk = (uint32_t) LSE_VALUE; 800ecb2: f44f 4300 mov.w r3, #32768 @ 0x8000 800ecb6: 63fb str r3, [r7, #60] @ 0x3c break; 800ecb8: e005 b.n 800ecc6 default: pclk = 0U; 800ecba: 2300 movs r3, #0 800ecbc: 63fb str r3, [r7, #60] @ 0x3c ret = HAL_ERROR; 800ecbe: 2301 movs r3, #1 800ecc0: f887 3042 strb.w r3, [r7, #66] @ 0x42 break; 800ecc4: bf00 nop } if (pclk != 0U) 800ecc6: 6bfb ldr r3, [r7, #60] @ 0x3c 800ecc8: 2b00 cmp r3, #0 800ecca: d021 beq.n 800ed10 { /* USARTDIV must be greater than or equal to 0d16 */ usartdiv = (uint32_t)(UART_DIV_SAMPLING16(pclk, huart->Init.BaudRate, huart->Init.ClockPrescaler)); 800eccc: 697b ldr r3, [r7, #20] 800ecce: 6a5b ldr r3, [r3, #36] @ 0x24 800ecd0: 4a1d ldr r2, [pc, #116] @ (800ed48 ) 800ecd2: f832 3013 ldrh.w r3, [r2, r3, lsl #1] 800ecd6: 461a mov r2, r3 800ecd8: 6bfb ldr r3, [r7, #60] @ 0x3c 800ecda: fbb3 f2f2 udiv r2, r3, r2 800ecde: 697b ldr r3, [r7, #20] 800ece0: 685b ldr r3, [r3, #4] 800ece2: 085b lsrs r3, r3, #1 800ece4: 441a add r2, r3 800ece6: 697b ldr r3, [r7, #20] 800ece8: 685b ldr r3, [r3, #4] 800ecea: fbb2 f3f3 udiv r3, r2, r3 800ecee: 63bb str r3, [r7, #56] @ 0x38 if ((usartdiv >= UART_BRR_MIN) && (usartdiv <= UART_BRR_MAX)) 800ecf0: 6bbb ldr r3, [r7, #56] @ 0x38 800ecf2: 2b0f cmp r3, #15 800ecf4: d909 bls.n 800ed0a 800ecf6: 6bbb ldr r3, [r7, #56] @ 0x38 800ecf8: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 800ecfc: d205 bcs.n 800ed0a { huart->Instance->BRR = (uint16_t)usartdiv; 800ecfe: 6bbb ldr r3, [r7, #56] @ 0x38 800ed00: b29a uxth r2, r3 800ed02: 697b ldr r3, [r7, #20] 800ed04: 681b ldr r3, [r3, #0] 800ed06: 60da str r2, [r3, #12] 800ed08: e002 b.n 800ed10 } else { ret = HAL_ERROR; 800ed0a: 2301 movs r3, #1 800ed0c: f887 3042 strb.w r3, [r7, #66] @ 0x42 } } } /* Initialize the number of data to process during RX/TX ISR execution */ huart->NbTxDataToProcess = 1; 800ed10: 697b ldr r3, [r7, #20] 800ed12: 2201 movs r2, #1 800ed14: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = 1; 800ed18: 697b ldr r3, [r7, #20] 800ed1a: 2201 movs r2, #1 800ed1c: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 /* Clear ISR function pointers */ huart->RxISR = NULL; 800ed20: 697b ldr r3, [r7, #20] 800ed22: 2200 movs r2, #0 800ed24: 675a str r2, [r3, #116] @ 0x74 huart->TxISR = NULL; 800ed26: 697b ldr r3, [r7, #20] 800ed28: 2200 movs r2, #0 800ed2a: 679a str r2, [r3, #120] @ 0x78 return ret; 800ed2c: f897 3042 ldrb.w r3, [r7, #66] @ 0x42 } 800ed30: 4618 mov r0, r3 800ed32: 3748 adds r7, #72 @ 0x48 800ed34: 46bd mov sp, r7 800ed36: e8bd 8fb0 ldmia.w sp!, {r4, r5, r7, r8, r9, sl, fp, pc} 800ed3a: bf00 nop 800ed3c: 58024400 .word 0x58024400 800ed40: 03d09000 .word 0x03d09000 800ed44: 003d0900 .word 0x003d0900 800ed48: 08031ad4 .word 0x08031ad4 0800ed4c : * @brief Configure the UART peripheral advanced features. * @param huart UART handle. * @retval None */ void UART_AdvFeatureConfig(UART_HandleTypeDef *huart) { 800ed4c: b480 push {r7} 800ed4e: b083 sub sp, #12 800ed50: af00 add r7, sp, #0 800ed52: 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)) 800ed54: 687b ldr r3, [r7, #4] 800ed56: 6a9b ldr r3, [r3, #40] @ 0x28 800ed58: f003 0308 and.w r3, r3, #8 800ed5c: 2b00 cmp r3, #0 800ed5e: d00a beq.n 800ed76 { assert_param(IS_UART_ADVFEATURE_SWAP(huart->AdvancedInit.Swap)); MODIFY_REG(huart->Instance->CR2, USART_CR2_SWAP, huart->AdvancedInit.Swap); 800ed60: 687b ldr r3, [r7, #4] 800ed62: 681b ldr r3, [r3, #0] 800ed64: 685b ldr r3, [r3, #4] 800ed66: f423 4100 bic.w r1, r3, #32768 @ 0x8000 800ed6a: 687b ldr r3, [r7, #4] 800ed6c: 6b9a ldr r2, [r3, #56] @ 0x38 800ed6e: 687b ldr r3, [r7, #4] 800ed70: 681b ldr r3, [r3, #0] 800ed72: 430a orrs r2, r1 800ed74: 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)) 800ed76: 687b ldr r3, [r7, #4] 800ed78: 6a9b ldr r3, [r3, #40] @ 0x28 800ed7a: f003 0301 and.w r3, r3, #1 800ed7e: 2b00 cmp r3, #0 800ed80: d00a beq.n 800ed98 { assert_param(IS_UART_ADVFEATURE_TXINV(huart->AdvancedInit.TxPinLevelInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_TXINV, huart->AdvancedInit.TxPinLevelInvert); 800ed82: 687b ldr r3, [r7, #4] 800ed84: 681b ldr r3, [r3, #0] 800ed86: 685b ldr r3, [r3, #4] 800ed88: f423 3100 bic.w r1, r3, #131072 @ 0x20000 800ed8c: 687b ldr r3, [r7, #4] 800ed8e: 6ada ldr r2, [r3, #44] @ 0x2c 800ed90: 687b ldr r3, [r7, #4] 800ed92: 681b ldr r3, [r3, #0] 800ed94: 430a orrs r2, r1 800ed96: 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)) 800ed98: 687b ldr r3, [r7, #4] 800ed9a: 6a9b ldr r3, [r3, #40] @ 0x28 800ed9c: f003 0302 and.w r3, r3, #2 800eda0: 2b00 cmp r3, #0 800eda2: d00a beq.n 800edba { assert_param(IS_UART_ADVFEATURE_RXINV(huart->AdvancedInit.RxPinLevelInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_RXINV, huart->AdvancedInit.RxPinLevelInvert); 800eda4: 687b ldr r3, [r7, #4] 800eda6: 681b ldr r3, [r3, #0] 800eda8: 685b ldr r3, [r3, #4] 800edaa: f423 3180 bic.w r1, r3, #65536 @ 0x10000 800edae: 687b ldr r3, [r7, #4] 800edb0: 6b1a ldr r2, [r3, #48] @ 0x30 800edb2: 687b ldr r3, [r7, #4] 800edb4: 681b ldr r3, [r3, #0] 800edb6: 430a orrs r2, r1 800edb8: 605a str r2, [r3, #4] } /* if required, configure data inversion */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_DATAINVERT_INIT)) 800edba: 687b ldr r3, [r7, #4] 800edbc: 6a9b ldr r3, [r3, #40] @ 0x28 800edbe: f003 0304 and.w r3, r3, #4 800edc2: 2b00 cmp r3, #0 800edc4: d00a beq.n 800eddc { assert_param(IS_UART_ADVFEATURE_DATAINV(huart->AdvancedInit.DataInvert)); MODIFY_REG(huart->Instance->CR2, USART_CR2_DATAINV, huart->AdvancedInit.DataInvert); 800edc6: 687b ldr r3, [r7, #4] 800edc8: 681b ldr r3, [r3, #0] 800edca: 685b ldr r3, [r3, #4] 800edcc: f423 2180 bic.w r1, r3, #262144 @ 0x40000 800edd0: 687b ldr r3, [r7, #4] 800edd2: 6b5a ldr r2, [r3, #52] @ 0x34 800edd4: 687b ldr r3, [r7, #4] 800edd6: 681b ldr r3, [r3, #0] 800edd8: 430a orrs r2, r1 800edda: 605a str r2, [r3, #4] } /* if required, configure RX overrun detection disabling */ if (HAL_IS_BIT_SET(huart->AdvancedInit.AdvFeatureInit, UART_ADVFEATURE_RXOVERRUNDISABLE_INIT)) 800eddc: 687b ldr r3, [r7, #4] 800edde: 6a9b ldr r3, [r3, #40] @ 0x28 800ede0: f003 0310 and.w r3, r3, #16 800ede4: 2b00 cmp r3, #0 800ede6: d00a beq.n 800edfe { assert_param(IS_UART_OVERRUN(huart->AdvancedInit.OverrunDisable)); MODIFY_REG(huart->Instance->CR3, USART_CR3_OVRDIS, huart->AdvancedInit.OverrunDisable); 800ede8: 687b ldr r3, [r7, #4] 800edea: 681b ldr r3, [r3, #0] 800edec: 689b ldr r3, [r3, #8] 800edee: f423 5180 bic.w r1, r3, #4096 @ 0x1000 800edf2: 687b ldr r3, [r7, #4] 800edf4: 6bda ldr r2, [r3, #60] @ 0x3c 800edf6: 687b ldr r3, [r7, #4] 800edf8: 681b ldr r3, [r3, #0] 800edfa: 430a orrs r2, r1 800edfc: 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)) 800edfe: 687b ldr r3, [r7, #4] 800ee00: 6a9b ldr r3, [r3, #40] @ 0x28 800ee02: f003 0320 and.w r3, r3, #32 800ee06: 2b00 cmp r3, #0 800ee08: d00a beq.n 800ee20 { assert_param(IS_UART_ADVFEATURE_DMAONRXERROR(huart->AdvancedInit.DMADisableonRxError)); MODIFY_REG(huart->Instance->CR3, USART_CR3_DDRE, huart->AdvancedInit.DMADisableonRxError); 800ee0a: 687b ldr r3, [r7, #4] 800ee0c: 681b ldr r3, [r3, #0] 800ee0e: 689b ldr r3, [r3, #8] 800ee10: f423 5100 bic.w r1, r3, #8192 @ 0x2000 800ee14: 687b ldr r3, [r7, #4] 800ee16: 6c1a ldr r2, [r3, #64] @ 0x40 800ee18: 687b ldr r3, [r7, #4] 800ee1a: 681b ldr r3, [r3, #0] 800ee1c: 430a orrs r2, r1 800ee1e: 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)) 800ee20: 687b ldr r3, [r7, #4] 800ee22: 6a9b ldr r3, [r3, #40] @ 0x28 800ee24: f003 0340 and.w r3, r3, #64 @ 0x40 800ee28: 2b00 cmp r3, #0 800ee2a: d01a beq.n 800ee62 { 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); 800ee2c: 687b ldr r3, [r7, #4] 800ee2e: 681b ldr r3, [r3, #0] 800ee30: 685b ldr r3, [r3, #4] 800ee32: f423 1180 bic.w r1, r3, #1048576 @ 0x100000 800ee36: 687b ldr r3, [r7, #4] 800ee38: 6c5a ldr r2, [r3, #68] @ 0x44 800ee3a: 687b ldr r3, [r7, #4] 800ee3c: 681b ldr r3, [r3, #0] 800ee3e: 430a orrs r2, r1 800ee40: 605a str r2, [r3, #4] /* set auto Baudrate detection parameters if detection is enabled */ if (huart->AdvancedInit.AutoBaudRateEnable == UART_ADVFEATURE_AUTOBAUDRATE_ENABLE) 800ee42: 687b ldr r3, [r7, #4] 800ee44: 6c5b ldr r3, [r3, #68] @ 0x44 800ee46: f5b3 1f80 cmp.w r3, #1048576 @ 0x100000 800ee4a: d10a bne.n 800ee62 { assert_param(IS_UART_ADVFEATURE_AUTOBAUDRATEMODE(huart->AdvancedInit.AutoBaudRateMode)); MODIFY_REG(huart->Instance->CR2, USART_CR2_ABRMODE, huart->AdvancedInit.AutoBaudRateMode); 800ee4c: 687b ldr r3, [r7, #4] 800ee4e: 681b ldr r3, [r3, #0] 800ee50: 685b ldr r3, [r3, #4] 800ee52: f423 01c0 bic.w r1, r3, #6291456 @ 0x600000 800ee56: 687b ldr r3, [r7, #4] 800ee58: 6c9a ldr r2, [r3, #72] @ 0x48 800ee5a: 687b ldr r3, [r7, #4] 800ee5c: 681b ldr r3, [r3, #0] 800ee5e: 430a orrs r2, r1 800ee60: 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)) 800ee62: 687b ldr r3, [r7, #4] 800ee64: 6a9b ldr r3, [r3, #40] @ 0x28 800ee66: f003 0380 and.w r3, r3, #128 @ 0x80 800ee6a: 2b00 cmp r3, #0 800ee6c: d00a beq.n 800ee84 { assert_param(IS_UART_ADVFEATURE_MSBFIRST(huart->AdvancedInit.MSBFirst)); MODIFY_REG(huart->Instance->CR2, USART_CR2_MSBFIRST, huart->AdvancedInit.MSBFirst); 800ee6e: 687b ldr r3, [r7, #4] 800ee70: 681b ldr r3, [r3, #0] 800ee72: 685b ldr r3, [r3, #4] 800ee74: f423 2100 bic.w r1, r3, #524288 @ 0x80000 800ee78: 687b ldr r3, [r7, #4] 800ee7a: 6cda ldr r2, [r3, #76] @ 0x4c 800ee7c: 687b ldr r3, [r7, #4] 800ee7e: 681b ldr r3, [r3, #0] 800ee80: 430a orrs r2, r1 800ee82: 605a str r2, [r3, #4] } } 800ee84: bf00 nop 800ee86: 370c adds r7, #12 800ee88: 46bd mov sp, r7 800ee8a: f85d 7b04 ldr.w r7, [sp], #4 800ee8e: 4770 bx lr 0800ee90 : * @brief Check the UART Idle State. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef UART_CheckIdleState(UART_HandleTypeDef *huart) { 800ee90: b580 push {r7, lr} 800ee92: b098 sub sp, #96 @ 0x60 800ee94: af02 add r7, sp, #8 800ee96: 6078 str r0, [r7, #4] uint32_t tickstart; /* Initialize the UART ErrorCode */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800ee98: 687b ldr r3, [r7, #4] 800ee9a: 2200 movs r2, #0 800ee9c: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Init tickstart for timeout management */ tickstart = HAL_GetTick(); 800eea0: f7f6 fccc bl 800583c 800eea4: 6578 str r0, [r7, #84] @ 0x54 /* Check if the Transmitter is enabled */ if ((huart->Instance->CR1 & USART_CR1_TE) == USART_CR1_TE) 800eea6: 687b ldr r3, [r7, #4] 800eea8: 681b ldr r3, [r3, #0] 800eeaa: 681b ldr r3, [r3, #0] 800eeac: f003 0308 and.w r3, r3, #8 800eeb0: 2b08 cmp r3, #8 800eeb2: d12f bne.n 800ef14 { /* Wait until TEACK flag is set */ if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_TEACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK) 800eeb4: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000 800eeb8: 9300 str r3, [sp, #0] 800eeba: 6d7b ldr r3, [r7, #84] @ 0x54 800eebc: 2200 movs r2, #0 800eebe: f44f 1100 mov.w r1, #2097152 @ 0x200000 800eec2: 6878 ldr r0, [r7, #4] 800eec4: f000 f88e bl 800efe4 800eec8: 4603 mov r3, r0 800eeca: 2b00 cmp r3, #0 800eecc: d022 beq.n 800ef14 { /* Disable TXE interrupt for the interrupt process */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_TXEIE_TXFNFIE)); 800eece: 687b ldr r3, [r7, #4] 800eed0: 681b ldr r3, [r3, #0] 800eed2: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800eed4: 6bbb ldr r3, [r7, #56] @ 0x38 800eed6: e853 3f00 ldrex r3, [r3] 800eeda: 637b str r3, [r7, #52] @ 0x34 return(result); 800eedc: 6b7b ldr r3, [r7, #52] @ 0x34 800eede: f023 0380 bic.w r3, r3, #128 @ 0x80 800eee2: 653b str r3, [r7, #80] @ 0x50 800eee4: 687b ldr r3, [r7, #4] 800eee6: 681b ldr r3, [r3, #0] 800eee8: 461a mov r2, r3 800eeea: 6d3b ldr r3, [r7, #80] @ 0x50 800eeec: 647b str r3, [r7, #68] @ 0x44 800eeee: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800eef0: 6c39 ldr r1, [r7, #64] @ 0x40 800eef2: 6c7a ldr r2, [r7, #68] @ 0x44 800eef4: e841 2300 strex r3, r2, [r1] 800eef8: 63fb str r3, [r7, #60] @ 0x3c return(result); 800eefa: 6bfb ldr r3, [r7, #60] @ 0x3c 800eefc: 2b00 cmp r3, #0 800eefe: d1e6 bne.n 800eece huart->gState = HAL_UART_STATE_READY; 800ef00: 687b ldr r3, [r7, #4] 800ef02: 2220 movs r2, #32 800ef04: f8c3 2088 str.w r2, [r3, #136] @ 0x88 __HAL_UNLOCK(huart); 800ef08: 687b ldr r3, [r7, #4] 800ef0a: 2200 movs r2, #0 800ef0c: f883 2084 strb.w r2, [r3, #132] @ 0x84 /* Timeout occurred */ return HAL_TIMEOUT; 800ef10: 2303 movs r3, #3 800ef12: e063 b.n 800efdc } } /* Check if the Receiver is enabled */ if ((huart->Instance->CR1 & USART_CR1_RE) == USART_CR1_RE) 800ef14: 687b ldr r3, [r7, #4] 800ef16: 681b ldr r3, [r3, #0] 800ef18: 681b ldr r3, [r3, #0] 800ef1a: f003 0304 and.w r3, r3, #4 800ef1e: 2b04 cmp r3, #4 800ef20: d149 bne.n 800efb6 { /* Wait until REACK flag is set */ if (UART_WaitOnFlagUntilTimeout(huart, USART_ISR_REACK, RESET, tickstart, HAL_UART_TIMEOUT_VALUE) != HAL_OK) 800ef22: f06f 437e mvn.w r3, #4261412864 @ 0xfe000000 800ef26: 9300 str r3, [sp, #0] 800ef28: 6d7b ldr r3, [r7, #84] @ 0x54 800ef2a: 2200 movs r2, #0 800ef2c: f44f 0180 mov.w r1, #4194304 @ 0x400000 800ef30: 6878 ldr r0, [r7, #4] 800ef32: f000 f857 bl 800efe4 800ef36: 4603 mov r3, r0 800ef38: 2b00 cmp r3, #0 800ef3a: d03c beq.n 800efb6 { /* 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)); 800ef3c: 687b ldr r3, [r7, #4] 800ef3e: 681b ldr r3, [r3, #0] 800ef40: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ef42: 6a7b ldr r3, [r7, #36] @ 0x24 800ef44: e853 3f00 ldrex r3, [r3] 800ef48: 623b str r3, [r7, #32] return(result); 800ef4a: 6a3b ldr r3, [r7, #32] 800ef4c: f423 7390 bic.w r3, r3, #288 @ 0x120 800ef50: 64fb str r3, [r7, #76] @ 0x4c 800ef52: 687b ldr r3, [r7, #4] 800ef54: 681b ldr r3, [r3, #0] 800ef56: 461a mov r2, r3 800ef58: 6cfb ldr r3, [r7, #76] @ 0x4c 800ef5a: 633b str r3, [r7, #48] @ 0x30 800ef5c: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ef5e: 6af9 ldr r1, [r7, #44] @ 0x2c 800ef60: 6b3a ldr r2, [r7, #48] @ 0x30 800ef62: e841 2300 strex r3, r2, [r1] 800ef66: 62bb str r3, [r7, #40] @ 0x28 return(result); 800ef68: 6abb ldr r3, [r7, #40] @ 0x28 800ef6a: 2b00 cmp r3, #0 800ef6c: d1e6 bne.n 800ef3c ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800ef6e: 687b ldr r3, [r7, #4] 800ef70: 681b ldr r3, [r3, #0] 800ef72: 3308 adds r3, #8 800ef74: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ef76: 693b ldr r3, [r7, #16] 800ef78: e853 3f00 ldrex r3, [r3] 800ef7c: 60fb str r3, [r7, #12] return(result); 800ef7e: 68fb ldr r3, [r7, #12] 800ef80: f023 0301 bic.w r3, r3, #1 800ef84: 64bb str r3, [r7, #72] @ 0x48 800ef86: 687b ldr r3, [r7, #4] 800ef88: 681b ldr r3, [r3, #0] 800ef8a: 3308 adds r3, #8 800ef8c: 6cba ldr r2, [r7, #72] @ 0x48 800ef8e: 61fa str r2, [r7, #28] 800ef90: 61bb str r3, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ef92: 69b9 ldr r1, [r7, #24] 800ef94: 69fa ldr r2, [r7, #28] 800ef96: e841 2300 strex r3, r2, [r1] 800ef9a: 617b str r3, [r7, #20] return(result); 800ef9c: 697b ldr r3, [r7, #20] 800ef9e: 2b00 cmp r3, #0 800efa0: d1e5 bne.n 800ef6e huart->RxState = HAL_UART_STATE_READY; 800efa2: 687b ldr r3, [r7, #4] 800efa4: 2220 movs r2, #32 800efa6: f8c3 208c str.w r2, [r3, #140] @ 0x8c __HAL_UNLOCK(huart); 800efaa: 687b ldr r3, [r7, #4] 800efac: 2200 movs r2, #0 800efae: f883 2084 strb.w r2, [r3, #132] @ 0x84 /* Timeout occurred */ return HAL_TIMEOUT; 800efb2: 2303 movs r3, #3 800efb4: e012 b.n 800efdc } } /* Initialize the UART State */ huart->gState = HAL_UART_STATE_READY; 800efb6: 687b ldr r3, [r7, #4] 800efb8: 2220 movs r2, #32 800efba: f8c3 2088 str.w r2, [r3, #136] @ 0x88 huart->RxState = HAL_UART_STATE_READY; 800efbe: 687b ldr r3, [r7, #4] 800efc0: 2220 movs r2, #32 800efc2: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800efc6: 687b ldr r3, [r7, #4] 800efc8: 2200 movs r2, #0 800efca: 66da str r2, [r3, #108] @ 0x6c huart->RxEventType = HAL_UART_RXEVENT_TC; 800efcc: 687b ldr r3, [r7, #4] 800efce: 2200 movs r2, #0 800efd0: 671a str r2, [r3, #112] @ 0x70 __HAL_UNLOCK(huart); 800efd2: 687b ldr r3, [r7, #4] 800efd4: 2200 movs r2, #0 800efd6: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 800efda: 2300 movs r3, #0 } 800efdc: 4618 mov r0, r3 800efde: 3758 adds r7, #88 @ 0x58 800efe0: 46bd mov sp, r7 800efe2: bd80 pop {r7, pc} 0800efe4 : * @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) { 800efe4: b580 push {r7, lr} 800efe6: b084 sub sp, #16 800efe8: af00 add r7, sp, #0 800efea: 60f8 str r0, [r7, #12] 800efec: 60b9 str r1, [r7, #8] 800efee: 603b str r3, [r7, #0] 800eff0: 4613 mov r3, r2 800eff2: 71fb strb r3, [r7, #7] /* Wait until flag is set */ while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 800eff4: e04f b.n 800f096 { /* Check for the Timeout */ if (Timeout != HAL_MAX_DELAY) 800eff6: 69bb ldr r3, [r7, #24] 800eff8: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 800effc: d04b beq.n 800f096 { if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) 800effe: f7f6 fc1d bl 800583c 800f002: 4602 mov r2, r0 800f004: 683b ldr r3, [r7, #0] 800f006: 1ad3 subs r3, r2, r3 800f008: 69ba ldr r2, [r7, #24] 800f00a: 429a cmp r2, r3 800f00c: d302 bcc.n 800f014 800f00e: 69bb ldr r3, [r7, #24] 800f010: 2b00 cmp r3, #0 800f012: d101 bne.n 800f018 { return HAL_TIMEOUT; 800f014: 2303 movs r3, #3 800f016: e04e b.n 800f0b6 } if ((READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) && (Flag != UART_FLAG_TXE) && (Flag != UART_FLAG_TC)) 800f018: 68fb ldr r3, [r7, #12] 800f01a: 681b ldr r3, [r3, #0] 800f01c: 681b ldr r3, [r3, #0] 800f01e: f003 0304 and.w r3, r3, #4 800f022: 2b00 cmp r3, #0 800f024: d037 beq.n 800f096 800f026: 68bb ldr r3, [r7, #8] 800f028: 2b80 cmp r3, #128 @ 0x80 800f02a: d034 beq.n 800f096 800f02c: 68bb ldr r3, [r7, #8] 800f02e: 2b40 cmp r3, #64 @ 0x40 800f030: d031 beq.n 800f096 { if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) == SET) 800f032: 68fb ldr r3, [r7, #12] 800f034: 681b ldr r3, [r3, #0] 800f036: 69db ldr r3, [r3, #28] 800f038: f003 0308 and.w r3, r3, #8 800f03c: 2b08 cmp r3, #8 800f03e: d110 bne.n 800f062 { /* Clear Overrun Error flag*/ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); 800f040: 68fb ldr r3, [r7, #12] 800f042: 681b ldr r3, [r3, #0] 800f044: 2208 movs r2, #8 800f046: 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); 800f048: 68f8 ldr r0, [r7, #12] 800f04a: f000 f95b bl 800f304 huart->ErrorCode = HAL_UART_ERROR_ORE; 800f04e: 68fb ldr r3, [r7, #12] 800f050: 2208 movs r2, #8 800f052: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Process Unlocked */ __HAL_UNLOCK(huart); 800f056: 68fb ldr r3, [r7, #12] 800f058: 2200 movs r2, #0 800f05a: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_ERROR; 800f05e: 2301 movs r3, #1 800f060: e029 b.n 800f0b6 } if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) 800f062: 68fb ldr r3, [r7, #12] 800f064: 681b ldr r3, [r3, #0] 800f066: 69db ldr r3, [r3, #28] 800f068: f403 6300 and.w r3, r3, #2048 @ 0x800 800f06c: f5b3 6f00 cmp.w r3, #2048 @ 0x800 800f070: d111 bne.n 800f096 { /* Clear Receiver Timeout flag*/ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 800f072: 68fb ldr r3, [r7, #12] 800f074: 681b ldr r3, [r3, #0] 800f076: f44f 6200 mov.w r2, #2048 @ 0x800 800f07a: 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); 800f07c: 68f8 ldr r0, [r7, #12] 800f07e: f000 f941 bl 800f304 huart->ErrorCode = HAL_UART_ERROR_RTO; 800f082: 68fb ldr r3, [r7, #12] 800f084: 2220 movs r2, #32 800f086: f8c3 2090 str.w r2, [r3, #144] @ 0x90 /* Process Unlocked */ __HAL_UNLOCK(huart); 800f08a: 68fb ldr r3, [r7, #12] 800f08c: 2200 movs r2, #0 800f08e: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_TIMEOUT; 800f092: 2303 movs r3, #3 800f094: e00f b.n 800f0b6 while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 800f096: 68fb ldr r3, [r7, #12] 800f098: 681b ldr r3, [r3, #0] 800f09a: 69da ldr r2, [r3, #28] 800f09c: 68bb ldr r3, [r7, #8] 800f09e: 4013 ands r3, r2 800f0a0: 68ba ldr r2, [r7, #8] 800f0a2: 429a cmp r2, r3 800f0a4: bf0c ite eq 800f0a6: 2301 moveq r3, #1 800f0a8: 2300 movne r3, #0 800f0aa: b2db uxtb r3, r3 800f0ac: 461a mov r2, r3 800f0ae: 79fb ldrb r3, [r7, #7] 800f0b0: 429a cmp r2, r3 800f0b2: d0a0 beq.n 800eff6 } } } } return HAL_OK; 800f0b4: 2300 movs r3, #0 } 800f0b6: 4618 mov r0, r3 800f0b8: 3710 adds r7, #16 800f0ba: 46bd mov sp, r7 800f0bc: bd80 pop {r7, pc} ... 0800f0c0 : * @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) { 800f0c0: b480 push {r7} 800f0c2: b0a3 sub sp, #140 @ 0x8c 800f0c4: af00 add r7, sp, #0 800f0c6: 60f8 str r0, [r7, #12] 800f0c8: 60b9 str r1, [r7, #8] 800f0ca: 4613 mov r3, r2 800f0cc: 80fb strh r3, [r7, #6] huart->pRxBuffPtr = pData; 800f0ce: 68fb ldr r3, [r7, #12] 800f0d0: 68ba ldr r2, [r7, #8] 800f0d2: 659a str r2, [r3, #88] @ 0x58 huart->RxXferSize = Size; 800f0d4: 68fb ldr r3, [r7, #12] 800f0d6: 88fa ldrh r2, [r7, #6] 800f0d8: f8a3 205c strh.w r2, [r3, #92] @ 0x5c huart->RxXferCount = Size; 800f0dc: 68fb ldr r3, [r7, #12] 800f0de: 88fa ldrh r2, [r7, #6] 800f0e0: f8a3 205e strh.w r2, [r3, #94] @ 0x5e huart->RxISR = NULL; 800f0e4: 68fb ldr r3, [r7, #12] 800f0e6: 2200 movs r2, #0 800f0e8: 675a str r2, [r3, #116] @ 0x74 /* Computation of UART mask to apply to RDR register */ UART_MASK_COMPUTATION(huart); 800f0ea: 68fb ldr r3, [r7, #12] 800f0ec: 689b ldr r3, [r3, #8] 800f0ee: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800f0f2: d10e bne.n 800f112 800f0f4: 68fb ldr r3, [r7, #12] 800f0f6: 691b ldr r3, [r3, #16] 800f0f8: 2b00 cmp r3, #0 800f0fa: d105 bne.n 800f108 800f0fc: 68fb ldr r3, [r7, #12] 800f0fe: f240 12ff movw r2, #511 @ 0x1ff 800f102: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f106: e02d b.n 800f164 800f108: 68fb ldr r3, [r7, #12] 800f10a: 22ff movs r2, #255 @ 0xff 800f10c: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f110: e028 b.n 800f164 800f112: 68fb ldr r3, [r7, #12] 800f114: 689b ldr r3, [r3, #8] 800f116: 2b00 cmp r3, #0 800f118: d10d bne.n 800f136 800f11a: 68fb ldr r3, [r7, #12] 800f11c: 691b ldr r3, [r3, #16] 800f11e: 2b00 cmp r3, #0 800f120: d104 bne.n 800f12c 800f122: 68fb ldr r3, [r7, #12] 800f124: 22ff movs r2, #255 @ 0xff 800f126: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f12a: e01b b.n 800f164 800f12c: 68fb ldr r3, [r7, #12] 800f12e: 227f movs r2, #127 @ 0x7f 800f130: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f134: e016 b.n 800f164 800f136: 68fb ldr r3, [r7, #12] 800f138: 689b ldr r3, [r3, #8] 800f13a: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 800f13e: d10d bne.n 800f15c 800f140: 68fb ldr r3, [r7, #12] 800f142: 691b ldr r3, [r3, #16] 800f144: 2b00 cmp r3, #0 800f146: d104 bne.n 800f152 800f148: 68fb ldr r3, [r7, #12] 800f14a: 227f movs r2, #127 @ 0x7f 800f14c: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f150: e008 b.n 800f164 800f152: 68fb ldr r3, [r7, #12] 800f154: 223f movs r2, #63 @ 0x3f 800f156: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 800f15a: e003 b.n 800f164 800f15c: 68fb ldr r3, [r7, #12] 800f15e: 2200 movs r2, #0 800f160: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 huart->ErrorCode = HAL_UART_ERROR_NONE; 800f164: 68fb ldr r3, [r7, #12] 800f166: 2200 movs r2, #0 800f168: f8c3 2090 str.w r2, [r3, #144] @ 0x90 huart->RxState = HAL_UART_STATE_BUSY_RX; 800f16c: 68fb ldr r3, [r7, #12] 800f16e: 2222 movs r2, #34 @ 0x22 800f170: 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); 800f174: 68fb ldr r3, [r7, #12] 800f176: 681b ldr r3, [r3, #0] 800f178: 3308 adds r3, #8 800f17a: 667b str r3, [r7, #100] @ 0x64 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f17c: 6e7b ldr r3, [r7, #100] @ 0x64 800f17e: e853 3f00 ldrex r3, [r3] 800f182: 663b str r3, [r7, #96] @ 0x60 return(result); 800f184: 6e3b ldr r3, [r7, #96] @ 0x60 800f186: f043 0301 orr.w r3, r3, #1 800f18a: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800f18e: 68fb ldr r3, [r7, #12] 800f190: 681b ldr r3, [r3, #0] 800f192: 3308 adds r3, #8 800f194: f8d7 2084 ldr.w r2, [r7, #132] @ 0x84 800f198: 673a str r2, [r7, #112] @ 0x70 800f19a: 66fb str r3, [r7, #108] @ 0x6c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f19c: 6ef9 ldr r1, [r7, #108] @ 0x6c 800f19e: 6f3a ldr r2, [r7, #112] @ 0x70 800f1a0: e841 2300 strex r3, r2, [r1] 800f1a4: 66bb str r3, [r7, #104] @ 0x68 return(result); 800f1a6: 6ebb ldr r3, [r7, #104] @ 0x68 800f1a8: 2b00 cmp r3, #0 800f1aa: d1e3 bne.n 800f174 /* Configure Rx interrupt processing */ if ((huart->FifoMode == UART_FIFOMODE_ENABLE) && (Size >= huart->NbRxDataToProcess)) 800f1ac: 68fb ldr r3, [r7, #12] 800f1ae: 6e5b ldr r3, [r3, #100] @ 0x64 800f1b0: f1b3 5f00 cmp.w r3, #536870912 @ 0x20000000 800f1b4: d14f bne.n 800f256 800f1b6: 68fb ldr r3, [r7, #12] 800f1b8: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800f1bc: 88fa ldrh r2, [r7, #6] 800f1be: 429a cmp r2, r3 800f1c0: d349 bcc.n 800f256 { /* 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)) 800f1c2: 68fb ldr r3, [r7, #12] 800f1c4: 689b ldr r3, [r3, #8] 800f1c6: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800f1ca: d107 bne.n 800f1dc 800f1cc: 68fb ldr r3, [r7, #12] 800f1ce: 691b ldr r3, [r3, #16] 800f1d0: 2b00 cmp r3, #0 800f1d2: d103 bne.n 800f1dc { huart->RxISR = UART_RxISR_16BIT_FIFOEN; 800f1d4: 68fb ldr r3, [r7, #12] 800f1d6: 4a47 ldr r2, [pc, #284] @ (800f2f4 ) 800f1d8: 675a str r2, [r3, #116] @ 0x74 800f1da: e002 b.n 800f1e2 } else { huart->RxISR = UART_RxISR_8BIT_FIFOEN; 800f1dc: 68fb ldr r3, [r7, #12] 800f1de: 4a46 ldr r2, [pc, #280] @ (800f2f8 ) 800f1e0: 675a str r2, [r3, #116] @ 0x74 } /* Enable the UART Parity Error interrupt and RX FIFO Threshold interrupt */ if (huart->Init.Parity != UART_PARITY_NONE) 800f1e2: 68fb ldr r3, [r7, #12] 800f1e4: 691b ldr r3, [r3, #16] 800f1e6: 2b00 cmp r3, #0 800f1e8: d01a beq.n 800f220 { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800f1ea: 68fb ldr r3, [r7, #12] 800f1ec: 681b ldr r3, [r3, #0] 800f1ee: 653b str r3, [r7, #80] @ 0x50 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f1f0: 6d3b ldr r3, [r7, #80] @ 0x50 800f1f2: e853 3f00 ldrex r3, [r3] 800f1f6: 64fb str r3, [r7, #76] @ 0x4c return(result); 800f1f8: 6cfb ldr r3, [r7, #76] @ 0x4c 800f1fa: f443 7380 orr.w r3, r3, #256 @ 0x100 800f1fe: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800f202: 68fb ldr r3, [r7, #12] 800f204: 681b ldr r3, [r3, #0] 800f206: 461a mov r2, r3 800f208: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 800f20c: 65fb str r3, [r7, #92] @ 0x5c 800f20e: 65ba str r2, [r7, #88] @ 0x58 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f210: 6db9 ldr r1, [r7, #88] @ 0x58 800f212: 6dfa ldr r2, [r7, #92] @ 0x5c 800f214: e841 2300 strex r3, r2, [r1] 800f218: 657b str r3, [r7, #84] @ 0x54 return(result); 800f21a: 6d7b ldr r3, [r7, #84] @ 0x54 800f21c: 2b00 cmp r3, #0 800f21e: d1e4 bne.n 800f1ea } ATOMIC_SET_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 800f220: 68fb ldr r3, [r7, #12] 800f222: 681b ldr r3, [r3, #0] 800f224: 3308 adds r3, #8 800f226: 63fb str r3, [r7, #60] @ 0x3c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f228: 6bfb ldr r3, [r7, #60] @ 0x3c 800f22a: e853 3f00 ldrex r3, [r3] 800f22e: 63bb str r3, [r7, #56] @ 0x38 return(result); 800f230: 6bbb ldr r3, [r7, #56] @ 0x38 800f232: f043 5380 orr.w r3, r3, #268435456 @ 0x10000000 800f236: 67fb str r3, [r7, #124] @ 0x7c 800f238: 68fb ldr r3, [r7, #12] 800f23a: 681b ldr r3, [r3, #0] 800f23c: 3308 adds r3, #8 800f23e: 6ffa ldr r2, [r7, #124] @ 0x7c 800f240: 64ba str r2, [r7, #72] @ 0x48 800f242: 647b str r3, [r7, #68] @ 0x44 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f244: 6c79 ldr r1, [r7, #68] @ 0x44 800f246: 6cba ldr r2, [r7, #72] @ 0x48 800f248: e841 2300 strex r3, r2, [r1] 800f24c: 643b str r3, [r7, #64] @ 0x40 return(result); 800f24e: 6c3b ldr r3, [r7, #64] @ 0x40 800f250: 2b00 cmp r3, #0 800f252: d1e5 bne.n 800f220 800f254: e046 b.n 800f2e4 } 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)) 800f256: 68fb ldr r3, [r7, #12] 800f258: 689b ldr r3, [r3, #8] 800f25a: f5b3 5f80 cmp.w r3, #4096 @ 0x1000 800f25e: d107 bne.n 800f270 800f260: 68fb ldr r3, [r7, #12] 800f262: 691b ldr r3, [r3, #16] 800f264: 2b00 cmp r3, #0 800f266: d103 bne.n 800f270 { huart->RxISR = UART_RxISR_16BIT; 800f268: 68fb ldr r3, [r7, #12] 800f26a: 4a24 ldr r2, [pc, #144] @ (800f2fc ) 800f26c: 675a str r2, [r3, #116] @ 0x74 800f26e: e002 b.n 800f276 } else { huart->RxISR = UART_RxISR_8BIT; 800f270: 68fb ldr r3, [r7, #12] 800f272: 4a23 ldr r2, [pc, #140] @ (800f300 ) 800f274: 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) 800f276: 68fb ldr r3, [r7, #12] 800f278: 691b ldr r3, [r3, #16] 800f27a: 2b00 cmp r3, #0 800f27c: d019 beq.n 800f2b2 { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_PEIE | USART_CR1_RXNEIE_RXFNEIE); 800f27e: 68fb ldr r3, [r7, #12] 800f280: 681b ldr r3, [r3, #0] 800f282: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f284: 6abb ldr r3, [r7, #40] @ 0x28 800f286: e853 3f00 ldrex r3, [r3] 800f28a: 627b str r3, [r7, #36] @ 0x24 return(result); 800f28c: 6a7b ldr r3, [r7, #36] @ 0x24 800f28e: f443 7390 orr.w r3, r3, #288 @ 0x120 800f292: 677b str r3, [r7, #116] @ 0x74 800f294: 68fb ldr r3, [r7, #12] 800f296: 681b ldr r3, [r3, #0] 800f298: 461a mov r2, r3 800f29a: 6f7b ldr r3, [r7, #116] @ 0x74 800f29c: 637b str r3, [r7, #52] @ 0x34 800f29e: 633a str r2, [r7, #48] @ 0x30 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f2a0: 6b39 ldr r1, [r7, #48] @ 0x30 800f2a2: 6b7a ldr r2, [r7, #52] @ 0x34 800f2a4: e841 2300 strex r3, r2, [r1] 800f2a8: 62fb str r3, [r7, #44] @ 0x2c return(result); 800f2aa: 6afb ldr r3, [r7, #44] @ 0x2c 800f2ac: 2b00 cmp r3, #0 800f2ae: d1e6 bne.n 800f27e 800f2b0: e018 b.n 800f2e4 } else { ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 800f2b2: 68fb ldr r3, [r7, #12] 800f2b4: 681b ldr r3, [r3, #0] 800f2b6: 617b str r3, [r7, #20] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f2b8: 697b ldr r3, [r7, #20] 800f2ba: e853 3f00 ldrex r3, [r3] 800f2be: 613b str r3, [r7, #16] return(result); 800f2c0: 693b ldr r3, [r7, #16] 800f2c2: f043 0320 orr.w r3, r3, #32 800f2c6: 67bb str r3, [r7, #120] @ 0x78 800f2c8: 68fb ldr r3, [r7, #12] 800f2ca: 681b ldr r3, [r3, #0] 800f2cc: 461a mov r2, r3 800f2ce: 6fbb ldr r3, [r7, #120] @ 0x78 800f2d0: 623b str r3, [r7, #32] 800f2d2: 61fa str r2, [r7, #28] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f2d4: 69f9 ldr r1, [r7, #28] 800f2d6: 6a3a ldr r2, [r7, #32] 800f2d8: e841 2300 strex r3, r2, [r1] 800f2dc: 61bb str r3, [r7, #24] return(result); 800f2de: 69bb ldr r3, [r7, #24] 800f2e0: 2b00 cmp r3, #0 800f2e2: d1e6 bne.n 800f2b2 } } return HAL_OK; 800f2e4: 2300 movs r3, #0 } 800f2e6: 4618 mov r0, r3 800f2e8: 378c adds r7, #140 @ 0x8c 800f2ea: 46bd mov sp, r7 800f2ec: f85d 7b04 ldr.w r7, [sp], #4 800f2f0: 4770 bx lr 800f2f2: bf00 nop 800f2f4: 0800fe69 .word 0x0800fe69 800f2f8: 0800fb09 .word 0x0800fb09 800f2fc: 0800f951 .word 0x0800f951 800f300: 0800f799 .word 0x0800f799 0800f304 : * @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) { 800f304: b480 push {r7} 800f306: b095 sub sp, #84 @ 0x54 800f308: af00 add r7, sp, #0 800f30a: 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)); 800f30c: 687b ldr r3, [r7, #4] 800f30e: 681b ldr r3, [r3, #0] 800f310: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f312: 6b7b ldr r3, [r7, #52] @ 0x34 800f314: e853 3f00 ldrex r3, [r3] 800f318: 633b str r3, [r7, #48] @ 0x30 return(result); 800f31a: 6b3b ldr r3, [r7, #48] @ 0x30 800f31c: f423 7390 bic.w r3, r3, #288 @ 0x120 800f320: 64fb str r3, [r7, #76] @ 0x4c 800f322: 687b ldr r3, [r7, #4] 800f324: 681b ldr r3, [r3, #0] 800f326: 461a mov r2, r3 800f328: 6cfb ldr r3, [r7, #76] @ 0x4c 800f32a: 643b str r3, [r7, #64] @ 0x40 800f32c: 63fa str r2, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f32e: 6bf9 ldr r1, [r7, #60] @ 0x3c 800f330: 6c3a ldr r2, [r7, #64] @ 0x40 800f332: e841 2300 strex r3, r2, [r1] 800f336: 63bb str r3, [r7, #56] @ 0x38 return(result); 800f338: 6bbb ldr r3, [r7, #56] @ 0x38 800f33a: 2b00 cmp r3, #0 800f33c: d1e6 bne.n 800f30c ATOMIC_CLEAR_BIT(huart->Instance->CR3, (USART_CR3_EIE | USART_CR3_RXFTIE)); 800f33e: 687b ldr r3, [r7, #4] 800f340: 681b ldr r3, [r3, #0] 800f342: 3308 adds r3, #8 800f344: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f346: 6a3b ldr r3, [r7, #32] 800f348: e853 3f00 ldrex r3, [r3] 800f34c: 61fb str r3, [r7, #28] return(result); 800f34e: 69fa ldr r2, [r7, #28] 800f350: 4b1e ldr r3, [pc, #120] @ (800f3cc ) 800f352: 4013 ands r3, r2 800f354: 64bb str r3, [r7, #72] @ 0x48 800f356: 687b ldr r3, [r7, #4] 800f358: 681b ldr r3, [r3, #0] 800f35a: 3308 adds r3, #8 800f35c: 6cba ldr r2, [r7, #72] @ 0x48 800f35e: 62fa str r2, [r7, #44] @ 0x2c 800f360: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f362: 6ab9 ldr r1, [r7, #40] @ 0x28 800f364: 6afa ldr r2, [r7, #44] @ 0x2c 800f366: e841 2300 strex r3, r2, [r1] 800f36a: 627b str r3, [r7, #36] @ 0x24 return(result); 800f36c: 6a7b ldr r3, [r7, #36] @ 0x24 800f36e: 2b00 cmp r3, #0 800f370: d1e5 bne.n 800f33e /* In case of reception waiting for IDLE event, disable also the IDLE IE interrupt source */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800f372: 687b ldr r3, [r7, #4] 800f374: 6edb ldr r3, [r3, #108] @ 0x6c 800f376: 2b01 cmp r3, #1 800f378: d118 bne.n 800f3ac { ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800f37a: 687b ldr r3, [r7, #4] 800f37c: 681b ldr r3, [r3, #0] 800f37e: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f380: 68fb ldr r3, [r7, #12] 800f382: e853 3f00 ldrex r3, [r3] 800f386: 60bb str r3, [r7, #8] return(result); 800f388: 68bb ldr r3, [r7, #8] 800f38a: f023 0310 bic.w r3, r3, #16 800f38e: 647b str r3, [r7, #68] @ 0x44 800f390: 687b ldr r3, [r7, #4] 800f392: 681b ldr r3, [r3, #0] 800f394: 461a mov r2, r3 800f396: 6c7b ldr r3, [r7, #68] @ 0x44 800f398: 61bb str r3, [r7, #24] 800f39a: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f39c: 6979 ldr r1, [r7, #20] 800f39e: 69ba ldr r2, [r7, #24] 800f3a0: e841 2300 strex r3, r2, [r1] 800f3a4: 613b str r3, [r7, #16] return(result); 800f3a6: 693b ldr r3, [r7, #16] 800f3a8: 2b00 cmp r3, #0 800f3aa: d1e6 bne.n 800f37a } /* At end of Rx process, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800f3ac: 687b ldr r3, [r7, #4] 800f3ae: 2220 movs r2, #32 800f3b0: f8c3 208c str.w r2, [r3, #140] @ 0x8c huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800f3b4: 687b ldr r3, [r7, #4] 800f3b6: 2200 movs r2, #0 800f3b8: 66da str r2, [r3, #108] @ 0x6c /* Reset RxIsr function pointer */ huart->RxISR = NULL; 800f3ba: 687b ldr r3, [r7, #4] 800f3bc: 2200 movs r2, #0 800f3be: 675a str r2, [r3, #116] @ 0x74 } 800f3c0: bf00 nop 800f3c2: 3754 adds r7, #84 @ 0x54 800f3c4: 46bd mov sp, r7 800f3c6: f85d 7b04 ldr.w r7, [sp], #4 800f3ca: 4770 bx lr 800f3cc: effffffe .word 0xeffffffe 0800f3d0 : * (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) { 800f3d0: b580 push {r7, lr} 800f3d2: b084 sub sp, #16 800f3d4: af00 add r7, sp, #0 800f3d6: 6078 str r0, [r7, #4] UART_HandleTypeDef *huart = (UART_HandleTypeDef *)(hdma->Parent); 800f3d8: 687b ldr r3, [r7, #4] 800f3da: 6b9b ldr r3, [r3, #56] @ 0x38 800f3dc: 60fb str r3, [r7, #12] huart->RxXferCount = 0U; 800f3de: 68fb ldr r3, [r7, #12] 800f3e0: 2200 movs r2, #0 800f3e2: f8a3 205e strh.w r2, [r3, #94] @ 0x5e huart->TxXferCount = 0U; 800f3e6: 68fb ldr r3, [r7, #12] 800f3e8: 2200 movs r2, #0 800f3ea: 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); 800f3ee: 68f8 ldr r0, [r7, #12] 800f3f0: f7fe ff3a bl 800e268 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ } 800f3f4: bf00 nop 800f3f6: 3710 adds r7, #16 800f3f8: 46bd mov sp, r7 800f3fa: bd80 pop {r7, pc} 0800f3fc : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_8BIT(UART_HandleTypeDef *huart) { 800f3fc: b480 push {r7} 800f3fe: b08f sub sp, #60 @ 0x3c 800f400: af00 add r7, sp, #0 800f402: 6078 str r0, [r7, #4] /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800f404: 687b ldr r3, [r7, #4] 800f406: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f40a: 2b21 cmp r3, #33 @ 0x21 800f40c: d14c bne.n 800f4a8 { if (huart->TxXferCount == 0U) 800f40e: 687b ldr r3, [r7, #4] 800f410: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f414: b29b uxth r3, r3 800f416: 2b00 cmp r3, #0 800f418: d132 bne.n 800f480 { /* Disable the UART Transmit Data Register Empty Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800f41a: 687b ldr r3, [r7, #4] 800f41c: 681b ldr r3, [r3, #0] 800f41e: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f420: 6a3b ldr r3, [r7, #32] 800f422: e853 3f00 ldrex r3, [r3] 800f426: 61fb str r3, [r7, #28] return(result); 800f428: 69fb ldr r3, [r7, #28] 800f42a: f023 0380 bic.w r3, r3, #128 @ 0x80 800f42e: 637b str r3, [r7, #52] @ 0x34 800f430: 687b ldr r3, [r7, #4] 800f432: 681b ldr r3, [r3, #0] 800f434: 461a mov r2, r3 800f436: 6b7b ldr r3, [r7, #52] @ 0x34 800f438: 62fb str r3, [r7, #44] @ 0x2c 800f43a: 62ba str r2, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f43c: 6ab9 ldr r1, [r7, #40] @ 0x28 800f43e: 6afa ldr r2, [r7, #44] @ 0x2c 800f440: e841 2300 strex r3, r2, [r1] 800f444: 627b str r3, [r7, #36] @ 0x24 return(result); 800f446: 6a7b ldr r3, [r7, #36] @ 0x24 800f448: 2b00 cmp r3, #0 800f44a: d1e6 bne.n 800f41a /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f44c: 687b ldr r3, [r7, #4] 800f44e: 681b ldr r3, [r3, #0] 800f450: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f452: 68fb ldr r3, [r7, #12] 800f454: e853 3f00 ldrex r3, [r3] 800f458: 60bb str r3, [r7, #8] return(result); 800f45a: 68bb ldr r3, [r7, #8] 800f45c: f043 0340 orr.w r3, r3, #64 @ 0x40 800f460: 633b str r3, [r7, #48] @ 0x30 800f462: 687b ldr r3, [r7, #4] 800f464: 681b ldr r3, [r3, #0] 800f466: 461a mov r2, r3 800f468: 6b3b ldr r3, [r7, #48] @ 0x30 800f46a: 61bb str r3, [r7, #24] 800f46c: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f46e: 6979 ldr r1, [r7, #20] 800f470: 69ba ldr r2, [r7, #24] 800f472: e841 2300 strex r3, r2, [r1] 800f476: 613b str r3, [r7, #16] return(result); 800f478: 693b ldr r3, [r7, #16] 800f47a: 2b00 cmp r3, #0 800f47c: d1e6 bne.n 800f44c huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); huart->pTxBuffPtr++; huart->TxXferCount--; } } } 800f47e: e013 b.n 800f4a8 huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); 800f480: 687b ldr r3, [r7, #4] 800f482: 6d1b ldr r3, [r3, #80] @ 0x50 800f484: 781a ldrb r2, [r3, #0] 800f486: 687b ldr r3, [r7, #4] 800f488: 681b ldr r3, [r3, #0] 800f48a: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr++; 800f48c: 687b ldr r3, [r7, #4] 800f48e: 6d1b ldr r3, [r3, #80] @ 0x50 800f490: 1c5a adds r2, r3, #1 800f492: 687b ldr r3, [r7, #4] 800f494: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f496: 687b ldr r3, [r7, #4] 800f498: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f49c: b29b uxth r3, r3 800f49e: 3b01 subs r3, #1 800f4a0: b29a uxth r2, r3 800f4a2: 687b ldr r3, [r7, #4] 800f4a4: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 } 800f4a8: bf00 nop 800f4aa: 373c adds r7, #60 @ 0x3c 800f4ac: 46bd mov sp, r7 800f4ae: f85d 7b04 ldr.w r7, [sp], #4 800f4b2: 4770 bx lr 0800f4b4 : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_16BIT(UART_HandleTypeDef *huart) { 800f4b4: b480 push {r7} 800f4b6: b091 sub sp, #68 @ 0x44 800f4b8: af00 add r7, sp, #0 800f4ba: 6078 str r0, [r7, #4] const uint16_t *tmp; /* Check that a Tx process is ongoing */ if (huart->gState == HAL_UART_STATE_BUSY_TX) 800f4bc: 687b ldr r3, [r7, #4] 800f4be: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f4c2: 2b21 cmp r3, #33 @ 0x21 800f4c4: d151 bne.n 800f56a { if (huart->TxXferCount == 0U) 800f4c6: 687b ldr r3, [r7, #4] 800f4c8: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f4cc: b29b uxth r3, r3 800f4ce: 2b00 cmp r3, #0 800f4d0: d132 bne.n 800f538 { /* Disable the UART Transmit Data Register Empty Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TXEIE_TXFNFIE); 800f4d2: 687b ldr r3, [r7, #4] 800f4d4: 681b ldr r3, [r3, #0] 800f4d6: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f4d8: 6a7b ldr r3, [r7, #36] @ 0x24 800f4da: e853 3f00 ldrex r3, [r3] 800f4de: 623b str r3, [r7, #32] return(result); 800f4e0: 6a3b ldr r3, [r7, #32] 800f4e2: f023 0380 bic.w r3, r3, #128 @ 0x80 800f4e6: 63bb str r3, [r7, #56] @ 0x38 800f4e8: 687b ldr r3, [r7, #4] 800f4ea: 681b ldr r3, [r3, #0] 800f4ec: 461a mov r2, r3 800f4ee: 6bbb ldr r3, [r7, #56] @ 0x38 800f4f0: 633b str r3, [r7, #48] @ 0x30 800f4f2: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f4f4: 6af9 ldr r1, [r7, #44] @ 0x2c 800f4f6: 6b3a ldr r2, [r7, #48] @ 0x30 800f4f8: e841 2300 strex r3, r2, [r1] 800f4fc: 62bb str r3, [r7, #40] @ 0x28 return(result); 800f4fe: 6abb ldr r3, [r7, #40] @ 0x28 800f500: 2b00 cmp r3, #0 800f502: d1e6 bne.n 800f4d2 /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f504: 687b ldr r3, [r7, #4] 800f506: 681b ldr r3, [r3, #0] 800f508: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f50a: 693b ldr r3, [r7, #16] 800f50c: e853 3f00 ldrex r3, [r3] 800f510: 60fb str r3, [r7, #12] return(result); 800f512: 68fb ldr r3, [r7, #12] 800f514: f043 0340 orr.w r3, r3, #64 @ 0x40 800f518: 637b str r3, [r7, #52] @ 0x34 800f51a: 687b ldr r3, [r7, #4] 800f51c: 681b ldr r3, [r3, #0] 800f51e: 461a mov r2, r3 800f520: 6b7b ldr r3, [r7, #52] @ 0x34 800f522: 61fb str r3, [r7, #28] 800f524: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f526: 69b9 ldr r1, [r7, #24] 800f528: 69fa ldr r2, [r7, #28] 800f52a: e841 2300 strex r3, r2, [r1] 800f52e: 617b str r3, [r7, #20] return(result); 800f530: 697b ldr r3, [r7, #20] 800f532: 2b00 cmp r3, #0 800f534: d1e6 bne.n 800f504 huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); huart->pTxBuffPtr += 2U; huart->TxXferCount--; } } } 800f536: e018 b.n 800f56a tmp = (const uint16_t *) huart->pTxBuffPtr; 800f538: 687b ldr r3, [r7, #4] 800f53a: 6d1b ldr r3, [r3, #80] @ 0x50 800f53c: 63fb str r3, [r7, #60] @ 0x3c huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); 800f53e: 6bfb ldr r3, [r7, #60] @ 0x3c 800f540: 881b ldrh r3, [r3, #0] 800f542: 461a mov r2, r3 800f544: 687b ldr r3, [r7, #4] 800f546: 681b ldr r3, [r3, #0] 800f548: f3c2 0208 ubfx r2, r2, #0, #9 800f54c: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr += 2U; 800f54e: 687b ldr r3, [r7, #4] 800f550: 6d1b ldr r3, [r3, #80] @ 0x50 800f552: 1c9a adds r2, r3, #2 800f554: 687b ldr r3, [r7, #4] 800f556: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f558: 687b ldr r3, [r7, #4] 800f55a: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f55e: b29b uxth r3, r3 800f560: 3b01 subs r3, #1 800f562: b29a uxth r2, r3 800f564: 687b ldr r3, [r7, #4] 800f566: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 } 800f56a: bf00 nop 800f56c: 3744 adds r7, #68 @ 0x44 800f56e: 46bd mov sp, r7 800f570: f85d 7b04 ldr.w r7, [sp], #4 800f574: 4770 bx lr 0800f576 : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_8BIT_FIFOEN(UART_HandleTypeDef *huart) { 800f576: b480 push {r7} 800f578: b091 sub sp, #68 @ 0x44 800f57a: af00 add r7, sp, #0 800f57c: 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) 800f57e: 687b ldr r3, [r7, #4] 800f580: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f584: 2b21 cmp r3, #33 @ 0x21 800f586: d160 bne.n 800f64a { for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f588: 687b ldr r3, [r7, #4] 800f58a: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 800f58e: 87fb strh r3, [r7, #62] @ 0x3e 800f590: e057 b.n 800f642 { if (huart->TxXferCount == 0U) 800f592: 687b ldr r3, [r7, #4] 800f594: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f598: b29b uxth r3, r3 800f59a: 2b00 cmp r3, #0 800f59c: d133 bne.n 800f606 { /* Disable the TX FIFO threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800f59e: 687b ldr r3, [r7, #4] 800f5a0: 681b ldr r3, [r3, #0] 800f5a2: 3308 adds r3, #8 800f5a4: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f5a6: 6a7b ldr r3, [r7, #36] @ 0x24 800f5a8: e853 3f00 ldrex r3, [r3] 800f5ac: 623b str r3, [r7, #32] return(result); 800f5ae: 6a3b ldr r3, [r7, #32] 800f5b0: f423 0300 bic.w r3, r3, #8388608 @ 0x800000 800f5b4: 63bb str r3, [r7, #56] @ 0x38 800f5b6: 687b ldr r3, [r7, #4] 800f5b8: 681b ldr r3, [r3, #0] 800f5ba: 3308 adds r3, #8 800f5bc: 6bba ldr r2, [r7, #56] @ 0x38 800f5be: 633a str r2, [r7, #48] @ 0x30 800f5c0: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f5c2: 6af9 ldr r1, [r7, #44] @ 0x2c 800f5c4: 6b3a ldr r2, [r7, #48] @ 0x30 800f5c6: e841 2300 strex r3, r2, [r1] 800f5ca: 62bb str r3, [r7, #40] @ 0x28 return(result); 800f5cc: 6abb ldr r3, [r7, #40] @ 0x28 800f5ce: 2b00 cmp r3, #0 800f5d0: d1e5 bne.n 800f59e /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f5d2: 687b ldr r3, [r7, #4] 800f5d4: 681b ldr r3, [r3, #0] 800f5d6: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f5d8: 693b ldr r3, [r7, #16] 800f5da: e853 3f00 ldrex r3, [r3] 800f5de: 60fb str r3, [r7, #12] return(result); 800f5e0: 68fb ldr r3, [r7, #12] 800f5e2: f043 0340 orr.w r3, r3, #64 @ 0x40 800f5e6: 637b str r3, [r7, #52] @ 0x34 800f5e8: 687b ldr r3, [r7, #4] 800f5ea: 681b ldr r3, [r3, #0] 800f5ec: 461a mov r2, r3 800f5ee: 6b7b ldr r3, [r7, #52] @ 0x34 800f5f0: 61fb str r3, [r7, #28] 800f5f2: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f5f4: 69b9 ldr r1, [r7, #24] 800f5f6: 69fa ldr r2, [r7, #28] 800f5f8: e841 2300 strex r3, r2, [r1] 800f5fc: 617b str r3, [r7, #20] return(result); 800f5fe: 697b ldr r3, [r7, #20] 800f600: 2b00 cmp r3, #0 800f602: d1e6 bne.n 800f5d2 break; /* force exit loop */ 800f604: e021 b.n 800f64a } else if (READ_BIT(huart->Instance->ISR, USART_ISR_TXE_TXFNF) != 0U) 800f606: 687b ldr r3, [r7, #4] 800f608: 681b ldr r3, [r3, #0] 800f60a: 69db ldr r3, [r3, #28] 800f60c: f003 0380 and.w r3, r3, #128 @ 0x80 800f610: 2b00 cmp r3, #0 800f612: d013 beq.n 800f63c { huart->Instance->TDR = (uint8_t)(*huart->pTxBuffPtr & (uint8_t)0xFF); 800f614: 687b ldr r3, [r7, #4] 800f616: 6d1b ldr r3, [r3, #80] @ 0x50 800f618: 781a ldrb r2, [r3, #0] 800f61a: 687b ldr r3, [r7, #4] 800f61c: 681b ldr r3, [r3, #0] 800f61e: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr++; 800f620: 687b ldr r3, [r7, #4] 800f622: 6d1b ldr r3, [r3, #80] @ 0x50 800f624: 1c5a adds r2, r3, #1 800f626: 687b ldr r3, [r7, #4] 800f628: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f62a: 687b ldr r3, [r7, #4] 800f62c: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f630: b29b uxth r3, r3 800f632: 3b01 subs r3, #1 800f634: b29a uxth r2, r3 800f636: 687b ldr r3, [r7, #4] 800f638: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f63c: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f63e: 3b01 subs r3, #1 800f640: 87fb strh r3, [r7, #62] @ 0x3e 800f642: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f644: 2b00 cmp r3, #0 800f646: d1a4 bne.n 800f592 { /* Nothing to do */ } } } } 800f648: e7ff b.n 800f64a 800f64a: bf00 nop 800f64c: 3744 adds r7, #68 @ 0x44 800f64e: 46bd mov sp, r7 800f650: f85d 7b04 ldr.w r7, [sp], #4 800f654: 4770 bx lr 0800f656 : * interruptions have been enabled by HAL_UART_Transmit_IT(). * @param huart UART handle. * @retval None */ static void UART_TxISR_16BIT_FIFOEN(UART_HandleTypeDef *huart) { 800f656: b480 push {r7} 800f658: b091 sub sp, #68 @ 0x44 800f65a: af00 add r7, sp, #0 800f65c: 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) 800f65e: 687b ldr r3, [r7, #4] 800f660: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 800f664: 2b21 cmp r3, #33 @ 0x21 800f666: d165 bne.n 800f734 { for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f668: 687b ldr r3, [r7, #4] 800f66a: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 800f66e: 87fb strh r3, [r7, #62] @ 0x3e 800f670: e05c b.n 800f72c { if (huart->TxXferCount == 0U) 800f672: 687b ldr r3, [r7, #4] 800f674: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f678: b29b uxth r3, r3 800f67a: 2b00 cmp r3, #0 800f67c: d133 bne.n 800f6e6 { /* Disable the TX FIFO threshold interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_TXFTIE); 800f67e: 687b ldr r3, [r7, #4] 800f680: 681b ldr r3, [r3, #0] 800f682: 3308 adds r3, #8 800f684: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f686: 6a3b ldr r3, [r7, #32] 800f688: e853 3f00 ldrex r3, [r3] 800f68c: 61fb str r3, [r7, #28] return(result); 800f68e: 69fb ldr r3, [r7, #28] 800f690: f423 0300 bic.w r3, r3, #8388608 @ 0x800000 800f694: 637b str r3, [r7, #52] @ 0x34 800f696: 687b ldr r3, [r7, #4] 800f698: 681b ldr r3, [r3, #0] 800f69a: 3308 adds r3, #8 800f69c: 6b7a ldr r2, [r7, #52] @ 0x34 800f69e: 62fa str r2, [r7, #44] @ 0x2c 800f6a0: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f6a2: 6ab9 ldr r1, [r7, #40] @ 0x28 800f6a4: 6afa ldr r2, [r7, #44] @ 0x2c 800f6a6: e841 2300 strex r3, r2, [r1] 800f6aa: 627b str r3, [r7, #36] @ 0x24 return(result); 800f6ac: 6a7b ldr r3, [r7, #36] @ 0x24 800f6ae: 2b00 cmp r3, #0 800f6b0: d1e5 bne.n 800f67e /* Enable the UART Transmit Complete Interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f6b2: 687b ldr r3, [r7, #4] 800f6b4: 681b ldr r3, [r3, #0] 800f6b6: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f6b8: 68fb ldr r3, [r7, #12] 800f6ba: e853 3f00 ldrex r3, [r3] 800f6be: 60bb str r3, [r7, #8] return(result); 800f6c0: 68bb ldr r3, [r7, #8] 800f6c2: f043 0340 orr.w r3, r3, #64 @ 0x40 800f6c6: 633b str r3, [r7, #48] @ 0x30 800f6c8: 687b ldr r3, [r7, #4] 800f6ca: 681b ldr r3, [r3, #0] 800f6cc: 461a mov r2, r3 800f6ce: 6b3b ldr r3, [r7, #48] @ 0x30 800f6d0: 61bb str r3, [r7, #24] 800f6d2: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f6d4: 6979 ldr r1, [r7, #20] 800f6d6: 69ba ldr r2, [r7, #24] 800f6d8: e841 2300 strex r3, r2, [r1] 800f6dc: 613b str r3, [r7, #16] return(result); 800f6de: 693b ldr r3, [r7, #16] 800f6e0: 2b00 cmp r3, #0 800f6e2: d1e6 bne.n 800f6b2 break; /* force exit loop */ 800f6e4: e026 b.n 800f734 } else if (READ_BIT(huart->Instance->ISR, USART_ISR_TXE_TXFNF) != 0U) 800f6e6: 687b ldr r3, [r7, #4] 800f6e8: 681b ldr r3, [r3, #0] 800f6ea: 69db ldr r3, [r3, #28] 800f6ec: f003 0380 and.w r3, r3, #128 @ 0x80 800f6f0: 2b00 cmp r3, #0 800f6f2: d018 beq.n 800f726 { tmp = (const uint16_t *) huart->pTxBuffPtr; 800f6f4: 687b ldr r3, [r7, #4] 800f6f6: 6d1b ldr r3, [r3, #80] @ 0x50 800f6f8: 63bb str r3, [r7, #56] @ 0x38 huart->Instance->TDR = (((uint32_t)(*tmp)) & 0x01FFUL); 800f6fa: 6bbb ldr r3, [r7, #56] @ 0x38 800f6fc: 881b ldrh r3, [r3, #0] 800f6fe: 461a mov r2, r3 800f700: 687b ldr r3, [r7, #4] 800f702: 681b ldr r3, [r3, #0] 800f704: f3c2 0208 ubfx r2, r2, #0, #9 800f708: 629a str r2, [r3, #40] @ 0x28 huart->pTxBuffPtr += 2U; 800f70a: 687b ldr r3, [r7, #4] 800f70c: 6d1b ldr r3, [r3, #80] @ 0x50 800f70e: 1c9a adds r2, r3, #2 800f710: 687b ldr r3, [r7, #4] 800f712: 651a str r2, [r3, #80] @ 0x50 huart->TxXferCount--; 800f714: 687b ldr r3, [r7, #4] 800f716: f8b3 3056 ldrh.w r3, [r3, #86] @ 0x56 800f71a: b29b uxth r3, r3 800f71c: 3b01 subs r3, #1 800f71e: b29a uxth r2, r3 800f720: 687b ldr r3, [r7, #4] 800f722: f8a3 2056 strh.w r2, [r3, #86] @ 0x56 for (nb_tx_data = huart->NbTxDataToProcess ; nb_tx_data > 0U ; nb_tx_data--) 800f726: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f728: 3b01 subs r3, #1 800f72a: 87fb strh r3, [r7, #62] @ 0x3e 800f72c: 8ffb ldrh r3, [r7, #62] @ 0x3e 800f72e: 2b00 cmp r3, #0 800f730: d19f bne.n 800f672 { /* Nothing to do */ } } } } 800f732: e7ff b.n 800f734 800f734: bf00 nop 800f736: 3744 adds r7, #68 @ 0x44 800f738: 46bd mov sp, r7 800f73a: f85d 7b04 ldr.w r7, [sp], #4 800f73e: 4770 bx lr 0800f740 : * @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) { 800f740: b580 push {r7, lr} 800f742: b088 sub sp, #32 800f744: af00 add r7, sp, #0 800f746: 6078 str r0, [r7, #4] /* Disable the UART Transmit Complete Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_TCIE); 800f748: 687b ldr r3, [r7, #4] 800f74a: 681b ldr r3, [r3, #0] 800f74c: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f74e: 68fb ldr r3, [r7, #12] 800f750: e853 3f00 ldrex r3, [r3] 800f754: 60bb str r3, [r7, #8] return(result); 800f756: 68bb ldr r3, [r7, #8] 800f758: f023 0340 bic.w r3, r3, #64 @ 0x40 800f75c: 61fb str r3, [r7, #28] 800f75e: 687b ldr r3, [r7, #4] 800f760: 681b ldr r3, [r3, #0] 800f762: 461a mov r2, r3 800f764: 69fb ldr r3, [r7, #28] 800f766: 61bb str r3, [r7, #24] 800f768: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f76a: 6979 ldr r1, [r7, #20] 800f76c: 69ba ldr r2, [r7, #24] 800f76e: e841 2300 strex r3, r2, [r1] 800f772: 613b str r3, [r7, #16] return(result); 800f774: 693b ldr r3, [r7, #16] 800f776: 2b00 cmp r3, #0 800f778: d1e6 bne.n 800f748 /* Tx process is ended, restore huart->gState to Ready */ huart->gState = HAL_UART_STATE_READY; 800f77a: 687b ldr r3, [r7, #4] 800f77c: 2220 movs r2, #32 800f77e: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Cleat TxISR function pointer */ huart->TxISR = NULL; 800f782: 687b ldr r3, [r7, #4] 800f784: 2200 movs r2, #0 800f786: 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); 800f788: 6878 ldr r0, [r7, #4] 800f78a: f7f5 f825 bl 80047d8 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ } 800f78e: bf00 nop 800f790: 3720 adds r7, #32 800f792: 46bd mov sp, r7 800f794: bd80 pop {r7, pc} ... 0800f798 : * @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) { 800f798: b580 push {r7, lr} 800f79a: b09c sub sp, #112 @ 0x70 800f79c: af00 add r7, sp, #0 800f79e: 6078 str r0, [r7, #4] uint16_t uhMask = huart->Mask; 800f7a0: 687b ldr r3, [r7, #4] 800f7a2: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800f7a6: 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) 800f7aa: 687b ldr r3, [r7, #4] 800f7ac: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800f7b0: 2b22 cmp r3, #34 @ 0x22 800f7b2: f040 80be bne.w 800f932 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800f7b6: 687b ldr r3, [r7, #4] 800f7b8: 681b ldr r3, [r3, #0] 800f7ba: 6a5b ldr r3, [r3, #36] @ 0x24 800f7bc: f8a7 306c strh.w r3, [r7, #108] @ 0x6c *huart->pRxBuffPtr = (uint8_t)(uhdata & (uint8_t)uhMask); 800f7c0: f8b7 306c ldrh.w r3, [r7, #108] @ 0x6c 800f7c4: b2d9 uxtb r1, r3 800f7c6: f8b7 306e ldrh.w r3, [r7, #110] @ 0x6e 800f7ca: b2da uxtb r2, r3 800f7cc: 687b ldr r3, [r7, #4] 800f7ce: 6d9b ldr r3, [r3, #88] @ 0x58 800f7d0: 400a ands r2, r1 800f7d2: b2d2 uxtb r2, r2 800f7d4: 701a strb r2, [r3, #0] huart->pRxBuffPtr++; 800f7d6: 687b ldr r3, [r7, #4] 800f7d8: 6d9b ldr r3, [r3, #88] @ 0x58 800f7da: 1c5a adds r2, r3, #1 800f7dc: 687b ldr r3, [r7, #4] 800f7de: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800f7e0: 687b ldr r3, [r7, #4] 800f7e2: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f7e6: b29b uxth r3, r3 800f7e8: 3b01 subs r3, #1 800f7ea: b29a uxth r2, r3 800f7ec: 687b ldr r3, [r7, #4] 800f7ee: f8a3 205e strh.w r2, [r3, #94] @ 0x5e if (huart->RxXferCount == 0U) 800f7f2: 687b ldr r3, [r7, #4] 800f7f4: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f7f8: b29b uxth r3, r3 800f7fa: 2b00 cmp r3, #0 800f7fc: f040 80a1 bne.w 800f942 { /* Disable the UART Parity Error Interrupt and RXNE interrupts */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800f800: 687b ldr r3, [r7, #4] 800f802: 681b ldr r3, [r3, #0] 800f804: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f806: 6cfb ldr r3, [r7, #76] @ 0x4c 800f808: e853 3f00 ldrex r3, [r3] 800f80c: 64bb str r3, [r7, #72] @ 0x48 return(result); 800f80e: 6cbb ldr r3, [r7, #72] @ 0x48 800f810: f423 7390 bic.w r3, r3, #288 @ 0x120 800f814: 66bb str r3, [r7, #104] @ 0x68 800f816: 687b ldr r3, [r7, #4] 800f818: 681b ldr r3, [r3, #0] 800f81a: 461a mov r2, r3 800f81c: 6ebb ldr r3, [r7, #104] @ 0x68 800f81e: 65bb str r3, [r7, #88] @ 0x58 800f820: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f822: 6d79 ldr r1, [r7, #84] @ 0x54 800f824: 6dba ldr r2, [r7, #88] @ 0x58 800f826: e841 2300 strex r3, r2, [r1] 800f82a: 653b str r3, [r7, #80] @ 0x50 return(result); 800f82c: 6d3b ldr r3, [r7, #80] @ 0x50 800f82e: 2b00 cmp r3, #0 800f830: d1e6 bne.n 800f800 /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800f832: 687b ldr r3, [r7, #4] 800f834: 681b ldr r3, [r3, #0] 800f836: 3308 adds r3, #8 800f838: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f83a: 6bbb ldr r3, [r7, #56] @ 0x38 800f83c: e853 3f00 ldrex r3, [r3] 800f840: 637b str r3, [r7, #52] @ 0x34 return(result); 800f842: 6b7b ldr r3, [r7, #52] @ 0x34 800f844: f023 0301 bic.w r3, r3, #1 800f848: 667b str r3, [r7, #100] @ 0x64 800f84a: 687b ldr r3, [r7, #4] 800f84c: 681b ldr r3, [r3, #0] 800f84e: 3308 adds r3, #8 800f850: 6e7a ldr r2, [r7, #100] @ 0x64 800f852: 647a str r2, [r7, #68] @ 0x44 800f854: 643b str r3, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f856: 6c39 ldr r1, [r7, #64] @ 0x40 800f858: 6c7a ldr r2, [r7, #68] @ 0x44 800f85a: e841 2300 strex r3, r2, [r1] 800f85e: 63fb str r3, [r7, #60] @ 0x3c return(result); 800f860: 6bfb ldr r3, [r7, #60] @ 0x3c 800f862: 2b00 cmp r3, #0 800f864: d1e5 bne.n 800f832 /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800f866: 687b ldr r3, [r7, #4] 800f868: 2220 movs r2, #32 800f86a: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800f86e: 687b ldr r3, [r7, #4] 800f870: 2200 movs r2, #0 800f872: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800f874: 687b ldr r3, [r7, #4] 800f876: 2200 movs r2, #0 800f878: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800f87a: 687b ldr r3, [r7, #4] 800f87c: 681b ldr r3, [r3, #0] 800f87e: 4a33 ldr r2, [pc, #204] @ (800f94c ) 800f880: 4293 cmp r3, r2 800f882: d01f beq.n 800f8c4 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800f884: 687b ldr r3, [r7, #4] 800f886: 681b ldr r3, [r3, #0] 800f888: 685b ldr r3, [r3, #4] 800f88a: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800f88e: 2b00 cmp r3, #0 800f890: d018 beq.n 800f8c4 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800f892: 687b ldr r3, [r7, #4] 800f894: 681b ldr r3, [r3, #0] 800f896: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f898: 6a7b ldr r3, [r7, #36] @ 0x24 800f89a: e853 3f00 ldrex r3, [r3] 800f89e: 623b str r3, [r7, #32] return(result); 800f8a0: 6a3b ldr r3, [r7, #32] 800f8a2: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800f8a6: 663b str r3, [r7, #96] @ 0x60 800f8a8: 687b ldr r3, [r7, #4] 800f8aa: 681b ldr r3, [r3, #0] 800f8ac: 461a mov r2, r3 800f8ae: 6e3b ldr r3, [r7, #96] @ 0x60 800f8b0: 633b str r3, [r7, #48] @ 0x30 800f8b2: 62fa str r2, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f8b4: 6af9 ldr r1, [r7, #44] @ 0x2c 800f8b6: 6b3a ldr r2, [r7, #48] @ 0x30 800f8b8: e841 2300 strex r3, r2, [r1] 800f8bc: 62bb str r3, [r7, #40] @ 0x28 return(result); 800f8be: 6abb ldr r3, [r7, #40] @ 0x28 800f8c0: 2b00 cmp r3, #0 800f8c2: d1e6 bne.n 800f892 } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800f8c4: 687b ldr r3, [r7, #4] 800f8c6: 6edb ldr r3, [r3, #108] @ 0x6c 800f8c8: 2b01 cmp r3, #1 800f8ca: d12e bne.n 800f92a { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800f8cc: 687b ldr r3, [r7, #4] 800f8ce: 2200 movs r2, #0 800f8d0: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800f8d2: 687b ldr r3, [r7, #4] 800f8d4: 681b ldr r3, [r3, #0] 800f8d6: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f8d8: 693b ldr r3, [r7, #16] 800f8da: e853 3f00 ldrex r3, [r3] 800f8de: 60fb str r3, [r7, #12] return(result); 800f8e0: 68fb ldr r3, [r7, #12] 800f8e2: f023 0310 bic.w r3, r3, #16 800f8e6: 65fb str r3, [r7, #92] @ 0x5c 800f8e8: 687b ldr r3, [r7, #4] 800f8ea: 681b ldr r3, [r3, #0] 800f8ec: 461a mov r2, r3 800f8ee: 6dfb ldr r3, [r7, #92] @ 0x5c 800f8f0: 61fb str r3, [r7, #28] 800f8f2: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f8f4: 69b9 ldr r1, [r7, #24] 800f8f6: 69fa ldr r2, [r7, #28] 800f8f8: e841 2300 strex r3, r2, [r1] 800f8fc: 617b str r3, [r7, #20] return(result); 800f8fe: 697b ldr r3, [r7, #20] 800f900: 2b00 cmp r3, #0 800f902: d1e6 bne.n 800f8d2 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800f904: 687b ldr r3, [r7, #4] 800f906: 681b ldr r3, [r3, #0] 800f908: 69db ldr r3, [r3, #28] 800f90a: f003 0310 and.w r3, r3, #16 800f90e: 2b10 cmp r3, #16 800f910: d103 bne.n 800f91a { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800f912: 687b ldr r3, [r7, #4] 800f914: 681b ldr r3, [r3, #0] 800f916: 2210 movs r2, #16 800f918: 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); 800f91a: 687b ldr r3, [r7, #4] 800f91c: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800f920: 4619 mov r1, r3 800f922: 6878 ldr r0, [r7, #4] 800f924: f7f4 fefe bl 8004724 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800f928: e00b b.n 800f942 HAL_UART_RxCpltCallback(huart); 800f92a: 6878 ldr r0, [r7, #4] 800f92c: f7f4 fef0 bl 8004710 } 800f930: e007 b.n 800f942 __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800f932: 687b ldr r3, [r7, #4] 800f934: 681b ldr r3, [r3, #0] 800f936: 699a ldr r2, [r3, #24] 800f938: 687b ldr r3, [r7, #4] 800f93a: 681b ldr r3, [r3, #0] 800f93c: f042 0208 orr.w r2, r2, #8 800f940: 619a str r2, [r3, #24] } 800f942: bf00 nop 800f944: 3770 adds r7, #112 @ 0x70 800f946: 46bd mov sp, r7 800f948: bd80 pop {r7, pc} 800f94a: bf00 nop 800f94c: 58000c00 .word 0x58000c00 0800f950 : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_16BIT(UART_HandleTypeDef *huart) { 800f950: b580 push {r7, lr} 800f952: b09c sub sp, #112 @ 0x70 800f954: af00 add r7, sp, #0 800f956: 6078 str r0, [r7, #4] uint16_t *tmp; uint16_t uhMask = huart->Mask; 800f958: 687b ldr r3, [r7, #4] 800f95a: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800f95e: 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) 800f962: 687b ldr r3, [r7, #4] 800f964: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800f968: 2b22 cmp r3, #34 @ 0x22 800f96a: f040 80be bne.w 800faea { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800f96e: 687b ldr r3, [r7, #4] 800f970: 681b ldr r3, [r3, #0] 800f972: 6a5b ldr r3, [r3, #36] @ 0x24 800f974: f8a7 306c strh.w r3, [r7, #108] @ 0x6c tmp = (uint16_t *) huart->pRxBuffPtr ; 800f978: 687b ldr r3, [r7, #4] 800f97a: 6d9b ldr r3, [r3, #88] @ 0x58 800f97c: 66bb str r3, [r7, #104] @ 0x68 *tmp = (uint16_t)(uhdata & uhMask); 800f97e: f8b7 206c ldrh.w r2, [r7, #108] @ 0x6c 800f982: f8b7 306e ldrh.w r3, [r7, #110] @ 0x6e 800f986: 4013 ands r3, r2 800f988: b29a uxth r2, r3 800f98a: 6ebb ldr r3, [r7, #104] @ 0x68 800f98c: 801a strh r2, [r3, #0] huart->pRxBuffPtr += 2U; 800f98e: 687b ldr r3, [r7, #4] 800f990: 6d9b ldr r3, [r3, #88] @ 0x58 800f992: 1c9a adds r2, r3, #2 800f994: 687b ldr r3, [r7, #4] 800f996: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800f998: 687b ldr r3, [r7, #4] 800f99a: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f99e: b29b uxth r3, r3 800f9a0: 3b01 subs r3, #1 800f9a2: b29a uxth r2, r3 800f9a4: 687b ldr r3, [r7, #4] 800f9a6: f8a3 205e strh.w r2, [r3, #94] @ 0x5e if (huart->RxXferCount == 0U) 800f9aa: 687b ldr r3, [r7, #4] 800f9ac: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800f9b0: b29b uxth r3, r3 800f9b2: 2b00 cmp r3, #0 800f9b4: f040 80a1 bne.w 800fafa { /* Disable the UART Parity Error Interrupt and RXNE interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE)); 800f9b8: 687b ldr r3, [r7, #4] 800f9ba: 681b ldr r3, [r3, #0] 800f9bc: 64bb str r3, [r7, #72] @ 0x48 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f9be: 6cbb ldr r3, [r7, #72] @ 0x48 800f9c0: e853 3f00 ldrex r3, [r3] 800f9c4: 647b str r3, [r7, #68] @ 0x44 return(result); 800f9c6: 6c7b ldr r3, [r7, #68] @ 0x44 800f9c8: f423 7390 bic.w r3, r3, #288 @ 0x120 800f9cc: 667b str r3, [r7, #100] @ 0x64 800f9ce: 687b ldr r3, [r7, #4] 800f9d0: 681b ldr r3, [r3, #0] 800f9d2: 461a mov r2, r3 800f9d4: 6e7b ldr r3, [r7, #100] @ 0x64 800f9d6: 657b str r3, [r7, #84] @ 0x54 800f9d8: 653a str r2, [r7, #80] @ 0x50 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800f9da: 6d39 ldr r1, [r7, #80] @ 0x50 800f9dc: 6d7a ldr r2, [r7, #84] @ 0x54 800f9de: e841 2300 strex r3, r2, [r1] 800f9e2: 64fb str r3, [r7, #76] @ 0x4c return(result); 800f9e4: 6cfb ldr r3, [r7, #76] @ 0x4c 800f9e6: 2b00 cmp r3, #0 800f9e8: d1e6 bne.n 800f9b8 /* Disable the UART Error Interrupt: (Frame error, noise error, overrun error) */ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 800f9ea: 687b ldr r3, [r7, #4] 800f9ec: 681b ldr r3, [r3, #0] 800f9ee: 3308 adds r3, #8 800f9f0: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800f9f2: 6b7b ldr r3, [r7, #52] @ 0x34 800f9f4: e853 3f00 ldrex r3, [r3] 800f9f8: 633b str r3, [r7, #48] @ 0x30 return(result); 800f9fa: 6b3b ldr r3, [r7, #48] @ 0x30 800f9fc: f023 0301 bic.w r3, r3, #1 800fa00: 663b str r3, [r7, #96] @ 0x60 800fa02: 687b ldr r3, [r7, #4] 800fa04: 681b ldr r3, [r3, #0] 800fa06: 3308 adds r3, #8 800fa08: 6e3a ldr r2, [r7, #96] @ 0x60 800fa0a: 643a str r2, [r7, #64] @ 0x40 800fa0c: 63fb str r3, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fa0e: 6bf9 ldr r1, [r7, #60] @ 0x3c 800fa10: 6c3a ldr r2, [r7, #64] @ 0x40 800fa12: e841 2300 strex r3, r2, [r1] 800fa16: 63bb str r3, [r7, #56] @ 0x38 return(result); 800fa18: 6bbb ldr r3, [r7, #56] @ 0x38 800fa1a: 2b00 cmp r3, #0 800fa1c: d1e5 bne.n 800f9ea /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800fa1e: 687b ldr r3, [r7, #4] 800fa20: 2220 movs r2, #32 800fa22: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800fa26: 687b ldr r3, [r7, #4] 800fa28: 2200 movs r2, #0 800fa2a: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800fa2c: 687b ldr r3, [r7, #4] 800fa2e: 2200 movs r2, #0 800fa30: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800fa32: 687b ldr r3, [r7, #4] 800fa34: 681b ldr r3, [r3, #0] 800fa36: 4a33 ldr r2, [pc, #204] @ (800fb04 ) 800fa38: 4293 cmp r3, r2 800fa3a: d01f beq.n 800fa7c { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800fa3c: 687b ldr r3, [r7, #4] 800fa3e: 681b ldr r3, [r3, #0] 800fa40: 685b ldr r3, [r3, #4] 800fa42: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800fa46: 2b00 cmp r3, #0 800fa48: d018 beq.n 800fa7c { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800fa4a: 687b ldr r3, [r7, #4] 800fa4c: 681b ldr r3, [r3, #0] 800fa4e: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fa50: 6a3b ldr r3, [r7, #32] 800fa52: e853 3f00 ldrex r3, [r3] 800fa56: 61fb str r3, [r7, #28] return(result); 800fa58: 69fb ldr r3, [r7, #28] 800fa5a: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800fa5e: 65fb str r3, [r7, #92] @ 0x5c 800fa60: 687b ldr r3, [r7, #4] 800fa62: 681b ldr r3, [r3, #0] 800fa64: 461a mov r2, r3 800fa66: 6dfb ldr r3, [r7, #92] @ 0x5c 800fa68: 62fb str r3, [r7, #44] @ 0x2c 800fa6a: 62ba str r2, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fa6c: 6ab9 ldr r1, [r7, #40] @ 0x28 800fa6e: 6afa ldr r2, [r7, #44] @ 0x2c 800fa70: e841 2300 strex r3, r2, [r1] 800fa74: 627b str r3, [r7, #36] @ 0x24 return(result); 800fa76: 6a7b ldr r3, [r7, #36] @ 0x24 800fa78: 2b00 cmp r3, #0 800fa7a: d1e6 bne.n 800fa4a } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800fa7c: 687b ldr r3, [r7, #4] 800fa7e: 6edb ldr r3, [r3, #108] @ 0x6c 800fa80: 2b01 cmp r3, #1 800fa82: d12e bne.n 800fae2 { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800fa84: 687b ldr r3, [r7, #4] 800fa86: 2200 movs r2, #0 800fa88: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800fa8a: 687b ldr r3, [r7, #4] 800fa8c: 681b ldr r3, [r3, #0] 800fa8e: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fa90: 68fb ldr r3, [r7, #12] 800fa92: e853 3f00 ldrex r3, [r3] 800fa96: 60bb str r3, [r7, #8] return(result); 800fa98: 68bb ldr r3, [r7, #8] 800fa9a: f023 0310 bic.w r3, r3, #16 800fa9e: 65bb str r3, [r7, #88] @ 0x58 800faa0: 687b ldr r3, [r7, #4] 800faa2: 681b ldr r3, [r3, #0] 800faa4: 461a mov r2, r3 800faa6: 6dbb ldr r3, [r7, #88] @ 0x58 800faa8: 61bb str r3, [r7, #24] 800faaa: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800faac: 6979 ldr r1, [r7, #20] 800faae: 69ba ldr r2, [r7, #24] 800fab0: e841 2300 strex r3, r2, [r1] 800fab4: 613b str r3, [r7, #16] return(result); 800fab6: 693b ldr r3, [r7, #16] 800fab8: 2b00 cmp r3, #0 800faba: d1e6 bne.n 800fa8a if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800fabc: 687b ldr r3, [r7, #4] 800fabe: 681b ldr r3, [r3, #0] 800fac0: 69db ldr r3, [r3, #28] 800fac2: f003 0310 and.w r3, r3, #16 800fac6: 2b10 cmp r3, #16 800fac8: d103 bne.n 800fad2 { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800faca: 687b ldr r3, [r7, #4] 800facc: 681b ldr r3, [r3, #0] 800face: 2210 movs r2, #16 800fad0: 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); 800fad2: 687b ldr r3, [r7, #4] 800fad4: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800fad8: 4619 mov r1, r3 800fada: 6878 ldr r0, [r7, #4] 800fadc: f7f4 fe22 bl 8004724 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800fae0: e00b b.n 800fafa HAL_UART_RxCpltCallback(huart); 800fae2: 6878 ldr r0, [r7, #4] 800fae4: f7f4 fe14 bl 8004710 } 800fae8: e007 b.n 800fafa __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800faea: 687b ldr r3, [r7, #4] 800faec: 681b ldr r3, [r3, #0] 800faee: 699a ldr r2, [r3, #24] 800faf0: 687b ldr r3, [r7, #4] 800faf2: 681b ldr r3, [r3, #0] 800faf4: f042 0208 orr.w r2, r2, #8 800faf8: 619a str r2, [r3, #24] } 800fafa: bf00 nop 800fafc: 3770 adds r7, #112 @ 0x70 800fafe: 46bd mov sp, r7 800fb00: bd80 pop {r7, pc} 800fb02: bf00 nop 800fb04: 58000c00 .word 0x58000c00 0800fb08 : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_8BIT_FIFOEN(UART_HandleTypeDef *huart) { 800fb08: b580 push {r7, lr} 800fb0a: b0ac sub sp, #176 @ 0xb0 800fb0c: af00 add r7, sp, #0 800fb0e: 6078 str r0, [r7, #4] uint16_t uhMask = huart->Mask; 800fb10: 687b ldr r3, [r7, #4] 800fb12: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800fb16: 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); 800fb1a: 687b ldr r3, [r7, #4] 800fb1c: 681b ldr r3, [r3, #0] 800fb1e: 69db ldr r3, [r3, #28] 800fb20: f8c7 30ac str.w r3, [r7, #172] @ 0xac uint32_t cr1its = READ_REG(huart->Instance->CR1); 800fb24: 687b ldr r3, [r7, #4] 800fb26: 681b ldr r3, [r3, #0] 800fb28: 681b ldr r3, [r3, #0] 800fb2a: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 uint32_t cr3its = READ_REG(huart->Instance->CR3); 800fb2e: 687b ldr r3, [r7, #4] 800fb30: 681b ldr r3, [r3, #0] 800fb32: 689b ldr r3, [r3, #8] 800fb34: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800fb38: 687b ldr r3, [r7, #4] 800fb3a: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800fb3e: 2b22 cmp r3, #34 @ 0x22 800fb40: f040 8180 bne.w 800fe44 { nb_rx_data = huart->NbRxDataToProcess; 800fb44: 687b ldr r3, [r7, #4] 800fb46: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800fb4a: f8a7 309e strh.w r3, [r7, #158] @ 0x9e while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800fb4e: e123 b.n 800fd98 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800fb50: 687b ldr r3, [r7, #4] 800fb52: 681b ldr r3, [r3, #0] 800fb54: 6a5b ldr r3, [r3, #36] @ 0x24 800fb56: f8a7 309c strh.w r3, [r7, #156] @ 0x9c *huart->pRxBuffPtr = (uint8_t)(uhdata & (uint8_t)uhMask); 800fb5a: f8b7 309c ldrh.w r3, [r7, #156] @ 0x9c 800fb5e: b2d9 uxtb r1, r3 800fb60: f8b7 30aa ldrh.w r3, [r7, #170] @ 0xaa 800fb64: b2da uxtb r2, r3 800fb66: 687b ldr r3, [r7, #4] 800fb68: 6d9b ldr r3, [r3, #88] @ 0x58 800fb6a: 400a ands r2, r1 800fb6c: b2d2 uxtb r2, r2 800fb6e: 701a strb r2, [r3, #0] huart->pRxBuffPtr++; 800fb70: 687b ldr r3, [r7, #4] 800fb72: 6d9b ldr r3, [r3, #88] @ 0x58 800fb74: 1c5a adds r2, r3, #1 800fb76: 687b ldr r3, [r7, #4] 800fb78: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800fb7a: 687b ldr r3, [r7, #4] 800fb7c: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800fb80: b29b uxth r3, r3 800fb82: 3b01 subs r3, #1 800fb84: b29a uxth r2, r3 800fb86: 687b ldr r3, [r7, #4] 800fb88: f8a3 205e strh.w r2, [r3, #94] @ 0x5e isrflags = READ_REG(huart->Instance->ISR); 800fb8c: 687b ldr r3, [r7, #4] 800fb8e: 681b ldr r3, [r3, #0] 800fb90: 69db ldr r3, [r3, #28] 800fb92: 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) 800fb96: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fb9a: f003 0307 and.w r3, r3, #7 800fb9e: 2b00 cmp r3, #0 800fba0: d053 beq.n 800fc4a { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800fba2: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fba6: f003 0301 and.w r3, r3, #1 800fbaa: 2b00 cmp r3, #0 800fbac: d011 beq.n 800fbd2 800fbae: f8d7 30a4 ldr.w r3, [r7, #164] @ 0xa4 800fbb2: f403 7380 and.w r3, r3, #256 @ 0x100 800fbb6: 2b00 cmp r3, #0 800fbb8: d00b beq.n 800fbd2 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800fbba: 687b ldr r3, [r7, #4] 800fbbc: 681b ldr r3, [r3, #0] 800fbbe: 2201 movs r2, #1 800fbc0: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800fbc2: 687b ldr r3, [r7, #4] 800fbc4: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fbc8: f043 0201 orr.w r2, r3, #1 800fbcc: 687b ldr r3, [r7, #4] 800fbce: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800fbd2: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fbd6: f003 0302 and.w r3, r3, #2 800fbda: 2b00 cmp r3, #0 800fbdc: d011 beq.n 800fc02 800fbde: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800fbe2: f003 0301 and.w r3, r3, #1 800fbe6: 2b00 cmp r3, #0 800fbe8: d00b beq.n 800fc02 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800fbea: 687b ldr r3, [r7, #4] 800fbec: 681b ldr r3, [r3, #0] 800fbee: 2202 movs r2, #2 800fbf0: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800fbf2: 687b ldr r3, [r7, #4] 800fbf4: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fbf8: f043 0204 orr.w r2, r3, #4 800fbfc: 687b ldr r3, [r7, #4] 800fbfe: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800fc02: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fc06: f003 0304 and.w r3, r3, #4 800fc0a: 2b00 cmp r3, #0 800fc0c: d011 beq.n 800fc32 800fc0e: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800fc12: f003 0301 and.w r3, r3, #1 800fc16: 2b00 cmp r3, #0 800fc18: d00b beq.n 800fc32 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800fc1a: 687b ldr r3, [r7, #4] 800fc1c: 681b ldr r3, [r3, #0] 800fc1e: 2204 movs r2, #4 800fc20: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800fc22: 687b ldr r3, [r7, #4] 800fc24: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fc28: f043 0202 orr.w r2, r3, #2 800fc2c: 687b ldr r3, [r7, #4] 800fc2e: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800fc32: 687b ldr r3, [r7, #4] 800fc34: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800fc38: 2b00 cmp r3, #0 800fc3a: d006 beq.n 800fc4a #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800fc3c: 6878 ldr r0, [r7, #4] 800fc3e: f7fe fb13 bl 800e268 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800fc42: 687b ldr r3, [r7, #4] 800fc44: 2200 movs r2, #0 800fc46: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } if (huart->RxXferCount == 0U) 800fc4a: 687b ldr r3, [r7, #4] 800fc4c: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800fc50: b29b uxth r3, r3 800fc52: 2b00 cmp r3, #0 800fc54: f040 80a0 bne.w 800fd98 { /* Disable the UART Parity Error Interrupt and RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800fc58: 687b ldr r3, [r7, #4] 800fc5a: 681b ldr r3, [r3, #0] 800fc5c: 673b str r3, [r7, #112] @ 0x70 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fc5e: 6f3b ldr r3, [r7, #112] @ 0x70 800fc60: e853 3f00 ldrex r3, [r3] 800fc64: 66fb str r3, [r7, #108] @ 0x6c return(result); 800fc66: 6efb ldr r3, [r7, #108] @ 0x6c 800fc68: f423 7380 bic.w r3, r3, #256 @ 0x100 800fc6c: f8c7 3098 str.w r3, [r7, #152] @ 0x98 800fc70: 687b ldr r3, [r7, #4] 800fc72: 681b ldr r3, [r3, #0] 800fc74: 461a mov r2, r3 800fc76: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 800fc7a: 67fb str r3, [r7, #124] @ 0x7c 800fc7c: 67ba str r2, [r7, #120] @ 0x78 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fc7e: 6fb9 ldr r1, [r7, #120] @ 0x78 800fc80: 6ffa ldr r2, [r7, #124] @ 0x7c 800fc82: e841 2300 strex r3, r2, [r1] 800fc86: 677b str r3, [r7, #116] @ 0x74 return(result); 800fc88: 6f7b ldr r3, [r7, #116] @ 0x74 800fc8a: 2b00 cmp r3, #0 800fc8c: d1e4 bne.n 800fc58 /* 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)); 800fc8e: 687b ldr r3, [r7, #4] 800fc90: 681b ldr r3, [r3, #0] 800fc92: 3308 adds r3, #8 800fc94: 65fb str r3, [r7, #92] @ 0x5c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fc96: 6dfb ldr r3, [r7, #92] @ 0x5c 800fc98: e853 3f00 ldrex r3, [r3] 800fc9c: 65bb str r3, [r7, #88] @ 0x58 return(result); 800fc9e: 6dba ldr r2, [r7, #88] @ 0x58 800fca0: 4b6e ldr r3, [pc, #440] @ (800fe5c ) 800fca2: 4013 ands r3, r2 800fca4: f8c7 3094 str.w r3, [r7, #148] @ 0x94 800fca8: 687b ldr r3, [r7, #4] 800fcaa: 681b ldr r3, [r3, #0] 800fcac: 3308 adds r3, #8 800fcae: f8d7 2094 ldr.w r2, [r7, #148] @ 0x94 800fcb2: 66ba str r2, [r7, #104] @ 0x68 800fcb4: 667b str r3, [r7, #100] @ 0x64 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fcb6: 6e79 ldr r1, [r7, #100] @ 0x64 800fcb8: 6eba ldr r2, [r7, #104] @ 0x68 800fcba: e841 2300 strex r3, r2, [r1] 800fcbe: 663b str r3, [r7, #96] @ 0x60 return(result); 800fcc0: 6e3b ldr r3, [r7, #96] @ 0x60 800fcc2: 2b00 cmp r3, #0 800fcc4: d1e3 bne.n 800fc8e /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 800fcc6: 687b ldr r3, [r7, #4] 800fcc8: 2220 movs r2, #32 800fcca: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 800fcce: 687b ldr r3, [r7, #4] 800fcd0: 2200 movs r2, #0 800fcd2: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 800fcd4: 687b ldr r3, [r7, #4] 800fcd6: 2200 movs r2, #0 800fcd8: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 800fcda: 687b ldr r3, [r7, #4] 800fcdc: 681b ldr r3, [r3, #0] 800fcde: 4a60 ldr r2, [pc, #384] @ (800fe60 ) 800fce0: 4293 cmp r3, r2 800fce2: d021 beq.n 800fd28 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 800fce4: 687b ldr r3, [r7, #4] 800fce6: 681b ldr r3, [r3, #0] 800fce8: 685b ldr r3, [r3, #4] 800fcea: f403 0300 and.w r3, r3, #8388608 @ 0x800000 800fcee: 2b00 cmp r3, #0 800fcf0: d01a beq.n 800fd28 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 800fcf2: 687b ldr r3, [r7, #4] 800fcf4: 681b ldr r3, [r3, #0] 800fcf6: 64bb str r3, [r7, #72] @ 0x48 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fcf8: 6cbb ldr r3, [r7, #72] @ 0x48 800fcfa: e853 3f00 ldrex r3, [r3] 800fcfe: 647b str r3, [r7, #68] @ 0x44 return(result); 800fd00: 6c7b ldr r3, [r7, #68] @ 0x44 800fd02: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 800fd06: f8c7 3090 str.w r3, [r7, #144] @ 0x90 800fd0a: 687b ldr r3, [r7, #4] 800fd0c: 681b ldr r3, [r3, #0] 800fd0e: 461a mov r2, r3 800fd10: f8d7 3090 ldr.w r3, [r7, #144] @ 0x90 800fd14: 657b str r3, [r7, #84] @ 0x54 800fd16: 653a str r2, [r7, #80] @ 0x50 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fd18: 6d39 ldr r1, [r7, #80] @ 0x50 800fd1a: 6d7a ldr r2, [r7, #84] @ 0x54 800fd1c: e841 2300 strex r3, r2, [r1] 800fd20: 64fb str r3, [r7, #76] @ 0x4c return(result); 800fd22: 6cfb ldr r3, [r7, #76] @ 0x4c 800fd24: 2b00 cmp r3, #0 800fd26: d1e4 bne.n 800fcf2 } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 800fd28: 687b ldr r3, [r7, #4] 800fd2a: 6edb ldr r3, [r3, #108] @ 0x6c 800fd2c: 2b01 cmp r3, #1 800fd2e: d130 bne.n 800fd92 { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 800fd30: 687b ldr r3, [r7, #4] 800fd32: 2200 movs r2, #0 800fd34: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 800fd36: 687b ldr r3, [r7, #4] 800fd38: 681b ldr r3, [r3, #0] 800fd3a: 637b str r3, [r7, #52] @ 0x34 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fd3c: 6b7b ldr r3, [r7, #52] @ 0x34 800fd3e: e853 3f00 ldrex r3, [r3] 800fd42: 633b str r3, [r7, #48] @ 0x30 return(result); 800fd44: 6b3b ldr r3, [r7, #48] @ 0x30 800fd46: f023 0310 bic.w r3, r3, #16 800fd4a: f8c7 308c str.w r3, [r7, #140] @ 0x8c 800fd4e: 687b ldr r3, [r7, #4] 800fd50: 681b ldr r3, [r3, #0] 800fd52: 461a mov r2, r3 800fd54: f8d7 308c ldr.w r3, [r7, #140] @ 0x8c 800fd58: 643b str r3, [r7, #64] @ 0x40 800fd5a: 63fa str r2, [r7, #60] @ 0x3c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fd5c: 6bf9 ldr r1, [r7, #60] @ 0x3c 800fd5e: 6c3a ldr r2, [r7, #64] @ 0x40 800fd60: e841 2300 strex r3, r2, [r1] 800fd64: 63bb str r3, [r7, #56] @ 0x38 return(result); 800fd66: 6bbb ldr r3, [r7, #56] @ 0x38 800fd68: 2b00 cmp r3, #0 800fd6a: d1e4 bne.n 800fd36 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 800fd6c: 687b ldr r3, [r7, #4] 800fd6e: 681b ldr r3, [r3, #0] 800fd70: 69db ldr r3, [r3, #28] 800fd72: f003 0310 and.w r3, r3, #16 800fd76: 2b10 cmp r3, #16 800fd78: d103 bne.n 800fd82 { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 800fd7a: 687b ldr r3, [r7, #4] 800fd7c: 681b ldr r3, [r3, #0] 800fd7e: 2210 movs r2, #16 800fd80: 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); 800fd82: 687b ldr r3, [r7, #4] 800fd84: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 800fd88: 4619 mov r1, r3 800fd8a: 6878 ldr r0, [r7, #4] 800fd8c: f7f4 fcca bl 8004724 800fd90: e002 b.n 800fd98 #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); 800fd92: 6878 ldr r0, [r7, #4] 800fd94: f7f4 fcbc bl 8004710 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800fd98: f8b7 309e ldrh.w r3, [r7, #158] @ 0x9e 800fd9c: 2b00 cmp r3, #0 800fd9e: d006 beq.n 800fdae 800fda0: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800fda4: f003 0320 and.w r3, r3, #32 800fda8: 2b00 cmp r3, #0 800fdaa: f47f aed1 bne.w 800fb50 /* 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; 800fdae: 687b ldr r3, [r7, #4] 800fdb0: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800fdb4: f8a7 308a strh.w r3, [r7, #138] @ 0x8a if ((rxdatacount != 0U) && (rxdatacount < huart->NbRxDataToProcess)) 800fdb8: f8b7 308a ldrh.w r3, [r7, #138] @ 0x8a 800fdbc: 2b00 cmp r3, #0 800fdbe: d049 beq.n 800fe54 800fdc0: 687b ldr r3, [r7, #4] 800fdc2: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800fdc6: f8b7 208a ldrh.w r2, [r7, #138] @ 0x8a 800fdca: 429a cmp r2, r3 800fdcc: d242 bcs.n 800fe54 { /* Disable the UART RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 800fdce: 687b ldr r3, [r7, #4] 800fdd0: 681b ldr r3, [r3, #0] 800fdd2: 3308 adds r3, #8 800fdd4: 623b str r3, [r7, #32] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fdd6: 6a3b ldr r3, [r7, #32] 800fdd8: e853 3f00 ldrex r3, [r3] 800fddc: 61fb str r3, [r7, #28] return(result); 800fdde: 69fb ldr r3, [r7, #28] 800fde0: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 800fde4: f8c7 3084 str.w r3, [r7, #132] @ 0x84 800fde8: 687b ldr r3, [r7, #4] 800fdea: 681b ldr r3, [r3, #0] 800fdec: 3308 adds r3, #8 800fdee: f8d7 2084 ldr.w r2, [r7, #132] @ 0x84 800fdf2: 62fa str r2, [r7, #44] @ 0x2c 800fdf4: 62bb str r3, [r7, #40] @ 0x28 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fdf6: 6ab9 ldr r1, [r7, #40] @ 0x28 800fdf8: 6afa ldr r2, [r7, #44] @ 0x2c 800fdfa: e841 2300 strex r3, r2, [r1] 800fdfe: 627b str r3, [r7, #36] @ 0x24 return(result); 800fe00: 6a7b ldr r3, [r7, #36] @ 0x24 800fe02: 2b00 cmp r3, #0 800fe04: d1e3 bne.n 800fdce /* Update the RxISR function pointer */ huart->RxISR = UART_RxISR_8BIT; 800fe06: 687b ldr r3, [r7, #4] 800fe08: 4a16 ldr r2, [pc, #88] @ (800fe64 ) 800fe0a: 675a str r2, [r3, #116] @ 0x74 /* Enable the UART Data Register Not Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 800fe0c: 687b ldr r3, [r7, #4] 800fe0e: 681b ldr r3, [r3, #0] 800fe10: 60fb str r3, [r7, #12] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fe12: 68fb ldr r3, [r7, #12] 800fe14: e853 3f00 ldrex r3, [r3] 800fe18: 60bb str r3, [r7, #8] return(result); 800fe1a: 68bb ldr r3, [r7, #8] 800fe1c: f043 0320 orr.w r3, r3, #32 800fe20: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800fe24: 687b ldr r3, [r7, #4] 800fe26: 681b ldr r3, [r3, #0] 800fe28: 461a mov r2, r3 800fe2a: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 800fe2e: 61bb str r3, [r7, #24] 800fe30: 617a str r2, [r7, #20] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800fe32: 6979 ldr r1, [r7, #20] 800fe34: 69ba ldr r2, [r7, #24] 800fe36: e841 2300 strex r3, r2, [r1] 800fe3a: 613b str r3, [r7, #16] return(result); 800fe3c: 693b ldr r3, [r7, #16] 800fe3e: 2b00 cmp r3, #0 800fe40: d1e4 bne.n 800fe0c else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 800fe42: e007 b.n 800fe54 __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 800fe44: 687b ldr r3, [r7, #4] 800fe46: 681b ldr r3, [r3, #0] 800fe48: 699a ldr r2, [r3, #24] 800fe4a: 687b ldr r3, [r7, #4] 800fe4c: 681b ldr r3, [r3, #0] 800fe4e: f042 0208 orr.w r2, r2, #8 800fe52: 619a str r2, [r3, #24] } 800fe54: bf00 nop 800fe56: 37b0 adds r7, #176 @ 0xb0 800fe58: 46bd mov sp, r7 800fe5a: bd80 pop {r7, pc} 800fe5c: effffffe .word 0xeffffffe 800fe60: 58000c00 .word 0x58000c00 800fe64: 0800f799 .word 0x0800f799 0800fe68 : * interruptions have been enabled by HAL_UART_Receive_IT() * @param huart UART handle. * @retval None */ static void UART_RxISR_16BIT_FIFOEN(UART_HandleTypeDef *huart) { 800fe68: b580 push {r7, lr} 800fe6a: b0ae sub sp, #184 @ 0xb8 800fe6c: af00 add r7, sp, #0 800fe6e: 6078 str r0, [r7, #4] uint16_t *tmp; uint16_t uhMask = huart->Mask; 800fe70: 687b ldr r3, [r7, #4] 800fe72: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 800fe76: 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); 800fe7a: 687b ldr r3, [r7, #4] 800fe7c: 681b ldr r3, [r3, #0] 800fe7e: 69db ldr r3, [r3, #28] 800fe80: f8c7 30b4 str.w r3, [r7, #180] @ 0xb4 uint32_t cr1its = READ_REG(huart->Instance->CR1); 800fe84: 687b ldr r3, [r7, #4] 800fe86: 681b ldr r3, [r3, #0] 800fe88: 681b ldr r3, [r3, #0] 800fe8a: f8c7 30ac str.w r3, [r7, #172] @ 0xac uint32_t cr3its = READ_REG(huart->Instance->CR3); 800fe8e: 687b ldr r3, [r7, #4] 800fe90: 681b ldr r3, [r3, #0] 800fe92: 689b ldr r3, [r3, #8] 800fe94: f8c7 30a8 str.w r3, [r7, #168] @ 0xa8 /* Check that a Rx process is ongoing */ if (huart->RxState == HAL_UART_STATE_BUSY_RX) 800fe98: 687b ldr r3, [r7, #4] 800fe9a: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 800fe9e: 2b22 cmp r3, #34 @ 0x22 800fea0: f040 8184 bne.w 80101ac { nb_rx_data = huart->NbRxDataToProcess; 800fea4: 687b ldr r3, [r7, #4] 800fea6: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 800feaa: f8a7 30a6 strh.w r3, [r7, #166] @ 0xa6 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 800feae: e127 b.n 8010100 { uhdata = (uint16_t) READ_REG(huart->Instance->RDR); 800feb0: 687b ldr r3, [r7, #4] 800feb2: 681b ldr r3, [r3, #0] 800feb4: 6a5b ldr r3, [r3, #36] @ 0x24 800feb6: f8a7 30a4 strh.w r3, [r7, #164] @ 0xa4 tmp = (uint16_t *) huart->pRxBuffPtr ; 800feba: 687b ldr r3, [r7, #4] 800febc: 6d9b ldr r3, [r3, #88] @ 0x58 800febe: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 *tmp = (uint16_t)(uhdata & uhMask); 800fec2: f8b7 20a4 ldrh.w r2, [r7, #164] @ 0xa4 800fec6: f8b7 30b2 ldrh.w r3, [r7, #178] @ 0xb2 800feca: 4013 ands r3, r2 800fecc: b29a uxth r2, r3 800fece: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 800fed2: 801a strh r2, [r3, #0] huart->pRxBuffPtr += 2U; 800fed4: 687b ldr r3, [r7, #4] 800fed6: 6d9b ldr r3, [r3, #88] @ 0x58 800fed8: 1c9a adds r2, r3, #2 800feda: 687b ldr r3, [r7, #4] 800fedc: 659a str r2, [r3, #88] @ 0x58 huart->RxXferCount--; 800fede: 687b ldr r3, [r7, #4] 800fee0: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800fee4: b29b uxth r3, r3 800fee6: 3b01 subs r3, #1 800fee8: b29a uxth r2, r3 800feea: 687b ldr r3, [r7, #4] 800feec: f8a3 205e strh.w r2, [r3, #94] @ 0x5e isrflags = READ_REG(huart->Instance->ISR); 800fef0: 687b ldr r3, [r7, #4] 800fef2: 681b ldr r3, [r3, #0] 800fef4: 69db ldr r3, [r3, #28] 800fef6: 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) 800fefa: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800fefe: f003 0307 and.w r3, r3, #7 800ff02: 2b00 cmp r3, #0 800ff04: d053 beq.n 800ffae { /* UART parity error interrupt occurred -------------------------------------*/ if (((isrflags & USART_ISR_PE) != 0U) && ((cr1its & USART_CR1_PEIE) != 0U)) 800ff06: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800ff0a: f003 0301 and.w r3, r3, #1 800ff0e: 2b00 cmp r3, #0 800ff10: d011 beq.n 800ff36 800ff12: f8d7 30ac ldr.w r3, [r7, #172] @ 0xac 800ff16: f403 7380 and.w r3, r3, #256 @ 0x100 800ff1a: 2b00 cmp r3, #0 800ff1c: d00b beq.n 800ff36 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); 800ff1e: 687b ldr r3, [r7, #4] 800ff20: 681b ldr r3, [r3, #0] 800ff22: 2201 movs r2, #1 800ff24: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_PE; 800ff26: 687b ldr r3, [r7, #4] 800ff28: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff2c: f043 0201 orr.w r2, r3, #1 800ff30: 687b ldr r3, [r7, #4] 800ff32: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART frame error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_FE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800ff36: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800ff3a: f003 0302 and.w r3, r3, #2 800ff3e: 2b00 cmp r3, #0 800ff40: d011 beq.n 800ff66 800ff42: f8d7 30a8 ldr.w r3, [r7, #168] @ 0xa8 800ff46: f003 0301 and.w r3, r3, #1 800ff4a: 2b00 cmp r3, #0 800ff4c: d00b beq.n 800ff66 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); 800ff4e: 687b ldr r3, [r7, #4] 800ff50: 681b ldr r3, [r3, #0] 800ff52: 2202 movs r2, #2 800ff54: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_FE; 800ff56: 687b ldr r3, [r7, #4] 800ff58: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff5c: f043 0204 orr.w r2, r3, #4 800ff60: 687b ldr r3, [r7, #4] 800ff62: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* UART noise error interrupt occurred --------------------------------------*/ if (((isrflags & USART_ISR_NE) != 0U) && ((cr3its & USART_CR3_EIE) != 0U)) 800ff66: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 800ff6a: f003 0304 and.w r3, r3, #4 800ff6e: 2b00 cmp r3, #0 800ff70: d011 beq.n 800ff96 800ff72: f8d7 30a8 ldr.w r3, [r7, #168] @ 0xa8 800ff76: f003 0301 and.w r3, r3, #1 800ff7a: 2b00 cmp r3, #0 800ff7c: d00b beq.n 800ff96 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); 800ff7e: 687b ldr r3, [r7, #4] 800ff80: 681b ldr r3, [r3, #0] 800ff82: 2204 movs r2, #4 800ff84: 621a str r2, [r3, #32] huart->ErrorCode |= HAL_UART_ERROR_NE; 800ff86: 687b ldr r3, [r7, #4] 800ff88: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff8c: f043 0202 orr.w r2, r3, #2 800ff90: 687b ldr r3, [r7, #4] 800ff92: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } /* Call UART Error Call back function if need be ----------------------------*/ if (huart->ErrorCode != HAL_UART_ERROR_NONE) 800ff96: 687b ldr r3, [r7, #4] 800ff98: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 800ff9c: 2b00 cmp r3, #0 800ff9e: d006 beq.n 800ffae #if (USE_HAL_UART_REGISTER_CALLBACKS == 1) /*Call registered error callback*/ huart->ErrorCallback(huart); #else /*Call legacy weak error callback*/ HAL_UART_ErrorCallback(huart); 800ffa0: 6878 ldr r0, [r7, #4] 800ffa2: f7fe f961 bl 800e268 #endif /* USE_HAL_UART_REGISTER_CALLBACKS */ huart->ErrorCode = HAL_UART_ERROR_NONE; 800ffa6: 687b ldr r3, [r7, #4] 800ffa8: 2200 movs r2, #0 800ffaa: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } if (huart->RxXferCount == 0U) 800ffae: 687b ldr r3, [r7, #4] 800ffb0: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 800ffb4: b29b uxth r3, r3 800ffb6: 2b00 cmp r3, #0 800ffb8: f040 80a2 bne.w 8010100 { /* Disable the UART Parity Error Interrupt and RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_PEIE); 800ffbc: 687b ldr r3, [r7, #4] 800ffbe: 681b ldr r3, [r3, #0] 800ffc0: 677b str r3, [r7, #116] @ 0x74 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800ffc2: 6f7b ldr r3, [r7, #116] @ 0x74 800ffc4: e853 3f00 ldrex r3, [r3] 800ffc8: 673b str r3, [r7, #112] @ 0x70 return(result); 800ffca: 6f3b ldr r3, [r7, #112] @ 0x70 800ffcc: f423 7380 bic.w r3, r3, #256 @ 0x100 800ffd0: f8c7 309c str.w r3, [r7, #156] @ 0x9c 800ffd4: 687b ldr r3, [r7, #4] 800ffd6: 681b ldr r3, [r3, #0] 800ffd8: 461a mov r2, r3 800ffda: f8d7 309c ldr.w r3, [r7, #156] @ 0x9c 800ffde: f8c7 3080 str.w r3, [r7, #128] @ 0x80 800ffe2: 67fa str r2, [r7, #124] @ 0x7c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 800ffe4: 6ff9 ldr r1, [r7, #124] @ 0x7c 800ffe6: f8d7 2080 ldr.w r2, [r7, #128] @ 0x80 800ffea: e841 2300 strex r3, r2, [r1] 800ffee: 67bb str r3, [r7, #120] @ 0x78 return(result); 800fff0: 6fbb ldr r3, [r7, #120] @ 0x78 800fff2: 2b00 cmp r3, #0 800fff4: d1e2 bne.n 800ffbc /* 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)); 800fff6: 687b ldr r3, [r7, #4] 800fff8: 681b ldr r3, [r3, #0] 800fffa: 3308 adds r3, #8 800fffc: 663b str r3, [r7, #96] @ 0x60 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 800fffe: 6e3b ldr r3, [r7, #96] @ 0x60 8010000: e853 3f00 ldrex r3, [r3] 8010004: 65fb str r3, [r7, #92] @ 0x5c return(result); 8010006: 6dfa ldr r2, [r7, #92] @ 0x5c 8010008: 4b6e ldr r3, [pc, #440] @ (80101c4 ) 801000a: 4013 ands r3, r2 801000c: f8c7 3098 str.w r3, [r7, #152] @ 0x98 8010010: 687b ldr r3, [r7, #4] 8010012: 681b ldr r3, [r3, #0] 8010014: 3308 adds r3, #8 8010016: f8d7 2098 ldr.w r2, [r7, #152] @ 0x98 801001a: 66fa str r2, [r7, #108] @ 0x6c 801001c: 66bb str r3, [r7, #104] @ 0x68 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 801001e: 6eb9 ldr r1, [r7, #104] @ 0x68 8010020: 6efa ldr r2, [r7, #108] @ 0x6c 8010022: e841 2300 strex r3, r2, [r1] 8010026: 667b str r3, [r7, #100] @ 0x64 return(result); 8010028: 6e7b ldr r3, [r7, #100] @ 0x64 801002a: 2b00 cmp r3, #0 801002c: d1e3 bne.n 800fff6 /* Rx process is completed, restore huart->RxState to Ready */ huart->RxState = HAL_UART_STATE_READY; 801002e: 687b ldr r3, [r7, #4] 8010030: 2220 movs r2, #32 8010032: f8c3 208c str.w r2, [r3, #140] @ 0x8c /* Clear RxISR function pointer */ huart->RxISR = NULL; 8010036: 687b ldr r3, [r7, #4] 8010038: 2200 movs r2, #0 801003a: 675a str r2, [r3, #116] @ 0x74 /* Initialize type of RxEvent to Transfer Complete */ huart->RxEventType = HAL_UART_RXEVENT_TC; 801003c: 687b ldr r3, [r7, #4] 801003e: 2200 movs r2, #0 8010040: 671a str r2, [r3, #112] @ 0x70 if (!(IS_LPUART_INSTANCE(huart->Instance))) 8010042: 687b ldr r3, [r7, #4] 8010044: 681b ldr r3, [r3, #0] 8010046: 4a60 ldr r2, [pc, #384] @ (80101c8 ) 8010048: 4293 cmp r3, r2 801004a: d021 beq.n 8010090 { /* Check that USART RTOEN bit is set */ if (READ_BIT(huart->Instance->CR2, USART_CR2_RTOEN) != 0U) 801004c: 687b ldr r3, [r7, #4] 801004e: 681b ldr r3, [r3, #0] 8010050: 685b ldr r3, [r3, #4] 8010052: f403 0300 and.w r3, r3, #8388608 @ 0x800000 8010056: 2b00 cmp r3, #0 8010058: d01a beq.n 8010090 { /* Enable the UART Receiver Timeout Interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_RTOIE); 801005a: 687b ldr r3, [r7, #4] 801005c: 681b ldr r3, [r3, #0] 801005e: 64fb str r3, [r7, #76] @ 0x4c __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 8010060: 6cfb ldr r3, [r7, #76] @ 0x4c 8010062: e853 3f00 ldrex r3, [r3] 8010066: 64bb str r3, [r7, #72] @ 0x48 return(result); 8010068: 6cbb ldr r3, [r7, #72] @ 0x48 801006a: f023 6380 bic.w r3, r3, #67108864 @ 0x4000000 801006e: f8c7 3094 str.w r3, [r7, #148] @ 0x94 8010072: 687b ldr r3, [r7, #4] 8010074: 681b ldr r3, [r3, #0] 8010076: 461a mov r2, r3 8010078: f8d7 3094 ldr.w r3, [r7, #148] @ 0x94 801007c: 65bb str r3, [r7, #88] @ 0x58 801007e: 657a str r2, [r7, #84] @ 0x54 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 8010080: 6d79 ldr r1, [r7, #84] @ 0x54 8010082: 6dba ldr r2, [r7, #88] @ 0x58 8010084: e841 2300 strex r3, r2, [r1] 8010088: 653b str r3, [r7, #80] @ 0x50 return(result); 801008a: 6d3b ldr r3, [r7, #80] @ 0x50 801008c: 2b00 cmp r3, #0 801008e: d1e4 bne.n 801005a } } /* Check current reception Mode : If Reception till IDLE event has been selected : */ if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 8010090: 687b ldr r3, [r7, #4] 8010092: 6edb ldr r3, [r3, #108] @ 0x6c 8010094: 2b01 cmp r3, #1 8010096: d130 bne.n 80100fa { /* Set reception type to Standard */ huart->ReceptionType = HAL_UART_RECEPTION_STANDARD; 8010098: 687b ldr r3, [r7, #4] 801009a: 2200 movs r2, #0 801009c: 66da str r2, [r3, #108] @ 0x6c /* Disable IDLE interrupt */ ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 801009e: 687b ldr r3, [r7, #4] 80100a0: 681b ldr r3, [r3, #0] 80100a2: 63bb str r3, [r7, #56] @ 0x38 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 80100a4: 6bbb ldr r3, [r7, #56] @ 0x38 80100a6: e853 3f00 ldrex r3, [r3] 80100aa: 637b str r3, [r7, #52] @ 0x34 return(result); 80100ac: 6b7b ldr r3, [r7, #52] @ 0x34 80100ae: f023 0310 bic.w r3, r3, #16 80100b2: f8c7 3090 str.w r3, [r7, #144] @ 0x90 80100b6: 687b ldr r3, [r7, #4] 80100b8: 681b ldr r3, [r3, #0] 80100ba: 461a mov r2, r3 80100bc: f8d7 3090 ldr.w r3, [r7, #144] @ 0x90 80100c0: 647b str r3, [r7, #68] @ 0x44 80100c2: 643a str r2, [r7, #64] @ 0x40 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 80100c4: 6c39 ldr r1, [r7, #64] @ 0x40 80100c6: 6c7a ldr r2, [r7, #68] @ 0x44 80100c8: e841 2300 strex r3, r2, [r1] 80100cc: 63fb str r3, [r7, #60] @ 0x3c return(result); 80100ce: 6bfb ldr r3, [r7, #60] @ 0x3c 80100d0: 2b00 cmp r3, #0 80100d2: d1e4 bne.n 801009e if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET) 80100d4: 687b ldr r3, [r7, #4] 80100d6: 681b ldr r3, [r3, #0] 80100d8: 69db ldr r3, [r3, #28] 80100da: f003 0310 and.w r3, r3, #16 80100de: 2b10 cmp r3, #16 80100e0: d103 bne.n 80100ea { /* Clear IDLE Flag */ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 80100e2: 687b ldr r3, [r7, #4] 80100e4: 681b ldr r3, [r3, #0] 80100e6: 2210 movs r2, #16 80100e8: 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); 80100ea: 687b ldr r3, [r7, #4] 80100ec: f8b3 305c ldrh.w r3, [r3, #92] @ 0x5c 80100f0: 4619 mov r1, r3 80100f2: 6878 ldr r0, [r7, #4] 80100f4: f7f4 fb16 bl 8004724 80100f8: e002 b.n 8010100 #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); 80100fa: 6878 ldr r0, [r7, #4] 80100fc: f7f4 fb08 bl 8004710 while ((nb_rx_data > 0U) && ((isrflags & USART_ISR_RXNE_RXFNE) != 0U)) 8010100: f8b7 30a6 ldrh.w r3, [r7, #166] @ 0xa6 8010104: 2b00 cmp r3, #0 8010106: d006 beq.n 8010116 8010108: f8d7 30b4 ldr.w r3, [r7, #180] @ 0xb4 801010c: f003 0320 and.w r3, r3, #32 8010110: 2b00 cmp r3, #0 8010112: f47f aecd bne.w 800feb0 /* 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; 8010116: 687b ldr r3, [r7, #4] 8010118: f8b3 305e ldrh.w r3, [r3, #94] @ 0x5e 801011c: f8a7 308e strh.w r3, [r7, #142] @ 0x8e if ((rxdatacount != 0U) && (rxdatacount < huart->NbRxDataToProcess)) 8010120: f8b7 308e ldrh.w r3, [r7, #142] @ 0x8e 8010124: 2b00 cmp r3, #0 8010126: d049 beq.n 80101bc 8010128: 687b ldr r3, [r7, #4] 801012a: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 801012e: f8b7 208e ldrh.w r2, [r7, #142] @ 0x8e 8010132: 429a cmp r2, r3 8010134: d242 bcs.n 80101bc { /* Disable the UART RXFT interrupt*/ ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_RXFTIE); 8010136: 687b ldr r3, [r7, #4] 8010138: 681b ldr r3, [r3, #0] 801013a: 3308 adds r3, #8 801013c: 627b str r3, [r7, #36] @ 0x24 __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 801013e: 6a7b ldr r3, [r7, #36] @ 0x24 8010140: e853 3f00 ldrex r3, [r3] 8010144: 623b str r3, [r7, #32] return(result); 8010146: 6a3b ldr r3, [r7, #32] 8010148: f023 5380 bic.w r3, r3, #268435456 @ 0x10000000 801014c: f8c7 3088 str.w r3, [r7, #136] @ 0x88 8010150: 687b ldr r3, [r7, #4] 8010152: 681b ldr r3, [r3, #0] 8010154: 3308 adds r3, #8 8010156: f8d7 2088 ldr.w r2, [r7, #136] @ 0x88 801015a: 633a str r2, [r7, #48] @ 0x30 801015c: 62fb str r3, [r7, #44] @ 0x2c __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 801015e: 6af9 ldr r1, [r7, #44] @ 0x2c 8010160: 6b3a ldr r2, [r7, #48] @ 0x30 8010162: e841 2300 strex r3, r2, [r1] 8010166: 62bb str r3, [r7, #40] @ 0x28 return(result); 8010168: 6abb ldr r3, [r7, #40] @ 0x28 801016a: 2b00 cmp r3, #0 801016c: d1e3 bne.n 8010136 /* Update the RxISR function pointer */ huart->RxISR = UART_RxISR_16BIT; 801016e: 687b ldr r3, [r7, #4] 8010170: 4a16 ldr r2, [pc, #88] @ (80101cc ) 8010172: 675a str r2, [r3, #116] @ 0x74 /* Enable the UART Data Register Not Empty interrupt */ ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_RXNEIE_RXFNEIE); 8010174: 687b ldr r3, [r7, #4] 8010176: 681b ldr r3, [r3, #0] 8010178: 613b str r3, [r7, #16] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 801017a: 693b ldr r3, [r7, #16] 801017c: e853 3f00 ldrex r3, [r3] 8010180: 60fb str r3, [r7, #12] return(result); 8010182: 68fb ldr r3, [r7, #12] 8010184: f043 0320 orr.w r3, r3, #32 8010188: f8c7 3084 str.w r3, [r7, #132] @ 0x84 801018c: 687b ldr r3, [r7, #4] 801018e: 681b ldr r3, [r3, #0] 8010190: 461a mov r2, r3 8010192: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 8010196: 61fb str r3, [r7, #28] 8010198: 61ba str r2, [r7, #24] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 801019a: 69b9 ldr r1, [r7, #24] 801019c: 69fa ldr r2, [r7, #28] 801019e: e841 2300 strex r3, r2, [r1] 80101a2: 617b str r3, [r7, #20] return(result); 80101a4: 697b ldr r3, [r7, #20] 80101a6: 2b00 cmp r3, #0 80101a8: d1e4 bne.n 8010174 else { /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); } } 80101aa: e007 b.n 80101bc __HAL_UART_SEND_REQ(huart, UART_RXDATA_FLUSH_REQUEST); 80101ac: 687b ldr r3, [r7, #4] 80101ae: 681b ldr r3, [r3, #0] 80101b0: 699a ldr r2, [r3, #24] 80101b2: 687b ldr r3, [r7, #4] 80101b4: 681b ldr r3, [r3, #0] 80101b6: f042 0208 orr.w r2, r2, #8 80101ba: 619a str r2, [r3, #24] } 80101bc: bf00 nop 80101be: 37b8 adds r7, #184 @ 0xb8 80101c0: 46bd mov sp, r7 80101c2: bd80 pop {r7, pc} 80101c4: effffffe .word 0xeffffffe 80101c8: 58000c00 .word 0x58000c00 80101cc: 0800f951 .word 0x0800f951 080101d0 : * @brief UART wakeup from Stop mode callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_WakeupCallback(UART_HandleTypeDef *huart) { 80101d0: b480 push {r7} 80101d2: b083 sub sp, #12 80101d4: af00 add r7, sp, #0 80101d6: 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. */ } 80101d8: bf00 nop 80101da: 370c adds r7, #12 80101dc: 46bd mov sp, r7 80101de: f85d 7b04 ldr.w r7, [sp], #4 80101e2: 4770 bx lr 080101e4 : * @brief UART RX Fifo full callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_RxFifoFullCallback(UART_HandleTypeDef *huart) { 80101e4: b480 push {r7} 80101e6: b083 sub sp, #12 80101e8: af00 add r7, sp, #0 80101ea: 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. */ } 80101ec: bf00 nop 80101ee: 370c adds r7, #12 80101f0: 46bd mov sp, r7 80101f2: f85d 7b04 ldr.w r7, [sp], #4 80101f6: 4770 bx lr 080101f8 : * @brief UART TX Fifo empty callback. * @param huart UART handle. * @retval None */ __weak void HAL_UARTEx_TxFifoEmptyCallback(UART_HandleTypeDef *huart) { 80101f8: b480 push {r7} 80101fa: b083 sub sp, #12 80101fc: af00 add r7, sp, #0 80101fe: 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. */ } 8010200: bf00 nop 8010202: 370c adds r7, #12 8010204: 46bd mov sp, r7 8010206: f85d 7b04 ldr.w r7, [sp], #4 801020a: 4770 bx lr 0801020c : * @brief Disable the FIFO mode. * @param huart UART handle. * @retval HAL status */ HAL_StatusTypeDef HAL_UARTEx_DisableFifoMode(UART_HandleTypeDef *huart) { 801020c: b480 push {r7} 801020e: b085 sub sp, #20 8010210: af00 add r7, sp, #0 8010212: 6078 str r0, [r7, #4] /* Check parameters */ assert_param(IS_UART_FIFO_INSTANCE(huart->Instance)); /* Process Locked */ __HAL_LOCK(huart); 8010214: 687b ldr r3, [r7, #4] 8010216: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 801021a: 2b01 cmp r3, #1 801021c: d101 bne.n 8010222 801021e: 2302 movs r3, #2 8010220: e027 b.n 8010272 8010222: 687b ldr r3, [r7, #4] 8010224: 2201 movs r2, #1 8010226: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 801022a: 687b ldr r3, [r7, #4] 801022c: 2224 movs r2, #36 @ 0x24 801022e: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 8010232: 687b ldr r3, [r7, #4] 8010234: 681b ldr r3, [r3, #0] 8010236: 681b ldr r3, [r3, #0] 8010238: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 801023a: 687b ldr r3, [r7, #4] 801023c: 681b ldr r3, [r3, #0] 801023e: 681a ldr r2, [r3, #0] 8010240: 687b ldr r3, [r7, #4] 8010242: 681b ldr r3, [r3, #0] 8010244: f022 0201 bic.w r2, r2, #1 8010248: 601a str r2, [r3, #0] /* Enable FIFO mode */ CLEAR_BIT(tmpcr1, USART_CR1_FIFOEN); 801024a: 68fb ldr r3, [r7, #12] 801024c: f023 5300 bic.w r3, r3, #536870912 @ 0x20000000 8010250: 60fb str r3, [r7, #12] huart->FifoMode = UART_FIFOMODE_DISABLE; 8010252: 687b ldr r3, [r7, #4] 8010254: 2200 movs r2, #0 8010256: 665a str r2, [r3, #100] @ 0x64 /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 8010258: 687b ldr r3, [r7, #4] 801025a: 681b ldr r3, [r3, #0] 801025c: 68fa ldr r2, [r7, #12] 801025e: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 8010260: 687b ldr r3, [r7, #4] 8010262: 2220 movs r2, #32 8010264: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 8010268: 687b ldr r3, [r7, #4] 801026a: 2200 movs r2, #0 801026c: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 8010270: 2300 movs r3, #0 } 8010272: 4618 mov r0, r3 8010274: 3714 adds r7, #20 8010276: 46bd mov sp, r7 8010278: f85d 7b04 ldr.w r7, [sp], #4 801027c: 4770 bx lr 0801027e : * @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) { 801027e: b580 push {r7, lr} 8010280: b084 sub sp, #16 8010282: af00 add r7, sp, #0 8010284: 6078 str r0, [r7, #4] 8010286: 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); 8010288: 687b ldr r3, [r7, #4] 801028a: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 801028e: 2b01 cmp r3, #1 8010290: d101 bne.n 8010296 8010292: 2302 movs r3, #2 8010294: e02d b.n 80102f2 8010296: 687b ldr r3, [r7, #4] 8010298: 2201 movs r2, #1 801029a: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 801029e: 687b ldr r3, [r7, #4] 80102a0: 2224 movs r2, #36 @ 0x24 80102a2: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 80102a6: 687b ldr r3, [r7, #4] 80102a8: 681b ldr r3, [r3, #0] 80102aa: 681b ldr r3, [r3, #0] 80102ac: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 80102ae: 687b ldr r3, [r7, #4] 80102b0: 681b ldr r3, [r3, #0] 80102b2: 681a ldr r2, [r3, #0] 80102b4: 687b ldr r3, [r7, #4] 80102b6: 681b ldr r3, [r3, #0] 80102b8: f022 0201 bic.w r2, r2, #1 80102bc: 601a str r2, [r3, #0] /* Update TX threshold configuration */ MODIFY_REG(huart->Instance->CR3, USART_CR3_TXFTCFG, Threshold); 80102be: 687b ldr r3, [r7, #4] 80102c0: 681b ldr r3, [r3, #0] 80102c2: 689b ldr r3, [r3, #8] 80102c4: f023 4160 bic.w r1, r3, #3758096384 @ 0xe0000000 80102c8: 687b ldr r3, [r7, #4] 80102ca: 681b ldr r3, [r3, #0] 80102cc: 683a ldr r2, [r7, #0] 80102ce: 430a orrs r2, r1 80102d0: 609a str r2, [r3, #8] /* Determine the number of data to process during RX/TX ISR execution */ UARTEx_SetNbDataToProcess(huart); 80102d2: 6878 ldr r0, [r7, #4] 80102d4: f000 f8a0 bl 8010418 /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 80102d8: 687b ldr r3, [r7, #4] 80102da: 681b ldr r3, [r3, #0] 80102dc: 68fa ldr r2, [r7, #12] 80102de: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 80102e0: 687b ldr r3, [r7, #4] 80102e2: 2220 movs r2, #32 80102e4: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 80102e8: 687b ldr r3, [r7, #4] 80102ea: 2200 movs r2, #0 80102ec: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 80102f0: 2300 movs r3, #0 } 80102f2: 4618 mov r0, r3 80102f4: 3710 adds r7, #16 80102f6: 46bd mov sp, r7 80102f8: bd80 pop {r7, pc} 080102fa : * @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) { 80102fa: b580 push {r7, lr} 80102fc: b084 sub sp, #16 80102fe: af00 add r7, sp, #0 8010300: 6078 str r0, [r7, #4] 8010302: 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); 8010304: 687b ldr r3, [r7, #4] 8010306: f893 3084 ldrb.w r3, [r3, #132] @ 0x84 801030a: 2b01 cmp r3, #1 801030c: d101 bne.n 8010312 801030e: 2302 movs r3, #2 8010310: e02d b.n 801036e 8010312: 687b ldr r3, [r7, #4] 8010314: 2201 movs r2, #1 8010316: f883 2084 strb.w r2, [r3, #132] @ 0x84 huart->gState = HAL_UART_STATE_BUSY; 801031a: 687b ldr r3, [r7, #4] 801031c: 2224 movs r2, #36 @ 0x24 801031e: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Save actual UART configuration */ tmpcr1 = READ_REG(huart->Instance->CR1); 8010322: 687b ldr r3, [r7, #4] 8010324: 681b ldr r3, [r3, #0] 8010326: 681b ldr r3, [r3, #0] 8010328: 60fb str r3, [r7, #12] /* Disable UART */ __HAL_UART_DISABLE(huart); 801032a: 687b ldr r3, [r7, #4] 801032c: 681b ldr r3, [r3, #0] 801032e: 681a ldr r2, [r3, #0] 8010330: 687b ldr r3, [r7, #4] 8010332: 681b ldr r3, [r3, #0] 8010334: f022 0201 bic.w r2, r2, #1 8010338: 601a str r2, [r3, #0] /* Update RX threshold configuration */ MODIFY_REG(huart->Instance->CR3, USART_CR3_RXFTCFG, Threshold); 801033a: 687b ldr r3, [r7, #4] 801033c: 681b ldr r3, [r3, #0] 801033e: 689b ldr r3, [r3, #8] 8010340: f023 6160 bic.w r1, r3, #234881024 @ 0xe000000 8010344: 687b ldr r3, [r7, #4] 8010346: 681b ldr r3, [r3, #0] 8010348: 683a ldr r2, [r7, #0] 801034a: 430a orrs r2, r1 801034c: 609a str r2, [r3, #8] /* Determine the number of data to process during RX/TX ISR execution */ UARTEx_SetNbDataToProcess(huart); 801034e: 6878 ldr r0, [r7, #4] 8010350: f000 f862 bl 8010418 /* Restore UART configuration */ WRITE_REG(huart->Instance->CR1, tmpcr1); 8010354: 687b ldr r3, [r7, #4] 8010356: 681b ldr r3, [r3, #0] 8010358: 68fa ldr r2, [r7, #12] 801035a: 601a str r2, [r3, #0] huart->gState = HAL_UART_STATE_READY; 801035c: 687b ldr r3, [r7, #4] 801035e: 2220 movs r2, #32 8010360: f8c3 2088 str.w r2, [r3, #136] @ 0x88 /* Process Unlocked */ __HAL_UNLOCK(huart); 8010364: 687b ldr r3, [r7, #4] 8010366: 2200 movs r2, #0 8010368: f883 2084 strb.w r2, [r3, #132] @ 0x84 return HAL_OK; 801036c: 2300 movs r3, #0 } 801036e: 4618 mov r0, r3 8010370: 3710 adds r7, #16 8010372: 46bd mov sp, r7 8010374: bd80 pop {r7, pc} 08010376 : * @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) { 8010376: b580 push {r7, lr} 8010378: b08c sub sp, #48 @ 0x30 801037a: af00 add r7, sp, #0 801037c: 60f8 str r0, [r7, #12] 801037e: 60b9 str r1, [r7, #8] 8010380: 4613 mov r3, r2 8010382: 80fb strh r3, [r7, #6] HAL_StatusTypeDef status = HAL_OK; 8010384: 2300 movs r3, #0 8010386: f887 302f strb.w r3, [r7, #47] @ 0x2f /* Check that a Rx process is not already ongoing */ if (huart->RxState == HAL_UART_STATE_READY) 801038a: 68fb ldr r3, [r7, #12] 801038c: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 8010390: 2b20 cmp r3, #32 8010392: d13b bne.n 801040c { if ((pData == NULL) || (Size == 0U)) 8010394: 68bb ldr r3, [r7, #8] 8010396: 2b00 cmp r3, #0 8010398: d002 beq.n 80103a0 801039a: 88fb ldrh r3, [r7, #6] 801039c: 2b00 cmp r3, #0 801039e: d101 bne.n 80103a4 { return HAL_ERROR; 80103a0: 2301 movs r3, #1 80103a2: e034 b.n 801040e } /* Set Reception type to reception till IDLE Event*/ huart->ReceptionType = HAL_UART_RECEPTION_TOIDLE; 80103a4: 68fb ldr r3, [r7, #12] 80103a6: 2201 movs r2, #1 80103a8: 66da str r2, [r3, #108] @ 0x6c huart->RxEventType = HAL_UART_RXEVENT_TC; 80103aa: 68fb ldr r3, [r7, #12] 80103ac: 2200 movs r2, #0 80103ae: 671a str r2, [r3, #112] @ 0x70 (void)UART_Start_Receive_IT(huart, pData, Size); 80103b0: 88fb ldrh r3, [r7, #6] 80103b2: 461a mov r2, r3 80103b4: 68b9 ldr r1, [r7, #8] 80103b6: 68f8 ldr r0, [r7, #12] 80103b8: f7fe fe82 bl 800f0c0 if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE) 80103bc: 68fb ldr r3, [r7, #12] 80103be: 6edb ldr r3, [r3, #108] @ 0x6c 80103c0: 2b01 cmp r3, #1 80103c2: d11d bne.n 8010400 { __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF); 80103c4: 68fb ldr r3, [r7, #12] 80103c6: 681b ldr r3, [r3, #0] 80103c8: 2210 movs r2, #16 80103ca: 621a str r2, [r3, #32] ATOMIC_SET_BIT(huart->Instance->CR1, USART_CR1_IDLEIE); 80103cc: 68fb ldr r3, [r7, #12] 80103ce: 681b ldr r3, [r3, #0] 80103d0: 61bb str r3, [r7, #24] __ASM volatile ("ldrex %0, %1" : "=r" (result) : "Q" (*addr) ); 80103d2: 69bb ldr r3, [r7, #24] 80103d4: e853 3f00 ldrex r3, [r3] 80103d8: 617b str r3, [r7, #20] return(result); 80103da: 697b ldr r3, [r7, #20] 80103dc: f043 0310 orr.w r3, r3, #16 80103e0: 62bb str r3, [r7, #40] @ 0x28 80103e2: 68fb ldr r3, [r7, #12] 80103e4: 681b ldr r3, [r3, #0] 80103e6: 461a mov r2, r3 80103e8: 6abb ldr r3, [r7, #40] @ 0x28 80103ea: 627b str r3, [r7, #36] @ 0x24 80103ec: 623a str r2, [r7, #32] __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) ); 80103ee: 6a39 ldr r1, [r7, #32] 80103f0: 6a7a ldr r2, [r7, #36] @ 0x24 80103f2: e841 2300 strex r3, r2, [r1] 80103f6: 61fb str r3, [r7, #28] return(result); 80103f8: 69fb ldr r3, [r7, #28] 80103fa: 2b00 cmp r3, #0 80103fc: d1e6 bne.n 80103cc 80103fe: e002 b.n 8010406 { /* 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; 8010400: 2301 movs r3, #1 8010402: f887 302f strb.w r3, [r7, #47] @ 0x2f } return status; 8010406: f897 302f ldrb.w r3, [r7, #47] @ 0x2f 801040a: e000 b.n 801040e } else { return HAL_BUSY; 801040c: 2302 movs r3, #2 } } 801040e: 4618 mov r0, r3 8010410: 3730 adds r7, #48 @ 0x30 8010412: 46bd mov sp, r7 8010414: bd80 pop {r7, pc} ... 08010418 : * the UART configuration registers. * @param huart UART handle. * @retval None */ static void UARTEx_SetNbDataToProcess(UART_HandleTypeDef *huart) { 8010418: b480 push {r7} 801041a: b085 sub sp, #20 801041c: af00 add r7, sp, #0 801041e: 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) 8010420: 687b ldr r3, [r7, #4] 8010422: 6e5b ldr r3, [r3, #100] @ 0x64 8010424: 2b00 cmp r3, #0 8010426: d108 bne.n 801043a { huart->NbTxDataToProcess = 1U; 8010428: 687b ldr r3, [r7, #4] 801042a: 2201 movs r2, #1 801042c: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = 1U; 8010430: 687b ldr r3, [r7, #4] 8010432: 2201 movs r2, #1 8010434: 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]; } } 8010438: e031 b.n 801049e rx_fifo_depth = RX_FIFO_DEPTH; 801043a: 2310 movs r3, #16 801043c: 73fb strb r3, [r7, #15] tx_fifo_depth = TX_FIFO_DEPTH; 801043e: 2310 movs r3, #16 8010440: 73bb strb r3, [r7, #14] rx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_RXFTCFG) >> USART_CR3_RXFTCFG_Pos); 8010442: 687b ldr r3, [r7, #4] 8010444: 681b ldr r3, [r3, #0] 8010446: 689b ldr r3, [r3, #8] 8010448: 0e5b lsrs r3, r3, #25 801044a: b2db uxtb r3, r3 801044c: f003 0307 and.w r3, r3, #7 8010450: 737b strb r3, [r7, #13] tx_fifo_threshold = (uint8_t)(READ_BIT(huart->Instance->CR3, USART_CR3_TXFTCFG) >> USART_CR3_TXFTCFG_Pos); 8010452: 687b ldr r3, [r7, #4] 8010454: 681b ldr r3, [r3, #0] 8010456: 689b ldr r3, [r3, #8] 8010458: 0f5b lsrs r3, r3, #29 801045a: b2db uxtb r3, r3 801045c: f003 0307 and.w r3, r3, #7 8010460: 733b strb r3, [r7, #12] huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / 8010462: 7bbb ldrb r3, [r7, #14] 8010464: 7b3a ldrb r2, [r7, #12] 8010466: 4911 ldr r1, [pc, #68] @ (80104ac ) 8010468: 5c8a ldrb r2, [r1, r2] 801046a: fb02 f303 mul.w r3, r2, r3 (uint16_t)denominator[tx_fifo_threshold]; 801046e: 7b3a ldrb r2, [r7, #12] 8010470: 490f ldr r1, [pc, #60] @ (80104b0 ) 8010472: 5c8a ldrb r2, [r1, r2] huart->NbTxDataToProcess = ((uint16_t)tx_fifo_depth * numerator[tx_fifo_threshold]) / 8010474: fb93 f3f2 sdiv r3, r3, r2 8010478: b29a uxth r2, r3 801047a: 687b ldr r3, [r7, #4] 801047c: f8a3 206a strh.w r2, [r3, #106] @ 0x6a huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / 8010480: 7bfb ldrb r3, [r7, #15] 8010482: 7b7a ldrb r2, [r7, #13] 8010484: 4909 ldr r1, [pc, #36] @ (80104ac ) 8010486: 5c8a ldrb r2, [r1, r2] 8010488: fb02 f303 mul.w r3, r2, r3 (uint16_t)denominator[rx_fifo_threshold]; 801048c: 7b7a ldrb r2, [r7, #13] 801048e: 4908 ldr r1, [pc, #32] @ (80104b0 ) 8010490: 5c8a ldrb r2, [r1, r2] huart->NbRxDataToProcess = ((uint16_t)rx_fifo_depth * numerator[rx_fifo_threshold]) / 8010492: fb93 f3f2 sdiv r3, r3, r2 8010496: b29a uxth r2, r3 8010498: 687b ldr r3, [r7, #4] 801049a: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } 801049e: bf00 nop 80104a0: 3714 adds r7, #20 80104a2: 46bd mov sp, r7 80104a4: f85d 7b04 ldr.w r7, [sp], #4 80104a8: 4770 bx lr 80104aa: bf00 nop 80104ac: 08031aec .word 0x08031aec 80104b0: 08031af4 .word 0x08031af4 080104b4 : /* 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){ 80104b4: b580 push {r7, lr} 80104b6: b082 sub sp, #8 80104b8: af00 add r7, sp, #0 80104ba: 6078 str r0, [r7, #4] 80104bc: 6039 str r1, [r7, #0] tcpip_init(tcpip_init_done, arg); 80104be: 6839 ldr r1, [r7, #0] 80104c0: 6878 ldr r0, [r7, #4] 80104c2: f009 fa47 bl 8019954 LOCK_TCPIP_CORE(); 80104c6: f000 fda1 bl 801100c } 80104ca: bf00 nop 80104cc: 3708 adds r7, #8 80104ce: 46bd mov sp, r7 80104d0: bd80 pop {r7, pc} ... 080104d4 : #define tcpip_init tcpip_init_wrap uint8_t is_link_up(void) { 80104d4: b480 push {r7} 80104d6: af00 add r7, sp, #0 return netif_is_up(&gnetif); 80104d8: 4b05 ldr r3, [pc, #20] @ (80104f0 ) 80104da: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80104de: f003 0301 and.w r3, r3, #1 80104e2: b2db uxtb r3, r3 } 80104e4: 4618 mov r0, r3 80104e6: 46bd mov sp, r7 80104e8: f85d 7b04 ldr.w r7, [sp], #4 80104ec: 4770 bx lr 80104ee: bf00 nop 80104f0: 24002264 .word 0x24002264 080104f4 : /** * LwIP initialization function */ void MX_LWIP_Init(void) { 80104f4: b580 push {r7, lr} 80104f6: b084 sub sp, #16 80104f8: 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); 80104fa: 4b27 ldr r3, [pc, #156] @ (8010598 ) 80104fc: 2200 movs r2, #0 80104fe: 601a str r2, [r3, #0] ip_addr_set_zero_ip4(&netmask); 8010500: 4b26 ldr r3, [pc, #152] @ (801059c ) 8010502: 2200 movs r2, #0 8010504: 601a str r2, [r3, #0] ip_addr_set_zero_ip4(&gw); 8010506: 4b26 ldr r3, [pc, #152] @ (80105a0 ) 8010508: 2200 movs r2, #0 801050a: 601a str r2, [r3, #0] #endif /* USER CODE END IP_ADDRESSES */ /* Initilialize the LwIP stack with RTOS */ tcpip_init( NULL, NULL ); 801050c: 2100 movs r1, #0 801050e: 2000 movs r0, #0 8010510: f7ff ffd0 bl 80104b4 // 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); 8010514: 4b23 ldr r3, [pc, #140] @ (80105a4 ) 8010516: 9302 str r3, [sp, #8] 8010518: 4b23 ldr r3, [pc, #140] @ (80105a8 ) 801051a: 9301 str r3, [sp, #4] 801051c: 2300 movs r3, #0 801051e: 9300 str r3, [sp, #0] 8010520: 4b1f ldr r3, [pc, #124] @ (80105a0 ) 8010522: 4a1e ldr r2, [pc, #120] @ (801059c ) 8010524: 491c ldr r1, [pc, #112] @ (8010598 ) 8010526: 4821 ldr r0, [pc, #132] @ (80105ac ) 8010528: f00a f884 bl 801a634 /* Registers the default network interface */ netif_set_default(&gnetif); 801052c: 481f ldr r0, [pc, #124] @ (80105ac ) 801052e: f00a fa3f bl 801a9b0 if (netif_is_link_up(&gnetif)) 8010532: 4b1e ldr r3, [pc, #120] @ (80105ac ) 8010534: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8010538: 089b lsrs r3, r3, #2 801053a: f003 0301 and.w r3, r3, #1 801053e: b2db uxtb r3, r3 8010540: 2b00 cmp r3, #0 8010542: d003 beq.n 801054c { /* When the netif is fully configured this function must be called */ netif_set_up(&gnetif); 8010544: 4819 ldr r0, [pc, #100] @ (80105ac ) 8010546: f00a fa43 bl 801a9d0 801054a: e002 b.n 8010552 } else { /* When the netif link is down this function must be called */ netif_set_down(&gnetif); 801054c: 4817 ldr r0, [pc, #92] @ (80105ac ) 801054e: f00a faad bl 801aaac } /* Set the link callback function, this function is called on change of link status*/ netif_set_link_callback(&gnetif, ethernet_link_status_updated); 8010552: 4917 ldr r1, [pc, #92] @ (80105b0 ) 8010554: 4815 ldr r0, [pc, #84] @ (80105ac ) 8010556: f00a fb49 bl 801abec /* Create the Ethernet link handler thread */ /* USER CODE BEGIN H7_OS_THREAD_NEW_CMSIS_RTOS_V2 */ memset(&attributes, 0x0, sizeof(osThreadAttr_t)); 801055a: 2224 movs r2, #36 @ 0x24 801055c: 2100 movs r1, #0 801055e: 4815 ldr r0, [pc, #84] @ (80105b4 ) 8010560: f01a fb2e bl 802abc0 attributes.name = "EthLink"; 8010564: 4b13 ldr r3, [pc, #76] @ (80105b4 ) 8010566: 4a14 ldr r2, [pc, #80] @ (80105b8 ) 8010568: 601a str r2, [r3, #0] attributes.stack_size = INTERFACE_THREAD_STACK_SIZE * 2; 801056a: 4b12 ldr r3, [pc, #72] @ (80105b4 ) 801056c: f44f 6200 mov.w r2, #2048 @ 0x800 8010570: 615a str r2, [r3, #20] attributes.priority = osPriorityBelowNormal; 8010572: 4b10 ldr r3, [pc, #64] @ (80105b4 ) 8010574: 2210 movs r2, #16 8010576: 619a str r2, [r3, #24] osThreadNew(ethernet_link_thread, &gnetif, &attributes); 8010578: 4a0e ldr r2, [pc, #56] @ (80105b4 ) 801057a: 490c ldr r1, [pc, #48] @ (80105ac ) 801057c: 480f ldr r0, [pc, #60] @ (80105bc ) 801057e: f000 feee bl 801135e /* 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); 8010582: 480a ldr r0, [pc, #40] @ (80105ac ) 8010584: f00a fa24 bl 801a9d0 dhcp_start(&gnetif); 8010588: 4808 ldr r0, [pc, #32] @ (80105ac ) 801058a: f012 fd11 bl 8022fb0 #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(); 801058e: f000 fd4d bl 801102c /* USER CODE END 3 */ } 8010592: bf00 nop 8010594: 46bd mov sp, r7 8010596: bd80 pop {r7, pc} 8010598: 2400229c .word 0x2400229c 801059c: 240022a0 .word 0x240022a0 80105a0: 240022a4 .word 0x240022a4 80105a4: 0801986d .word 0x0801986d 80105a8: 08010a75 .word 0x08010a75 80105ac: 24002264 .word 0x24002264 80105b0: 080105c1 .word 0x080105c1 80105b4: 240022a8 .word 0x240022a8 80105b8: 0802da08 .word 0x0802da08 80105bc: 08010d45 .word 0x08010d45 080105c0 : * @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) { 80105c0: b480 push {r7} 80105c2: b083 sub sp, #12 80105c4: af00 add r7, sp, #0 80105c6: 6078 str r0, [r7, #4] else /* netif is down */ { /* USER CODE BEGIN 6 */ /* USER CODE END 6 */ } } 80105c8: bf00 nop 80105ca: 370c adds r7, #12 80105cc: 46bd mov sp, r7 80105ce: f85d 7b04 ldr.w r7, [sp], #4 80105d2: 4770 bx lr 080105d4 : * @brief Ethernet Rx Transfer completed callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *handlerEth) { 80105d4: b580 push {r7, lr} 80105d6: b082 sub sp, #8 80105d8: af00 add r7, sp, #0 80105da: 6078 str r0, [r7, #4] osSemaphoreRelease(RxPktSemaphore); 80105dc: 4b04 ldr r3, [pc, #16] @ (80105f0 ) 80105de: 681b ldr r3, [r3, #0] 80105e0: 4618 mov r0, r3 80105e2: f001 fa55 bl 8011a90 } 80105e6: bf00 nop 80105e8: 3708 adds r7, #8 80105ea: 46bd mov sp, r7 80105ec: bd80 pop {r7, pc} 80105ee: bf00 nop 80105f0: 240022d4 .word 0x240022d4 080105f4 : * @brief Ethernet Tx Transfer completed callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *handlerEth) { 80105f4: b580 push {r7, lr} 80105f6: b082 sub sp, #8 80105f8: af00 add r7, sp, #0 80105fa: 6078 str r0, [r7, #4] osSemaphoreRelease(TxPktSemaphore); 80105fc: 4b04 ldr r3, [pc, #16] @ (8010610 ) 80105fe: 681b ldr r3, [r3, #0] 8010600: 4618 mov r0, r3 8010602: f001 fa45 bl 8011a90 } 8010606: bf00 nop 8010608: 3708 adds r7, #8 801060a: 46bd mov sp, r7 801060c: bd80 pop {r7, pc} 801060e: bf00 nop 8010610: 240022d8 .word 0x240022d8 08010614 : * @brief Ethernet DMA transfer error callback * @param handlerEth: ETH handler * @retval None */ void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *handlerEth) { 8010614: b580 push {r7, lr} 8010616: b082 sub sp, #8 8010618: af00 add r7, sp, #0 801061a: 6078 str r0, [r7, #4] if((HAL_ETH_GetDMAError(handlerEth) & ETH_DMACSR_RBU) == ETH_DMACSR_RBU) 801061c: 6878 ldr r0, [r7, #4] 801061e: f7f8 fead bl 800937c 8010622: 4603 mov r3, r0 8010624: f003 0380 and.w r3, r3, #128 @ 0x80 8010628: 2b80 cmp r3, #128 @ 0x80 801062a: d104 bne.n 8010636 { osSemaphoreRelease(RxPktSemaphore); 801062c: 4b04 ldr r3, [pc, #16] @ (8010640 ) 801062e: 681b ldr r3, [r3, #0] 8010630: 4618 mov r0, r3 8010632: f001 fa2d bl 8011a90 } } 8010636: bf00 nop 8010638: 3708 adds r7, #8 801063a: 46bd mov sp, r7 801063c: bd80 pop {r7, pc} 801063e: bf00 nop 8010640: 240022d4 .word 0x240022d4 08010644 : * * @param netif the already initialized lwip network interface structure * for this ethernetif */ static void low_level_init(struct netif *netif) { 8010644: b580 push {r7, lr} 8010646: b0aa sub sp, #168 @ 0xa8 8010648: af00 add r7, sp, #0 801064a: 6078 str r0, [r7, #4] HAL_StatusTypeDef hal_eth_init_status = HAL_OK; 801064c: 2300 movs r3, #0 801064e: 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; 8010652: 2300 movs r3, #0 8010654: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 int32_t PHYLinkState = 0; 8010658: 2300 movs r3, #0 801065a: f8c7 3098 str.w r3, [r7, #152] @ 0x98 ETH_MACConfigTypeDef MACConf = {0}; 801065e: f107 0310 add.w r3, r7, #16 8010662: 2264 movs r2, #100 @ 0x64 8010664: 2100 movs r1, #0 8010666: 4618 mov r0, r3 8010668: f01a faaa bl 802abc0 /* Start ETH HAL Init */ uint8_t MACAddr[6] ; heth.Instance = ETH; 801066c: 4b86 ldr r3, [pc, #536] @ (8010888 ) 801066e: 4a87 ldr r2, [pc, #540] @ (801088c ) 8010670: 601a str r2, [r3, #0] // MACAddr[1] = 0x80; // MACAddr[2] = 0xE1; // MACAddr[3] = 0x00; // MACAddr[4] = 0x00; // MACAddr[5] = 0x00; MACAddr[0] = 0x7C; 8010672: 237c movs r3, #124 @ 0x7c 8010674: 723b strb r3, [r7, #8] MACAddr[1] = 0xF6; 8010676: 23f6 movs r3, #246 @ 0xf6 8010678: 727b strb r3, [r7, #9] MACAddr[2] = 0x66; 801067a: 2366 movs r3, #102 @ 0x66 801067c: 72bb strb r3, [r7, #10] MACAddr[3] = 0xE4; 801067e: 23e4 movs r3, #228 @ 0xe4 8010680: 72fb strb r3, [r7, #11] MACAddr[4] = 0xB5; 8010682: 23b5 movs r3, #181 @ 0xb5 8010684: 733b strb r3, [r7, #12] MACAddr[5] = 0x41; 8010686: 2341 movs r3, #65 @ 0x41 8010688: 737b strb r3, [r7, #13] heth.Init.MACAddr = &MACAddr[0]; 801068a: 4a7f ldr r2, [pc, #508] @ (8010888 ) 801068c: f107 0308 add.w r3, r7, #8 8010690: 6053 str r3, [r2, #4] heth.Init.MediaInterface = HAL_ETH_MII_MODE; 8010692: 4b7d ldr r3, [pc, #500] @ (8010888 ) 8010694: 2200 movs r2, #0 8010696: 721a strb r2, [r3, #8] heth.Init.TxDesc = DMATxDscrTab; 8010698: 4b7b ldr r3, [pc, #492] @ (8010888 ) 801069a: 4a7d ldr r2, [pc, #500] @ (8010890 ) 801069c: 60da str r2, [r3, #12] heth.Init.RxDesc = DMARxDscrTab; 801069e: 4b7a ldr r3, [pc, #488] @ (8010888 ) 80106a0: 4a7c ldr r2, [pc, #496] @ (8010894 ) 80106a2: 611a str r2, [r3, #16] heth.Init.RxBuffLen = 1536; 80106a4: 4b78 ldr r3, [pc, #480] @ (8010888 ) 80106a6: f44f 62c0 mov.w r2, #1536 @ 0x600 80106aa: 615a str r2, [r3, #20] /* USER CODE BEGIN MACADDRESS */ /* USER CODE END MACADDRESS */ hal_eth_init_status = HAL_ETH_Init(&heth); 80106ac: 4876 ldr r0, [pc, #472] @ (8010888 ) 80106ae: f7f7 fe99 bl 80083e4 80106b2: 4603 mov r3, r0 80106b4: f887 309f strb.w r3, [r7, #159] @ 0x9f memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfig)); 80106b8: 2238 movs r2, #56 @ 0x38 80106ba: 2100 movs r1, #0 80106bc: 4876 ldr r0, [pc, #472] @ (8010898 ) 80106be: f01a fa7f bl 802abc0 TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD; 80106c2: 4b75 ldr r3, [pc, #468] @ (8010898 ) 80106c4: 2221 movs r2, #33 @ 0x21 80106c6: 601a str r2, [r3, #0] TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC; 80106c8: 4b73 ldr r3, [pc, #460] @ (8010898 ) 80106ca: f44f 3240 mov.w r2, #196608 @ 0x30000 80106ce: 615a str r2, [r3, #20] TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT; 80106d0: 4b71 ldr r3, [pc, #452] @ (8010898 ) 80106d2: 2200 movs r2, #0 80106d4: 611a str r2, [r3, #16] /* End ETH HAL Init */ /* Initialize the RX POOL */ LWIP_MEMPOOL_INIT(RX_POOL); 80106d6: 4871 ldr r0, [pc, #452] @ (801089c ) 80106d8: f009 fe66 bl 801a3a8 #if LWIP_ARP || LWIP_ETHERNET /* set MAC hardware address length */ netif->hwaddr_len = ETH_HWADDR_LEN; 80106dc: 687b ldr r3, [r7, #4] 80106de: 2206 movs r2, #6 80106e0: f883 2030 strb.w r2, [r3, #48] @ 0x30 /* set MAC hardware address */ netif->hwaddr[0] = heth.Init.MACAddr[0]; 80106e4: 4b68 ldr r3, [pc, #416] @ (8010888 ) 80106e6: 685b ldr r3, [r3, #4] 80106e8: 781a ldrb r2, [r3, #0] 80106ea: 687b ldr r3, [r7, #4] 80106ec: f883 202a strb.w r2, [r3, #42] @ 0x2a netif->hwaddr[1] = heth.Init.MACAddr[1]; 80106f0: 4b65 ldr r3, [pc, #404] @ (8010888 ) 80106f2: 685b ldr r3, [r3, #4] 80106f4: 785a ldrb r2, [r3, #1] 80106f6: 687b ldr r3, [r7, #4] 80106f8: f883 202b strb.w r2, [r3, #43] @ 0x2b netif->hwaddr[2] = heth.Init.MACAddr[2]; 80106fc: 4b62 ldr r3, [pc, #392] @ (8010888 ) 80106fe: 685b ldr r3, [r3, #4] 8010700: 789a ldrb r2, [r3, #2] 8010702: 687b ldr r3, [r7, #4] 8010704: f883 202c strb.w r2, [r3, #44] @ 0x2c netif->hwaddr[3] = heth.Init.MACAddr[3]; 8010708: 4b5f ldr r3, [pc, #380] @ (8010888 ) 801070a: 685b ldr r3, [r3, #4] 801070c: 78da ldrb r2, [r3, #3] 801070e: 687b ldr r3, [r7, #4] 8010710: f883 202d strb.w r2, [r3, #45] @ 0x2d netif->hwaddr[4] = heth.Init.MACAddr[4]; 8010714: 4b5c ldr r3, [pc, #368] @ (8010888 ) 8010716: 685b ldr r3, [r3, #4] 8010718: 791a ldrb r2, [r3, #4] 801071a: 687b ldr r3, [r7, #4] 801071c: f883 202e strb.w r2, [r3, #46] @ 0x2e netif->hwaddr[5] = heth.Init.MACAddr[5]; 8010720: 4b59 ldr r3, [pc, #356] @ (8010888 ) 8010722: 685b ldr r3, [r3, #4] 8010724: 795a ldrb r2, [r3, #5] 8010726: 687b ldr r3, [r7, #4] 8010728: f883 202f strb.w r2, [r3, #47] @ 0x2f /* maximum transfer unit */ netif->mtu = ETH_MAX_PAYLOAD; 801072c: 687b ldr r3, [r7, #4] 801072e: f240 52dc movw r2, #1500 @ 0x5dc 8010732: 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; 8010734: 687b ldr r3, [r7, #4] 8010736: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801073a: f043 030a orr.w r3, r3, #10 801073e: b2da uxtb r2, r3 8010740: 687b ldr r3, [r7, #4] 8010742: 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); 8010746: 2200 movs r2, #0 8010748: 2101 movs r1, #1 801074a: 2001 movs r0, #1 801074c: f001 f8c5 bl 80118da 8010750: 4603 mov r3, r0 8010752: 4a53 ldr r2, [pc, #332] @ (80108a0 ) 8010754: 6013 str r3, [r2, #0] /* create a binary semaphore used for informing ethernetif of frame transmission */ TxPktSemaphore = osSemaphoreNew(1, 1, NULL); 8010756: 2200 movs r2, #0 8010758: 2101 movs r1, #1 801075a: 2001 movs r0, #1 801075c: f001 f8bd bl 80118da 8010760: 4603 mov r3, r0 8010762: 4a50 ldr r2, [pc, #320] @ (80108a4 ) 8010764: 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)); 8010766: f107 0374 add.w r3, r7, #116 @ 0x74 801076a: 2224 movs r2, #36 @ 0x24 801076c: 2100 movs r1, #0 801076e: 4618 mov r0, r3 8010770: f01a fa26 bl 802abc0 attributes.name = "EthIf"; 8010774: 4b4c ldr r3, [pc, #304] @ (80108a8 ) 8010776: 677b str r3, [r7, #116] @ 0x74 attributes.stack_size = INTERFACE_THREAD_STACK_SIZE; 8010778: f44f 6380 mov.w r3, #1024 @ 0x400 801077c: f8c7 3088 str.w r3, [r7, #136] @ 0x88 attributes.priority = osPriorityRealtime; 8010780: 2330 movs r3, #48 @ 0x30 8010782: f8c7 308c str.w r3, [r7, #140] @ 0x8c osThreadNew(ethernetif_input, netif, &attributes); 8010786: f107 0374 add.w r3, r7, #116 @ 0x74 801078a: 461a mov r2, r3 801078c: 6879 ldr r1, [r7, #4] 801078e: 4847 ldr r0, [pc, #284] @ (80108ac ) 8010790: f000 fde5 bl 801135e /* USER CODE BEGIN PHY_PRE_CONFIG */ /* USER CODE END PHY_PRE_CONFIG */ /* Set PHY IO functions */ DP83848_RegisterBusIO(&DP83848, &DP83848_IOCtx); 8010794: 4946 ldr r1, [pc, #280] @ (80108b0 ) 8010796: 4847 ldr r0, [pc, #284] @ (80108b4 ) 8010798: f7f4 fef9 bl 800558e /* Initialize the DP83848 ETH PHY */ DP83848_Init(&DP83848); 801079c: 4845 ldr r0, [pc, #276] @ (80108b4 ) 801079e: f7f4 ff28 bl 80055f2 if (hal_eth_init_status == HAL_OK) 80107a2: f897 309f ldrb.w r3, [r7, #159] @ 0x9f 80107a6: 2b00 cmp r3, #0 80107a8: d168 bne.n 801087c { PHYLinkState = DP83848_GetLinkState(&DP83848); 80107aa: 4842 ldr r0, [pc, #264] @ (80108b4 ) 80107ac: f7f4 ff6e bl 800568c 80107b0: f8c7 0098 str.w r0, [r7, #152] @ 0x98 /* Get link state */ if(PHYLinkState <= DP83848_STATUS_LINK_DOWN) 80107b4: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 80107b8: 2b01 cmp r3, #1 80107ba: dc06 bgt.n 80107ca { netif_set_link_down(netif); 80107bc: 6878 ldr r0, [r7, #4] 80107be: f00a f9e3 bl 801ab88 netif_set_down(netif); 80107c2: 6878 ldr r0, [r7, #4] 80107c4: f00a f972 bl 801aaac #endif /* LWIP_ARP || LWIP_ETHERNET */ /* USER CODE BEGIN LOW_LEVEL_INIT */ /* USER CODE END LOW_LEVEL_INIT */ } 80107c8: e05a b.n 8010880 switch (PHYLinkState) 80107ca: f8d7 3098 ldr.w r3, [r7, #152] @ 0x98 80107ce: 3b02 subs r3, #2 80107d0: 2b03 cmp r3, #3 80107d2: d82b bhi.n 801082c 80107d4: a201 add r2, pc, #4 @ (adr r2, 80107dc ) 80107d6: f852 f023 ldr.w pc, [r2, r3, lsl #2] 80107da: bf00 nop 80107dc: 080107ed .word 0x080107ed 80107e0: 080107ff .word 0x080107ff 80107e4: 0801080f .word 0x0801080f 80107e8: 0801081f .word 0x0801081f duplex = ETH_FULLDUPLEX_MODE; 80107ec: f44f 5300 mov.w r3, #8192 @ 0x2000 80107f0: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 80107f4: f44f 4380 mov.w r3, #16384 @ 0x4000 80107f8: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 80107fc: e01f b.n 801083e duplex = ETH_HALFDUPLEX_MODE; 80107fe: 2300 movs r3, #0 8010800: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 8010804: f44f 4380 mov.w r3, #16384 @ 0x4000 8010808: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 801080c: e017 b.n 801083e duplex = ETH_FULLDUPLEX_MODE; 801080e: f44f 5300 mov.w r3, #8192 @ 0x2000 8010812: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_10M; 8010816: 2300 movs r3, #0 8010818: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 801081c: e00f b.n 801083e duplex = ETH_HALFDUPLEX_MODE; 801081e: 2300 movs r3, #0 8010820: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_10M; 8010824: 2300 movs r3, #0 8010826: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 801082a: e008 b.n 801083e duplex = ETH_FULLDUPLEX_MODE; 801082c: f44f 5300 mov.w r3, #8192 @ 0x2000 8010830: f8c7 30a4 str.w r3, [r7, #164] @ 0xa4 speed = ETH_SPEED_100M; 8010834: f44f 4380 mov.w r3, #16384 @ 0x4000 8010838: f8c7 30a0 str.w r3, [r7, #160] @ 0xa0 break; 801083c: bf00 nop HAL_ETH_GetMACConfig(&heth, &MACConf); 801083e: f107 0310 add.w r3, r7, #16 8010842: 4619 mov r1, r3 8010844: 4810 ldr r0, [pc, #64] @ (8010888 ) 8010846: f7f8 fb5b bl 8008f00 MACConf.DuplexMode = duplex; 801084a: f8d7 30a4 ldr.w r3, [r7, #164] @ 0xa4 801084e: 62bb str r3, [r7, #40] @ 0x28 MACConf.Speed = speed; 8010850: f8d7 30a0 ldr.w r3, [r7, #160] @ 0xa0 8010854: 627b str r3, [r7, #36] @ 0x24 HAL_ETH_SetMACConfig(&heth, &MACConf); 8010856: f107 0310 add.w r3, r7, #16 801085a: 4619 mov r1, r3 801085c: 480a ldr r0, [pc, #40] @ (8010888 ) 801085e: f7f8 fd23 bl 80092a8 HAL_ETH_Start_IT(&heth); 8010862: 4809 ldr r0, [pc, #36] @ (8010888 ) 8010864: f7f7 febc bl 80085e0 netif_set_up(netif); 8010868: 6878 ldr r0, [r7, #4] 801086a: f00a f8b1 bl 801a9d0 netif_set_link_up(netif); 801086e: 6878 ldr r0, [r7, #4] 8010870: f00a f950 bl 801ab14 ethernetif_notify_conn_changed(netif); 8010874: 6878 ldr r0, [r7, #4] 8010876: f000 fb1b bl 8010eb0 } 801087a: e001 b.n 8010880 Error_Handler(); 801087c: f7f1 ff68 bl 8002750 } 8010880: bf00 nop 8010882: 37a8 adds r7, #168 @ 0xa8 8010884: 46bd mov sp, r7 8010886: bd80 pop {r7, pc} 8010888: 240022dc .word 0x240022dc 801088c: 40028000 .word 0x40028000 8010890: 24040100 .word 0x24040100 8010894: 24040000 .word 0x24040000 8010898: 2400238c .word 0x2400238c 801089c: 08031afc .word 0x08031afc 80108a0: 240022d4 .word 0x240022d4 80108a4: 240022d8 .word 0x240022d8 80108a8: 0802da28 .word 0x0802da28 80108ac: 08010a21 .word 0x08010a21 80108b0: 24000034 .word 0x24000034 80108b4: 240023c4 .word 0x240023c4 080108b8 : * 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) { 80108b8: b580 push {r7, lr} 80108ba: b092 sub sp, #72 @ 0x48 80108bc: af00 add r7, sp, #0 80108be: 6078 str r0, [r7, #4] 80108c0: 6039 str r1, [r7, #0] uint32_t i = 0U; 80108c2: 2300 movs r3, #0 80108c4: 647b str r3, [r7, #68] @ 0x44 struct pbuf *q = NULL; 80108c6: 2300 movs r3, #0 80108c8: 643b str r3, [r7, #64] @ 0x40 err_t errval = ERR_OK; 80108ca: 2300 movs r3, #0 80108cc: f887 303f strb.w r3, [r7, #63] @ 0x3f ETH_BufferTypeDef Txbuffer[ETH_TX_DESC_CNT] = {0}; 80108d0: f107 030c add.w r3, r7, #12 80108d4: 2230 movs r2, #48 @ 0x30 80108d6: 2100 movs r1, #0 80108d8: 4618 mov r0, r3 80108da: f01a f971 bl 802abc0 memset(Txbuffer, 0 , ETH_TX_DESC_CNT*sizeof(ETH_BufferTypeDef)); 80108de: f107 030c add.w r3, r7, #12 80108e2: 2230 movs r2, #48 @ 0x30 80108e4: 2100 movs r1, #0 80108e6: 4618 mov r0, r3 80108e8: f01a f96a bl 802abc0 for(q = p; q != NULL; q = q->next) 80108ec: 683b ldr r3, [r7, #0] 80108ee: 643b str r3, [r7, #64] @ 0x40 80108f0: e045 b.n 801097e { if(i >= ETH_TX_DESC_CNT) 80108f2: 6c7b ldr r3, [r7, #68] @ 0x44 80108f4: 2b03 cmp r3, #3 80108f6: d902 bls.n 80108fe return ERR_IF; 80108f8: f06f 030b mvn.w r3, #11 80108fc: e06c b.n 80109d8 Txbuffer[i].buffer = q->payload; 80108fe: 6c3b ldr r3, [r7, #64] @ 0x40 8010900: 6859 ldr r1, [r3, #4] 8010902: 6c7a ldr r2, [r7, #68] @ 0x44 8010904: 4613 mov r3, r2 8010906: 005b lsls r3, r3, #1 8010908: 4413 add r3, r2 801090a: 009b lsls r3, r3, #2 801090c: 3348 adds r3, #72 @ 0x48 801090e: 443b add r3, r7 8010910: 3b3c subs r3, #60 @ 0x3c 8010912: 6019 str r1, [r3, #0] Txbuffer[i].len = q->len; 8010914: 6c3b ldr r3, [r7, #64] @ 0x40 8010916: 895b ldrh r3, [r3, #10] 8010918: 4619 mov r1, r3 801091a: 6c7a ldr r2, [r7, #68] @ 0x44 801091c: 4613 mov r3, r2 801091e: 005b lsls r3, r3, #1 8010920: 4413 add r3, r2 8010922: 009b lsls r3, r3, #2 8010924: 3348 adds r3, #72 @ 0x48 8010926: 443b add r3, r7 8010928: 3b38 subs r3, #56 @ 0x38 801092a: 6019 str r1, [r3, #0] if(i>0) 801092c: 6c7b ldr r3, [r7, #68] @ 0x44 801092e: 2b00 cmp r3, #0 8010930: d011 beq.n 8010956 { Txbuffer[i-1].next = &Txbuffer[i]; 8010932: 6c7b ldr r3, [r7, #68] @ 0x44 8010934: 1e5a subs r2, r3, #1 8010936: f107 000c add.w r0, r7, #12 801093a: 6c79 ldr r1, [r7, #68] @ 0x44 801093c: 460b mov r3, r1 801093e: 005b lsls r3, r3, #1 8010940: 440b add r3, r1 8010942: 009b lsls r3, r3, #2 8010944: 18c1 adds r1, r0, r3 8010946: 4613 mov r3, r2 8010948: 005b lsls r3, r3, #1 801094a: 4413 add r3, r2 801094c: 009b lsls r3, r3, #2 801094e: 3348 adds r3, #72 @ 0x48 8010950: 443b add r3, r7 8010952: 3b34 subs r3, #52 @ 0x34 8010954: 6019 str r1, [r3, #0] } if(q->next == NULL) 8010956: 6c3b ldr r3, [r7, #64] @ 0x40 8010958: 681b ldr r3, [r3, #0] 801095a: 2b00 cmp r3, #0 801095c: d109 bne.n 8010972 { Txbuffer[i].next = NULL; 801095e: 6c7a ldr r2, [r7, #68] @ 0x44 8010960: 4613 mov r3, r2 8010962: 005b lsls r3, r3, #1 8010964: 4413 add r3, r2 8010966: 009b lsls r3, r3, #2 8010968: 3348 adds r3, #72 @ 0x48 801096a: 443b add r3, r7 801096c: 3b34 subs r3, #52 @ 0x34 801096e: 2200 movs r2, #0 8010970: 601a str r2, [r3, #0] } i++; 8010972: 6c7b ldr r3, [r7, #68] @ 0x44 8010974: 3301 adds r3, #1 8010976: 647b str r3, [r7, #68] @ 0x44 for(q = p; q != NULL; q = q->next) 8010978: 6c3b ldr r3, [r7, #64] @ 0x40 801097a: 681b ldr r3, [r3, #0] 801097c: 643b str r3, [r7, #64] @ 0x40 801097e: 6c3b ldr r3, [r7, #64] @ 0x40 8010980: 2b00 cmp r3, #0 8010982: d1b6 bne.n 80108f2 } TxConfig.Length = p->tot_len; 8010984: 683b ldr r3, [r7, #0] 8010986: 891b ldrh r3, [r3, #8] 8010988: 461a mov r2, r3 801098a: 4b15 ldr r3, [pc, #84] @ (80109e0 ) 801098c: 605a str r2, [r3, #4] TxConfig.TxBuffer = Txbuffer; 801098e: 4a14 ldr r2, [pc, #80] @ (80109e0 ) 8010990: f107 030c add.w r3, r7, #12 8010994: 6093 str r3, [r2, #8] TxConfig.pData = p; 8010996: 4a12 ldr r2, [pc, #72] @ (80109e0 ) 8010998: 683b ldr r3, [r7, #0] 801099a: 6353 str r3, [r2, #52] @ 0x34 pbuf_ref(p); 801099c: 6838 ldr r0, [r7, #0] 801099e: f00a fdab bl 801b4f8 #if 1 if (HAL_ETH_Transmit_IT(&heth, &TxConfig) == HAL_OK) { 80109a2: 490f ldr r1, [pc, #60] @ (80109e0 ) 80109a4: 480f ldr r0, [pc, #60] @ (80109e4 ) 80109a6: f7f7 ff07 bl 80087b8 80109aa: 4603 mov r3, r0 80109ac: 2b00 cmp r3, #0 80109ae: d10e bne.n 80109ce while(osSemaphoreAcquire(TxPktSemaphore, TIME_WAITING_FOR_INPUT)!=osOK) 80109b0: bf00 nop 80109b2: 4b0d ldr r3, [pc, #52] @ (80109e8 ) 80109b4: 681b ldr r3, [r3, #0] 80109b6: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80109ba: 4618 mov r0, r3 80109bc: f001 f816 bl 80119ec 80109c0: 4603 mov r3, r0 80109c2: 2b00 cmp r3, #0 80109c4: d1f5 bne.n 80109b2 { } // osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(1000)); HAL_ETH_ReleaseTxPacket(&heth); 80109c6: 4807 ldr r0, [pc, #28] @ (80109e4 ) 80109c8: f7f8 f87d bl 8008ac6 80109cc: e002 b.n 80109d4 } else { pbuf_free(p); 80109ce: 6838 ldr r0, [r7, #0] 80109d0: f00a fcec bl 801b3ac HAL_ETH_Transmit_IT(&heth, &TxConfig); osSemaphoreAcquire(TxPktSemaphore, pdMS_TO_TICKS(100)); HAL_ETH_ReleaseTxPacket(&heth); #endif return errval; 80109d4: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f } 80109d8: 4618 mov r0, r3 80109da: 3748 adds r7, #72 @ 0x48 80109dc: 46bd mov sp, r7 80109de: bd80 pop {r7, pc} 80109e0: 2400238c .word 0x2400238c 80109e4: 240022dc .word 0x240022dc 80109e8: 240022d8 .word 0x240022d8 080109ec : * @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) { 80109ec: b580 push {r7, lr} 80109ee: b084 sub sp, #16 80109f0: af00 add r7, sp, #0 80109f2: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 80109f4: 2300 movs r3, #0 80109f6: 60fb str r3, [r7, #12] if(RxAllocStatus == RX_ALLOC_OK) 80109f8: 4b07 ldr r3, [pc, #28] @ (8010a18 ) 80109fa: 781b ldrb r3, [r3, #0] 80109fc: 2b00 cmp r3, #0 80109fe: d105 bne.n 8010a0c { HAL_ETH_ReadData(&heth, (void **)&p); 8010a00: f107 030c add.w r3, r7, #12 8010a04: 4619 mov r1, r3 8010a06: 4805 ldr r0, [pc, #20] @ (8010a1c ) 8010a08: f7f7 ff27 bl 800885a } return p; 8010a0c: 68fb ldr r3, [r7, #12] } 8010a0e: 4618 mov r0, r3 8010a10: 3710 adds r7, #16 8010a12: 46bd mov sp, r7 8010a14: bd80 pop {r7, pc} 8010a16: bf00 nop 8010a18: 240022d0 .word 0x240022d0 8010a1c: 240022dc .word 0x240022dc 08010a20 : * the appropriate input function is called. * * @param netif the lwip network interface structure for this ethernetif */ void ethernetif_input(void* argument) { 8010a20: b580 push {r7, lr} 8010a22: b084 sub sp, #16 8010a24: af00 add r7, sp, #0 8010a26: 6078 str r0, [r7, #4] struct pbuf *p = NULL; 8010a28: 2300 movs r3, #0 8010a2a: 60fb str r3, [r7, #12] struct netif *netif = (struct netif *) argument; 8010a2c: 687b ldr r3, [r7, #4] 8010a2e: 60bb str r3, [r7, #8] for( ;; ) { if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK) 8010a30: 4b0f ldr r3, [pc, #60] @ (8010a70 ) 8010a32: 681b ldr r3, [r3, #0] 8010a34: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8010a38: 4618 mov r0, r3 8010a3a: f000 ffd7 bl 80119ec 8010a3e: 4603 mov r3, r0 8010a40: 2b00 cmp r3, #0 8010a42: d1f5 bne.n 8010a30 { do { p = low_level_input( netif ); 8010a44: 68b8 ldr r0, [r7, #8] 8010a46: f7ff ffd1 bl 80109ec 8010a4a: 60f8 str r0, [r7, #12] if (p != NULL) 8010a4c: 68fb ldr r3, [r7, #12] 8010a4e: 2b00 cmp r3, #0 8010a50: d00a beq.n 8010a68 { if (netif->input( p, netif) != ERR_OK ) 8010a52: 68bb ldr r3, [r7, #8] 8010a54: 691b ldr r3, [r3, #16] 8010a56: 68b9 ldr r1, [r7, #8] 8010a58: 68f8 ldr r0, [r7, #12] 8010a5a: 4798 blx r3 8010a5c: 4603 mov r3, r0 8010a5e: 2b00 cmp r3, #0 8010a60: d002 beq.n 8010a68 { pbuf_free(p); 8010a62: 68f8 ldr r0, [r7, #12] 8010a64: f00a fca2 bl 801b3ac } } } while(p!=NULL); 8010a68: 68fb ldr r3, [r7, #12] 8010a6a: 2b00 cmp r3, #0 8010a6c: d1ea bne.n 8010a44 if (osSemaphoreAcquire(RxPktSemaphore, TIME_WAITING_FOR_INPUT) == osOK) 8010a6e: e7df b.n 8010a30 8010a70: 240022d4 .word 0x240022d4 08010a74 : * @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) { 8010a74: b580 push {r7, lr} 8010a76: b082 sub sp, #8 8010a78: af00 add r7, sp, #0 8010a7a: 6078 str r0, [r7, #4] LWIP_ASSERT("netif != NULL", (netif != NULL)); 8010a7c: 687b ldr r3, [r7, #4] 8010a7e: 2b00 cmp r3, #0 8010a80: d106 bne.n 8010a90 8010a82: 4b0e ldr r3, [pc, #56] @ (8010abc ) 8010a84: f240 2235 movw r2, #565 @ 0x235 8010a88: 490d ldr r1, [pc, #52] @ (8010ac0 ) 8010a8a: 480e ldr r0, [pc, #56] @ (8010ac4 ) 8010a8c: f019 ff06 bl 802a89c * 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; 8010a90: 687b ldr r3, [r7, #4] 8010a92: 2273 movs r2, #115 @ 0x73 8010a94: f883 2032 strb.w r2, [r3, #50] @ 0x32 netif->name[1] = IFNAME1; 8010a98: 687b ldr r3, [r7, #4] 8010a9a: 2274 movs r2, #116 @ 0x74 8010a9c: 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; 8010aa0: 687b ldr r3, [r7, #4] 8010aa2: 4a09 ldr r2, [pc, #36] @ (8010ac8 ) 8010aa4: 615a str r2, [r3, #20] #if LWIP_IPV6 netif->output_ip6 = ethip6_output; #endif /* LWIP_IPV6 */ netif->linkoutput = low_level_output; 8010aa6: 687b ldr r3, [r7, #4] 8010aa8: 4a08 ldr r2, [pc, #32] @ (8010acc ) 8010aaa: 619a str r2, [r3, #24] /* initialize the hardware */ low_level_init(netif); 8010aac: 6878 ldr r0, [r7, #4] 8010aae: f7ff fdc9 bl 8010644 return ERR_OK; 8010ab2: 2300 movs r3, #0 } 8010ab4: 4618 mov r0, r3 8010ab6: 3708 adds r7, #8 8010ab8: 46bd mov sp, r7 8010aba: bd80 pop {r7, pc} 8010abc: 0802da30 .word 0x0802da30 8010ac0: 0802da4c .word 0x0802da4c 8010ac4: 0802da5c .word 0x0802da5c 8010ac8: 08024f0d .word 0x08024f0d 8010acc: 080108b9 .word 0x080108b9 08010ad0 : * @brief Custom Rx pbuf free callback * @param pbuf: pbuf to be freed * @retval None */ void pbuf_free_custom(struct pbuf *p) { 8010ad0: b580 push {r7, lr} 8010ad2: b084 sub sp, #16 8010ad4: af00 add r7, sp, #0 8010ad6: 6078 str r0, [r7, #4] struct pbuf_custom* custom_pbuf = (struct pbuf_custom*)p; 8010ad8: 687b ldr r3, [r7, #4] 8010ada: 60fb str r3, [r7, #12] LWIP_MEMPOOL_FREE(RX_POOL, custom_pbuf); 8010adc: 68f9 ldr r1, [r7, #12] 8010ade: 4809 ldr r0, [pc, #36] @ (8010b04 ) 8010ae0: f009 fd52 bl 801a588 /* 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) 8010ae4: 4b08 ldr r3, [pc, #32] @ (8010b08 ) 8010ae6: 781b ldrb r3, [r3, #0] 8010ae8: 2b01 cmp r3, #1 8010aea: d107 bne.n 8010afc { RxAllocStatus = RX_ALLOC_OK; 8010aec: 4b06 ldr r3, [pc, #24] @ (8010b08 ) 8010aee: 2200 movs r2, #0 8010af0: 701a strb r2, [r3, #0] osSemaphoreRelease(RxPktSemaphore); 8010af2: 4b06 ldr r3, [pc, #24] @ (8010b0c ) 8010af4: 681b ldr r3, [r3, #0] 8010af6: 4618 mov r0, r3 8010af8: f000 ffca bl 8011a90 } } 8010afc: bf00 nop 8010afe: 3710 adds r7, #16 8010b00: 46bd mov sp, r7 8010b02: bd80 pop {r7, pc} 8010b04: 08031afc .word 0x08031afc 8010b08: 240022d0 .word 0x240022d0 8010b0c: 240022d4 .word 0x240022d4 08010b10 : * when LWIP_TIMERS == 1 and NO_SYS == 1 * @param None * @retval Current Time value */ u32_t sys_now(void) { 8010b10: b580 push {r7, lr} 8010b12: af00 add r7, sp, #0 return HAL_GetTick(); 8010b14: f7f4 fe92 bl 800583c 8010b18: 4603 mov r3, r0 } 8010b1a: 4618 mov r0, r3 8010b1c: bd80 pop {r7, pc} ... 08010b20 : * @param ethHandle: ETH handle * @retval None */ void HAL_ETH_MspInit(ETH_HandleTypeDef* ethHandle) { 8010b20: b580 push {r7, lr} 8010b22: b08e sub sp, #56 @ 0x38 8010b24: af00 add r7, sp, #0 8010b26: 6078 str r0, [r7, #4] GPIO_InitTypeDef GPIO_InitStruct = {0}; 8010b28: f107 0324 add.w r3, r7, #36 @ 0x24 8010b2c: 2200 movs r2, #0 8010b2e: 601a str r2, [r3, #0] 8010b30: 605a str r2, [r3, #4] 8010b32: 609a str r2, [r3, #8] 8010b34: 60da str r2, [r3, #12] 8010b36: 611a str r2, [r3, #16] if(ethHandle->Instance==ETH) 8010b38: 687b ldr r3, [r7, #4] 8010b3a: 681b ldr r3, [r3, #0] 8010b3c: 4a55 ldr r2, [pc, #340] @ (8010c94 ) 8010b3e: 4293 cmp r3, r2 8010b40: f040 80a4 bne.w 8010c8c { /* USER CODE BEGIN ETH_MspInit 0 */ /* USER CODE END ETH_MspInit 0 */ /* Enable Peripheral clock */ __HAL_RCC_ETH1MAC_CLK_ENABLE(); 8010b44: 4b54 ldr r3, [pc, #336] @ (8010c98 ) 8010b46: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b4a: 4a53 ldr r2, [pc, #332] @ (8010c98 ) 8010b4c: f443 4300 orr.w r3, r3, #32768 @ 0x8000 8010b50: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 8010b54: 4b50 ldr r3, [pc, #320] @ (8010c98 ) 8010b56: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b5a: f403 4300 and.w r3, r3, #32768 @ 0x8000 8010b5e: 623b str r3, [r7, #32] 8010b60: 6a3b ldr r3, [r7, #32] __HAL_RCC_ETH1TX_CLK_ENABLE(); 8010b62: 4b4d ldr r3, [pc, #308] @ (8010c98 ) 8010b64: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b68: 4a4b ldr r2, [pc, #300] @ (8010c98 ) 8010b6a: f443 3380 orr.w r3, r3, #65536 @ 0x10000 8010b6e: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 8010b72: 4b49 ldr r3, [pc, #292] @ (8010c98 ) 8010b74: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b78: f403 3380 and.w r3, r3, #65536 @ 0x10000 8010b7c: 61fb str r3, [r7, #28] 8010b7e: 69fb ldr r3, [r7, #28] __HAL_RCC_ETH1RX_CLK_ENABLE(); 8010b80: 4b45 ldr r3, [pc, #276] @ (8010c98 ) 8010b82: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b86: 4a44 ldr r2, [pc, #272] @ (8010c98 ) 8010b88: f443 3300 orr.w r3, r3, #131072 @ 0x20000 8010b8c: f8c2 30d8 str.w r3, [r2, #216] @ 0xd8 8010b90: 4b41 ldr r3, [pc, #260] @ (8010c98 ) 8010b92: f8d3 30d8 ldr.w r3, [r3, #216] @ 0xd8 8010b96: f403 3300 and.w r3, r3, #131072 @ 0x20000 8010b9a: 61bb str r3, [r7, #24] 8010b9c: 69bb ldr r3, [r7, #24] __HAL_RCC_GPIOC_CLK_ENABLE(); 8010b9e: 4b3e ldr r3, [pc, #248] @ (8010c98 ) 8010ba0: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010ba4: 4a3c ldr r2, [pc, #240] @ (8010c98 ) 8010ba6: f043 0304 orr.w r3, r3, #4 8010baa: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8010bae: 4b3a ldr r3, [pc, #232] @ (8010c98 ) 8010bb0: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010bb4: f003 0304 and.w r3, r3, #4 8010bb8: 617b str r3, [r7, #20] 8010bba: 697b ldr r3, [r7, #20] __HAL_RCC_GPIOA_CLK_ENABLE(); 8010bbc: 4b36 ldr r3, [pc, #216] @ (8010c98 ) 8010bbe: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010bc2: 4a35 ldr r2, [pc, #212] @ (8010c98 ) 8010bc4: f043 0301 orr.w r3, r3, #1 8010bc8: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8010bcc: 4b32 ldr r3, [pc, #200] @ (8010c98 ) 8010bce: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010bd2: f003 0301 and.w r3, r3, #1 8010bd6: 613b str r3, [r7, #16] 8010bd8: 693b ldr r3, [r7, #16] __HAL_RCC_GPIOB_CLK_ENABLE(); 8010bda: 4b2f ldr r3, [pc, #188] @ (8010c98 ) 8010bdc: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010be0: 4a2d ldr r2, [pc, #180] @ (8010c98 ) 8010be2: f043 0302 orr.w r3, r3, #2 8010be6: f8c2 30e0 str.w r3, [r2, #224] @ 0xe0 8010bea: 4b2b ldr r3, [pc, #172] @ (8010c98 ) 8010bec: f8d3 30e0 ldr.w r3, [r3, #224] @ 0xe0 8010bf0: f003 0302 and.w r3, r3, #2 8010bf4: 60fb str r3, [r7, #12] 8010bf6: 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 8010bf8: 233e movs r3, #62 @ 0x3e 8010bfa: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010bfc: 2302 movs r3, #2 8010bfe: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010c00: 2300 movs r3, #0 8010c02: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010c04: 2303 movs r3, #3 8010c06: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010c08: 230b movs r3, #11 8010c0a: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); 8010c0c: f107 0324 add.w r3, r7, #36 @ 0x24 8010c10: 4619 mov r1, r3 8010c12: 4822 ldr r0, [pc, #136] @ (8010c9c ) 8010c14: f7f9 f942 bl 8009e9c GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 8010c18: 238f movs r3, #143 @ 0x8f 8010c1a: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010c1c: 2302 movs r3, #2 8010c1e: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010c20: 2300 movs r3, #0 8010c22: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010c24: 2303 movs r3, #3 8010c26: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010c28: 230b movs r3, #11 8010c2a: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 8010c2c: f107 0324 add.w r3, r7, #36 @ 0x24 8010c30: 4619 mov r1, r3 8010c32: 481b ldr r0, [pc, #108] @ (8010ca0 ) 8010c34: f7f9 f932 bl 8009e9c GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_11|GPIO_PIN_12 8010c38: f643 1303 movw r3, #14595 @ 0x3903 8010c3c: 627b str r3, [r7, #36] @ 0x24 |GPIO_PIN_13|GPIO_PIN_8; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010c3e: 2302 movs r3, #2 8010c40: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010c42: 2300 movs r3, #0 8010c44: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010c46: 2303 movs r3, #3 8010c48: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010c4a: 230b movs r3, #11 8010c4c: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8010c4e: f107 0324 add.w r3, r7, #36 @ 0x24 8010c52: 4619 mov r1, r3 8010c54: 4813 ldr r0, [pc, #76] @ (8010ca4 ) 8010c56: f7f9 f921 bl 8009e9c GPIO_InitStruct.Pin = GPIO_PIN_10; 8010c5a: f44f 6380 mov.w r3, #1024 @ 0x400 8010c5e: 627b str r3, [r7, #36] @ 0x24 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 8010c60: 2302 movs r3, #2 8010c62: 62bb str r3, [r7, #40] @ 0x28 GPIO_InitStruct.Pull = GPIO_NOPULL; 8010c64: 2300 movs r3, #0 8010c66: 62fb str r3, [r7, #44] @ 0x2c GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; 8010c68: 2303 movs r3, #3 8010c6a: 633b str r3, [r7, #48] @ 0x30 GPIO_InitStruct.Alternate = GPIO_AF11_ETH; 8010c6c: 230b movs r3, #11 8010c6e: 637b str r3, [r7, #52] @ 0x34 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 8010c70: f107 0324 add.w r3, r7, #36 @ 0x24 8010c74: 4619 mov r1, r3 8010c76: 480b ldr r0, [pc, #44] @ (8010ca4 ) 8010c78: f7f9 f910 bl 8009e9c /* Peripheral interrupt init */ HAL_NVIC_SetPriority(ETH_IRQn, 5, 0); 8010c7c: 2200 movs r2, #0 8010c7e: 2105 movs r1, #5 8010c80: 203d movs r0, #61 @ 0x3d 8010c82: f7f4 fee3 bl 8005a4c HAL_NVIC_EnableIRQ(ETH_IRQn); 8010c86: 203d movs r0, #61 @ 0x3d 8010c88: f7f4 fefa bl 8005a80 /* USER CODE BEGIN ETH_MspInit 1 */ /* USER CODE END ETH_MspInit 1 */ } } 8010c8c: bf00 nop 8010c8e: 3738 adds r7, #56 @ 0x38 8010c90: 46bd mov sp, r7 8010c92: bd80 pop {r7, pc} 8010c94: 40028000 .word 0x40028000 8010c98: 58024400 .word 0x58024400 8010c9c: 58020800 .word 0x58020800 8010ca0: 58020000 .word 0x58020000 8010ca4: 58020400 .word 0x58020400 08010ca8 : * @brief Initializes the MDIO interface GPIO and clocks. * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_Init(void) { 8010ca8: b580 push {r7, lr} 8010caa: 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); 8010cac: 4802 ldr r0, [pc, #8] @ (8010cb8 ) 8010cae: f7f8 fb15 bl 80092dc return 0; 8010cb2: 2300 movs r3, #0 } 8010cb4: 4618 mov r0, r3 8010cb6: bd80 pop {r7, pc} 8010cb8: 240022dc .word 0x240022dc 08010cbc : * @brief De-Initializes the MDIO interface . * @param None * @retval 0 if OK, -1 if ERROR */ int32_t ETH_PHY_IO_DeInit (void) { 8010cbc: b480 push {r7} 8010cbe: af00 add r7, sp, #0 return 0; 8010cc0: 2300 movs r3, #0 } 8010cc2: 4618 mov r0, r3 8010cc4: 46bd mov sp, r7 8010cc6: f85d 7b04 ldr.w r7, [sp], #4 8010cca: 4770 bx lr 08010ccc : * @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) { 8010ccc: b580 push {r7, lr} 8010cce: b084 sub sp, #16 8010cd0: af00 add r7, sp, #0 8010cd2: 60f8 str r0, [r7, #12] 8010cd4: 60b9 str r1, [r7, #8] 8010cd6: 607a str r2, [r7, #4] if(HAL_ETH_ReadPHYRegister(&heth, DevAddr, RegAddr, pRegVal) != HAL_OK) 8010cd8: 687b ldr r3, [r7, #4] 8010cda: 68ba ldr r2, [r7, #8] 8010cdc: 68f9 ldr r1, [r7, #12] 8010cde: 4807 ldr r0, [pc, #28] @ (8010cfc ) 8010ce0: f7f8 f866 bl 8008db0 8010ce4: 4603 mov r3, r0 8010ce6: 2b00 cmp r3, #0 8010ce8: d002 beq.n 8010cf0 { return -1; 8010cea: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8010cee: e000 b.n 8010cf2 } return 0; 8010cf0: 2300 movs r3, #0 } 8010cf2: 4618 mov r0, r3 8010cf4: 3710 adds r7, #16 8010cf6: 46bd mov sp, r7 8010cf8: bd80 pop {r7, pc} 8010cfa: bf00 nop 8010cfc: 240022dc .word 0x240022dc 08010d00 : * @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) { 8010d00: b580 push {r7, lr} 8010d02: b084 sub sp, #16 8010d04: af00 add r7, sp, #0 8010d06: 60f8 str r0, [r7, #12] 8010d08: 60b9 str r1, [r7, #8] 8010d0a: 607a str r2, [r7, #4] if(HAL_ETH_WritePHYRegister(&heth, DevAddr, RegAddr, RegVal) != HAL_OK) 8010d0c: 687b ldr r3, [r7, #4] 8010d0e: 68ba ldr r2, [r7, #8] 8010d10: 68f9 ldr r1, [r7, #12] 8010d12: 4807 ldr r0, [pc, #28] @ (8010d30 ) 8010d14: f7f8 f8a0 bl 8008e58 8010d18: 4603 mov r3, r0 8010d1a: 2b00 cmp r3, #0 8010d1c: d002 beq.n 8010d24 { return -1; 8010d1e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8010d22: e000 b.n 8010d26 } return 0; 8010d24: 2300 movs r3, #0 } 8010d26: 4618 mov r0, r3 8010d28: 3710 adds r7, #16 8010d2a: 46bd mov sp, r7 8010d2c: bd80 pop {r7, pc} 8010d2e: bf00 nop 8010d30: 240022dc .word 0x240022dc 08010d34 : /** * @brief Get the time in millisecons used for internal PHY driver process. * @retval Time value */ int32_t ETH_PHY_IO_GetTick(void) { 8010d34: b580 push {r7, lr} 8010d36: af00 add r7, sp, #0 return HAL_GetTick(); 8010d38: f7f4 fd80 bl 800583c 8010d3c: 4603 mov r3, r0 } 8010d3e: 4618 mov r0, r3 8010d40: bd80 pop {r7, pc} ... 08010d44 : /** * @brief Check the ETH link state then update ETH driver and netif link accordingly. * @retval None */ void ethernet_link_thread(void* argument) { 8010d44: b580 push {r7, lr} 8010d46: b0a2 sub sp, #136 @ 0x88 8010d48: af00 add r7, sp, #0 8010d4a: 6078 str r0, [r7, #4] ETH_MACConfigTypeDef MACConf = {0}; 8010d4c: f107 0310 add.w r3, r7, #16 8010d50: 2264 movs r2, #100 @ 0x64 8010d52: 2100 movs r1, #0 8010d54: 4618 mov r0, r3 8010d56: f019 ff33 bl 802abc0 int32_t PHYLinkState = 0; 8010d5a: 2300 movs r3, #0 8010d5c: 67bb str r3, [r7, #120] @ 0x78 uint32_t linkchanged = 0U, speed = 0U, duplex = 0U; 8010d5e: 2300 movs r3, #0 8010d60: f8c7 3084 str.w r3, [r7, #132] @ 0x84 8010d64: 2300 movs r3, #0 8010d66: f8c7 3080 str.w r3, [r7, #128] @ 0x80 8010d6a: 2300 movs r3, #0 8010d6c: 67fb str r3, [r7, #124] @ 0x7c struct netif *netif = (struct netif *) argument; 8010d6e: 687b ldr r3, [r7, #4] 8010d70: 677b str r3, [r7, #116] @ 0x74 /* USER CODE BEGIN ETH link init */ #if USE_DHCP enum dhcp_states DHCP_state = DHCP_START; 8010d72: 2301 movs r3, #1 8010d74: 73fb strb r3, [r7, #15] // LOCK_TCPIP_CORE(); /* USER CODE END ETH link init */ for(;;) { PHYLinkState = DP83848_GetLinkState(&DP83848); 8010d76: 484a ldr r0, [pc, #296] @ (8010ea0 ) 8010d78: f7f4 fc88 bl 800568c 8010d7c: 67b8 str r0, [r7, #120] @ 0x78 if(netif_is_link_up(netif) && (PHYLinkState <= DP83848_STATUS_LINK_DOWN)) 8010d7e: 6f7b ldr r3, [r7, #116] @ 0x74 8010d80: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8010d84: 089b lsrs r3, r3, #2 8010d86: f003 0301 and.w r3, r3, #1 8010d8a: b2db uxtb r3, r3 8010d8c: 2b00 cmp r3, #0 8010d8e: d013 beq.n 8010db8 8010d90: 6fbb ldr r3, [r7, #120] @ 0x78 8010d92: 2b01 cmp r3, #1 8010d94: dc10 bgt.n 8010db8 { HAL_ETH_Stop_IT(&heth); 8010d96: 4843 ldr r0, [pc, #268] @ (8010ea4 ) 8010d98: f7f7 fc96 bl 80086c8 LOCK_TCPIP_CORE(); 8010d9c: f000 f936 bl 801100c netif_set_down(netif); 8010da0: 6f78 ldr r0, [r7, #116] @ 0x74 8010da2: f009 fe83 bl 801aaac netif_set_link_down(netif); 8010da6: 6f78 ldr r0, [r7, #116] @ 0x74 8010da8: f009 feee bl 801ab88 UNLOCK_TCPIP_CORE(); 8010dac: f000 f93e bl 801102c printf("Link down...\r\n"); 8010db0: 483d ldr r0, [pc, #244] @ (8010ea8 ) 8010db2: f019 fddb bl 802a96c 8010db6: e067 b.n 8010e88 } else if(!netif_is_link_up(netif) && (PHYLinkState > DP83848_STATUS_LINK_DOWN)) 8010db8: 6f7b ldr r3, [r7, #116] @ 0x74 8010dba: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8010dbe: f003 0304 and.w r3, r3, #4 8010dc2: 2b00 cmp r3, #0 8010dc4: d160 bne.n 8010e88 8010dc6: 6fbb ldr r3, [r7, #120] @ 0x78 8010dc8: 2b01 cmp r3, #1 8010dca: dd5d ble.n 8010e88 { switch (PHYLinkState) 8010dcc: 6fbb ldr r3, [r7, #120] @ 0x78 8010dce: 3b02 subs r3, #2 8010dd0: 2b03 cmp r3, #3 8010dd2: d833 bhi.n 8010e3c 8010dd4: a201 add r2, pc, #4 @ (adr r2, 8010ddc ) 8010dd6: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8010dda: bf00 nop 8010ddc: 08010ded .word 0x08010ded 8010de0: 08010e03 .word 0x08010e03 8010de4: 08010e17 .word 0x08010e17 8010de8: 08010e2b .word 0x08010e2b { case DP83848_STATUS_100MBITS_FULLDUPLEX: duplex = ETH_FULLDUPLEX_MODE; 8010dec: f44f 5300 mov.w r3, #8192 @ 0x2000 8010df0: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_100M; 8010df2: f44f 4380 mov.w r3, #16384 @ 0x4000 8010df6: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010dfa: 2301 movs r3, #1 8010dfc: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010e00: e01d b.n 8010e3e case DP83848_STATUS_100MBITS_HALFDUPLEX: duplex = ETH_HALFDUPLEX_MODE; 8010e02: 2300 movs r3, #0 8010e04: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_100M; 8010e06: f44f 4380 mov.w r3, #16384 @ 0x4000 8010e0a: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010e0e: 2301 movs r3, #1 8010e10: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010e14: e013 b.n 8010e3e case DP83848_STATUS_10MBITS_FULLDUPLEX: duplex = ETH_FULLDUPLEX_MODE; 8010e16: f44f 5300 mov.w r3, #8192 @ 0x2000 8010e1a: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_10M; 8010e1c: 2300 movs r3, #0 8010e1e: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010e22: 2301 movs r3, #1 8010e24: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010e28: e009 b.n 8010e3e case DP83848_STATUS_10MBITS_HALFDUPLEX: duplex = ETH_HALFDUPLEX_MODE; 8010e2a: 2300 movs r3, #0 8010e2c: 67fb str r3, [r7, #124] @ 0x7c speed = ETH_SPEED_10M; 8010e2e: 2300 movs r3, #0 8010e30: f8c7 3080 str.w r3, [r7, #128] @ 0x80 linkchanged = 1; 8010e34: 2301 movs r3, #1 8010e36: f8c7 3084 str.w r3, [r7, #132] @ 0x84 break; 8010e3a: e000 b.n 8010e3e default: break; 8010e3c: bf00 nop } if(linkchanged) 8010e3e: f8d7 3084 ldr.w r3, [r7, #132] @ 0x84 8010e42: 2b00 cmp r3, #0 8010e44: d020 beq.n 8010e88 { /* Get MAC Config MAC */ HAL_ETH_GetMACConfig(&heth, &MACConf); 8010e46: f107 0310 add.w r3, r7, #16 8010e4a: 4619 mov r1, r3 8010e4c: 4815 ldr r0, [pc, #84] @ (8010ea4 ) 8010e4e: f7f8 f857 bl 8008f00 MACConf.DuplexMode = duplex; 8010e52: 6ffb ldr r3, [r7, #124] @ 0x7c 8010e54: 62bb str r3, [r7, #40] @ 0x28 MACConf.Speed = speed; 8010e56: f8d7 3080 ldr.w r3, [r7, #128] @ 0x80 8010e5a: 627b str r3, [r7, #36] @ 0x24 HAL_ETH_SetMACConfig(&heth, &MACConf); 8010e5c: f107 0310 add.w r3, r7, #16 8010e60: 4619 mov r1, r3 8010e62: 4810 ldr r0, [pc, #64] @ (8010ea4 ) 8010e64: f7f8 fa20 bl 80092a8 HAL_ETH_Start_IT(&heth); 8010e68: 480e ldr r0, [pc, #56] @ (8010ea4 ) 8010e6a: f7f7 fbb9 bl 80085e0 LOCK_TCPIP_CORE(); 8010e6e: f000 f8cd bl 801100c netif_set_up(netif); 8010e72: 6f78 ldr r0, [r7, #116] @ 0x74 8010e74: f009 fdac bl 801a9d0 netif_set_link_up(netif); 8010e78: 6f78 ldr r0, [r7, #116] @ 0x74 8010e7a: f009 fe4b bl 801ab14 UNLOCK_TCPIP_CORE(); 8010e7e: f000 f8d5 bl 801102c printf("Link up...\r\n"); 8010e82: 480a ldr r0, [pc, #40] @ (8010eac ) 8010e84: f019 fd72 bl 802a96c } } /* USER CODE BEGIN ETH link Thread core code for User BSP */ #if USE_DHCP dhcp_sm(netif, &DHCP_state); 8010e88: f107 030f add.w r3, r7, #15 8010e8c: 4619 mov r1, r3 8010e8e: 6f78 ldr r0, [r7, #116] @ 0x74 8010e90: f000 f922 bl 80110d8 #endif /* ETH_CODE: workaround to call LOCK_TCPIP_CORE when accessing netif link functions*/ // UNLOCK_TCPIP_CORE(); osDelay(pdMS_TO_TICKS(500)); 8010e94: f44f 70fa mov.w r0, #500 @ 0x1f4 8010e98: f000 faff bl 801149a // LOCK_TCPIP_CORE(); continue; /* skip next osDelay */ 8010e9c: bf00 nop PHYLinkState = DP83848_GetLinkState(&DP83848); 8010e9e: e76a b.n 8010d76 8010ea0: 240023c4 .word 0x240023c4 8010ea4: 240022dc .word 0x240022dc 8010ea8: 0802da84 .word 0x0802da84 8010eac: 0802da94 .word 0x0802da94 08010eb0 : * @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) { 8010eb0: b480 push {r7} 8010eb2: b083 sub sp, #12 8010eb4: af00 add r7, sp, #0 8010eb6: 6078 str r0, [r7, #4] /* NOTE : This is function could be implemented in user file when the callback is needed, */ } 8010eb8: bf00 nop 8010eba: 370c adds r7, #12 8010ebc: 46bd mov sp, r7 8010ebe: f85d 7b04 ldr.w r7, [sp], #4 8010ec2: 4770 bx lr 08010ec4 : void HAL_ETH_RxAllocateCallback(uint8_t **buff) { 8010ec4: b580 push {r7, lr} 8010ec6: b086 sub sp, #24 8010ec8: af02 add r7, sp, #8 8010eca: 6078 str r0, [r7, #4] /* USER CODE BEGIN HAL ETH RxAllocateCallback */ struct pbuf_custom *p = LWIP_MEMPOOL_ALLOC(RX_POOL); 8010ecc: 4812 ldr r0, [pc, #72] @ (8010f18 ) 8010ece: f009 fae7 bl 801a4a0 8010ed2: 60f8 str r0, [r7, #12] if (p) 8010ed4: 68fb ldr r3, [r7, #12] 8010ed6: 2b00 cmp r3, #0 8010ed8: d014 beq.n 8010f04 { /* Get the buff from the struct pbuf address. */ *buff = (uint8_t *)p + offsetof(RxBuff_t, buff); 8010eda: 68fb ldr r3, [r7, #12] 8010edc: f103 0220 add.w r2, r3, #32 8010ee0: 687b ldr r3, [r7, #4] 8010ee2: 601a str r2, [r3, #0] p->custom_free_function = pbuf_free_custom; 8010ee4: 68fb ldr r3, [r7, #12] 8010ee6: 4a0d ldr r2, [pc, #52] @ (8010f1c ) 8010ee8: 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); 8010eea: 687b ldr r3, [r7, #4] 8010eec: 681b ldr r3, [r3, #0] 8010eee: f44f 62c0 mov.w r2, #1536 @ 0x600 8010ef2: 9201 str r2, [sp, #4] 8010ef4: 9300 str r3, [sp, #0] 8010ef6: 68fb ldr r3, [r7, #12] 8010ef8: 2241 movs r2, #65 @ 0x41 8010efa: 2100 movs r1, #0 8010efc: 2000 movs r0, #0 8010efe: f00a f86b bl 801afd8 { RxAllocStatus = RX_ALLOC_ERROR; *buff = NULL; } /* USER CODE END HAL ETH RxAllocateCallback */ } 8010f02: e005 b.n 8010f10 RxAllocStatus = RX_ALLOC_ERROR; 8010f04: 4b06 ldr r3, [pc, #24] @ (8010f20 ) 8010f06: 2201 movs r2, #1 8010f08: 701a strb r2, [r3, #0] *buff = NULL; 8010f0a: 687b ldr r3, [r7, #4] 8010f0c: 2200 movs r2, #0 8010f0e: 601a str r2, [r3, #0] } 8010f10: bf00 nop 8010f12: 3710 adds r7, #16 8010f14: 46bd mov sp, r7 8010f16: bd80 pop {r7, pc} 8010f18: 08031afc .word 0x08031afc 8010f1c: 08010ad1 .word 0x08010ad1 8010f20: 240022d0 .word 0x240022d0 08010f24 : void HAL_ETH_RxLinkCallback(void **pStart, void **pEnd, uint8_t *buff, uint16_t Length) { 8010f24: b480 push {r7} 8010f26: b08d sub sp, #52 @ 0x34 8010f28: af00 add r7, sp, #0 8010f2a: 60f8 str r0, [r7, #12] 8010f2c: 60b9 str r1, [r7, #8] 8010f2e: 607a str r2, [r7, #4] 8010f30: 807b strh r3, [r7, #2] /* USER CODE BEGIN HAL ETH RxLinkCallback */ struct pbuf **ppStart = (struct pbuf **)pStart; 8010f32: 68fb ldr r3, [r7, #12] 8010f34: 62bb str r3, [r7, #40] @ 0x28 struct pbuf **ppEnd = (struct pbuf **)pEnd; 8010f36: 68bb ldr r3, [r7, #8] 8010f38: 627b str r3, [r7, #36] @ 0x24 struct pbuf *p = NULL; 8010f3a: 2300 movs r3, #0 8010f3c: 62fb str r3, [r7, #44] @ 0x2c /* Get the struct pbuf from the buff address. */ p = (struct pbuf *)(buff - offsetof(RxBuff_t, buff)); 8010f3e: 687b ldr r3, [r7, #4] 8010f40: 3b20 subs r3, #32 8010f42: 62fb str r3, [r7, #44] @ 0x2c p->next = NULL; 8010f44: 6afb ldr r3, [r7, #44] @ 0x2c 8010f46: 2200 movs r2, #0 8010f48: 601a str r2, [r3, #0] p->tot_len = 0; 8010f4a: 6afb ldr r3, [r7, #44] @ 0x2c 8010f4c: 2200 movs r2, #0 8010f4e: 811a strh r2, [r3, #8] p->len = Length; 8010f50: 6afb ldr r3, [r7, #44] @ 0x2c 8010f52: 887a ldrh r2, [r7, #2] 8010f54: 815a strh r2, [r3, #10] /* Chain the buffer. */ if (!*ppStart) 8010f56: 6abb ldr r3, [r7, #40] @ 0x28 8010f58: 681b ldr r3, [r3, #0] 8010f5a: 2b00 cmp r3, #0 8010f5c: d103 bne.n 8010f66 { /* The first buffer of the packet. */ *ppStart = p; 8010f5e: 6abb ldr r3, [r7, #40] @ 0x28 8010f60: 6afa ldr r2, [r7, #44] @ 0x2c 8010f62: 601a str r2, [r3, #0] 8010f64: e003 b.n 8010f6e } else { /* Chain the buffer to the end of the packet. */ (*ppEnd)->next = p; 8010f66: 6a7b ldr r3, [r7, #36] @ 0x24 8010f68: 681b ldr r3, [r3, #0] 8010f6a: 6afa ldr r2, [r7, #44] @ 0x2c 8010f6c: 601a str r2, [r3, #0] } *ppEnd = p; 8010f6e: 6a7b ldr r3, [r7, #36] @ 0x24 8010f70: 6afa ldr r2, [r7, #44] @ 0x2c 8010f72: 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) 8010f74: 6abb ldr r3, [r7, #40] @ 0x28 8010f76: 681b ldr r3, [r3, #0] 8010f78: 62fb str r3, [r7, #44] @ 0x2c 8010f7a: e009 b.n 8010f90 { p->tot_len += Length; 8010f7c: 6afb ldr r3, [r7, #44] @ 0x2c 8010f7e: 891a ldrh r2, [r3, #8] 8010f80: 887b ldrh r3, [r7, #2] 8010f82: 4413 add r3, r2 8010f84: b29a uxth r2, r3 8010f86: 6afb ldr r3, [r7, #44] @ 0x2c 8010f88: 811a strh r2, [r3, #8] for (p = *ppStart; p != NULL; p = p->next) 8010f8a: 6afb ldr r3, [r7, #44] @ 0x2c 8010f8c: 681b ldr r3, [r3, #0] 8010f8e: 62fb str r3, [r7, #44] @ 0x2c 8010f90: 6afb ldr r3, [r7, #44] @ 0x2c 8010f92: 2b00 cmp r3, #0 8010f94: d1f2 bne.n 8010f7c } /* Invalidate data cache because Rx DMA's writing to physical memory makes it stale. */ SCB_InvalidateDCache_by_Addr((uint32_t *)buff, Length); 8010f96: 887b ldrh r3, [r7, #2] 8010f98: 687a ldr r2, [r7, #4] 8010f9a: 623a str r2, [r7, #32] 8010f9c: 61fb str r3, [r7, #28] if ( dsize > 0 ) { 8010f9e: 69fb ldr r3, [r7, #28] 8010fa0: 2b00 cmp r3, #0 8010fa2: dd1d ble.n 8010fe0 int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U)); 8010fa4: 6a3b ldr r3, [r7, #32] 8010fa6: f003 021f and.w r2, r3, #31 8010faa: 69fb ldr r3, [r7, #28] 8010fac: 4413 add r3, r2 8010fae: 61bb str r3, [r7, #24] uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */; 8010fb0: 6a3b ldr r3, [r7, #32] 8010fb2: 617b str r3, [r7, #20] __ASM volatile ("dsb 0xF":::"memory"); 8010fb4: f3bf 8f4f dsb sy } 8010fb8: bf00 nop SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */ 8010fba: 4a0d ldr r2, [pc, #52] @ (8010ff0 ) 8010fbc: 697b ldr r3, [r7, #20] 8010fbe: f8c2 325c str.w r3, [r2, #604] @ 0x25c op_addr += __SCB_DCACHE_LINE_SIZE; 8010fc2: 697b ldr r3, [r7, #20] 8010fc4: 3320 adds r3, #32 8010fc6: 617b str r3, [r7, #20] op_size -= __SCB_DCACHE_LINE_SIZE; 8010fc8: 69bb ldr r3, [r7, #24] 8010fca: 3b20 subs r3, #32 8010fcc: 61bb str r3, [r7, #24] } while ( op_size > 0 ); 8010fce: 69bb ldr r3, [r7, #24] 8010fd0: 2b00 cmp r3, #0 8010fd2: dcf2 bgt.n 8010fba __ASM volatile ("dsb 0xF":::"memory"); 8010fd4: f3bf 8f4f dsb sy } 8010fd8: bf00 nop __ASM volatile ("isb 0xF":::"memory"); 8010fda: f3bf 8f6f isb sy } 8010fde: bf00 nop } 8010fe0: bf00 nop /* USER CODE END HAL ETH RxLinkCallback */ } 8010fe2: bf00 nop 8010fe4: 3734 adds r7, #52 @ 0x34 8010fe6: 46bd mov sp, r7 8010fe8: f85d 7b04 ldr.w r7, [sp], #4 8010fec: 4770 bx lr 8010fee: bf00 nop 8010ff0: e000ed00 .word 0xe000ed00 08010ff4 : void HAL_ETH_TxFreeCallback(uint32_t * buff) { 8010ff4: b580 push {r7, lr} 8010ff6: b082 sub sp, #8 8010ff8: af00 add r7, sp, #0 8010ffa: 6078 str r0, [r7, #4] /* USER CODE BEGIN HAL ETH TxFreeCallback */ pbuf_free((struct pbuf *)buff); 8010ffc: 6878 ldr r0, [r7, #4] 8010ffe: f00a f9d5 bl 801b3ac /* USER CODE END HAL ETH TxFreeCallback */ } 8011002: bf00 nop 8011004: 3708 adds r7, #8 8011006: 46bd mov sp, r7 8011008: bd80 pop {r7, pc} ... 0801100c : /* 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){ 801100c: b580 push {r7, lr} 801100e: af00 add r7, sp, #0 sys_mutex_lock(&lock_tcpip_core); 8011010: 4804 ldr r0, [pc, #16] @ (8011024 ) 8011012: f016 f971 bl 80272f8 lwip_core_lock_holder_thread_id = osThreadGetId(); 8011016: f000 fa35 bl 8011484 801101a: 4603 mov r3, r0 801101c: 4a02 ldr r2, [pc, #8] @ (8011028 ) 801101e: 6013 str r3, [r2, #0] } 8011020: bf00 nop 8011022: bd80 pop {r7, pc} 8011024: 24024424 .word 0x24024424 8011028: 240023e4 .word 0x240023e4 0801102c : void sys_unlock_tcpip_core(void){ 801102c: b580 push {r7, lr} 801102e: af00 add r7, sp, #0 lwip_core_lock_holder_thread_id = 0; 8011030: 4b03 ldr r3, [pc, #12] @ (8011040 ) 8011032: 2200 movs r2, #0 8011034: 601a str r2, [r3, #0] sys_mutex_unlock(&lock_tcpip_core); 8011036: 4803 ldr r0, [pc, #12] @ (8011044 ) 8011038: f016 f96d bl 8027316 } 801103c: bf00 nop 801103e: bd80 pop {r7, pc} 8011040: 240023e4 .word 0x240023e4 8011044: 24024424 .word 0x24024424 08011048 : void sys_check_core_locking(void){ 8011048: b580 push {r7, lr} 801104a: b082 sub sp, #8 801104c: 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); 801104e: 4b15 ldr r3, [pc, #84] @ (80110a4 ) 8011050: 685b ldr r3, [r3, #4] 8011052: f3c3 0308 ubfx r3, r3, #0, #9 8011056: 2b00 cmp r3, #0 8011058: d006 beq.n 8011068 801105a: 4b13 ldr r3, [pc, #76] @ (80110a8 ) 801105c: f240 4216 movw r2, #1046 @ 0x416 8011060: 4912 ldr r1, [pc, #72] @ (80110ac ) 8011062: 4813 ldr r0, [pc, #76] @ (80110b0 ) 8011064: f019 fc1a bl 802a89c if (lwip_tcpip_thread_id != 0) { 8011068: 4b12 ldr r3, [pc, #72] @ (80110b4 ) 801106a: 681b ldr r3, [r3, #0] 801106c: 2b00 cmp r3, #0 801106e: d014 beq.n 801109a osThreadId_t current_thread_id = osThreadGetId(); 8011070: f000 fa08 bl 8011484 8011074: 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); 8011076: 4b10 ldr r3, [pc, #64] @ (80110b8 ) 8011078: 681b ldr r3, [r3, #0] 801107a: 687a ldr r2, [r7, #4] 801107c: 429a cmp r2, r3 801107e: d006 beq.n 801108e 8011080: 4b09 ldr r3, [pc, #36] @ (80110a8 ) 8011082: f240 421c movw r2, #1052 @ 0x41c 8011086: 490d ldr r1, [pc, #52] @ (80110bc ) 8011088: 4809 ldr r0, [pc, #36] @ (80110b0 ) 801108a: f019 fc07 bl 802a89c /* 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); 801108e: 4b0a ldr r3, [pc, #40] @ (80110b8 ) 8011090: 681b ldr r3, [r3, #0] 8011092: 687a ldr r2, [r7, #4] 8011094: 429a cmp r2, r3 8011096: d000 beq.n 801109a 8011098: 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 */ } } 801109a: bf00 nop 801109c: 3708 adds r7, #8 801109e: 46bd mov sp, r7 80110a0: bd80 pop {r7, pc} 80110a2: bf00 nop 80110a4: e000ed00 .word 0xe000ed00 80110a8: 0802da30 .word 0x0802da30 80110ac: 0802daa0 .word 0x0802daa0 80110b0: 0802da5c .word 0x0802da5c 80110b4: 240023e8 .word 0x240023e8 80110b8: 240023e4 .word 0x240023e4 80110bc: 0802dac8 .word 0x0802dac8 080110c0 : void sys_mark_tcpip_thread(void){ 80110c0: b580 push {r7, lr} 80110c2: af00 add r7, sp, #0 lwip_tcpip_thread_id = osThreadGetId(); 80110c4: f000 f9de bl 8011484 80110c8: 4603 mov r3, r0 80110ca: 4a02 ldr r2, [pc, #8] @ (80110d4 ) 80110cc: 6013 str r3, [r2, #0] } 80110ce: bf00 nop 80110d0: bd80 pop {r7, pc} 80110d2: bf00 nop 80110d4: 240023e8 .word 0x240023e8 080110d8 : #if USE_DHCP void dhcp_sm(struct netif *netif, enum dhcp_states *state) { 80110d8: b580 push {r7, lr} 80110da: b08c sub sp, #48 @ 0x30 80110dc: af00 add r7, sp, #0 80110de: 6078 str r0, [r7, #4] 80110e0: 6039 str r1, [r7, #0] ip_addr_t gw; #ifdef DHCP_USER_LOGS uint8_t iptxt[20]; #endif switch(*state) 80110e2: 683b ldr r3, [r7, #0] 80110e4: 781b ldrb r3, [r3, #0] 80110e6: 2b03 cmp r3, #3 80110e8: d072 beq.n 80111d0 80110ea: 2b03 cmp r3, #3 80110ec: dc7b bgt.n 80111e6 80110ee: 2b01 cmp r3, #1 80110f0: d002 beq.n 80110f8 80110f2: 2b02 cmp r3, #2 80110f4: d00a beq.n 801110c { *state = DHCP_START; } break; default: break; 80110f6: e076 b.n 80111e6 *state = DHCP_WAIT_ADDRESS; 80110f8: 683b ldr r3, [r7, #0] 80110fa: 2202 movs r2, #2 80110fc: 701a strb r2, [r3, #0] dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 80110fe: 687b ldr r3, [r7, #4] 8011100: 6a5b ldr r3, [r3, #36] @ 0x24 8011102: 62fb str r3, [r7, #44] @ 0x2c printf(" State: Looking for DHCP server ...\n"); 8011104: 483c ldr r0, [pc, #240] @ (80111f8 ) 8011106: f019 fc31 bl 802a96c break; 801110a: e071 b.n 80111f0 if (dhcp_supplied_address(netif)) 801110c: 6878 ldr r0, [r7, #4] 801110e: f013 fa57 bl 80245c0 8011112: 4603 mov r3, r0 8011114: 2b00 cmp r3, #0 8011116: d015 beq.n 8011144 *state = DHCP_ADDRESS_ASSIGNED; 8011118: 683b ldr r3, [r7, #0] 801111a: 2203 movs r2, #3 801111c: 701a strb r2, [r3, #0] sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 801111e: 687b ldr r3, [r7, #4] 8011120: 3304 adds r3, #4 8011122: 4618 mov r0, r3 8011124: f014 ffe4 bl 80260f0 8011128: 4602 mov r2, r0 801112a: f107 030c add.w r3, r7, #12 801112e: 4933 ldr r1, [pc, #204] @ (80111fc ) 8011130: 4618 mov r0, r3 8011132: f019 fc23 bl 802a97c printf("IP address assigned by a DHCP server: %s\n", iptxt); 8011136: f107 030c add.w r3, r7, #12 801113a: 4619 mov r1, r3 801113c: 4830 ldr r0, [pc, #192] @ (8011200 ) 801113e: f019 fbad bl 802a89c break; 8011142: e052 b.n 80111ea dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 8011144: 687b ldr r3, [r7, #4] 8011146: 6a5b ldr r3, [r3, #36] @ 0x24 8011148: 62fb str r3, [r7, #44] @ 0x2c if (dhcp->tries > MAX_DHCP_TRIES) 801114a: 6afb ldr r3, [r7, #44] @ 0x2c 801114c: 799b ldrb r3, [r3, #6] 801114e: 2b04 cmp r3, #4 8011150: d94b bls.n 80111ea *state = DHCP_TIMEOUT; 8011152: 683b ldr r3, [r7, #0] 8011154: 2204 movs r2, #4 8011156: 701a strb r2, [r3, #0] LOCK_TCPIP_CORE(); 8011158: f7ff ff58 bl 801100c dhcp_stop(netif); 801115c: 6878 ldr r0, [r7, #4] 801115e: f012 fc87 bl 8023a70 UNLOCK_TCPIP_CORE(); 8011162: f7ff ff63 bl 801102c ipaddr_aton(STATIC_IP, &ipaddr); 8011166: f107 0328 add.w r3, r7, #40 @ 0x28 801116a: 4619 mov r1, r3 801116c: 4825 ldr r0, [pc, #148] @ (8011204 ) 801116e: f014 fe95 bl 8025e9c ipaddr_aton(STATIC_MASK, &netmask); 8011172: f107 0324 add.w r3, r7, #36 @ 0x24 8011176: 4619 mov r1, r3 8011178: 4823 ldr r0, [pc, #140] @ (8011208 ) 801117a: f014 fe8f bl 8025e9c ipaddr_aton(STATIC_GW, &gw); 801117e: f107 0320 add.w r3, r7, #32 8011182: 4619 mov r1, r3 8011184: 4821 ldr r0, [pc, #132] @ (801120c ) 8011186: f014 fe89 bl 8025e9c LOCK_TCPIP_CORE(); 801118a: f7ff ff3f bl 801100c netif_set_addr(netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw)); 801118e: f107 0320 add.w r3, r7, #32 8011192: f107 0224 add.w r2, r7, #36 @ 0x24 8011196: f107 0128 add.w r1, r7, #40 @ 0x28 801119a: 6878 ldr r0, [r7, #4] 801119c: f009 fbbc bl 801a918 UNLOCK_TCPIP_CORE(); 80111a0: f7ff ff44 bl 801102c sprintf((char *)iptxt, "%s", ip4addr_ntoa((const ip4_addr_t *)&netif->ip_addr)); 80111a4: 687b ldr r3, [r7, #4] 80111a6: 3304 adds r3, #4 80111a8: 4618 mov r0, r3 80111aa: f014 ffa1 bl 80260f0 80111ae: 4602 mov r2, r0 80111b0: f107 030c add.w r3, r7, #12 80111b4: 4911 ldr r1, [pc, #68] @ (80111fc ) 80111b6: 4618 mov r0, r3 80111b8: f019 fbe0 bl 802a97c printf("DHCP Timeout !! \n"); 80111bc: 4814 ldr r0, [pc, #80] @ (8011210 ) 80111be: f019 fbd5 bl 802a96c printf("Static IP address: %s\n", iptxt); 80111c2: f107 030c add.w r3, r7, #12 80111c6: 4619 mov r1, r3 80111c8: 4812 ldr r0, [pc, #72] @ (8011214 ) 80111ca: f019 fb67 bl 802a89c break; 80111ce: e00c b.n 80111ea dhcp = (struct dhcp *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); 80111d0: 687b ldr r3, [r7, #4] 80111d2: 6a5b ldr r3, [r3, #36] @ 0x24 80111d4: 62fb str r3, [r7, #44] @ 0x2c if(dhcp->state == 3) 80111d6: 6afb ldr r3, [r7, #44] @ 0x2c 80111d8: 795b ldrb r3, [r3, #5] 80111da: 2b03 cmp r3, #3 80111dc: d107 bne.n 80111ee *state = DHCP_START; 80111de: 683b ldr r3, [r7, #0] 80111e0: 2201 movs r2, #1 80111e2: 701a strb r2, [r3, #0] break; 80111e4: e003 b.n 80111ee break; 80111e6: bf00 nop 80111e8: e002 b.n 80111f0 break; 80111ea: bf00 nop 80111ec: e000 b.n 80111f0 break; 80111ee: bf00 nop } } 80111f0: bf00 nop 80111f2: 3730 adds r7, #48 @ 0x30 80111f4: 46bd mov sp, r7 80111f6: bd80 pop {r7, pc} 80111f8: 0802daec .word 0x0802daec 80111fc: 0802db14 .word 0x0802db14 8011200: 0802db18 .word 0x0802db18 8011204: 0802db44 .word 0x0802db44 8011208: 0802db54 .word 0x0802db54 801120c: 0802db64 .word 0x0802db64 8011210: 0802db70 .word 0x0802db70 8011214: 0802db84 .word 0x0802db84 08011218 <__NVIC_SetPriority>: { 8011218: b480 push {r7} 801121a: b083 sub sp, #12 801121c: af00 add r7, sp, #0 801121e: 4603 mov r3, r0 8011220: 6039 str r1, [r7, #0] 8011222: 80fb strh r3, [r7, #6] if ((int32_t)(IRQn) >= 0) 8011224: f9b7 3006 ldrsh.w r3, [r7, #6] 8011228: 2b00 cmp r3, #0 801122a: db0a blt.n 8011242 <__NVIC_SetPriority+0x2a> NVIC->IP[((uint32_t)IRQn)] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 801122c: 683b ldr r3, [r7, #0] 801122e: b2da uxtb r2, r3 8011230: 490c ldr r1, [pc, #48] @ (8011264 <__NVIC_SetPriority+0x4c>) 8011232: f9b7 3006 ldrsh.w r3, [r7, #6] 8011236: 0112 lsls r2, r2, #4 8011238: b2d2 uxtb r2, r2 801123a: 440b add r3, r1 801123c: f883 2300 strb.w r2, [r3, #768] @ 0x300 } 8011240: e00a b.n 8011258 <__NVIC_SetPriority+0x40> SCB->SHPR[(((uint32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); 8011242: 683b ldr r3, [r7, #0] 8011244: b2da uxtb r2, r3 8011246: 4908 ldr r1, [pc, #32] @ (8011268 <__NVIC_SetPriority+0x50>) 8011248: 88fb ldrh r3, [r7, #6] 801124a: f003 030f and.w r3, r3, #15 801124e: 3b04 subs r3, #4 8011250: 0112 lsls r2, r2, #4 8011252: b2d2 uxtb r2, r2 8011254: 440b add r3, r1 8011256: 761a strb r2, [r3, #24] } 8011258: bf00 nop 801125a: 370c adds r7, #12 801125c: 46bd mov sp, r7 801125e: f85d 7b04 ldr.w r7, [sp], #4 8011262: 4770 bx lr 8011264: e000e100 .word 0xe000e100 8011268: e000ed00 .word 0xe000ed00 0801126c : /* SysTick handler implementation that also clears overflow flag. */ #if (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0) void SysTick_Handler (void) { 801126c: b580 push {r7, lr} 801126e: af00 add r7, sp, #0 /* Clear overflow flag */ SysTick->CTRL; 8011270: 4b05 ldr r3, [pc, #20] @ (8011288 ) 8011272: 681b ldr r3, [r3, #0] if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) { 8011274: f003 fa3c bl 80146f0 8011278: 4603 mov r3, r0 801127a: 2b01 cmp r3, #1 801127c: d001 beq.n 8011282 /* Call tick handler */ xPortSysTickHandler(); 801127e: f004 fc4b bl 8015b18 } } 8011282: bf00 nop 8011284: bd80 pop {r7, pc} 8011286: bf00 nop 8011288: e000e010 .word 0xe000e010 0801128c : #endif /* SysTick */ /* Setup SVC to reset value. */ __STATIC_INLINE void SVC_Setup (void) { 801128c: b580 push {r7, lr} 801128e: 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); 8011290: 2100 movs r1, #0 8011292: f06f 0004 mvn.w r0, #4 8011296: f7ff ffbf bl 8011218 <__NVIC_SetPriority> #endif } 801129a: bf00 nop 801129c: bd80 pop {r7, pc} ... 080112a0 : static uint32_t OS_Tick_GetOverflow (void); /* Get OS Tick interval */ static uint32_t OS_Tick_GetInterval (void); /*---------------------------------------------------------------------------*/ osStatus_t osKernelInitialize (void) { 80112a0: b480 push {r7} 80112a2: b083 sub sp, #12 80112a4: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80112a6: f3ef 8305 mrs r3, IPSR 80112aa: 603b str r3, [r7, #0] return(result); 80112ac: 683b ldr r3, [r7, #0] osStatus_t stat; if (IS_IRQ()) { 80112ae: 2b00 cmp r3, #0 80112b0: d003 beq.n 80112ba stat = osErrorISR; 80112b2: f06f 0305 mvn.w r3, #5 80112b6: 607b str r3, [r7, #4] 80112b8: e00c b.n 80112d4 } else { if (KernelState == osKernelInactive) { 80112ba: 4b0a ldr r3, [pc, #40] @ (80112e4 ) 80112bc: 681b ldr r3, [r3, #0] 80112be: 2b00 cmp r3, #0 80112c0: d105 bne.n 80112ce EvrFreeRTOSSetup(0U); #endif #if defined(USE_FreeRTOS_HEAP_5) && (HEAP_5_REGION_SETUP == 1) vPortDefineHeapRegions (configHEAP_5_REGIONS); #endif KernelState = osKernelReady; 80112c2: 4b08 ldr r3, [pc, #32] @ (80112e4 ) 80112c4: 2201 movs r2, #1 80112c6: 601a str r2, [r3, #0] stat = osOK; 80112c8: 2300 movs r3, #0 80112ca: 607b str r3, [r7, #4] 80112cc: e002 b.n 80112d4 } else { stat = osError; 80112ce: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80112d2: 607b str r3, [r7, #4] } } return (stat); 80112d4: 687b ldr r3, [r7, #4] } 80112d6: 4618 mov r0, r3 80112d8: 370c adds r7, #12 80112da: 46bd mov sp, r7 80112dc: f85d 7b04 ldr.w r7, [sp], #4 80112e0: 4770 bx lr 80112e2: bf00 nop 80112e4: 240023ec .word 0x240023ec 080112e8 : } return (state); } osStatus_t osKernelStart (void) { 80112e8: b580 push {r7, lr} 80112ea: b082 sub sp, #8 80112ec: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80112ee: f3ef 8305 mrs r3, IPSR 80112f2: 603b str r3, [r7, #0] return(result); 80112f4: 683b ldr r3, [r7, #0] osStatus_t stat; if (IS_IRQ()) { 80112f6: 2b00 cmp r3, #0 80112f8: d003 beq.n 8011302 stat = osErrorISR; 80112fa: f06f 0305 mvn.w r3, #5 80112fe: 607b str r3, [r7, #4] 8011300: e010 b.n 8011324 } else { if (KernelState == osKernelReady) { 8011302: 4b0b ldr r3, [pc, #44] @ (8011330 ) 8011304: 681b ldr r3, [r3, #0] 8011306: 2b01 cmp r3, #1 8011308: d109 bne.n 801131e /* Ensure SVC priority is at the reset value */ SVC_Setup(); 801130a: f7ff ffbf bl 801128c /* Change state to enable IRQ masking check */ KernelState = osKernelRunning; 801130e: 4b08 ldr r3, [pc, #32] @ (8011330 ) 8011310: 2202 movs r2, #2 8011312: 601a str r2, [r3, #0] /* Start the kernel scheduler */ vTaskStartScheduler(); 8011314: f002 fd30 bl 8013d78 stat = osOK; 8011318: 2300 movs r3, #0 801131a: 607b str r3, [r7, #4] 801131c: e002 b.n 8011324 } else { stat = osError; 801131e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011322: 607b str r3, [r7, #4] } } return (stat); 8011324: 687b ldr r3, [r7, #4] } 8011326: 4618 mov r0, r3 8011328: 3708 adds r7, #8 801132a: 46bd mov sp, r7 801132c: bd80 pop {r7, pc} 801132e: bf00 nop 8011330: 240023ec .word 0x240023ec 08011334 : } return (lock); } uint32_t osKernelGetTickCount (void) { 8011334: b580 push {r7, lr} 8011336: b082 sub sp, #8 8011338: af00 add r7, sp, #0 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801133a: f3ef 8305 mrs r3, IPSR 801133e: 603b str r3, [r7, #0] return(result); 8011340: 683b ldr r3, [r7, #0] TickType_t ticks; if (IS_IRQ()) { 8011342: 2b00 cmp r3, #0 8011344: d003 beq.n 801134e ticks = xTaskGetTickCountFromISR(); 8011346: f002 fe43 bl 8013fd0 801134a: 6078 str r0, [r7, #4] 801134c: e002 b.n 8011354 } else { ticks = xTaskGetTickCount(); 801134e: f002 fe2f bl 8013fb0 8011352: 6078 str r0, [r7, #4] } return (ticks); 8011354: 687b ldr r3, [r7, #4] } 8011356: 4618 mov r0, r3 8011358: 3708 adds r7, #8 801135a: 46bd mov sp, r7 801135c: bd80 pop {r7, pc} 0801135e : return (configCPU_CLOCK_HZ); } /*---------------------------------------------------------------------------*/ osThreadId_t osThreadNew (osThreadFunc_t func, void *argument, const osThreadAttr_t *attr) { 801135e: b580 push {r7, lr} 8011360: b08e sub sp, #56 @ 0x38 8011362: af04 add r7, sp, #16 8011364: 60f8 str r0, [r7, #12] 8011366: 60b9 str r1, [r7, #8] 8011368: 607a str r2, [r7, #4] uint32_t stack; TaskHandle_t hTask; UBaseType_t prio; int32_t mem; hTask = NULL; 801136a: 2300 movs r3, #0 801136c: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801136e: f3ef 8305 mrs r3, IPSR 8011372: 617b str r3, [r7, #20] return(result); 8011374: 697b ldr r3, [r7, #20] if (!IS_IRQ() && (func != NULL)) { 8011376: 2b00 cmp r3, #0 8011378: d17f bne.n 801147a 801137a: 68fb ldr r3, [r7, #12] 801137c: 2b00 cmp r3, #0 801137e: d07c beq.n 801147a stack = configMINIMAL_STACK_SIZE; 8011380: f44f 7300 mov.w r3, #512 @ 0x200 8011384: 623b str r3, [r7, #32] prio = (UBaseType_t)osPriorityNormal; 8011386: 2318 movs r3, #24 8011388: 61fb str r3, [r7, #28] name = NULL; 801138a: 2300 movs r3, #0 801138c: 627b str r3, [r7, #36] @ 0x24 mem = -1; 801138e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011392: 61bb str r3, [r7, #24] if (attr != NULL) { 8011394: 687b ldr r3, [r7, #4] 8011396: 2b00 cmp r3, #0 8011398: d045 beq.n 8011426 if (attr->name != NULL) { 801139a: 687b ldr r3, [r7, #4] 801139c: 681b ldr r3, [r3, #0] 801139e: 2b00 cmp r3, #0 80113a0: d002 beq.n 80113a8 name = attr->name; 80113a2: 687b ldr r3, [r7, #4] 80113a4: 681b ldr r3, [r3, #0] 80113a6: 627b str r3, [r7, #36] @ 0x24 } if (attr->priority != osPriorityNone) { 80113a8: 687b ldr r3, [r7, #4] 80113aa: 699b ldr r3, [r3, #24] 80113ac: 2b00 cmp r3, #0 80113ae: d002 beq.n 80113b6 prio = (UBaseType_t)attr->priority; 80113b0: 687b ldr r3, [r7, #4] 80113b2: 699b ldr r3, [r3, #24] 80113b4: 61fb str r3, [r7, #28] } if ((prio < osPriorityIdle) || (prio > osPriorityISR) || ((attr->attr_bits & osThreadJoinable) == osThreadJoinable)) { 80113b6: 69fb ldr r3, [r7, #28] 80113b8: 2b00 cmp r3, #0 80113ba: d008 beq.n 80113ce 80113bc: 69fb ldr r3, [r7, #28] 80113be: 2b38 cmp r3, #56 @ 0x38 80113c0: d805 bhi.n 80113ce 80113c2: 687b ldr r3, [r7, #4] 80113c4: 685b ldr r3, [r3, #4] 80113c6: f003 0301 and.w r3, r3, #1 80113ca: 2b00 cmp r3, #0 80113cc: d001 beq.n 80113d2 return (NULL); 80113ce: 2300 movs r3, #0 80113d0: e054 b.n 801147c } if (attr->stack_size > 0U) { 80113d2: 687b ldr r3, [r7, #4] 80113d4: 695b ldr r3, [r3, #20] 80113d6: 2b00 cmp r3, #0 80113d8: d003 beq.n 80113e2 /* 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); 80113da: 687b ldr r3, [r7, #4] 80113dc: 695b ldr r3, [r3, #20] 80113de: 089b lsrs r3, r3, #2 80113e0: 623b str r3, [r7, #32] } if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) && 80113e2: 687b ldr r3, [r7, #4] 80113e4: 689b ldr r3, [r3, #8] 80113e6: 2b00 cmp r3, #0 80113e8: d00e beq.n 8011408 80113ea: 687b ldr r3, [r7, #4] 80113ec: 68db ldr r3, [r3, #12] 80113ee: 2ba7 cmp r3, #167 @ 0xa7 80113f0: d90a bls.n 8011408 (attr->stack_mem != NULL) && (attr->stack_size > 0U)) { 80113f2: 687b ldr r3, [r7, #4] 80113f4: 691b ldr r3, [r3, #16] if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTask_t)) && 80113f6: 2b00 cmp r3, #0 80113f8: d006 beq.n 8011408 (attr->stack_mem != NULL) && (attr->stack_size > 0U)) { 80113fa: 687b ldr r3, [r7, #4] 80113fc: 695b ldr r3, [r3, #20] 80113fe: 2b00 cmp r3, #0 8011400: d002 beq.n 8011408 mem = 1; 8011402: 2301 movs r3, #1 8011404: 61bb str r3, [r7, #24] 8011406: e010 b.n 801142a } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && (attr->stack_mem == NULL)) { 8011408: 687b ldr r3, [r7, #4] 801140a: 689b ldr r3, [r3, #8] 801140c: 2b00 cmp r3, #0 801140e: d10c bne.n 801142a 8011410: 687b ldr r3, [r7, #4] 8011412: 68db ldr r3, [r3, #12] 8011414: 2b00 cmp r3, #0 8011416: d108 bne.n 801142a 8011418: 687b ldr r3, [r7, #4] 801141a: 691b ldr r3, [r3, #16] 801141c: 2b00 cmp r3, #0 801141e: d104 bne.n 801142a mem = 0; 8011420: 2300 movs r3, #0 8011422: 61bb str r3, [r7, #24] 8011424: e001 b.n 801142a } } } else { mem = 0; 8011426: 2300 movs r3, #0 8011428: 61bb str r3, [r7, #24] } if (mem == 1) { 801142a: 69bb ldr r3, [r7, #24] 801142c: 2b01 cmp r3, #1 801142e: d110 bne.n 8011452 #if (configSUPPORT_STATIC_ALLOCATION == 1) hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 8011430: 687b ldr r3, [r7, #4] 8011432: 691b ldr r3, [r3, #16] (StaticTask_t *)attr->cb_mem); 8011434: 687a ldr r2, [r7, #4] 8011436: 6892 ldr r2, [r2, #8] hTask = xTaskCreateStatic ((TaskFunction_t)func, name, stack, argument, prio, (StackType_t *)attr->stack_mem, 8011438: 9202 str r2, [sp, #8] 801143a: 9301 str r3, [sp, #4] 801143c: 69fb ldr r3, [r7, #28] 801143e: 9300 str r3, [sp, #0] 8011440: 68bb ldr r3, [r7, #8] 8011442: 6a3a ldr r2, [r7, #32] 8011444: 6a79 ldr r1, [r7, #36] @ 0x24 8011446: 68f8 ldr r0, [r7, #12] 8011448: f002 faa2 bl 8013990 801144c: 4603 mov r3, r0 801144e: 613b str r3, [r7, #16] 8011450: e013 b.n 801147a #endif } else { if (mem == 0) { 8011452: 69bb ldr r3, [r7, #24] 8011454: 2b00 cmp r3, #0 8011456: d110 bne.n 801147a #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) if (xTaskCreate ((TaskFunction_t)func, name, (uint16_t)stack, argument, prio, &hTask) != pdPASS) { 8011458: 6a3b ldr r3, [r7, #32] 801145a: b29a uxth r2, r3 801145c: f107 0310 add.w r3, r7, #16 8011460: 9301 str r3, [sp, #4] 8011462: 69fb ldr r3, [r7, #28] 8011464: 9300 str r3, [sp, #0] 8011466: 68bb ldr r3, [r7, #8] 8011468: 6a79 ldr r1, [r7, #36] @ 0x24 801146a: 68f8 ldr r0, [r7, #12] 801146c: f002 faf0 bl 8013a50 8011470: 4603 mov r3, r0 8011472: 2b01 cmp r3, #1 8011474: d001 beq.n 801147a hTask = NULL; 8011476: 2300 movs r3, #0 8011478: 613b str r3, [r7, #16] #endif } } } return ((osThreadId_t)hTask); 801147a: 693b ldr r3, [r7, #16] } 801147c: 4618 mov r0, r3 801147e: 3728 adds r7, #40 @ 0x28 8011480: 46bd mov sp, r7 8011482: bd80 pop {r7, pc} 08011484 : } return (name); } osThreadId_t osThreadGetId (void) { 8011484: b580 push {r7, lr} 8011486: b082 sub sp, #8 8011488: af00 add r7, sp, #0 osThreadId_t id; id = (osThreadId_t)xTaskGetCurrentTaskHandle(); 801148a: f003 f921 bl 80146d0 801148e: 6078 str r0, [r7, #4] return (id); 8011490: 687b ldr r3, [r7, #4] } 8011492: 4618 mov r0, r3 8011494: 3708 adds r7, #8 8011496: 46bd mov sp, r7 8011498: bd80 pop {r7, pc} 0801149a : /* Return flags before clearing */ return (rflags); } #endif /* (configUSE_OS2_THREAD_FLAGS == 1) */ osStatus_t osDelay (uint32_t ticks) { 801149a: b580 push {r7, lr} 801149c: b084 sub sp, #16 801149e: af00 add r7, sp, #0 80114a0: 6078 str r0, [r7, #4] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80114a2: f3ef 8305 mrs r3, IPSR 80114a6: 60bb str r3, [r7, #8] return(result); 80114a8: 68bb ldr r3, [r7, #8] osStatus_t stat; if (IS_IRQ()) { 80114aa: 2b00 cmp r3, #0 80114ac: d003 beq.n 80114b6 stat = osErrorISR; 80114ae: f06f 0305 mvn.w r3, #5 80114b2: 60fb str r3, [r7, #12] 80114b4: e007 b.n 80114c6 } else { stat = osOK; 80114b6: 2300 movs r3, #0 80114b8: 60fb str r3, [r7, #12] if (ticks != 0U) { 80114ba: 687b ldr r3, [r7, #4] 80114bc: 2b00 cmp r3, #0 80114be: d002 beq.n 80114c6 vTaskDelay(ticks); 80114c0: 6878 ldr r0, [r7, #4] 80114c2: f002 fc23 bl 8013d0c } } return (stat); 80114c6: 68fb ldr r3, [r7, #12] } 80114c8: 4618 mov r0, r3 80114ca: 3710 adds r7, #16 80114cc: 46bd mov sp, r7 80114ce: bd80 pop {r7, pc} 080114d0 : } /*---------------------------------------------------------------------------*/ #if (configUSE_OS2_TIMER == 1) static void TimerCallback (TimerHandle_t hTimer) { 80114d0: b580 push {r7, lr} 80114d2: b084 sub sp, #16 80114d4: af00 add r7, sp, #0 80114d6: 6078 str r0, [r7, #4] TimerCallback_t *callb; callb = (TimerCallback_t *)pvTimerGetTimerID (hTimer); 80114d8: 6878 ldr r0, [r7, #4] 80114da: f004 f93b bl 8015754 80114de: 60f8 str r0, [r7, #12] if (callb != NULL) { 80114e0: 68fb ldr r3, [r7, #12] 80114e2: 2b00 cmp r3, #0 80114e4: d005 beq.n 80114f2 callb->func (callb->arg); 80114e6: 68fb ldr r3, [r7, #12] 80114e8: 681b ldr r3, [r3, #0] 80114ea: 68fa ldr r2, [r7, #12] 80114ec: 6852 ldr r2, [r2, #4] 80114ee: 4610 mov r0, r2 80114f0: 4798 blx r3 } } 80114f2: bf00 nop 80114f4: 3710 adds r7, #16 80114f6: 46bd mov sp, r7 80114f8: bd80 pop {r7, pc} ... 080114fc : osTimerId_t osTimerNew (osTimerFunc_t func, osTimerType_t type, void *argument, const osTimerAttr_t *attr) { 80114fc: b580 push {r7, lr} 80114fe: b08c sub sp, #48 @ 0x30 8011500: af02 add r7, sp, #8 8011502: 60f8 str r0, [r7, #12] 8011504: 607a str r2, [r7, #4] 8011506: 603b str r3, [r7, #0] 8011508: 460b mov r3, r1 801150a: 72fb strb r3, [r7, #11] TimerHandle_t hTimer; TimerCallback_t *callb; UBaseType_t reload; int32_t mem; hTimer = NULL; 801150c: 2300 movs r3, #0 801150e: 623b str r3, [r7, #32] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011510: f3ef 8305 mrs r3, IPSR 8011514: 613b str r3, [r7, #16] return(result); 8011516: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (func != NULL)) { 8011518: 2b00 cmp r3, #0 801151a: d163 bne.n 80115e4 801151c: 68fb ldr r3, [r7, #12] 801151e: 2b00 cmp r3, #0 8011520: d060 beq.n 80115e4 /* Allocate memory to store callback function and argument */ callb = pvPortMalloc (sizeof(TimerCallback_t)); 8011522: 2008 movs r0, #8 8011524: f004 fb8a bl 8015c3c 8011528: 6178 str r0, [r7, #20] if (callb != NULL) { 801152a: 697b ldr r3, [r7, #20] 801152c: 2b00 cmp r3, #0 801152e: d059 beq.n 80115e4 callb->func = func; 8011530: 697b ldr r3, [r7, #20] 8011532: 68fa ldr r2, [r7, #12] 8011534: 601a str r2, [r3, #0] callb->arg = argument; 8011536: 697b ldr r3, [r7, #20] 8011538: 687a ldr r2, [r7, #4] 801153a: 605a str r2, [r3, #4] if (type == osTimerOnce) { 801153c: 7afb ldrb r3, [r7, #11] 801153e: 2b00 cmp r3, #0 8011540: d102 bne.n 8011548 reload = pdFALSE; 8011542: 2300 movs r3, #0 8011544: 61fb str r3, [r7, #28] 8011546: e001 b.n 801154c } else { reload = pdTRUE; 8011548: 2301 movs r3, #1 801154a: 61fb str r3, [r7, #28] } mem = -1; 801154c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011550: 61bb str r3, [r7, #24] name = NULL; 8011552: 2300 movs r3, #0 8011554: 627b str r3, [r7, #36] @ 0x24 if (attr != NULL) { 8011556: 683b ldr r3, [r7, #0] 8011558: 2b00 cmp r3, #0 801155a: d01c beq.n 8011596 if (attr->name != NULL) { 801155c: 683b ldr r3, [r7, #0] 801155e: 681b ldr r3, [r3, #0] 8011560: 2b00 cmp r3, #0 8011562: d002 beq.n 801156a name = attr->name; 8011564: 683b ldr r3, [r7, #0] 8011566: 681b ldr r3, [r3, #0] 8011568: 627b str r3, [r7, #36] @ 0x24 } if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticTimer_t))) { 801156a: 683b ldr r3, [r7, #0] 801156c: 689b ldr r3, [r3, #8] 801156e: 2b00 cmp r3, #0 8011570: d006 beq.n 8011580 8011572: 683b ldr r3, [r7, #0] 8011574: 68db ldr r3, [r3, #12] 8011576: 2b2b cmp r3, #43 @ 0x2b 8011578: d902 bls.n 8011580 mem = 1; 801157a: 2301 movs r3, #1 801157c: 61bb str r3, [r7, #24] 801157e: e00c b.n 801159a } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8011580: 683b ldr r3, [r7, #0] 8011582: 689b ldr r3, [r3, #8] 8011584: 2b00 cmp r3, #0 8011586: d108 bne.n 801159a 8011588: 683b ldr r3, [r7, #0] 801158a: 68db ldr r3, [r3, #12] 801158c: 2b00 cmp r3, #0 801158e: d104 bne.n 801159a mem = 0; 8011590: 2300 movs r3, #0 8011592: 61bb str r3, [r7, #24] 8011594: e001 b.n 801159a } } } else { mem = 0; 8011596: 2300 movs r3, #0 8011598: 61bb str r3, [r7, #24] } if (mem == 1) { 801159a: 69bb ldr r3, [r7, #24] 801159c: 2b01 cmp r3, #1 801159e: d10c bne.n 80115ba #if (configSUPPORT_STATIC_ALLOCATION == 1) hTimer = xTimerCreateStatic (name, 1, reload, callb, TimerCallback, (StaticTimer_t *)attr->cb_mem); 80115a0: 683b ldr r3, [r7, #0] 80115a2: 689b ldr r3, [r3, #8] 80115a4: 9301 str r3, [sp, #4] 80115a6: 4b12 ldr r3, [pc, #72] @ (80115f0 ) 80115a8: 9300 str r3, [sp, #0] 80115aa: 697b ldr r3, [r7, #20] 80115ac: 69fa ldr r2, [r7, #28] 80115ae: 2101 movs r1, #1 80115b0: 6a78 ldr r0, [r7, #36] @ 0x24 80115b2: f003 fd18 bl 8014fe6 80115b6: 6238 str r0, [r7, #32] 80115b8: e00b b.n 80115d2 #endif } else { if (mem == 0) { 80115ba: 69bb ldr r3, [r7, #24] 80115bc: 2b00 cmp r3, #0 80115be: d108 bne.n 80115d2 #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hTimer = xTimerCreate (name, 1, reload, callb, TimerCallback); 80115c0: 4b0b ldr r3, [pc, #44] @ (80115f0 ) 80115c2: 9300 str r3, [sp, #0] 80115c4: 697b ldr r3, [r7, #20] 80115c6: 69fa ldr r2, [r7, #28] 80115c8: 2101 movs r1, #1 80115ca: 6a78 ldr r0, [r7, #36] @ 0x24 80115cc: f003 fcea bl 8014fa4 80115d0: 6238 str r0, [r7, #32] #endif } } if ((hTimer == NULL) && (callb != NULL)) { 80115d2: 6a3b ldr r3, [r7, #32] 80115d4: 2b00 cmp r3, #0 80115d6: d105 bne.n 80115e4 80115d8: 697b ldr r3, [r7, #20] 80115da: 2b00 cmp r3, #0 80115dc: d002 beq.n 80115e4 vPortFree (callb); 80115de: 6978 ldr r0, [r7, #20] 80115e0: f004 fbfa bl 8015dd8 } } } return ((osTimerId_t)hTimer); 80115e4: 6a3b ldr r3, [r7, #32] } 80115e6: 4618 mov r0, r3 80115e8: 3728 adds r7, #40 @ 0x28 80115ea: 46bd mov sp, r7 80115ec: bd80 pop {r7, pc} 80115ee: bf00 nop 80115f0: 080114d1 .word 0x080114d1 080115f4 : } return (p); } osStatus_t osTimerStart (osTimerId_t timer_id, uint32_t ticks) { 80115f4: b580 push {r7, lr} 80115f6: b088 sub sp, #32 80115f8: af02 add r7, sp, #8 80115fa: 6078 str r0, [r7, #4] 80115fc: 6039 str r1, [r7, #0] TimerHandle_t hTimer = (TimerHandle_t)timer_id; 80115fe: 687b ldr r3, [r7, #4] 8011600: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011602: f3ef 8305 mrs r3, IPSR 8011606: 60fb str r3, [r7, #12] return(result); 8011608: 68fb ldr r3, [r7, #12] osStatus_t stat; if (IS_IRQ()) { 801160a: 2b00 cmp r3, #0 801160c: d003 beq.n 8011616 stat = osErrorISR; 801160e: f06f 0305 mvn.w r3, #5 8011612: 617b str r3, [r7, #20] 8011614: e017 b.n 8011646 } else if (hTimer == NULL) { 8011616: 693b ldr r3, [r7, #16] 8011618: 2b00 cmp r3, #0 801161a: d103 bne.n 8011624 stat = osErrorParameter; 801161c: f06f 0303 mvn.w r3, #3 8011620: 617b str r3, [r7, #20] 8011622: e010 b.n 8011646 } else { if (xTimerChangePeriod (hTimer, ticks, 0) == pdPASS) { 8011624: 2300 movs r3, #0 8011626: 9300 str r3, [sp, #0] 8011628: 2300 movs r3, #0 801162a: 683a ldr r2, [r7, #0] 801162c: 2104 movs r1, #4 801162e: 6938 ldr r0, [r7, #16] 8011630: f003 fd56 bl 80150e0 8011634: 4603 mov r3, r0 8011636: 2b01 cmp r3, #1 8011638: d102 bne.n 8011640 stat = osOK; 801163a: 2300 movs r3, #0 801163c: 617b str r3, [r7, #20] 801163e: e002 b.n 8011646 } else { stat = osErrorResource; 8011640: f06f 0302 mvn.w r3, #2 8011644: 617b str r3, [r7, #20] } } return (stat); 8011646: 697b ldr r3, [r7, #20] } 8011648: 4618 mov r0, r3 801164a: 3718 adds r7, #24 801164c: 46bd mov sp, r7 801164e: bd80 pop {r7, pc} 08011650 : osStatus_t osTimerStop (osTimerId_t timer_id) { 8011650: b580 push {r7, lr} 8011652: b088 sub sp, #32 8011654: af02 add r7, sp, #8 8011656: 6078 str r0, [r7, #4] TimerHandle_t hTimer = (TimerHandle_t)timer_id; 8011658: 687b ldr r3, [r7, #4] 801165a: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801165c: f3ef 8305 mrs r3, IPSR 8011660: 60fb str r3, [r7, #12] return(result); 8011662: 68fb ldr r3, [r7, #12] osStatus_t stat; if (IS_IRQ()) { 8011664: 2b00 cmp r3, #0 8011666: d003 beq.n 8011670 stat = osErrorISR; 8011668: f06f 0305 mvn.w r3, #5 801166c: 617b str r3, [r7, #20] 801166e: e021 b.n 80116b4 } else if (hTimer == NULL) { 8011670: 693b ldr r3, [r7, #16] 8011672: 2b00 cmp r3, #0 8011674: d103 bne.n 801167e stat = osErrorParameter; 8011676: f06f 0303 mvn.w r3, #3 801167a: 617b str r3, [r7, #20] 801167c: e01a b.n 80116b4 } else { if (xTimerIsTimerActive (hTimer) == pdFALSE) { 801167e: 6938 ldr r0, [r7, #16] 8011680: f004 f83e bl 8015700 8011684: 4603 mov r3, r0 8011686: 2b00 cmp r3, #0 8011688: d103 bne.n 8011692 stat = osErrorResource; 801168a: f06f 0302 mvn.w r3, #2 801168e: 617b str r3, [r7, #20] 8011690: e010 b.n 80116b4 } else { if (xTimerStop (hTimer, 0) == pdPASS) { 8011692: 2300 movs r3, #0 8011694: 9300 str r3, [sp, #0] 8011696: 2300 movs r3, #0 8011698: 2200 movs r2, #0 801169a: 2103 movs r1, #3 801169c: 6938 ldr r0, [r7, #16] 801169e: f003 fd1f bl 80150e0 80116a2: 4603 mov r3, r0 80116a4: 2b01 cmp r3, #1 80116a6: d102 bne.n 80116ae stat = osOK; 80116a8: 2300 movs r3, #0 80116aa: 617b str r3, [r7, #20] 80116ac: e002 b.n 80116b4 } else { stat = osError; 80116ae: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80116b2: 617b str r3, [r7, #20] } } } return (stat); 80116b4: 697b ldr r3, [r7, #20] } 80116b6: 4618 mov r0, r3 80116b8: 3718 adds r7, #24 80116ba: 46bd mov sp, r7 80116bc: bd80 pop {r7, pc} 080116be : } /*---------------------------------------------------------------------------*/ #if (configUSE_OS2_MUTEX == 1) osMutexId_t osMutexNew (const osMutexAttr_t *attr) { 80116be: b580 push {r7, lr} 80116c0: b088 sub sp, #32 80116c2: af00 add r7, sp, #0 80116c4: 6078 str r0, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hMutex = NULL; 80116c6: 2300 movs r3, #0 80116c8: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80116ca: f3ef 8305 mrs r3, IPSR 80116ce: 60bb str r3, [r7, #8] return(result); 80116d0: 68bb ldr r3, [r7, #8] if (!IS_IRQ()) { 80116d2: 2b00 cmp r3, #0 80116d4: d174 bne.n 80117c0 if (attr != NULL) { 80116d6: 687b ldr r3, [r7, #4] 80116d8: 2b00 cmp r3, #0 80116da: d003 beq.n 80116e4 type = attr->attr_bits; 80116dc: 687b ldr r3, [r7, #4] 80116de: 685b ldr r3, [r3, #4] 80116e0: 61bb str r3, [r7, #24] 80116e2: e001 b.n 80116e8 } else { type = 0U; 80116e4: 2300 movs r3, #0 80116e6: 61bb str r3, [r7, #24] } if ((type & osMutexRecursive) == osMutexRecursive) { 80116e8: 69bb ldr r3, [r7, #24] 80116ea: f003 0301 and.w r3, r3, #1 80116ee: 2b00 cmp r3, #0 80116f0: d002 beq.n 80116f8 rmtx = 1U; 80116f2: 2301 movs r3, #1 80116f4: 617b str r3, [r7, #20] 80116f6: e001 b.n 80116fc } else { rmtx = 0U; 80116f8: 2300 movs r3, #0 80116fa: 617b str r3, [r7, #20] } if ((type & osMutexRobust) != osMutexRobust) { 80116fc: 69bb ldr r3, [r7, #24] 80116fe: f003 0308 and.w r3, r3, #8 8011702: 2b00 cmp r3, #0 8011704: d15c bne.n 80117c0 mem = -1; 8011706: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801170a: 613b str r3, [r7, #16] if (attr != NULL) { 801170c: 687b ldr r3, [r7, #4] 801170e: 2b00 cmp r3, #0 8011710: d015 beq.n 801173e if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 8011712: 687b ldr r3, [r7, #4] 8011714: 689b ldr r3, [r3, #8] 8011716: 2b00 cmp r3, #0 8011718: d006 beq.n 8011728 801171a: 687b ldr r3, [r7, #4] 801171c: 68db ldr r3, [r3, #12] 801171e: 2b4f cmp r3, #79 @ 0x4f 8011720: d902 bls.n 8011728 mem = 1; 8011722: 2301 movs r3, #1 8011724: 613b str r3, [r7, #16] 8011726: e00c b.n 8011742 } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8011728: 687b ldr r3, [r7, #4] 801172a: 689b ldr r3, [r3, #8] 801172c: 2b00 cmp r3, #0 801172e: d108 bne.n 8011742 8011730: 687b ldr r3, [r7, #4] 8011732: 68db ldr r3, [r3, #12] 8011734: 2b00 cmp r3, #0 8011736: d104 bne.n 8011742 mem = 0; 8011738: 2300 movs r3, #0 801173a: 613b str r3, [r7, #16] 801173c: e001 b.n 8011742 } } } else { mem = 0; 801173e: 2300 movs r3, #0 8011740: 613b str r3, [r7, #16] } if (mem == 1) { 8011742: 693b ldr r3, [r7, #16] 8011744: 2b01 cmp r3, #1 8011746: d112 bne.n 801176e #if (configSUPPORT_STATIC_ALLOCATION == 1) if (rmtx != 0U) { 8011748: 697b ldr r3, [r7, #20] 801174a: 2b00 cmp r3, #0 801174c: d007 beq.n 801175e #if (configUSE_RECURSIVE_MUTEXES == 1) hMutex = xSemaphoreCreateRecursiveMutexStatic (attr->cb_mem); 801174e: 687b ldr r3, [r7, #4] 8011750: 689b ldr r3, [r3, #8] 8011752: 4619 mov r1, r3 8011754: 2004 movs r0, #4 8011756: f000 fdd8 bl 801230a 801175a: 61f8 str r0, [r7, #28] 801175c: e016 b.n 801178c #endif } else { hMutex = xSemaphoreCreateMutexStatic (attr->cb_mem); 801175e: 687b ldr r3, [r7, #4] 8011760: 689b ldr r3, [r3, #8] 8011762: 4619 mov r1, r3 8011764: 2001 movs r0, #1 8011766: f000 fdd0 bl 801230a 801176a: 61f8 str r0, [r7, #28] 801176c: e00e b.n 801178c } #endif } else { if (mem == 0) { 801176e: 693b ldr r3, [r7, #16] 8011770: 2b00 cmp r3, #0 8011772: d10b bne.n 801178c #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) if (rmtx != 0U) { 8011774: 697b ldr r3, [r7, #20] 8011776: 2b00 cmp r3, #0 8011778: d004 beq.n 8011784 #if (configUSE_RECURSIVE_MUTEXES == 1) hMutex = xSemaphoreCreateRecursiveMutex (); 801177a: 2004 movs r0, #4 801177c: f000 fdad bl 80122da 8011780: 61f8 str r0, [r7, #28] 8011782: e003 b.n 801178c #endif } else { hMutex = xSemaphoreCreateMutex (); 8011784: 2001 movs r0, #1 8011786: f000 fda8 bl 80122da 801178a: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hMutex != NULL) { 801178c: 69fb ldr r3, [r7, #28] 801178e: 2b00 cmp r3, #0 8011790: d00c beq.n 80117ac if (attr != NULL) { 8011792: 687b ldr r3, [r7, #4] 8011794: 2b00 cmp r3, #0 8011796: d003 beq.n 80117a0 name = attr->name; 8011798: 687b ldr r3, [r7, #4] 801179a: 681b ldr r3, [r3, #0] 801179c: 60fb str r3, [r7, #12] 801179e: e001 b.n 80117a4 } else { name = NULL; 80117a0: 2300 movs r3, #0 80117a2: 60fb str r3, [r7, #12] } vQueueAddToRegistry (hMutex, name); 80117a4: 68f9 ldr r1, [r7, #12] 80117a6: 69f8 ldr r0, [r7, #28] 80117a8: f001 fcd2 bl 8013150 } #endif if ((hMutex != NULL) && (rmtx != 0U)) { 80117ac: 69fb ldr r3, [r7, #28] 80117ae: 2b00 cmp r3, #0 80117b0: d006 beq.n 80117c0 80117b2: 697b ldr r3, [r7, #20] 80117b4: 2b00 cmp r3, #0 80117b6: d003 beq.n 80117c0 hMutex = (SemaphoreHandle_t)((uint32_t)hMutex | 1U); 80117b8: 69fb ldr r3, [r7, #28] 80117ba: f043 0301 orr.w r3, r3, #1 80117be: 61fb str r3, [r7, #28] } } } return ((osMutexId_t)hMutex); 80117c0: 69fb ldr r3, [r7, #28] } 80117c2: 4618 mov r0, r3 80117c4: 3720 adds r7, #32 80117c6: 46bd mov sp, r7 80117c8: bd80 pop {r7, pc} 080117ca : osStatus_t osMutexAcquire (osMutexId_t mutex_id, uint32_t timeout) { 80117ca: b580 push {r7, lr} 80117cc: b086 sub sp, #24 80117ce: af00 add r7, sp, #0 80117d0: 6078 str r0, [r7, #4] 80117d2: 6039 str r1, [r7, #0] SemaphoreHandle_t hMutex; osStatus_t stat; uint32_t rmtx; hMutex = (SemaphoreHandle_t)((uint32_t)mutex_id & ~1U); 80117d4: 687b ldr r3, [r7, #4] 80117d6: f023 0301 bic.w r3, r3, #1 80117da: 613b str r3, [r7, #16] rmtx = (uint32_t)mutex_id & 1U; 80117dc: 687b ldr r3, [r7, #4] 80117de: f003 0301 and.w r3, r3, #1 80117e2: 60fb str r3, [r7, #12] stat = osOK; 80117e4: 2300 movs r3, #0 80117e6: 617b str r3, [r7, #20] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80117e8: f3ef 8305 mrs r3, IPSR 80117ec: 60bb str r3, [r7, #8] return(result); 80117ee: 68bb ldr r3, [r7, #8] if (IS_IRQ()) { 80117f0: 2b00 cmp r3, #0 80117f2: d003 beq.n 80117fc stat = osErrorISR; 80117f4: f06f 0305 mvn.w r3, #5 80117f8: 617b str r3, [r7, #20] 80117fa: e02c b.n 8011856 } else if (hMutex == NULL) { 80117fc: 693b ldr r3, [r7, #16] 80117fe: 2b00 cmp r3, #0 8011800: d103 bne.n 801180a stat = osErrorParameter; 8011802: f06f 0303 mvn.w r3, #3 8011806: 617b str r3, [r7, #20] 8011808: e025 b.n 8011856 } else { if (rmtx != 0U) { 801180a: 68fb ldr r3, [r7, #12] 801180c: 2b00 cmp r3, #0 801180e: d011 beq.n 8011834 #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreTakeRecursive (hMutex, timeout) != pdPASS) { 8011810: 6839 ldr r1, [r7, #0] 8011812: 6938 ldr r0, [r7, #16] 8011814: f000 fdc9 bl 80123aa 8011818: 4603 mov r3, r0 801181a: 2b01 cmp r3, #1 801181c: d01b beq.n 8011856 if (timeout != 0U) { 801181e: 683b ldr r3, [r7, #0] 8011820: 2b00 cmp r3, #0 8011822: d003 beq.n 801182c stat = osErrorTimeout; 8011824: f06f 0301 mvn.w r3, #1 8011828: 617b str r3, [r7, #20] 801182a: e014 b.n 8011856 } else { stat = osErrorResource; 801182c: f06f 0302 mvn.w r3, #2 8011830: 617b str r3, [r7, #20] 8011832: e010 b.n 8011856 } } #endif } else { if (xSemaphoreTake (hMutex, timeout) != pdPASS) { 8011834: 6839 ldr r1, [r7, #0] 8011836: 6938 ldr r0, [r7, #16] 8011838: f001 f96e bl 8012b18 801183c: 4603 mov r3, r0 801183e: 2b01 cmp r3, #1 8011840: d009 beq.n 8011856 if (timeout != 0U) { 8011842: 683b ldr r3, [r7, #0] 8011844: 2b00 cmp r3, #0 8011846: d003 beq.n 8011850 stat = osErrorTimeout; 8011848: f06f 0301 mvn.w r3, #1 801184c: 617b str r3, [r7, #20] 801184e: e002 b.n 8011856 } else { stat = osErrorResource; 8011850: f06f 0302 mvn.w r3, #2 8011854: 617b str r3, [r7, #20] } } } } return (stat); 8011856: 697b ldr r3, [r7, #20] } 8011858: 4618 mov r0, r3 801185a: 3718 adds r7, #24 801185c: 46bd mov sp, r7 801185e: bd80 pop {r7, pc} 08011860 : osStatus_t osMutexRelease (osMutexId_t mutex_id) { 8011860: b580 push {r7, lr} 8011862: b086 sub sp, #24 8011864: af00 add r7, sp, #0 8011866: 6078 str r0, [r7, #4] SemaphoreHandle_t hMutex; osStatus_t stat; uint32_t rmtx; hMutex = (SemaphoreHandle_t)((uint32_t)mutex_id & ~1U); 8011868: 687b ldr r3, [r7, #4] 801186a: f023 0301 bic.w r3, r3, #1 801186e: 613b str r3, [r7, #16] rmtx = (uint32_t)mutex_id & 1U; 8011870: 687b ldr r3, [r7, #4] 8011872: f003 0301 and.w r3, r3, #1 8011876: 60fb str r3, [r7, #12] stat = osOK; 8011878: 2300 movs r3, #0 801187a: 617b str r3, [r7, #20] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 801187c: f3ef 8305 mrs r3, IPSR 8011880: 60bb str r3, [r7, #8] return(result); 8011882: 68bb ldr r3, [r7, #8] if (IS_IRQ()) { 8011884: 2b00 cmp r3, #0 8011886: d003 beq.n 8011890 stat = osErrorISR; 8011888: f06f 0305 mvn.w r3, #5 801188c: 617b str r3, [r7, #20] 801188e: e01f b.n 80118d0 } else if (hMutex == NULL) { 8011890: 693b ldr r3, [r7, #16] 8011892: 2b00 cmp r3, #0 8011894: d103 bne.n 801189e stat = osErrorParameter; 8011896: f06f 0303 mvn.w r3, #3 801189a: 617b str r3, [r7, #20] 801189c: e018 b.n 80118d0 } else { if (rmtx != 0U) { 801189e: 68fb ldr r3, [r7, #12] 80118a0: 2b00 cmp r3, #0 80118a2: d009 beq.n 80118b8 #if (configUSE_RECURSIVE_MUTEXES == 1) if (xSemaphoreGiveRecursive (hMutex) != pdPASS) { 80118a4: 6938 ldr r0, [r7, #16] 80118a6: f000 fd4b bl 8012340 80118aa: 4603 mov r3, r0 80118ac: 2b01 cmp r3, #1 80118ae: d00f beq.n 80118d0 stat = osErrorResource; 80118b0: f06f 0302 mvn.w r3, #2 80118b4: 617b str r3, [r7, #20] 80118b6: e00b b.n 80118d0 } #endif } else { if (xSemaphoreGive (hMutex) != pdPASS) { 80118b8: 2300 movs r3, #0 80118ba: 2200 movs r2, #0 80118bc: 2100 movs r1, #0 80118be: 6938 ldr r0, [r7, #16] 80118c0: f000 fe18 bl 80124f4 80118c4: 4603 mov r3, r0 80118c6: 2b01 cmp r3, #1 80118c8: d002 beq.n 80118d0 stat = osErrorResource; 80118ca: f06f 0302 mvn.w r3, #2 80118ce: 617b str r3, [r7, #20] } } } return (stat); 80118d0: 697b ldr r3, [r7, #20] } 80118d2: 4618 mov r0, r3 80118d4: 3718 adds r7, #24 80118d6: 46bd mov sp, r7 80118d8: bd80 pop {r7, pc} 080118da : } #endif /* (configUSE_OS2_MUTEX == 1) */ /*---------------------------------------------------------------------------*/ osSemaphoreId_t osSemaphoreNew (uint32_t max_count, uint32_t initial_count, const osSemaphoreAttr_t *attr) { 80118da: b580 push {r7, lr} 80118dc: b08a sub sp, #40 @ 0x28 80118de: af02 add r7, sp, #8 80118e0: 60f8 str r0, [r7, #12] 80118e2: 60b9 str r1, [r7, #8] 80118e4: 607a str r2, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hSemaphore = NULL; 80118e6: 2300 movs r3, #0 80118e8: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 80118ea: f3ef 8305 mrs r3, IPSR 80118ee: 613b str r3, [r7, #16] return(result); 80118f0: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (max_count > 0U) && (initial_count <= max_count)) { 80118f2: 2b00 cmp r3, #0 80118f4: d175 bne.n 80119e2 80118f6: 68fb ldr r3, [r7, #12] 80118f8: 2b00 cmp r3, #0 80118fa: d072 beq.n 80119e2 80118fc: 68ba ldr r2, [r7, #8] 80118fe: 68fb ldr r3, [r7, #12] 8011900: 429a cmp r2, r3 8011902: d86e bhi.n 80119e2 mem = -1; 8011904: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011908: 61bb str r3, [r7, #24] if (attr != NULL) { 801190a: 687b ldr r3, [r7, #4] 801190c: 2b00 cmp r3, #0 801190e: d015 beq.n 801193c if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticSemaphore_t))) { 8011910: 687b ldr r3, [r7, #4] 8011912: 689b ldr r3, [r3, #8] 8011914: 2b00 cmp r3, #0 8011916: d006 beq.n 8011926 8011918: 687b ldr r3, [r7, #4] 801191a: 68db ldr r3, [r3, #12] 801191c: 2b4f cmp r3, #79 @ 0x4f 801191e: d902 bls.n 8011926 mem = 1; 8011920: 2301 movs r3, #1 8011922: 61bb str r3, [r7, #24] 8011924: e00c b.n 8011940 } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U)) { 8011926: 687b ldr r3, [r7, #4] 8011928: 689b ldr r3, [r3, #8] 801192a: 2b00 cmp r3, #0 801192c: d108 bne.n 8011940 801192e: 687b ldr r3, [r7, #4] 8011930: 68db ldr r3, [r3, #12] 8011932: 2b00 cmp r3, #0 8011934: d104 bne.n 8011940 mem = 0; 8011936: 2300 movs r3, #0 8011938: 61bb str r3, [r7, #24] 801193a: e001 b.n 8011940 } } } else { mem = 0; 801193c: 2300 movs r3, #0 801193e: 61bb str r3, [r7, #24] } if (mem != -1) { 8011940: 69bb ldr r3, [r7, #24] 8011942: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011946: d04c beq.n 80119e2 if (max_count == 1U) { 8011948: 68fb ldr r3, [r7, #12] 801194a: 2b01 cmp r3, #1 801194c: d128 bne.n 80119a0 if (mem == 1) { 801194e: 69bb ldr r3, [r7, #24] 8011950: 2b01 cmp r3, #1 8011952: d10a bne.n 801196a #if (configSUPPORT_STATIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateBinaryStatic ((StaticSemaphore_t *)attr->cb_mem); 8011954: 687b ldr r3, [r7, #4] 8011956: 689b ldr r3, [r3, #8] 8011958: 2203 movs r2, #3 801195a: 9200 str r2, [sp, #0] 801195c: 2200 movs r2, #0 801195e: 2100 movs r1, #0 8011960: 2001 movs r0, #1 8011962: f000 fbc5 bl 80120f0 8011966: 61f8 str r0, [r7, #28] 8011968: e005 b.n 8011976 #endif } else { #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateBinary(); 801196a: 2203 movs r2, #3 801196c: 2100 movs r1, #0 801196e: 2001 movs r0, #1 8011970: f000 fc3b bl 80121ea 8011974: 61f8 str r0, [r7, #28] #endif } if ((hSemaphore != NULL) && (initial_count != 0U)) { 8011976: 69fb ldr r3, [r7, #28] 8011978: 2b00 cmp r3, #0 801197a: d022 beq.n 80119c2 801197c: 68bb ldr r3, [r7, #8] 801197e: 2b00 cmp r3, #0 8011980: d01f beq.n 80119c2 if (xSemaphoreGive (hSemaphore) != pdPASS) { 8011982: 2300 movs r3, #0 8011984: 2200 movs r2, #0 8011986: 2100 movs r1, #0 8011988: 69f8 ldr r0, [r7, #28] 801198a: f000 fdb3 bl 80124f4 801198e: 4603 mov r3, r0 8011990: 2b01 cmp r3, #1 8011992: d016 beq.n 80119c2 vSemaphoreDelete (hSemaphore); 8011994: 69f8 ldr r0, [r7, #28] 8011996: f001 fa8f bl 8012eb8 hSemaphore = NULL; 801199a: 2300 movs r3, #0 801199c: 61fb str r3, [r7, #28] 801199e: e010 b.n 80119c2 } } } else { if (mem == 1) { 80119a0: 69bb ldr r3, [r7, #24] 80119a2: 2b01 cmp r3, #1 80119a4: d108 bne.n 80119b8 #if (configSUPPORT_STATIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateCountingStatic (max_count, initial_count, (StaticSemaphore_t *)attr->cb_mem); 80119a6: 687b ldr r3, [r7, #4] 80119a8: 689b ldr r3, [r3, #8] 80119aa: 461a mov r2, r3 80119ac: 68b9 ldr r1, [r7, #8] 80119ae: 68f8 ldr r0, [r7, #12] 80119b0: f000 fd32 bl 8012418 80119b4: 61f8 str r0, [r7, #28] 80119b6: e004 b.n 80119c2 #endif } else { #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hSemaphore = xSemaphoreCreateCounting (max_count, initial_count); 80119b8: 68b9 ldr r1, [r7, #8] 80119ba: 68f8 ldr r0, [r7, #12] 80119bc: f000 fd65 bl 801248a 80119c0: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hSemaphore != NULL) { 80119c2: 69fb ldr r3, [r7, #28] 80119c4: 2b00 cmp r3, #0 80119c6: d00c beq.n 80119e2 if (attr != NULL) { 80119c8: 687b ldr r3, [r7, #4] 80119ca: 2b00 cmp r3, #0 80119cc: d003 beq.n 80119d6 name = attr->name; 80119ce: 687b ldr r3, [r7, #4] 80119d0: 681b ldr r3, [r3, #0] 80119d2: 617b str r3, [r7, #20] 80119d4: e001 b.n 80119da } else { name = NULL; 80119d6: 2300 movs r3, #0 80119d8: 617b str r3, [r7, #20] } vQueueAddToRegistry (hSemaphore, name); 80119da: 6979 ldr r1, [r7, #20] 80119dc: 69f8 ldr r0, [r7, #28] 80119de: f001 fbb7 bl 8013150 } #endif } } return ((osSemaphoreId_t)hSemaphore); 80119e2: 69fb ldr r3, [r7, #28] } 80119e4: 4618 mov r0, r3 80119e6: 3720 adds r7, #32 80119e8: 46bd mov sp, r7 80119ea: bd80 pop {r7, pc} 080119ec : osStatus_t osSemaphoreAcquire (osSemaphoreId_t semaphore_id, uint32_t timeout) { 80119ec: b580 push {r7, lr} 80119ee: b086 sub sp, #24 80119f0: af00 add r7, sp, #0 80119f2: 6078 str r0, [r7, #4] 80119f4: 6039 str r1, [r7, #0] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 80119f6: 687b ldr r3, [r7, #4] 80119f8: 613b str r3, [r7, #16] osStatus_t stat; BaseType_t yield; stat = osOK; 80119fa: 2300 movs r3, #0 80119fc: 617b str r3, [r7, #20] if (hSemaphore == NULL) { 80119fe: 693b ldr r3, [r7, #16] 8011a00: 2b00 cmp r3, #0 8011a02: d103 bne.n 8011a0c stat = osErrorParameter; 8011a04: f06f 0303 mvn.w r3, #3 8011a08: 617b str r3, [r7, #20] 8011a0a: e039 b.n 8011a80 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011a0c: f3ef 8305 mrs r3, IPSR 8011a10: 60fb str r3, [r7, #12] return(result); 8011a12: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 8011a14: 2b00 cmp r3, #0 8011a16: d022 beq.n 8011a5e if (timeout != 0U) { 8011a18: 683b ldr r3, [r7, #0] 8011a1a: 2b00 cmp r3, #0 8011a1c: d003 beq.n 8011a26 stat = osErrorParameter; 8011a1e: f06f 0303 mvn.w r3, #3 8011a22: 617b str r3, [r7, #20] 8011a24: e02c b.n 8011a80 } else { yield = pdFALSE; 8011a26: 2300 movs r3, #0 8011a28: 60bb str r3, [r7, #8] if (xSemaphoreTakeFromISR (hSemaphore, &yield) != pdPASS) { 8011a2a: f107 0308 add.w r3, r7, #8 8011a2e: 461a mov r2, r3 8011a30: 2100 movs r1, #0 8011a32: 6938 ldr r0, [r7, #16] 8011a34: f001 f980 bl 8012d38 8011a38: 4603 mov r3, r0 8011a3a: 2b01 cmp r3, #1 8011a3c: d003 beq.n 8011a46 stat = osErrorResource; 8011a3e: f06f 0302 mvn.w r3, #2 8011a42: 617b str r3, [r7, #20] 8011a44: e01c b.n 8011a80 } else { portYIELD_FROM_ISR (yield); 8011a46: 68bb ldr r3, [r7, #8] 8011a48: 2b00 cmp r3, #0 8011a4a: d019 beq.n 8011a80 8011a4c: 4b0f ldr r3, [pc, #60] @ (8011a8c ) 8011a4e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011a52: 601a str r2, [r3, #0] 8011a54: f3bf 8f4f dsb sy 8011a58: f3bf 8f6f isb sy 8011a5c: e010 b.n 8011a80 } } } else { if (xSemaphoreTake (hSemaphore, (TickType_t)timeout) != pdPASS) { 8011a5e: 6839 ldr r1, [r7, #0] 8011a60: 6938 ldr r0, [r7, #16] 8011a62: f001 f859 bl 8012b18 8011a66: 4603 mov r3, r0 8011a68: 2b01 cmp r3, #1 8011a6a: d009 beq.n 8011a80 if (timeout != 0U) { 8011a6c: 683b ldr r3, [r7, #0] 8011a6e: 2b00 cmp r3, #0 8011a70: d003 beq.n 8011a7a stat = osErrorTimeout; 8011a72: f06f 0301 mvn.w r3, #1 8011a76: 617b str r3, [r7, #20] 8011a78: e002 b.n 8011a80 } else { stat = osErrorResource; 8011a7a: f06f 0302 mvn.w r3, #2 8011a7e: 617b str r3, [r7, #20] } } } return (stat); 8011a80: 697b ldr r3, [r7, #20] } 8011a82: 4618 mov r0, r3 8011a84: 3718 adds r7, #24 8011a86: 46bd mov sp, r7 8011a88: bd80 pop {r7, pc} 8011a8a: bf00 nop 8011a8c: e000ed04 .word 0xe000ed04 08011a90 : osStatus_t osSemaphoreRelease (osSemaphoreId_t semaphore_id) { 8011a90: b580 push {r7, lr} 8011a92: b086 sub sp, #24 8011a94: af00 add r7, sp, #0 8011a96: 6078 str r0, [r7, #4] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 8011a98: 687b ldr r3, [r7, #4] 8011a9a: 613b str r3, [r7, #16] osStatus_t stat; BaseType_t yield; stat = osOK; 8011a9c: 2300 movs r3, #0 8011a9e: 617b str r3, [r7, #20] if (hSemaphore == NULL) { 8011aa0: 693b ldr r3, [r7, #16] 8011aa2: 2b00 cmp r3, #0 8011aa4: d103 bne.n 8011aae stat = osErrorParameter; 8011aa6: f06f 0303 mvn.w r3, #3 8011aaa: 617b str r3, [r7, #20] 8011aac: e02c b.n 8011b08 __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011aae: f3ef 8305 mrs r3, IPSR 8011ab2: 60fb str r3, [r7, #12] return(result); 8011ab4: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 8011ab6: 2b00 cmp r3, #0 8011ab8: d01a beq.n 8011af0 yield = pdFALSE; 8011aba: 2300 movs r3, #0 8011abc: 60bb str r3, [r7, #8] if (xSemaphoreGiveFromISR (hSemaphore, &yield) != pdTRUE) { 8011abe: f107 0308 add.w r3, r7, #8 8011ac2: 4619 mov r1, r3 8011ac4: 6938 ldr r0, [r7, #16] 8011ac6: f000 feb5 bl 8012834 8011aca: 4603 mov r3, r0 8011acc: 2b01 cmp r3, #1 8011ace: d003 beq.n 8011ad8 stat = osErrorResource; 8011ad0: f06f 0302 mvn.w r3, #2 8011ad4: 617b str r3, [r7, #20] 8011ad6: e017 b.n 8011b08 } else { portYIELD_FROM_ISR (yield); 8011ad8: 68bb ldr r3, [r7, #8] 8011ada: 2b00 cmp r3, #0 8011adc: d014 beq.n 8011b08 8011ade: 4b0d ldr r3, [pc, #52] @ (8011b14 ) 8011ae0: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011ae4: 601a str r2, [r3, #0] 8011ae6: f3bf 8f4f dsb sy 8011aea: f3bf 8f6f isb sy 8011aee: e00b b.n 8011b08 } } else { if (xSemaphoreGive (hSemaphore) != pdPASS) { 8011af0: 2300 movs r3, #0 8011af2: 2200 movs r2, #0 8011af4: 2100 movs r1, #0 8011af6: 6938 ldr r0, [r7, #16] 8011af8: f000 fcfc bl 80124f4 8011afc: 4603 mov r3, r0 8011afe: 2b01 cmp r3, #1 8011b00: d002 beq.n 8011b08 stat = osErrorResource; 8011b02: f06f 0302 mvn.w r3, #2 8011b06: 617b str r3, [r7, #20] } } return (stat); 8011b08: 697b ldr r3, [r7, #20] } 8011b0a: 4618 mov r0, r3 8011b0c: 3718 adds r7, #24 8011b0e: 46bd mov sp, r7 8011b10: bd80 pop {r7, pc} 8011b12: bf00 nop 8011b14: e000ed04 .word 0xe000ed04 08011b18 : } return (count); } osStatus_t osSemaphoreDelete (osSemaphoreId_t semaphore_id) { 8011b18: b580 push {r7, lr} 8011b1a: b086 sub sp, #24 8011b1c: af00 add r7, sp, #0 8011b1e: 6078 str r0, [r7, #4] SemaphoreHandle_t hSemaphore = (SemaphoreHandle_t)semaphore_id; 8011b20: 687b ldr r3, [r7, #4] 8011b22: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011b24: f3ef 8305 mrs r3, IPSR 8011b28: 60fb str r3, [r7, #12] return(result); 8011b2a: 68fb ldr r3, [r7, #12] osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8011b2c: 2b00 cmp r3, #0 8011b2e: d003 beq.n 8011b38 stat = osErrorISR; 8011b30: f06f 0305 mvn.w r3, #5 8011b34: 617b str r3, [r7, #20] 8011b36: e00e b.n 8011b56 } else if (hSemaphore == NULL) { 8011b38: 693b ldr r3, [r7, #16] 8011b3a: 2b00 cmp r3, #0 8011b3c: d103 bne.n 8011b46 stat = osErrorParameter; 8011b3e: f06f 0303 mvn.w r3, #3 8011b42: 617b str r3, [r7, #20] 8011b44: e007 b.n 8011b56 } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hSemaphore); 8011b46: 6938 ldr r0, [r7, #16] 8011b48: f001 fb2c bl 80131a4 #endif stat = osOK; 8011b4c: 2300 movs r3, #0 8011b4e: 617b str r3, [r7, #20] vSemaphoreDelete (hSemaphore); 8011b50: 6938 ldr r0, [r7, #16] 8011b52: f001 f9b1 bl 8012eb8 } #else stat = osError; #endif return (stat); 8011b56: 697b ldr r3, [r7, #20] } 8011b58: 4618 mov r0, r3 8011b5a: 3718 adds r7, #24 8011b5c: 46bd mov sp, r7 8011b5e: bd80 pop {r7, pc} 08011b60 : /*---------------------------------------------------------------------------*/ osMessageQueueId_t osMessageQueueNew (uint32_t msg_count, uint32_t msg_size, const osMessageQueueAttr_t *attr) { 8011b60: b580 push {r7, lr} 8011b62: b08a sub sp, #40 @ 0x28 8011b64: af02 add r7, sp, #8 8011b66: 60f8 str r0, [r7, #12] 8011b68: 60b9 str r1, [r7, #8] 8011b6a: 607a str r2, [r7, #4] int32_t mem; #if (configQUEUE_REGISTRY_SIZE > 0) const char *name; #endif hQueue = NULL; 8011b6c: 2300 movs r3, #0 8011b6e: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011b70: f3ef 8305 mrs r3, IPSR 8011b74: 613b str r3, [r7, #16] return(result); 8011b76: 693b ldr r3, [r7, #16] if (!IS_IRQ() && (msg_count > 0U) && (msg_size > 0U)) { 8011b78: 2b00 cmp r3, #0 8011b7a: d15f bne.n 8011c3c 8011b7c: 68fb ldr r3, [r7, #12] 8011b7e: 2b00 cmp r3, #0 8011b80: d05c beq.n 8011c3c 8011b82: 68bb ldr r3, [r7, #8] 8011b84: 2b00 cmp r3, #0 8011b86: d059 beq.n 8011c3c mem = -1; 8011b88: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8011b8c: 61bb str r3, [r7, #24] if (attr != NULL) { 8011b8e: 687b ldr r3, [r7, #4] 8011b90: 2b00 cmp r3, #0 8011b92: d029 beq.n 8011be8 if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 8011b94: 687b ldr r3, [r7, #4] 8011b96: 689b ldr r3, [r3, #8] 8011b98: 2b00 cmp r3, #0 8011b9a: d012 beq.n 8011bc2 8011b9c: 687b ldr r3, [r7, #4] 8011b9e: 68db ldr r3, [r3, #12] 8011ba0: 2b4f cmp r3, #79 @ 0x4f 8011ba2: d90e bls.n 8011bc2 (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 8011ba4: 687b ldr r3, [r7, #4] 8011ba6: 691b ldr r3, [r3, #16] if ((attr->cb_mem != NULL) && (attr->cb_size >= sizeof(StaticQueue_t)) && 8011ba8: 2b00 cmp r3, #0 8011baa: d00a beq.n 8011bc2 (attr->mq_mem != NULL) && (attr->mq_size >= (msg_count * msg_size))) { 8011bac: 687b ldr r3, [r7, #4] 8011bae: 695a ldr r2, [r3, #20] 8011bb0: 68fb ldr r3, [r7, #12] 8011bb2: 68b9 ldr r1, [r7, #8] 8011bb4: fb01 f303 mul.w r3, r1, r3 8011bb8: 429a cmp r2, r3 8011bba: d302 bcc.n 8011bc2 mem = 1; 8011bbc: 2301 movs r3, #1 8011bbe: 61bb str r3, [r7, #24] 8011bc0: e014 b.n 8011bec } else { if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 8011bc2: 687b ldr r3, [r7, #4] 8011bc4: 689b ldr r3, [r3, #8] 8011bc6: 2b00 cmp r3, #0 8011bc8: d110 bne.n 8011bec 8011bca: 687b ldr r3, [r7, #4] 8011bcc: 68db ldr r3, [r3, #12] 8011bce: 2b00 cmp r3, #0 8011bd0: d10c bne.n 8011bec (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 8011bd2: 687b ldr r3, [r7, #4] 8011bd4: 691b ldr r3, [r3, #16] if ((attr->cb_mem == NULL) && (attr->cb_size == 0U) && 8011bd6: 2b00 cmp r3, #0 8011bd8: d108 bne.n 8011bec (attr->mq_mem == NULL) && (attr->mq_size == 0U)) { 8011bda: 687b ldr r3, [r7, #4] 8011bdc: 695b ldr r3, [r3, #20] 8011bde: 2b00 cmp r3, #0 8011be0: d104 bne.n 8011bec mem = 0; 8011be2: 2300 movs r3, #0 8011be4: 61bb str r3, [r7, #24] 8011be6: e001 b.n 8011bec } } } else { mem = 0; 8011be8: 2300 movs r3, #0 8011bea: 61bb str r3, [r7, #24] } if (mem == 1) { 8011bec: 69bb ldr r3, [r7, #24] 8011bee: 2b01 cmp r3, #1 8011bf0: d10b bne.n 8011c0a #if (configSUPPORT_STATIC_ALLOCATION == 1) hQueue = xQueueCreateStatic (msg_count, msg_size, attr->mq_mem, attr->cb_mem); 8011bf2: 687b ldr r3, [r7, #4] 8011bf4: 691a ldr r2, [r3, #16] 8011bf6: 687b ldr r3, [r7, #4] 8011bf8: 689b ldr r3, [r3, #8] 8011bfa: 2100 movs r1, #0 8011bfc: 9100 str r1, [sp, #0] 8011bfe: 68b9 ldr r1, [r7, #8] 8011c00: 68f8 ldr r0, [r7, #12] 8011c02: f000 fa75 bl 80120f0 8011c06: 61f8 str r0, [r7, #28] 8011c08: e008 b.n 8011c1c #endif } else { if (mem == 0) { 8011c0a: 69bb ldr r3, [r7, #24] 8011c0c: 2b00 cmp r3, #0 8011c0e: d105 bne.n 8011c1c #if (configSUPPORT_DYNAMIC_ALLOCATION == 1) hQueue = xQueueCreate (msg_count, msg_size); 8011c10: 2200 movs r2, #0 8011c12: 68b9 ldr r1, [r7, #8] 8011c14: 68f8 ldr r0, [r7, #12] 8011c16: f000 fae8 bl 80121ea 8011c1a: 61f8 str r0, [r7, #28] #endif } } #if (configQUEUE_REGISTRY_SIZE > 0) if (hQueue != NULL) { 8011c1c: 69fb ldr r3, [r7, #28] 8011c1e: 2b00 cmp r3, #0 8011c20: d00c beq.n 8011c3c if (attr != NULL) { 8011c22: 687b ldr r3, [r7, #4] 8011c24: 2b00 cmp r3, #0 8011c26: d003 beq.n 8011c30 name = attr->name; 8011c28: 687b ldr r3, [r7, #4] 8011c2a: 681b ldr r3, [r3, #0] 8011c2c: 617b str r3, [r7, #20] 8011c2e: e001 b.n 8011c34 } else { name = NULL; 8011c30: 2300 movs r3, #0 8011c32: 617b str r3, [r7, #20] } vQueueAddToRegistry (hQueue, name); 8011c34: 6979 ldr r1, [r7, #20] 8011c36: 69f8 ldr r0, [r7, #28] 8011c38: f001 fa8a bl 8013150 } #endif } return ((osMessageQueueId_t)hQueue); 8011c3c: 69fb ldr r3, [r7, #28] } 8011c3e: 4618 mov r0, r3 8011c40: 3720 adds r7, #32 8011c42: 46bd mov sp, r7 8011c44: bd80 pop {r7, pc} ... 08011c48 : osStatus_t osMessageQueuePut (osMessageQueueId_t mq_id, const void *msg_ptr, uint8_t msg_prio, uint32_t timeout) { 8011c48: b580 push {r7, lr} 8011c4a: b088 sub sp, #32 8011c4c: af00 add r7, sp, #0 8011c4e: 60f8 str r0, [r7, #12] 8011c50: 60b9 str r1, [r7, #8] 8011c52: 603b str r3, [r7, #0] 8011c54: 4613 mov r3, r2 8011c56: 71fb strb r3, [r7, #7] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011c58: 68fb ldr r3, [r7, #12] 8011c5a: 61bb str r3, [r7, #24] osStatus_t stat; BaseType_t yield; (void)msg_prio; /* Message priority is ignored */ stat = osOK; 8011c5c: 2300 movs r3, #0 8011c5e: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011c60: f3ef 8305 mrs r3, IPSR 8011c64: 617b str r3, [r7, #20] return(result); 8011c66: 697b ldr r3, [r7, #20] if (IS_IRQ()) { 8011c68: 2b00 cmp r3, #0 8011c6a: d028 beq.n 8011cbe if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 8011c6c: 69bb ldr r3, [r7, #24] 8011c6e: 2b00 cmp r3, #0 8011c70: d005 beq.n 8011c7e 8011c72: 68bb ldr r3, [r7, #8] 8011c74: 2b00 cmp r3, #0 8011c76: d002 beq.n 8011c7e 8011c78: 683b ldr r3, [r7, #0] 8011c7a: 2b00 cmp r3, #0 8011c7c: d003 beq.n 8011c86 stat = osErrorParameter; 8011c7e: f06f 0303 mvn.w r3, #3 8011c82: 61fb str r3, [r7, #28] 8011c84: e038 b.n 8011cf8 } else { yield = pdFALSE; 8011c86: 2300 movs r3, #0 8011c88: 613b str r3, [r7, #16] if (xQueueSendToBackFromISR (hQueue, msg_ptr, &yield) != pdTRUE) { 8011c8a: f107 0210 add.w r2, r7, #16 8011c8e: 2300 movs r3, #0 8011c90: 68b9 ldr r1, [r7, #8] 8011c92: 69b8 ldr r0, [r7, #24] 8011c94: f000 fd30 bl 80126f8 8011c98: 4603 mov r3, r0 8011c9a: 2b01 cmp r3, #1 8011c9c: d003 beq.n 8011ca6 stat = osErrorResource; 8011c9e: f06f 0302 mvn.w r3, #2 8011ca2: 61fb str r3, [r7, #28] 8011ca4: e028 b.n 8011cf8 } else { portYIELD_FROM_ISR (yield); 8011ca6: 693b ldr r3, [r7, #16] 8011ca8: 2b00 cmp r3, #0 8011caa: d025 beq.n 8011cf8 8011cac: 4b15 ldr r3, [pc, #84] @ (8011d04 ) 8011cae: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011cb2: 601a str r2, [r3, #0] 8011cb4: f3bf 8f4f dsb sy 8011cb8: f3bf 8f6f isb sy 8011cbc: e01c b.n 8011cf8 } } } else { if ((hQueue == NULL) || (msg_ptr == NULL)) { 8011cbe: 69bb ldr r3, [r7, #24] 8011cc0: 2b00 cmp r3, #0 8011cc2: d002 beq.n 8011cca 8011cc4: 68bb ldr r3, [r7, #8] 8011cc6: 2b00 cmp r3, #0 8011cc8: d103 bne.n 8011cd2 stat = osErrorParameter; 8011cca: f06f 0303 mvn.w r3, #3 8011cce: 61fb str r3, [r7, #28] 8011cd0: e012 b.n 8011cf8 } else { if (xQueueSendToBack (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 8011cd2: 2300 movs r3, #0 8011cd4: 683a ldr r2, [r7, #0] 8011cd6: 68b9 ldr r1, [r7, #8] 8011cd8: 69b8 ldr r0, [r7, #24] 8011cda: f000 fc0b bl 80124f4 8011cde: 4603 mov r3, r0 8011ce0: 2b01 cmp r3, #1 8011ce2: d009 beq.n 8011cf8 if (timeout != 0U) { 8011ce4: 683b ldr r3, [r7, #0] 8011ce6: 2b00 cmp r3, #0 8011ce8: d003 beq.n 8011cf2 stat = osErrorTimeout; 8011cea: f06f 0301 mvn.w r3, #1 8011cee: 61fb str r3, [r7, #28] 8011cf0: e002 b.n 8011cf8 } else { stat = osErrorResource; 8011cf2: f06f 0302 mvn.w r3, #2 8011cf6: 61fb str r3, [r7, #28] } } } } return (stat); 8011cf8: 69fb ldr r3, [r7, #28] } 8011cfa: 4618 mov r0, r3 8011cfc: 3720 adds r7, #32 8011cfe: 46bd mov sp, r7 8011d00: bd80 pop {r7, pc} 8011d02: bf00 nop 8011d04: e000ed04 .word 0xe000ed04 08011d08 : osStatus_t osMessageQueueGet (osMessageQueueId_t mq_id, void *msg_ptr, uint8_t *msg_prio, uint32_t timeout) { 8011d08: b580 push {r7, lr} 8011d0a: b088 sub sp, #32 8011d0c: af00 add r7, sp, #0 8011d0e: 60f8 str r0, [r7, #12] 8011d10: 60b9 str r1, [r7, #8] 8011d12: 607a str r2, [r7, #4] 8011d14: 603b str r3, [r7, #0] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011d16: 68fb ldr r3, [r7, #12] 8011d18: 61bb str r3, [r7, #24] osStatus_t stat; BaseType_t yield; (void)msg_prio; /* Message priority is ignored */ stat = osOK; 8011d1a: 2300 movs r3, #0 8011d1c: 61fb str r3, [r7, #28] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011d1e: f3ef 8305 mrs r3, IPSR 8011d22: 617b str r3, [r7, #20] return(result); 8011d24: 697b ldr r3, [r7, #20] if (IS_IRQ()) { 8011d26: 2b00 cmp r3, #0 8011d28: d028 beq.n 8011d7c if ((hQueue == NULL) || (msg_ptr == NULL) || (timeout != 0U)) { 8011d2a: 69bb ldr r3, [r7, #24] 8011d2c: 2b00 cmp r3, #0 8011d2e: d005 beq.n 8011d3c 8011d30: 68bb ldr r3, [r7, #8] 8011d32: 2b00 cmp r3, #0 8011d34: d002 beq.n 8011d3c 8011d36: 683b ldr r3, [r7, #0] 8011d38: 2b00 cmp r3, #0 8011d3a: d003 beq.n 8011d44 stat = osErrorParameter; 8011d3c: f06f 0303 mvn.w r3, #3 8011d40: 61fb str r3, [r7, #28] 8011d42: e037 b.n 8011db4 } else { yield = pdFALSE; 8011d44: 2300 movs r3, #0 8011d46: 613b str r3, [r7, #16] if (xQueueReceiveFromISR (hQueue, msg_ptr, &yield) != pdPASS) { 8011d48: f107 0310 add.w r3, r7, #16 8011d4c: 461a mov r2, r3 8011d4e: 68b9 ldr r1, [r7, #8] 8011d50: 69b8 ldr r0, [r7, #24] 8011d52: f000 fff1 bl 8012d38 8011d56: 4603 mov r3, r0 8011d58: 2b01 cmp r3, #1 8011d5a: d003 beq.n 8011d64 stat = osErrorResource; 8011d5c: f06f 0302 mvn.w r3, #2 8011d60: 61fb str r3, [r7, #28] 8011d62: e027 b.n 8011db4 } else { portYIELD_FROM_ISR (yield); 8011d64: 693b ldr r3, [r7, #16] 8011d66: 2b00 cmp r3, #0 8011d68: d024 beq.n 8011db4 8011d6a: 4b15 ldr r3, [pc, #84] @ (8011dc0 ) 8011d6c: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8011d70: 601a str r2, [r3, #0] 8011d72: f3bf 8f4f dsb sy 8011d76: f3bf 8f6f isb sy 8011d7a: e01b b.n 8011db4 } } } else { if ((hQueue == NULL) || (msg_ptr == NULL)) { 8011d7c: 69bb ldr r3, [r7, #24] 8011d7e: 2b00 cmp r3, #0 8011d80: d002 beq.n 8011d88 8011d82: 68bb ldr r3, [r7, #8] 8011d84: 2b00 cmp r3, #0 8011d86: d103 bne.n 8011d90 stat = osErrorParameter; 8011d88: f06f 0303 mvn.w r3, #3 8011d8c: 61fb str r3, [r7, #28] 8011d8e: e011 b.n 8011db4 } else { if (xQueueReceive (hQueue, msg_ptr, (TickType_t)timeout) != pdPASS) { 8011d90: 683a ldr r2, [r7, #0] 8011d92: 68b9 ldr r1, [r7, #8] 8011d94: 69b8 ldr r0, [r7, #24] 8011d96: f000 fddd bl 8012954 8011d9a: 4603 mov r3, r0 8011d9c: 2b01 cmp r3, #1 8011d9e: d009 beq.n 8011db4 if (timeout != 0U) { 8011da0: 683b ldr r3, [r7, #0] 8011da2: 2b00 cmp r3, #0 8011da4: d003 beq.n 8011dae stat = osErrorTimeout; 8011da6: f06f 0301 mvn.w r3, #1 8011daa: 61fb str r3, [r7, #28] 8011dac: e002 b.n 8011db4 } else { stat = osErrorResource; 8011dae: f06f 0302 mvn.w r3, #2 8011db2: 61fb str r3, [r7, #28] } } } } return (stat); 8011db4: 69fb ldr r3, [r7, #28] } 8011db6: 4618 mov r0, r3 8011db8: 3720 adds r7, #32 8011dba: 46bd mov sp, r7 8011dbc: bd80 pop {r7, pc} 8011dbe: bf00 nop 8011dc0: e000ed04 .word 0xe000ed04 08011dc4 : } return (size); } uint32_t osMessageQueueGetCount (osMessageQueueId_t mq_id) { 8011dc4: b580 push {r7, lr} 8011dc6: b086 sub sp, #24 8011dc8: af00 add r7, sp, #0 8011dca: 6078 str r0, [r7, #4] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011dcc: 687b ldr r3, [r7, #4] 8011dce: 613b str r3, [r7, #16] UBaseType_t count; if (hQueue == NULL) { 8011dd0: 693b ldr r3, [r7, #16] 8011dd2: 2b00 cmp r3, #0 8011dd4: d102 bne.n 8011ddc count = 0U; 8011dd6: 2300 movs r3, #0 8011dd8: 617b str r3, [r7, #20] 8011dda: e00e b.n 8011dfa __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011ddc: f3ef 8305 mrs r3, IPSR 8011de0: 60fb str r3, [r7, #12] return(result); 8011de2: 68fb ldr r3, [r7, #12] } else if (IS_IRQ()) { 8011de4: 2b00 cmp r3, #0 8011de6: d004 beq.n 8011df2 count = uxQueueMessagesWaitingFromISR (hQueue); 8011de8: 6938 ldr r0, [r7, #16] 8011dea: f001 f846 bl 8012e7a 8011dee: 6178 str r0, [r7, #20] 8011df0: e003 b.n 8011dfa } else { count = uxQueueMessagesWaiting (hQueue); 8011df2: 6938 ldr r0, [r7, #16] 8011df4: f001 f822 bl 8012e3c 8011df8: 6178 str r0, [r7, #20] } return ((uint32_t)count); 8011dfa: 697b ldr r3, [r7, #20] } 8011dfc: 4618 mov r0, r3 8011dfe: 3718 adds r7, #24 8011e00: 46bd mov sp, r7 8011e02: bd80 pop {r7, pc} 08011e04 : } return (stat); } osStatus_t osMessageQueueDelete (osMessageQueueId_t mq_id) { 8011e04: b580 push {r7, lr} 8011e06: b086 sub sp, #24 8011e08: af00 add r7, sp, #0 8011e0a: 6078 str r0, [r7, #4] QueueHandle_t hQueue = (QueueHandle_t)mq_id; 8011e0c: 687b ldr r3, [r7, #4] 8011e0e: 613b str r3, [r7, #16] __ASM volatile ("MRS %0, ipsr" : "=r" (result) ); 8011e10: f3ef 8305 mrs r3, IPSR 8011e14: 60fb str r3, [r7, #12] return(result); 8011e16: 68fb ldr r3, [r7, #12] osStatus_t stat; #ifndef USE_FreeRTOS_HEAP_1 if (IS_IRQ()) { 8011e18: 2b00 cmp r3, #0 8011e1a: d003 beq.n 8011e24 stat = osErrorISR; 8011e1c: f06f 0305 mvn.w r3, #5 8011e20: 617b str r3, [r7, #20] 8011e22: e00e b.n 8011e42 } else if (hQueue == NULL) { 8011e24: 693b ldr r3, [r7, #16] 8011e26: 2b00 cmp r3, #0 8011e28: d103 bne.n 8011e32 stat = osErrorParameter; 8011e2a: f06f 0303 mvn.w r3, #3 8011e2e: 617b str r3, [r7, #20] 8011e30: e007 b.n 8011e42 } else { #if (configQUEUE_REGISTRY_SIZE > 0) vQueueUnregisterQueue (hQueue); 8011e32: 6938 ldr r0, [r7, #16] 8011e34: f001 f9b6 bl 80131a4 #endif stat = osOK; 8011e38: 2300 movs r3, #0 8011e3a: 617b str r3, [r7, #20] vQueueDelete (hQueue); 8011e3c: 6938 ldr r0, [r7, #16] 8011e3e: f001 f83b bl 8012eb8 } #else stat = osError; #endif return (stat); 8011e42: 697b ldr r3, [r7, #20] } 8011e44: 4618 mov r0, r3 8011e46: 3718 adds r7, #24 8011e48: 46bd mov sp, r7 8011e4a: bd80 pop {r7, pc} 08011e4c : /* 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) { 8011e4c: b480 push {r7} 8011e4e: b085 sub sp, #20 8011e50: af00 add r7, sp, #0 8011e52: 60f8 str r0, [r7, #12] 8011e54: 60b9 str r1, [r7, #8] 8011e56: 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; 8011e58: 68fb ldr r3, [r7, #12] 8011e5a: 4a07 ldr r2, [pc, #28] @ (8011e78 ) 8011e5c: 601a str r2, [r3, #0] *ppxIdleTaskStackBuffer = &Idle_Stack[0]; 8011e5e: 68bb ldr r3, [r7, #8] 8011e60: 4a06 ldr r2, [pc, #24] @ (8011e7c ) 8011e62: 601a str r2, [r3, #0] *pulIdleTaskStackSize = (uint32_t)configMINIMAL_STACK_SIZE; 8011e64: 687b ldr r3, [r7, #4] 8011e66: f44f 7200 mov.w r2, #512 @ 0x200 8011e6a: 601a str r2, [r3, #0] } 8011e6c: bf00 nop 8011e6e: 3714 adds r7, #20 8011e70: 46bd mov sp, r7 8011e72: f85d 7b04 ldr.w r7, [sp], #4 8011e76: 4770 bx lr 8011e78: 240023f0 .word 0x240023f0 8011e7c: 24002498 .word 0x24002498 08011e80 : /* 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) { 8011e80: b480 push {r7} 8011e82: b085 sub sp, #20 8011e84: af00 add r7, sp, #0 8011e86: 60f8 str r0, [r7, #12] 8011e88: 60b9 str r1, [r7, #8] 8011e8a: 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; 8011e8c: 68fb ldr r3, [r7, #12] 8011e8e: 4a07 ldr r2, [pc, #28] @ (8011eac ) 8011e90: 601a str r2, [r3, #0] *ppxTimerTaskStackBuffer = &Timer_Stack[0]; 8011e92: 68bb ldr r3, [r7, #8] 8011e94: 4a06 ldr r2, [pc, #24] @ (8011eb0 ) 8011e96: 601a str r2, [r3, #0] *pulTimerTaskStackSize = (uint32_t)configTIMER_TASK_STACK_DEPTH; 8011e98: 687b ldr r3, [r7, #4] 8011e9a: f44f 6280 mov.w r2, #1024 @ 0x400 8011e9e: 601a str r2, [r3, #0] } 8011ea0: bf00 nop 8011ea2: 3714 adds r7, #20 8011ea4: 46bd mov sp, r7 8011ea6: f85d 7b04 ldr.w r7, [sp], #4 8011eaa: 4770 bx lr 8011eac: 24002c98 .word 0x24002c98 8011eb0: 24002d40 .word 0x24002d40 08011eb4 : /*----------------------------------------------------------- * PUBLIC LIST API documented in list.h *----------------------------------------------------------*/ void vListInitialise( List_t * const pxList ) { 8011eb4: b480 push {r7} 8011eb6: b083 sub sp, #12 8011eb8: af00 add r7, sp, #0 8011eba: 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. */ 8011ebc: 687b ldr r3, [r7, #4] 8011ebe: f103 0208 add.w r2, r3, #8 8011ec2: 687b ldr r3, [r7, #4] 8011ec4: 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; 8011ec6: 687b ldr r3, [r7, #4] 8011ec8: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8011ecc: 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. */ 8011ece: 687b ldr r3, [r7, #4] 8011ed0: f103 0208 add.w r2, r3, #8 8011ed4: 687b ldr r3, [r7, #4] 8011ed6: 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. */ 8011ed8: 687b ldr r3, [r7, #4] 8011eda: f103 0208 add.w r2, r3, #8 8011ede: 687b ldr r3, [r7, #4] 8011ee0: 611a str r2, [r3, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 8011ee2: 687b ldr r3, [r7, #4] 8011ee4: 2200 movs r2, #0 8011ee6: 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 ); } 8011ee8: bf00 nop 8011eea: 370c adds r7, #12 8011eec: 46bd mov sp, r7 8011eee: f85d 7b04 ldr.w r7, [sp], #4 8011ef2: 4770 bx lr 08011ef4 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { 8011ef4: b480 push {r7} 8011ef6: b083 sub sp, #12 8011ef8: af00 add r7, sp, #0 8011efa: 6078 str r0, [r7, #4] /* Make sure the list item is not recorded as being on a list. */ pxItem->pxContainer = NULL; 8011efc: 687b ldr r3, [r7, #4] 8011efe: 2200 movs r2, #0 8011f00: 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 ); } 8011f02: bf00 nop 8011f04: 370c adds r7, #12 8011f06: 46bd mov sp, r7 8011f08: f85d 7b04 ldr.w r7, [sp], #4 8011f0c: 4770 bx lr 08011f0e : /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { 8011f0e: b480 push {r7} 8011f10: b085 sub sp, #20 8011f12: af00 add r7, sp, #0 8011f14: 6078 str r0, [r7, #4] 8011f16: 6039 str r1, [r7, #0] ListItem_t * const pxIndex = pxList->pxIndex; 8011f18: 687b ldr r3, [r7, #4] 8011f1a: 685b ldr r3, [r3, #4] 8011f1c: 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; 8011f1e: 683b ldr r3, [r7, #0] 8011f20: 68fa ldr r2, [r7, #12] 8011f22: 605a str r2, [r3, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 8011f24: 68fb ldr r3, [r7, #12] 8011f26: 689a ldr r2, [r3, #8] 8011f28: 683b ldr r3, [r7, #0] 8011f2a: 609a str r2, [r3, #8] /* Only used during decision coverage testing. */ mtCOVERAGE_TEST_DELAY(); pxIndex->pxPrevious->pxNext = pxNewListItem; 8011f2c: 68fb ldr r3, [r7, #12] 8011f2e: 689b ldr r3, [r3, #8] 8011f30: 683a ldr r2, [r7, #0] 8011f32: 605a str r2, [r3, #4] pxIndex->pxPrevious = pxNewListItem; 8011f34: 68fb ldr r3, [r7, #12] 8011f36: 683a ldr r2, [r7, #0] 8011f38: 609a str r2, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pxContainer = pxList; 8011f3a: 683b ldr r3, [r7, #0] 8011f3c: 687a ldr r2, [r7, #4] 8011f3e: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; 8011f40: 687b ldr r3, [r7, #4] 8011f42: 681b ldr r3, [r3, #0] 8011f44: 1c5a adds r2, r3, #1 8011f46: 687b ldr r3, [r7, #4] 8011f48: 601a str r2, [r3, #0] } 8011f4a: bf00 nop 8011f4c: 3714 adds r7, #20 8011f4e: 46bd mov sp, r7 8011f50: f85d 7b04 ldr.w r7, [sp], #4 8011f54: 4770 bx lr 08011f56 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 8011f56: b480 push {r7} 8011f58: b085 sub sp, #20 8011f5a: af00 add r7, sp, #0 8011f5c: 6078 str r0, [r7, #4] 8011f5e: 6039 str r1, [r7, #0] ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 8011f60: 683b ldr r3, [r7, #0] 8011f62: 681b ldr r3, [r3, #0] 8011f64: 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 ) 8011f66: 68bb ldr r3, [r7, #8] 8011f68: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8011f6c: d103 bne.n 8011f76 { pxIterator = pxList->xListEnd.pxPrevious; 8011f6e: 687b ldr r3, [r7, #4] 8011f70: 691b ldr r3, [r3, #16] 8011f72: 60fb str r3, [r7, #12] 8011f74: e00c b.n 8011f90 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. */ 8011f76: 687b ldr r3, [r7, #4] 8011f78: 3308 adds r3, #8 8011f7a: 60fb str r3, [r7, #12] 8011f7c: e002 b.n 8011f84 8011f7e: 68fb ldr r3, [r7, #12] 8011f80: 685b ldr r3, [r3, #4] 8011f82: 60fb str r3, [r7, #12] 8011f84: 68fb ldr r3, [r7, #12] 8011f86: 685b ldr r3, [r3, #4] 8011f88: 681b ldr r3, [r3, #0] 8011f8a: 68ba ldr r2, [r7, #8] 8011f8c: 429a cmp r2, r3 8011f8e: d2f6 bcs.n 8011f7e /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 8011f90: 68fb ldr r3, [r7, #12] 8011f92: 685a ldr r2, [r3, #4] 8011f94: 683b ldr r3, [r7, #0] 8011f96: 605a str r2, [r3, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 8011f98: 683b ldr r3, [r7, #0] 8011f9a: 685b ldr r3, [r3, #4] 8011f9c: 683a ldr r2, [r7, #0] 8011f9e: 609a str r2, [r3, #8] pxNewListItem->pxPrevious = pxIterator; 8011fa0: 683b ldr r3, [r7, #0] 8011fa2: 68fa ldr r2, [r7, #12] 8011fa4: 609a str r2, [r3, #8] pxIterator->pxNext = pxNewListItem; 8011fa6: 68fb ldr r3, [r7, #12] 8011fa8: 683a ldr r2, [r7, #0] 8011faa: 605a str r2, [r3, #4] /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pxContainer = pxList; 8011fac: 683b ldr r3, [r7, #0] 8011fae: 687a ldr r2, [r7, #4] 8011fb0: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; 8011fb2: 687b ldr r3, [r7, #4] 8011fb4: 681b ldr r3, [r3, #0] 8011fb6: 1c5a adds r2, r3, #1 8011fb8: 687b ldr r3, [r7, #4] 8011fba: 601a str r2, [r3, #0] } 8011fbc: bf00 nop 8011fbe: 3714 adds r7, #20 8011fc0: 46bd mov sp, r7 8011fc2: f85d 7b04 ldr.w r7, [sp], #4 8011fc6: 4770 bx lr 08011fc8 : /*-----------------------------------------------------------*/ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) { 8011fc8: b480 push {r7} 8011fca: b085 sub sp, #20 8011fcc: af00 add r7, sp, #0 8011fce: 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; 8011fd0: 687b ldr r3, [r7, #4] 8011fd2: 691b ldr r3, [r3, #16] 8011fd4: 60fb str r3, [r7, #12] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 8011fd6: 687b ldr r3, [r7, #4] 8011fd8: 685b ldr r3, [r3, #4] 8011fda: 687a ldr r2, [r7, #4] 8011fdc: 6892 ldr r2, [r2, #8] 8011fde: 609a str r2, [r3, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 8011fe0: 687b ldr r3, [r7, #4] 8011fe2: 689b ldr r3, [r3, #8] 8011fe4: 687a ldr r2, [r7, #4] 8011fe6: 6852 ldr r2, [r2, #4] 8011fe8: 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 ) 8011fea: 68fb ldr r3, [r7, #12] 8011fec: 685b ldr r3, [r3, #4] 8011fee: 687a ldr r2, [r7, #4] 8011ff0: 429a cmp r2, r3 8011ff2: d103 bne.n 8011ffc { pxList->pxIndex = pxItemToRemove->pxPrevious; 8011ff4: 687b ldr r3, [r7, #4] 8011ff6: 689a ldr r2, [r3, #8] 8011ff8: 68fb ldr r3, [r7, #12] 8011ffa: 605a str r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pxContainer = NULL; 8011ffc: 687b ldr r3, [r7, #4] 8011ffe: 2200 movs r2, #0 8012000: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )--; 8012002: 68fb ldr r3, [r7, #12] 8012004: 681b ldr r3, [r3, #0] 8012006: 1e5a subs r2, r3, #1 8012008: 68fb ldr r3, [r7, #12] 801200a: 601a str r2, [r3, #0] return pxList->uxNumberOfItems; 801200c: 68fb ldr r3, [r7, #12] 801200e: 681b ldr r3, [r3, #0] } 8012010: 4618 mov r0, r3 8012012: 3714 adds r7, #20 8012014: 46bd mov sp, r7 8012016: f85d 7b04 ldr.w r7, [sp], #4 801201a: 4770 bx lr 0801201c : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 801201c: b580 push {r7, lr} 801201e: b084 sub sp, #16 8012020: af00 add r7, sp, #0 8012022: 6078 str r0, [r7, #4] 8012024: 6039 str r1, [r7, #0] Queue_t * const pxQueue = xQueue; 8012026: 687b ldr r3, [r7, #4] 8012028: 60fb str r3, [r7, #12] configASSERT( pxQueue ); 801202a: 68fb ldr r3, [r7, #12] 801202c: 2b00 cmp r3, #0 801202e: d10b bne.n 8012048 portFORCE_INLINE static void vPortRaiseBASEPRI( void ) { uint32_t ulNewBASEPRI; __asm volatile 8012030: f04f 0350 mov.w r3, #80 @ 0x50 8012034: f383 8811 msr BASEPRI, r3 8012038: f3bf 8f6f isb sy 801203c: f3bf 8f4f dsb sy 8012040: 60bb str r3, [r7, #8] " msr basepri, %0 \n" \ " isb \n" \ " dsb \n" \ :"=r" (ulNewBASEPRI) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "memory" ); } 8012042: bf00 nop 8012044: bf00 nop 8012046: e7fd b.n 8012044 taskENTER_CRITICAL(); 8012048: f003 fcd6 bl 80159f8 { pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 801204c: 68fb ldr r3, [r7, #12] 801204e: 681a ldr r2, [r3, #0] 8012050: 68fb ldr r3, [r7, #12] 8012052: 6bdb ldr r3, [r3, #60] @ 0x3c 8012054: 68f9 ldr r1, [r7, #12] 8012056: 6c09 ldr r1, [r1, #64] @ 0x40 8012058: fb01 f303 mul.w r3, r1, r3 801205c: 441a add r2, r3 801205e: 68fb ldr r3, [r7, #12] 8012060: 609a str r2, [r3, #8] pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 8012062: 68fb ldr r3, [r7, #12] 8012064: 2200 movs r2, #0 8012066: 639a str r2, [r3, #56] @ 0x38 pxQueue->pcWriteTo = pxQueue->pcHead; 8012068: 68fb ldr r3, [r7, #12] 801206a: 681a ldr r2, [r3, #0] 801206c: 68fb ldr r3, [r7, #12] 801206e: 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. */ 8012070: 68fb ldr r3, [r7, #12] 8012072: 681a ldr r2, [r3, #0] 8012074: 68fb ldr r3, [r7, #12] 8012076: 6bdb ldr r3, [r3, #60] @ 0x3c 8012078: 3b01 subs r3, #1 801207a: 68f9 ldr r1, [r7, #12] 801207c: 6c09 ldr r1, [r1, #64] @ 0x40 801207e: fb01 f303 mul.w r3, r1, r3 8012082: 441a add r2, r3 8012084: 68fb ldr r3, [r7, #12] 8012086: 60da str r2, [r3, #12] pxQueue->cRxLock = queueUNLOCKED; 8012088: 68fb ldr r3, [r7, #12] 801208a: 22ff movs r2, #255 @ 0xff 801208c: f883 2044 strb.w r2, [r3, #68] @ 0x44 pxQueue->cTxLock = queueUNLOCKED; 8012090: 68fb ldr r3, [r7, #12] 8012092: 22ff movs r2, #255 @ 0xff 8012094: f883 2045 strb.w r2, [r3, #69] @ 0x45 if( xNewQueue == pdFALSE ) 8012098: 683b ldr r3, [r7, #0] 801209a: 2b00 cmp r3, #0 801209c: d114 bne.n 80120c8 /* 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 ) 801209e: 68fb ldr r3, [r7, #12] 80120a0: 691b ldr r3, [r3, #16] 80120a2: 2b00 cmp r3, #0 80120a4: d01a beq.n 80120dc { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80120a6: 68fb ldr r3, [r7, #12] 80120a8: 3310 adds r3, #16 80120aa: 4618 mov r0, r3 80120ac: f002 f922 bl 80142f4 80120b0: 4603 mov r3, r0 80120b2: 2b00 cmp r3, #0 80120b4: d012 beq.n 80120dc { queueYIELD_IF_USING_PREEMPTION(); 80120b6: 4b0d ldr r3, [pc, #52] @ (80120ec ) 80120b8: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80120bc: 601a str r2, [r3, #0] 80120be: f3bf 8f4f dsb sy 80120c2: f3bf 8f6f isb sy 80120c6: e009 b.n 80120dc } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 80120c8: 68fb ldr r3, [r7, #12] 80120ca: 3310 adds r3, #16 80120cc: 4618 mov r0, r3 80120ce: f7ff fef1 bl 8011eb4 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 80120d2: 68fb ldr r3, [r7, #12] 80120d4: 3324 adds r3, #36 @ 0x24 80120d6: 4618 mov r0, r3 80120d8: f7ff feec bl 8011eb4 } } taskEXIT_CRITICAL(); 80120dc: f003 fcbe bl 8015a5c /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; 80120e0: 2301 movs r3, #1 } 80120e2: 4618 mov r0, r3 80120e4: 3710 adds r7, #16 80120e6: 46bd mov sp, r7 80120e8: bd80 pop {r7, pc} 80120ea: bf00 nop 80120ec: e000ed04 .word 0xe000ed04 080120f0 : /*-----------------------------------------------------------*/ #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 ) { 80120f0: b580 push {r7, lr} 80120f2: b08e sub sp, #56 @ 0x38 80120f4: af02 add r7, sp, #8 80120f6: 60f8 str r0, [r7, #12] 80120f8: 60b9 str r1, [r7, #8] 80120fa: 607a str r2, [r7, #4] 80120fc: 603b str r3, [r7, #0] Queue_t *pxNewQueue; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 80120fe: 68fb ldr r3, [r7, #12] 8012100: 2b00 cmp r3, #0 8012102: d10b bne.n 801211c __asm volatile 8012104: f04f 0350 mov.w r3, #80 @ 0x50 8012108: f383 8811 msr BASEPRI, r3 801210c: f3bf 8f6f isb sy 8012110: f3bf 8f4f dsb sy 8012114: 62bb str r3, [r7, #40] @ 0x28 } 8012116: bf00 nop 8012118: bf00 nop 801211a: e7fd b.n 8012118 /* The StaticQueue_t structure and the queue storage area must be supplied. */ configASSERT( pxStaticQueue != NULL ); 801211c: 683b ldr r3, [r7, #0] 801211e: 2b00 cmp r3, #0 8012120: d10b bne.n 801213a __asm volatile 8012122: f04f 0350 mov.w r3, #80 @ 0x50 8012126: f383 8811 msr BASEPRI, r3 801212a: f3bf 8f6f isb sy 801212e: f3bf 8f4f dsb sy 8012132: 627b str r3, [r7, #36] @ 0x24 } 8012134: bf00 nop 8012136: bf00 nop 8012138: e7fd b.n 8012136 /* 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 ) ) ); 801213a: 687b ldr r3, [r7, #4] 801213c: 2b00 cmp r3, #0 801213e: d002 beq.n 8012146 8012140: 68bb ldr r3, [r7, #8] 8012142: 2b00 cmp r3, #0 8012144: d001 beq.n 801214a 8012146: 2301 movs r3, #1 8012148: e000 b.n 801214c 801214a: 2300 movs r3, #0 801214c: 2b00 cmp r3, #0 801214e: d10b bne.n 8012168 __asm volatile 8012150: f04f 0350 mov.w r3, #80 @ 0x50 8012154: f383 8811 msr BASEPRI, r3 8012158: f3bf 8f6f isb sy 801215c: f3bf 8f4f dsb sy 8012160: 623b str r3, [r7, #32] } 8012162: bf00 nop 8012164: bf00 nop 8012166: e7fd b.n 8012164 configASSERT( !( ( pucQueueStorage == NULL ) && ( uxItemSize != 0 ) ) ); 8012168: 687b ldr r3, [r7, #4] 801216a: 2b00 cmp r3, #0 801216c: d102 bne.n 8012174 801216e: 68bb ldr r3, [r7, #8] 8012170: 2b00 cmp r3, #0 8012172: d101 bne.n 8012178 8012174: 2301 movs r3, #1 8012176: e000 b.n 801217a 8012178: 2300 movs r3, #0 801217a: 2b00 cmp r3, #0 801217c: d10b bne.n 8012196 __asm volatile 801217e: f04f 0350 mov.w r3, #80 @ 0x50 8012182: f383 8811 msr BASEPRI, r3 8012186: f3bf 8f6f isb sy 801218a: f3bf 8f4f dsb sy 801218e: 61fb str r3, [r7, #28] } 8012190: bf00 nop 8012192: bf00 nop 8012194: e7fd b.n 8012192 #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 ); 8012196: 2350 movs r3, #80 @ 0x50 8012198: 617b str r3, [r7, #20] configASSERT( xSize == sizeof( Queue_t ) ); 801219a: 697b ldr r3, [r7, #20] 801219c: 2b50 cmp r3, #80 @ 0x50 801219e: d00b beq.n 80121b8 __asm volatile 80121a0: f04f 0350 mov.w r3, #80 @ 0x50 80121a4: f383 8811 msr BASEPRI, r3 80121a8: f3bf 8f6f isb sy 80121ac: f3bf 8f4f dsb sy 80121b0: 61bb str r3, [r7, #24] } 80121b2: bf00 nop 80121b4: bf00 nop 80121b6: e7fd b.n 80121b4 ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ 80121b8: 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. */ 80121ba: 683b ldr r3, [r7, #0] 80121bc: 62fb str r3, [r7, #44] @ 0x2c if( pxNewQueue != NULL ) 80121be: 6afb ldr r3, [r7, #44] @ 0x2c 80121c0: 2b00 cmp r3, #0 80121c2: d00d beq.n 80121e0 #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; 80121c4: 6afb ldr r3, [r7, #44] @ 0x2c 80121c6: 2201 movs r2, #1 80121c8: f883 2046 strb.w r2, [r3, #70] @ 0x46 } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 80121cc: f897 2038 ldrb.w r2, [r7, #56] @ 0x38 80121d0: 6afb ldr r3, [r7, #44] @ 0x2c 80121d2: 9300 str r3, [sp, #0] 80121d4: 4613 mov r3, r2 80121d6: 687a ldr r2, [r7, #4] 80121d8: 68b9 ldr r1, [r7, #8] 80121da: 68f8 ldr r0, [r7, #12] 80121dc: f000 f840 bl 8012260 { traceQUEUE_CREATE_FAILED( ucQueueType ); mtCOVERAGE_TEST_MARKER(); } return pxNewQueue; 80121e0: 6afb ldr r3, [r7, #44] @ 0x2c } 80121e2: 4618 mov r0, r3 80121e4: 3730 adds r7, #48 @ 0x30 80121e6: 46bd mov sp, r7 80121e8: bd80 pop {r7, pc} 080121ea : /*-----------------------------------------------------------*/ #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 80121ea: b580 push {r7, lr} 80121ec: b08a sub sp, #40 @ 0x28 80121ee: af02 add r7, sp, #8 80121f0: 60f8 str r0, [r7, #12] 80121f2: 60b9 str r1, [r7, #8] 80121f4: 4613 mov r3, r2 80121f6: 71fb strb r3, [r7, #7] Queue_t *pxNewQueue; size_t xQueueSizeInBytes; uint8_t *pucQueueStorage; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 80121f8: 68fb ldr r3, [r7, #12] 80121fa: 2b00 cmp r3, #0 80121fc: d10b bne.n 8012216 __asm volatile 80121fe: f04f 0350 mov.w r3, #80 @ 0x50 8012202: f383 8811 msr BASEPRI, r3 8012206: f3bf 8f6f isb sy 801220a: f3bf 8f4f dsb sy 801220e: 613b str r3, [r7, #16] } 8012210: bf00 nop 8012212: bf00 nop 8012214: e7fd b.n 8012212 /* 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. */ 8012216: 68fb ldr r3, [r7, #12] 8012218: 68ba ldr r2, [r7, #8] 801221a: fb02 f303 mul.w r3, r2, r3 801221e: 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. */ 8012220: 69fb ldr r3, [r7, #28] 8012222: 3350 adds r3, #80 @ 0x50 8012224: 4618 mov r0, r3 8012226: f003 fd09 bl 8015c3c 801222a: 61b8 str r0, [r7, #24] if( pxNewQueue != NULL ) 801222c: 69bb ldr r3, [r7, #24] 801222e: 2b00 cmp r3, #0 8012230: d011 beq.n 8012256 { /* Jump past the queue structure to find the location of the queue storage area. */ pucQueueStorage = ( uint8_t * ) pxNewQueue; 8012232: 69bb ldr r3, [r7, #24] 8012234: 617b str r3, [r7, #20] pucQueueStorage += sizeof( Queue_t ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ 8012236: 697b ldr r3, [r7, #20] 8012238: 3350 adds r3, #80 @ 0x50 801223a: 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; 801223c: 69bb ldr r3, [r7, #24] 801223e: 2200 movs r2, #0 8012240: f883 2046 strb.w r2, [r3, #70] @ 0x46 } #endif /* configSUPPORT_STATIC_ALLOCATION */ prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); 8012244: 79fa ldrb r2, [r7, #7] 8012246: 69bb ldr r3, [r7, #24] 8012248: 9300 str r3, [sp, #0] 801224a: 4613 mov r3, r2 801224c: 697a ldr r2, [r7, #20] 801224e: 68b9 ldr r1, [r7, #8] 8012250: 68f8 ldr r0, [r7, #12] 8012252: f000 f805 bl 8012260 { traceQUEUE_CREATE_FAILED( ucQueueType ); mtCOVERAGE_TEST_MARKER(); } return pxNewQueue; 8012256: 69bb ldr r3, [r7, #24] } 8012258: 4618 mov r0, r3 801225a: 3720 adds r7, #32 801225c: 46bd mov sp, r7 801225e: bd80 pop {r7, pc} 08012260 : #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 ) { 8012260: b580 push {r7, lr} 8012262: b084 sub sp, #16 8012264: af00 add r7, sp, #0 8012266: 60f8 str r0, [r7, #12] 8012268: 60b9 str r1, [r7, #8] 801226a: 607a str r2, [r7, #4] 801226c: 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 ) 801226e: 68bb ldr r3, [r7, #8] 8012270: 2b00 cmp r3, #0 8012272: d103 bne.n 801227c { /* 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; 8012274: 69bb ldr r3, [r7, #24] 8012276: 69ba ldr r2, [r7, #24] 8012278: 601a str r2, [r3, #0] 801227a: e002 b.n 8012282 } else { /* Set the head to the start of the queue storage area. */ pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage; 801227c: 69bb ldr r3, [r7, #24] 801227e: 687a ldr r2, [r7, #4] 8012280: 601a str r2, [r3, #0] } /* Initialise the queue members as described where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 8012282: 69bb ldr r3, [r7, #24] 8012284: 68fa ldr r2, [r7, #12] 8012286: 63da str r2, [r3, #60] @ 0x3c pxNewQueue->uxItemSize = uxItemSize; 8012288: 69bb ldr r3, [r7, #24] 801228a: 68ba ldr r2, [r7, #8] 801228c: 641a str r2, [r3, #64] @ 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 801228e: 2101 movs r1, #1 8012290: 69b8 ldr r0, [r7, #24] 8012292: f7ff fec3 bl 801201c #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 8012296: 69bb ldr r3, [r7, #24] 8012298: 78fa ldrb r2, [r7, #3] 801229a: f883 204c strb.w r2, [r3, #76] @ 0x4c pxNewQueue->pxQueueSetContainer = NULL; } #endif /* configUSE_QUEUE_SETS */ traceQUEUE_CREATE( pxNewQueue ); } 801229e: bf00 nop 80122a0: 3710 adds r7, #16 80122a2: 46bd mov sp, r7 80122a4: bd80 pop {r7, pc} 080122a6 : /*-----------------------------------------------------------*/ #if( configUSE_MUTEXES == 1 ) static void prvInitialiseMutex( Queue_t *pxNewQueue ) { 80122a6: b580 push {r7, lr} 80122a8: b082 sub sp, #8 80122aa: af00 add r7, sp, #0 80122ac: 6078 str r0, [r7, #4] if( pxNewQueue != NULL ) 80122ae: 687b ldr r3, [r7, #4] 80122b0: 2b00 cmp r3, #0 80122b2: d00e beq.n 80122d2 { /* 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; 80122b4: 687b ldr r3, [r7, #4] 80122b6: 2200 movs r2, #0 80122b8: 609a str r2, [r3, #8] pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; 80122ba: 687b ldr r3, [r7, #4] 80122bc: 2200 movs r2, #0 80122be: 601a str r2, [r3, #0] /* In case this is a recursive mutex. */ pxNewQueue->u.xSemaphore.uxRecursiveCallCount = 0; 80122c0: 687b ldr r3, [r7, #4] 80122c2: 2200 movs r2, #0 80122c4: 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 ); 80122c6: 2300 movs r3, #0 80122c8: 2200 movs r2, #0 80122ca: 2100 movs r1, #0 80122cc: 6878 ldr r0, [r7, #4] 80122ce: f000 f911 bl 80124f4 } else { traceCREATE_MUTEX_FAILED(); } } 80122d2: bf00 nop 80122d4: 3708 adds r7, #8 80122d6: 46bd mov sp, r7 80122d8: bd80 pop {r7, pc} 080122da : /*-----------------------------------------------------------*/ #if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 80122da: b580 push {r7, lr} 80122dc: b086 sub sp, #24 80122de: af00 add r7, sp, #0 80122e0: 4603 mov r3, r0 80122e2: 71fb strb r3, [r7, #7] QueueHandle_t xNewQueue; const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0; 80122e4: 2301 movs r3, #1 80122e6: 617b str r3, [r7, #20] 80122e8: 2300 movs r3, #0 80122ea: 613b str r3, [r7, #16] xNewQueue = xQueueGenericCreate( uxMutexLength, uxMutexSize, ucQueueType ); 80122ec: 79fb ldrb r3, [r7, #7] 80122ee: 461a mov r2, r3 80122f0: 6939 ldr r1, [r7, #16] 80122f2: 6978 ldr r0, [r7, #20] 80122f4: f7ff ff79 bl 80121ea 80122f8: 60f8 str r0, [r7, #12] prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 80122fa: 68f8 ldr r0, [r7, #12] 80122fc: f7ff ffd3 bl 80122a6 return xNewQueue; 8012300: 68fb ldr r3, [r7, #12] } 8012302: 4618 mov r0, r3 8012304: 3718 adds r7, #24 8012306: 46bd mov sp, r7 8012308: bd80 pop {r7, pc} 0801230a : /*-----------------------------------------------------------*/ #if( ( configUSE_MUTEXES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateMutexStatic( const uint8_t ucQueueType, StaticQueue_t *pxStaticQueue ) { 801230a: b580 push {r7, lr} 801230c: b088 sub sp, #32 801230e: af02 add r7, sp, #8 8012310: 4603 mov r3, r0 8012312: 6039 str r1, [r7, #0] 8012314: 71fb strb r3, [r7, #7] QueueHandle_t xNewQueue; const UBaseType_t uxMutexLength = ( UBaseType_t ) 1, uxMutexSize = ( UBaseType_t ) 0; 8012316: 2301 movs r3, #1 8012318: 617b str r3, [r7, #20] 801231a: 2300 movs r3, #0 801231c: 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 ); 801231e: 79fb ldrb r3, [r7, #7] 8012320: 9300 str r3, [sp, #0] 8012322: 683b ldr r3, [r7, #0] 8012324: 2200 movs r2, #0 8012326: 6939 ldr r1, [r7, #16] 8012328: 6978 ldr r0, [r7, #20] 801232a: f7ff fee1 bl 80120f0 801232e: 60f8 str r0, [r7, #12] prvInitialiseMutex( ( Queue_t * ) xNewQueue ); 8012330: 68f8 ldr r0, [r7, #12] 8012332: f7ff ffb8 bl 80122a6 return xNewQueue; 8012336: 68fb ldr r3, [r7, #12] } 8012338: 4618 mov r0, r3 801233a: 3718 adds r7, #24 801233c: 46bd mov sp, r7 801233e: bd80 pop {r7, pc} 08012340 : /*-----------------------------------------------------------*/ #if ( configUSE_RECURSIVE_MUTEXES == 1 ) BaseType_t xQueueGiveMutexRecursive( QueueHandle_t xMutex ) { 8012340: b590 push {r4, r7, lr} 8012342: b087 sub sp, #28 8012344: af00 add r7, sp, #0 8012346: 6078 str r0, [r7, #4] BaseType_t xReturn; Queue_t * const pxMutex = ( Queue_t * ) xMutex; 8012348: 687b ldr r3, [r7, #4] 801234a: 613b str r3, [r7, #16] configASSERT( pxMutex ); 801234c: 693b ldr r3, [r7, #16] 801234e: 2b00 cmp r3, #0 8012350: d10b bne.n 801236a __asm volatile 8012352: f04f 0350 mov.w r3, #80 @ 0x50 8012356: f383 8811 msr BASEPRI, r3 801235a: f3bf 8f6f isb sy 801235e: f3bf 8f4f dsb sy 8012362: 60fb str r3, [r7, #12] } 8012364: bf00 nop 8012366: bf00 nop 8012368: e7fd b.n 8012366 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() ) 801236a: 693b ldr r3, [r7, #16] 801236c: 689c ldr r4, [r3, #8] 801236e: f002 f9af bl 80146d0 8012372: 4603 mov r3, r0 8012374: 429c cmp r4, r3 8012376: d111 bne.n 801239c /* 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 )--; 8012378: 693b ldr r3, [r7, #16] 801237a: 68db ldr r3, [r3, #12] 801237c: 1e5a subs r2, r3, #1 801237e: 693b ldr r3, [r7, #16] 8012380: 60da str r2, [r3, #12] /* Has the recursive call count unwound to 0? */ if( pxMutex->u.xSemaphore.uxRecursiveCallCount == ( UBaseType_t ) 0 ) 8012382: 693b ldr r3, [r7, #16] 8012384: 68db ldr r3, [r3, #12] 8012386: 2b00 cmp r3, #0 8012388: d105 bne.n 8012396 { /* 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 ); 801238a: 2300 movs r3, #0 801238c: 2200 movs r2, #0 801238e: 2100 movs r1, #0 8012390: 6938 ldr r0, [r7, #16] 8012392: f000 f8af bl 80124f4 else { mtCOVERAGE_TEST_MARKER(); } xReturn = pdPASS; 8012396: 2301 movs r3, #1 8012398: 617b str r3, [r7, #20] 801239a: e001 b.n 80123a0 } else { /* The mutex cannot be given because the calling task is not the holder. */ xReturn = pdFAIL; 801239c: 2300 movs r3, #0 801239e: 617b str r3, [r7, #20] traceGIVE_MUTEX_RECURSIVE_FAILED( pxMutex ); } return xReturn; 80123a0: 697b ldr r3, [r7, #20] } 80123a2: 4618 mov r0, r3 80123a4: 371c adds r7, #28 80123a6: 46bd mov sp, r7 80123a8: bd90 pop {r4, r7, pc} 080123aa : /*-----------------------------------------------------------*/ #if ( configUSE_RECURSIVE_MUTEXES == 1 ) BaseType_t xQueueTakeMutexRecursive( QueueHandle_t xMutex, TickType_t xTicksToWait ) { 80123aa: b590 push {r4, r7, lr} 80123ac: b087 sub sp, #28 80123ae: af00 add r7, sp, #0 80123b0: 6078 str r0, [r7, #4] 80123b2: 6039 str r1, [r7, #0] BaseType_t xReturn; Queue_t * const pxMutex = ( Queue_t * ) xMutex; 80123b4: 687b ldr r3, [r7, #4] 80123b6: 613b str r3, [r7, #16] configASSERT( pxMutex ); 80123b8: 693b ldr r3, [r7, #16] 80123ba: 2b00 cmp r3, #0 80123bc: d10b bne.n 80123d6 __asm volatile 80123be: f04f 0350 mov.w r3, #80 @ 0x50 80123c2: f383 8811 msr BASEPRI, r3 80123c6: f3bf 8f6f isb sy 80123ca: f3bf 8f4f dsb sy 80123ce: 60fb str r3, [r7, #12] } 80123d0: bf00 nop 80123d2: bf00 nop 80123d4: e7fd b.n 80123d2 /* Comments regarding mutual exclusion as per those within xQueueGiveMutexRecursive(). */ traceTAKE_MUTEX_RECURSIVE( pxMutex ); if( pxMutex->u.xSemaphore.xMutexHolder == xTaskGetCurrentTaskHandle() ) 80123d6: 693b ldr r3, [r7, #16] 80123d8: 689c ldr r4, [r3, #8] 80123da: f002 f979 bl 80146d0 80123de: 4603 mov r3, r0 80123e0: 429c cmp r4, r3 80123e2: d107 bne.n 80123f4 { ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 80123e4: 693b ldr r3, [r7, #16] 80123e6: 68db ldr r3, [r3, #12] 80123e8: 1c5a adds r2, r3, #1 80123ea: 693b ldr r3, [r7, #16] 80123ec: 60da str r2, [r3, #12] xReturn = pdPASS; 80123ee: 2301 movs r3, #1 80123f0: 617b str r3, [r7, #20] 80123f2: e00c b.n 801240e } else { xReturn = xQueueSemaphoreTake( pxMutex, xTicksToWait ); 80123f4: 6839 ldr r1, [r7, #0] 80123f6: 6938 ldr r0, [r7, #16] 80123f8: f000 fb8e bl 8012b18 80123fc: 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 ) 80123fe: 697b ldr r3, [r7, #20] 8012400: 2b00 cmp r3, #0 8012402: d004 beq.n 801240e { ( pxMutex->u.xSemaphore.uxRecursiveCallCount )++; 8012404: 693b ldr r3, [r7, #16] 8012406: 68db ldr r3, [r3, #12] 8012408: 1c5a adds r2, r3, #1 801240a: 693b ldr r3, [r7, #16] 801240c: 60da str r2, [r3, #12] { traceTAKE_MUTEX_RECURSIVE_FAILED( pxMutex ); } } return xReturn; 801240e: 697b ldr r3, [r7, #20] } 8012410: 4618 mov r0, r3 8012412: 371c adds r7, #28 8012414: 46bd mov sp, r7 8012416: bd90 pop {r4, r7, pc} 08012418 : /*-----------------------------------------------------------*/ #if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateCountingSemaphoreStatic( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount, StaticQueue_t *pxStaticQueue ) { 8012418: b580 push {r7, lr} 801241a: b08a sub sp, #40 @ 0x28 801241c: af02 add r7, sp, #8 801241e: 60f8 str r0, [r7, #12] 8012420: 60b9 str r1, [r7, #8] 8012422: 607a str r2, [r7, #4] QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 8012424: 68fb ldr r3, [r7, #12] 8012426: 2b00 cmp r3, #0 8012428: d10b bne.n 8012442 __asm volatile 801242a: f04f 0350 mov.w r3, #80 @ 0x50 801242e: f383 8811 msr BASEPRI, r3 8012432: f3bf 8f6f isb sy 8012436: f3bf 8f4f dsb sy 801243a: 61bb str r3, [r7, #24] } 801243c: bf00 nop 801243e: bf00 nop 8012440: e7fd b.n 801243e configASSERT( uxInitialCount <= uxMaxCount ); 8012442: 68ba ldr r2, [r7, #8] 8012444: 68fb ldr r3, [r7, #12] 8012446: 429a cmp r2, r3 8012448: d90b bls.n 8012462 __asm volatile 801244a: f04f 0350 mov.w r3, #80 @ 0x50 801244e: f383 8811 msr BASEPRI, r3 8012452: f3bf 8f6f isb sy 8012456: f3bf 8f4f dsb sy 801245a: 617b str r3, [r7, #20] } 801245c: bf00 nop 801245e: bf00 nop 8012460: e7fd b.n 801245e xHandle = xQueueGenericCreateStatic( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, NULL, pxStaticQueue, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 8012462: 2302 movs r3, #2 8012464: 9300 str r3, [sp, #0] 8012466: 687b ldr r3, [r7, #4] 8012468: 2200 movs r2, #0 801246a: 2100 movs r1, #0 801246c: 68f8 ldr r0, [r7, #12] 801246e: f7ff fe3f bl 80120f0 8012472: 61f8 str r0, [r7, #28] if( xHandle != NULL ) 8012474: 69fb ldr r3, [r7, #28] 8012476: 2b00 cmp r3, #0 8012478: d002 beq.n 8012480 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 801247a: 69fb ldr r3, [r7, #28] 801247c: 68ba ldr r2, [r7, #8] 801247e: 639a str r2, [r3, #56] @ 0x38 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } return xHandle; 8012480: 69fb ldr r3, [r7, #28] } 8012482: 4618 mov r0, r3 8012484: 3720 adds r7, #32 8012486: 46bd mov sp, r7 8012488: bd80 pop {r7, pc} 0801248a : /*-----------------------------------------------------------*/ #if( ( configUSE_COUNTING_SEMAPHORES == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 801248a: b580 push {r7, lr} 801248c: b086 sub sp, #24 801248e: af00 add r7, sp, #0 8012490: 6078 str r0, [r7, #4] 8012492: 6039 str r1, [r7, #0] QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 8012494: 687b ldr r3, [r7, #4] 8012496: 2b00 cmp r3, #0 8012498: d10b bne.n 80124b2 __asm volatile 801249a: f04f 0350 mov.w r3, #80 @ 0x50 801249e: f383 8811 msr BASEPRI, r3 80124a2: f3bf 8f6f isb sy 80124a6: f3bf 8f4f dsb sy 80124aa: 613b str r3, [r7, #16] } 80124ac: bf00 nop 80124ae: bf00 nop 80124b0: e7fd b.n 80124ae configASSERT( uxInitialCount <= uxMaxCount ); 80124b2: 683a ldr r2, [r7, #0] 80124b4: 687b ldr r3, [r7, #4] 80124b6: 429a cmp r2, r3 80124b8: d90b bls.n 80124d2 __asm volatile 80124ba: f04f 0350 mov.w r3, #80 @ 0x50 80124be: f383 8811 msr BASEPRI, r3 80124c2: f3bf 8f6f isb sy 80124c6: f3bf 8f4f dsb sy 80124ca: 60fb str r3, [r7, #12] } 80124cc: bf00 nop 80124ce: bf00 nop 80124d0: e7fd b.n 80124ce xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 80124d2: 2202 movs r2, #2 80124d4: 2100 movs r1, #0 80124d6: 6878 ldr r0, [r7, #4] 80124d8: f7ff fe87 bl 80121ea 80124dc: 6178 str r0, [r7, #20] if( xHandle != NULL ) 80124de: 697b ldr r3, [r7, #20] 80124e0: 2b00 cmp r3, #0 80124e2: d002 beq.n 80124ea { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 80124e4: 697b ldr r3, [r7, #20] 80124e6: 683a ldr r2, [r7, #0] 80124e8: 639a str r2, [r3, #56] @ 0x38 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } return xHandle; 80124ea: 697b ldr r3, [r7, #20] } 80124ec: 4618 mov r0, r3 80124ee: 3718 adds r7, #24 80124f0: 46bd mov sp, r7 80124f2: bd80 pop {r7, pc} 080124f4 : #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 ) { 80124f4: b580 push {r7, lr} 80124f6: b08e sub sp, #56 @ 0x38 80124f8: af00 add r7, sp, #0 80124fa: 60f8 str r0, [r7, #12] 80124fc: 60b9 str r1, [r7, #8] 80124fe: 607a str r2, [r7, #4] 8012500: 603b str r3, [r7, #0] BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; 8012502: 2300 movs r3, #0 8012504: 637b str r3, [r7, #52] @ 0x34 TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8012506: 68fb ldr r3, [r7, #12] 8012508: 633b str r3, [r7, #48] @ 0x30 configASSERT( pxQueue ); 801250a: 6b3b ldr r3, [r7, #48] @ 0x30 801250c: 2b00 cmp r3, #0 801250e: d10b bne.n 8012528 __asm volatile 8012510: f04f 0350 mov.w r3, #80 @ 0x50 8012514: f383 8811 msr BASEPRI, r3 8012518: f3bf 8f6f isb sy 801251c: f3bf 8f4f dsb sy 8012520: 62bb str r3, [r7, #40] @ 0x28 } 8012522: bf00 nop 8012524: bf00 nop 8012526: e7fd b.n 8012524 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8012528: 68bb ldr r3, [r7, #8] 801252a: 2b00 cmp r3, #0 801252c: d103 bne.n 8012536 801252e: 6b3b ldr r3, [r7, #48] @ 0x30 8012530: 6c1b ldr r3, [r3, #64] @ 0x40 8012532: 2b00 cmp r3, #0 8012534: d101 bne.n 801253a 8012536: 2301 movs r3, #1 8012538: e000 b.n 801253c 801253a: 2300 movs r3, #0 801253c: 2b00 cmp r3, #0 801253e: d10b bne.n 8012558 __asm volatile 8012540: f04f 0350 mov.w r3, #80 @ 0x50 8012544: f383 8811 msr BASEPRI, r3 8012548: f3bf 8f6f isb sy 801254c: f3bf 8f4f dsb sy 8012550: 627b str r3, [r7, #36] @ 0x24 } 8012552: bf00 nop 8012554: bf00 nop 8012556: e7fd b.n 8012554 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8012558: 683b ldr r3, [r7, #0] 801255a: 2b02 cmp r3, #2 801255c: d103 bne.n 8012566 801255e: 6b3b ldr r3, [r7, #48] @ 0x30 8012560: 6bdb ldr r3, [r3, #60] @ 0x3c 8012562: 2b01 cmp r3, #1 8012564: d101 bne.n 801256a 8012566: 2301 movs r3, #1 8012568: e000 b.n 801256c 801256a: 2300 movs r3, #0 801256c: 2b00 cmp r3, #0 801256e: d10b bne.n 8012588 __asm volatile 8012570: f04f 0350 mov.w r3, #80 @ 0x50 8012574: f383 8811 msr BASEPRI, r3 8012578: f3bf 8f6f isb sy 801257c: f3bf 8f4f dsb sy 8012580: 623b str r3, [r7, #32] } 8012582: bf00 nop 8012584: bf00 nop 8012586: e7fd b.n 8012584 #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8012588: f002 f8b2 bl 80146f0 801258c: 4603 mov r3, r0 801258e: 2b00 cmp r3, #0 8012590: d102 bne.n 8012598 8012592: 687b ldr r3, [r7, #4] 8012594: 2b00 cmp r3, #0 8012596: d101 bne.n 801259c 8012598: 2301 movs r3, #1 801259a: e000 b.n 801259e 801259c: 2300 movs r3, #0 801259e: 2b00 cmp r3, #0 80125a0: d10b bne.n 80125ba __asm volatile 80125a2: f04f 0350 mov.w r3, #80 @ 0x50 80125a6: f383 8811 msr BASEPRI, r3 80125aa: f3bf 8f6f isb sy 80125ae: f3bf 8f4f dsb sy 80125b2: 61fb str r3, [r7, #28] } 80125b4: bf00 nop 80125b6: bf00 nop 80125b8: e7fd b.n 80125b6 /*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(); 80125ba: f003 fa1d bl 80159f8 { /* 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 ) ) 80125be: 6b3b ldr r3, [r7, #48] @ 0x30 80125c0: 6b9a ldr r2, [r3, #56] @ 0x38 80125c2: 6b3b ldr r3, [r7, #48] @ 0x30 80125c4: 6bdb ldr r3, [r3, #60] @ 0x3c 80125c6: 429a cmp r2, r3 80125c8: d302 bcc.n 80125d0 80125ca: 683b ldr r3, [r7, #0] 80125cc: 2b02 cmp r3, #2 80125ce: d129 bne.n 8012624 } } } #else /* configUSE_QUEUE_SETS */ { xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 80125d0: 683a ldr r2, [r7, #0] 80125d2: 68b9 ldr r1, [r7, #8] 80125d4: 6b38 ldr r0, [r7, #48] @ 0x30 80125d6: f000 fcab bl 8012f30 80125da: 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 ) 80125dc: 6b3b ldr r3, [r7, #48] @ 0x30 80125de: 6a5b ldr r3, [r3, #36] @ 0x24 80125e0: 2b00 cmp r3, #0 80125e2: d010 beq.n 8012606 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80125e4: 6b3b ldr r3, [r7, #48] @ 0x30 80125e6: 3324 adds r3, #36 @ 0x24 80125e8: 4618 mov r0, r3 80125ea: f001 fe83 bl 80142f4 80125ee: 4603 mov r3, r0 80125f0: 2b00 cmp r3, #0 80125f2: d013 beq.n 801261c { /* 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(); 80125f4: 4b3f ldr r3, [pc, #252] @ (80126f4 ) 80125f6: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80125fa: 601a str r2, [r3, #0] 80125fc: f3bf 8f4f dsb sy 8012600: f3bf 8f6f isb sy 8012604: e00a b.n 801261c else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 8012606: 6afb ldr r3, [r7, #44] @ 0x2c 8012608: 2b00 cmp r3, #0 801260a: d007 beq.n 801261c { /* 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(); 801260c: 4b39 ldr r3, [pc, #228] @ (80126f4 ) 801260e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012612: 601a str r2, [r3, #0] 8012614: f3bf 8f4f dsb sy 8012618: f3bf 8f6f isb sy mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 801261c: f003 fa1e bl 8015a5c return pdPASS; 8012620: 2301 movs r3, #1 8012622: e063 b.n 80126ec } else { if( xTicksToWait == ( TickType_t ) 0 ) 8012624: 687b ldr r3, [r7, #4] 8012626: 2b00 cmp r3, #0 8012628: d103 bne.n 8012632 { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 801262a: f003 fa17 bl 8015a5c /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 801262e: 2300 movs r3, #0 8012630: e05c b.n 80126ec } else if( xEntryTimeSet == pdFALSE ) 8012632: 6b7b ldr r3, [r7, #52] @ 0x34 8012634: 2b00 cmp r3, #0 8012636: d106 bne.n 8012646 { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8012638: f107 0314 add.w r3, r7, #20 801263c: 4618 mov r0, r3 801263e: f001 fee5 bl 801440c xEntryTimeSet = pdTRUE; 8012642: 2301 movs r3, #1 8012644: 637b str r3, [r7, #52] @ 0x34 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8012646: f003 fa09 bl 8015a5c /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 801264a: f001 fc05 bl 8013e58 prvLockQueue( pxQueue ); 801264e: f003 f9d3 bl 80159f8 8012652: 6b3b ldr r3, [r7, #48] @ 0x30 8012654: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8012658: b25b sxtb r3, r3 801265a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801265e: d103 bne.n 8012668 8012660: 6b3b ldr r3, [r7, #48] @ 0x30 8012662: 2200 movs r2, #0 8012664: f883 2044 strb.w r2, [r3, #68] @ 0x44 8012668: 6b3b ldr r3, [r7, #48] @ 0x30 801266a: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 801266e: b25b sxtb r3, r3 8012670: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012674: d103 bne.n 801267e 8012676: 6b3b ldr r3, [r7, #48] @ 0x30 8012678: 2200 movs r2, #0 801267a: f883 2045 strb.w r2, [r3, #69] @ 0x45 801267e: f003 f9ed bl 8015a5c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8012682: 1d3a adds r2, r7, #4 8012684: f107 0314 add.w r3, r7, #20 8012688: 4611 mov r1, r2 801268a: 4618 mov r0, r3 801268c: f001 fed4 bl 8014438 8012690: 4603 mov r3, r0 8012692: 2b00 cmp r3, #0 8012694: d124 bne.n 80126e0 { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 8012696: 6b38 ldr r0, [r7, #48] @ 0x30 8012698: f000 fd42 bl 8013120 801269c: 4603 mov r3, r0 801269e: 2b00 cmp r3, #0 80126a0: d018 beq.n 80126d4 { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 80126a2: 6b3b ldr r3, [r7, #48] @ 0x30 80126a4: 3310 adds r3, #16 80126a6: 687a ldr r2, [r7, #4] 80126a8: 4611 mov r1, r2 80126aa: 4618 mov r0, r3 80126ac: f001 fdd0 bl 8014250 /* 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 ); 80126b0: 6b38 ldr r0, [r7, #48] @ 0x30 80126b2: f000 fccd bl 8013050 /* 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 ) 80126b6: f001 fbdd bl 8013e74 80126ba: 4603 mov r3, r0 80126bc: 2b00 cmp r3, #0 80126be: f47f af7c bne.w 80125ba { portYIELD_WITHIN_API(); 80126c2: 4b0c ldr r3, [pc, #48] @ (80126f4 ) 80126c4: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80126c8: 601a str r2, [r3, #0] 80126ca: f3bf 8f4f dsb sy 80126ce: f3bf 8f6f isb sy 80126d2: e772 b.n 80125ba } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 80126d4: 6b38 ldr r0, [r7, #48] @ 0x30 80126d6: f000 fcbb bl 8013050 ( void ) xTaskResumeAll(); 80126da: f001 fbcb bl 8013e74 80126de: e76c b.n 80125ba } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 80126e0: 6b38 ldr r0, [r7, #48] @ 0x30 80126e2: f000 fcb5 bl 8013050 ( void ) xTaskResumeAll(); 80126e6: f001 fbc5 bl 8013e74 traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 80126ea: 2300 movs r3, #0 } } /*lint -restore */ } 80126ec: 4618 mov r0, r3 80126ee: 3738 adds r7, #56 @ 0x38 80126f0: 46bd mov sp, r7 80126f2: bd80 pop {r7, pc} 80126f4: e000ed04 .word 0xe000ed04 080126f8 : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 80126f8: b580 push {r7, lr} 80126fa: b090 sub sp, #64 @ 0x40 80126fc: af00 add r7, sp, #0 80126fe: 60f8 str r0, [r7, #12] 8012700: 60b9 str r1, [r7, #8] 8012702: 607a str r2, [r7, #4] 8012704: 603b str r3, [r7, #0] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 8012706: 68fb ldr r3, [r7, #12] 8012708: 63bb str r3, [r7, #56] @ 0x38 configASSERT( pxQueue ); 801270a: 6bbb ldr r3, [r7, #56] @ 0x38 801270c: 2b00 cmp r3, #0 801270e: d10b bne.n 8012728 __asm volatile 8012710: f04f 0350 mov.w r3, #80 @ 0x50 8012714: f383 8811 msr BASEPRI, r3 8012718: f3bf 8f6f isb sy 801271c: f3bf 8f4f dsb sy 8012720: 62bb str r3, [r7, #40] @ 0x28 } 8012722: bf00 nop 8012724: bf00 nop 8012726: e7fd b.n 8012724 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8012728: 68bb ldr r3, [r7, #8] 801272a: 2b00 cmp r3, #0 801272c: d103 bne.n 8012736 801272e: 6bbb ldr r3, [r7, #56] @ 0x38 8012730: 6c1b ldr r3, [r3, #64] @ 0x40 8012732: 2b00 cmp r3, #0 8012734: d101 bne.n 801273a 8012736: 2301 movs r3, #1 8012738: e000 b.n 801273c 801273a: 2300 movs r3, #0 801273c: 2b00 cmp r3, #0 801273e: d10b bne.n 8012758 __asm volatile 8012740: f04f 0350 mov.w r3, #80 @ 0x50 8012744: f383 8811 msr BASEPRI, r3 8012748: f3bf 8f6f isb sy 801274c: f3bf 8f4f dsb sy 8012750: 627b str r3, [r7, #36] @ 0x24 } 8012752: bf00 nop 8012754: bf00 nop 8012756: e7fd b.n 8012754 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8012758: 683b ldr r3, [r7, #0] 801275a: 2b02 cmp r3, #2 801275c: d103 bne.n 8012766 801275e: 6bbb ldr r3, [r7, #56] @ 0x38 8012760: 6bdb ldr r3, [r3, #60] @ 0x3c 8012762: 2b01 cmp r3, #1 8012764: d101 bne.n 801276a 8012766: 2301 movs r3, #1 8012768: e000 b.n 801276c 801276a: 2300 movs r3, #0 801276c: 2b00 cmp r3, #0 801276e: d10b bne.n 8012788 __asm volatile 8012770: f04f 0350 mov.w r3, #80 @ 0x50 8012774: f383 8811 msr BASEPRI, r3 8012778: f3bf 8f6f isb sy 801277c: f3bf 8f4f dsb sy 8012780: 623b str r3, [r7, #32] } 8012782: bf00 nop 8012784: bf00 nop 8012786: e7fd b.n 8012784 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(); 8012788: f003 fa16 bl 8015bb8 portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void ) { uint32_t ulOriginalBASEPRI, ulNewBASEPRI; __asm volatile 801278c: f3ef 8211 mrs r2, BASEPRI 8012790: f04f 0350 mov.w r3, #80 @ 0x50 8012794: f383 8811 msr BASEPRI, r3 8012798: f3bf 8f6f isb sy 801279c: f3bf 8f4f dsb sy 80127a0: 61fa str r2, [r7, #28] 80127a2: 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; 80127a4: 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(); 80127a6: 637b str r3, [r7, #52] @ 0x34 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 80127a8: 6bbb ldr r3, [r7, #56] @ 0x38 80127aa: 6b9a ldr r2, [r3, #56] @ 0x38 80127ac: 6bbb ldr r3, [r7, #56] @ 0x38 80127ae: 6bdb ldr r3, [r3, #60] @ 0x3c 80127b0: 429a cmp r2, r3 80127b2: d302 bcc.n 80127ba 80127b4: 683b ldr r3, [r7, #0] 80127b6: 2b02 cmp r3, #2 80127b8: d12f bne.n 801281a { const int8_t cTxLock = pxQueue->cTxLock; 80127ba: 6bbb ldr r3, [r7, #56] @ 0x38 80127bc: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 80127c0: f887 3033 strb.w r3, [r7, #51] @ 0x33 const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting; 80127c4: 6bbb ldr r3, [r7, #56] @ 0x38 80127c6: 6b9b ldr r3, [r3, #56] @ 0x38 80127c8: 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 ); 80127ca: 683a ldr r2, [r7, #0] 80127cc: 68b9 ldr r1, [r7, #8] 80127ce: 6bb8 ldr r0, [r7, #56] @ 0x38 80127d0: f000 fbae bl 8012f30 /* The event list is not altered if the queue is locked. This will be done when the queue is unlocked later. */ if( cTxLock == queueUNLOCKED ) 80127d4: f997 3033 ldrsb.w r3, [r7, #51] @ 0x33 80127d8: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80127dc: d112 bne.n 8012804 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80127de: 6bbb ldr r3, [r7, #56] @ 0x38 80127e0: 6a5b ldr r3, [r3, #36] @ 0x24 80127e2: 2b00 cmp r3, #0 80127e4: d016 beq.n 8012814 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80127e6: 6bbb ldr r3, [r7, #56] @ 0x38 80127e8: 3324 adds r3, #36 @ 0x24 80127ea: 4618 mov r0, r3 80127ec: f001 fd82 bl 80142f4 80127f0: 4603 mov r3, r0 80127f2: 2b00 cmp r3, #0 80127f4: d00e beq.n 8012814 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 80127f6: 687b ldr r3, [r7, #4] 80127f8: 2b00 cmp r3, #0 80127fa: d00b beq.n 8012814 { *pxHigherPriorityTaskWoken = pdTRUE; 80127fc: 687b ldr r3, [r7, #4] 80127fe: 2201 movs r2, #1 8012800: 601a str r2, [r3, #0] 8012802: e007 b.n 8012814 } 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 ); 8012804: f897 3033 ldrb.w r3, [r7, #51] @ 0x33 8012808: 3301 adds r3, #1 801280a: b2db uxtb r3, r3 801280c: b25a sxtb r2, r3 801280e: 6bbb ldr r3, [r7, #56] @ 0x38 8012810: f883 2045 strb.w r2, [r3, #69] @ 0x45 } xReturn = pdPASS; 8012814: 2301 movs r3, #1 8012816: 63fb str r3, [r7, #60] @ 0x3c { 8012818: e001 b.n 801281e } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 801281a: 2300 movs r3, #0 801281c: 63fb str r3, [r7, #60] @ 0x3c 801281e: 6b7b ldr r3, [r7, #52] @ 0x34 8012820: 617b str r3, [r7, #20] } /*-----------------------------------------------------------*/ portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue ) { __asm volatile 8012822: 697b ldr r3, [r7, #20] 8012824: f383 8811 msr BASEPRI, r3 ( " msr basepri, %0 " :: "r" ( ulNewMaskValue ) : "memory" ); } 8012828: bf00 nop } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 801282a: 6bfb ldr r3, [r7, #60] @ 0x3c } 801282c: 4618 mov r0, r3 801282e: 3740 adds r7, #64 @ 0x40 8012830: 46bd mov sp, r7 8012832: bd80 pop {r7, pc} 08012834 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 8012834: b580 push {r7, lr} 8012836: b08e sub sp, #56 @ 0x38 8012838: af00 add r7, sp, #0 801283a: 6078 str r0, [r7, #4] 801283c: 6039 str r1, [r7, #0] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 801283e: 687b ldr r3, [r7, #4] 8012840: 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 ); 8012842: 6b3b ldr r3, [r7, #48] @ 0x30 8012844: 2b00 cmp r3, #0 8012846: d10b bne.n 8012860 __asm volatile 8012848: f04f 0350 mov.w r3, #80 @ 0x50 801284c: f383 8811 msr BASEPRI, r3 8012850: f3bf 8f6f isb sy 8012854: f3bf 8f4f dsb sy 8012858: 623b str r3, [r7, #32] } 801285a: bf00 nop 801285c: bf00 nop 801285e: e7fd b.n 801285c /* xQueueGenericSendFromISR() should be used instead of xQueueGiveFromISR() if the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 8012860: 6b3b ldr r3, [r7, #48] @ 0x30 8012862: 6c1b ldr r3, [r3, #64] @ 0x40 8012864: 2b00 cmp r3, #0 8012866: d00b beq.n 8012880 __asm volatile 8012868: f04f 0350 mov.w r3, #80 @ 0x50 801286c: f383 8811 msr BASEPRI, r3 8012870: f3bf 8f6f isb sy 8012874: f3bf 8f4f dsb sy 8012878: 61fb str r3, [r7, #28] } 801287a: bf00 nop 801287c: bf00 nop 801287e: e7fd b.n 801287c /* 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 ) ) ); 8012880: 6b3b ldr r3, [r7, #48] @ 0x30 8012882: 681b ldr r3, [r3, #0] 8012884: 2b00 cmp r3, #0 8012886: d103 bne.n 8012890 8012888: 6b3b ldr r3, [r7, #48] @ 0x30 801288a: 689b ldr r3, [r3, #8] 801288c: 2b00 cmp r3, #0 801288e: d101 bne.n 8012894 8012890: 2301 movs r3, #1 8012892: e000 b.n 8012896 8012894: 2300 movs r3, #0 8012896: 2b00 cmp r3, #0 8012898: d10b bne.n 80128b2 __asm volatile 801289a: f04f 0350 mov.w r3, #80 @ 0x50 801289e: f383 8811 msr BASEPRI, r3 80128a2: f3bf 8f6f isb sy 80128a6: f3bf 8f4f dsb sy 80128aa: 61bb str r3, [r7, #24] } 80128ac: bf00 nop 80128ae: bf00 nop 80128b0: e7fd b.n 80128ae 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(); 80128b2: f003 f981 bl 8015bb8 __asm volatile 80128b6: f3ef 8211 mrs r2, BASEPRI 80128ba: f04f 0350 mov.w r3, #80 @ 0x50 80128be: f383 8811 msr BASEPRI, r3 80128c2: f3bf 8f6f isb sy 80128c6: f3bf 8f4f dsb sy 80128ca: 617a str r2, [r7, #20] 80128cc: 613b str r3, [r7, #16] return ulOriginalBASEPRI; 80128ce: 697b ldr r3, [r7, #20] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 80128d0: 62fb str r3, [r7, #44] @ 0x2c { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 80128d2: 6b3b ldr r3, [r7, #48] @ 0x30 80128d4: 6b9b ldr r3, [r3, #56] @ 0x38 80128d6: 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 ) 80128d8: 6b3b ldr r3, [r7, #48] @ 0x30 80128da: 6bdb ldr r3, [r3, #60] @ 0x3c 80128dc: 6aba ldr r2, [r7, #40] @ 0x28 80128de: 429a cmp r2, r3 80128e0: d22b bcs.n 801293a { const int8_t cTxLock = pxQueue->cTxLock; 80128e2: 6b3b ldr r3, [r7, #48] @ 0x30 80128e4: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 80128e8: 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; 80128ec: 6abb ldr r3, [r7, #40] @ 0x28 80128ee: 1c5a adds r2, r3, #1 80128f0: 6b3b ldr r3, [r7, #48] @ 0x30 80128f2: 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 ) 80128f4: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 80128f8: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80128fc: d112 bne.n 8012924 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80128fe: 6b3b ldr r3, [r7, #48] @ 0x30 8012900: 6a5b ldr r3, [r3, #36] @ 0x24 8012902: 2b00 cmp r3, #0 8012904: d016 beq.n 8012934 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8012906: 6b3b ldr r3, [r7, #48] @ 0x30 8012908: 3324 adds r3, #36 @ 0x24 801290a: 4618 mov r0, r3 801290c: f001 fcf2 bl 80142f4 8012910: 4603 mov r3, r0 8012912: 2b00 cmp r3, #0 8012914: d00e beq.n 8012934 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 8012916: 683b ldr r3, [r7, #0] 8012918: 2b00 cmp r3, #0 801291a: d00b beq.n 8012934 { *pxHigherPriorityTaskWoken = pdTRUE; 801291c: 683b ldr r3, [r7, #0] 801291e: 2201 movs r2, #1 8012920: 601a str r2, [r3, #0] 8012922: e007 b.n 8012934 } 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 ); 8012924: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 8012928: 3301 adds r3, #1 801292a: b2db uxtb r3, r3 801292c: b25a sxtb r2, r3 801292e: 6b3b ldr r3, [r7, #48] @ 0x30 8012930: f883 2045 strb.w r2, [r3, #69] @ 0x45 } xReturn = pdPASS; 8012934: 2301 movs r3, #1 8012936: 637b str r3, [r7, #52] @ 0x34 8012938: e001 b.n 801293e } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 801293a: 2300 movs r3, #0 801293c: 637b str r3, [r7, #52] @ 0x34 801293e: 6afb ldr r3, [r7, #44] @ 0x2c 8012940: 60fb str r3, [r7, #12] __asm volatile 8012942: 68fb ldr r3, [r7, #12] 8012944: f383 8811 msr BASEPRI, r3 } 8012948: bf00 nop } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 801294a: 6b7b ldr r3, [r7, #52] @ 0x34 } 801294c: 4618 mov r0, r3 801294e: 3738 adds r7, #56 @ 0x38 8012950: 46bd mov sp, r7 8012952: bd80 pop {r7, pc} 08012954 : /*-----------------------------------------------------------*/ BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait ) { 8012954: b580 push {r7, lr} 8012956: b08c sub sp, #48 @ 0x30 8012958: af00 add r7, sp, #0 801295a: 60f8 str r0, [r7, #12] 801295c: 60b9 str r1, [r7, #8] 801295e: 607a str r2, [r7, #4] BaseType_t xEntryTimeSet = pdFALSE; 8012960: 2300 movs r3, #0 8012962: 62fb str r3, [r7, #44] @ 0x2c TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8012964: 68fb ldr r3, [r7, #12] 8012966: 62bb str r3, [r7, #40] @ 0x28 /* Check the pointer is not NULL. */ configASSERT( ( pxQueue ) ); 8012968: 6abb ldr r3, [r7, #40] @ 0x28 801296a: 2b00 cmp r3, #0 801296c: d10b bne.n 8012986 __asm volatile 801296e: f04f 0350 mov.w r3, #80 @ 0x50 8012972: f383 8811 msr BASEPRI, r3 8012976: f3bf 8f6f isb sy 801297a: f3bf 8f4f dsb sy 801297e: 623b str r3, [r7, #32] } 8012980: bf00 nop 8012982: bf00 nop 8012984: e7fd b.n 8012982 /* 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 ) ) ); 8012986: 68bb ldr r3, [r7, #8] 8012988: 2b00 cmp r3, #0 801298a: d103 bne.n 8012994 801298c: 6abb ldr r3, [r7, #40] @ 0x28 801298e: 6c1b ldr r3, [r3, #64] @ 0x40 8012990: 2b00 cmp r3, #0 8012992: d101 bne.n 8012998 8012994: 2301 movs r3, #1 8012996: e000 b.n 801299a 8012998: 2300 movs r3, #0 801299a: 2b00 cmp r3, #0 801299c: d10b bne.n 80129b6 __asm volatile 801299e: f04f 0350 mov.w r3, #80 @ 0x50 80129a2: f383 8811 msr BASEPRI, r3 80129a6: f3bf 8f6f isb sy 80129aa: f3bf 8f4f dsb sy 80129ae: 61fb str r3, [r7, #28] } 80129b0: bf00 nop 80129b2: bf00 nop 80129b4: e7fd b.n 80129b2 /* Cannot block if the scheduler is suspended. */ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 80129b6: f001 fe9b bl 80146f0 80129ba: 4603 mov r3, r0 80129bc: 2b00 cmp r3, #0 80129be: d102 bne.n 80129c6 80129c0: 687b ldr r3, [r7, #4] 80129c2: 2b00 cmp r3, #0 80129c4: d101 bne.n 80129ca 80129c6: 2301 movs r3, #1 80129c8: e000 b.n 80129cc 80129ca: 2300 movs r3, #0 80129cc: 2b00 cmp r3, #0 80129ce: d10b bne.n 80129e8 __asm volatile 80129d0: f04f 0350 mov.w r3, #80 @ 0x50 80129d4: f383 8811 msr BASEPRI, r3 80129d8: f3bf 8f6f isb sy 80129dc: f3bf 8f4f dsb sy 80129e0: 61bb str r3, [r7, #24] } 80129e2: bf00 nop 80129e4: bf00 nop 80129e6: e7fd b.n 80129e4 /*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(); 80129e8: f003 f806 bl 80159f8 { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 80129ec: 6abb ldr r3, [r7, #40] @ 0x28 80129ee: 6b9b ldr r3, [r3, #56] @ 0x38 80129f0: 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 ) 80129f2: 6a7b ldr r3, [r7, #36] @ 0x24 80129f4: 2b00 cmp r3, #0 80129f6: d01f beq.n 8012a38 { /* Data available, remove one item. */ prvCopyDataFromQueue( pxQueue, pvBuffer ); 80129f8: 68b9 ldr r1, [r7, #8] 80129fa: 6ab8 ldr r0, [r7, #40] @ 0x28 80129fc: f000 fb02 bl 8013004 traceQUEUE_RECEIVE( pxQueue ); pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 8012a00: 6a7b ldr r3, [r7, #36] @ 0x24 8012a02: 1e5a subs r2, r3, #1 8012a04: 6abb ldr r3, [r7, #40] @ 0x28 8012a06: 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 ) 8012a08: 6abb ldr r3, [r7, #40] @ 0x28 8012a0a: 691b ldr r3, [r3, #16] 8012a0c: 2b00 cmp r3, #0 8012a0e: d00f beq.n 8012a30 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8012a10: 6abb ldr r3, [r7, #40] @ 0x28 8012a12: 3310 adds r3, #16 8012a14: 4618 mov r0, r3 8012a16: f001 fc6d bl 80142f4 8012a1a: 4603 mov r3, r0 8012a1c: 2b00 cmp r3, #0 8012a1e: d007 beq.n 8012a30 { queueYIELD_IF_USING_PREEMPTION(); 8012a20: 4b3c ldr r3, [pc, #240] @ (8012b14 ) 8012a22: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012a26: 601a str r2, [r3, #0] 8012a28: f3bf 8f4f dsb sy 8012a2c: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } taskEXIT_CRITICAL(); 8012a30: f003 f814 bl 8015a5c return pdPASS; 8012a34: 2301 movs r3, #1 8012a36: e069 b.n 8012b0c } else { if( xTicksToWait == ( TickType_t ) 0 ) 8012a38: 687b ldr r3, [r7, #4] 8012a3a: 2b00 cmp r3, #0 8012a3c: d103 bne.n 8012a46 { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 8012a3e: f003 f80d bl 8015a5c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012a42: 2300 movs r3, #0 8012a44: e062 b.n 8012b0c } else if( xEntryTimeSet == pdFALSE ) 8012a46: 6afb ldr r3, [r7, #44] @ 0x2c 8012a48: 2b00 cmp r3, #0 8012a4a: d106 bne.n 8012a5a { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8012a4c: f107 0310 add.w r3, r7, #16 8012a50: 4618 mov r0, r3 8012a52: f001 fcdb bl 801440c xEntryTimeSet = pdTRUE; 8012a56: 2301 movs r3, #1 8012a58: 62fb str r3, [r7, #44] @ 0x2c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8012a5a: f002 ffff bl 8015a5c /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 8012a5e: f001 f9fb bl 8013e58 prvLockQueue( pxQueue ); 8012a62: f002 ffc9 bl 80159f8 8012a66: 6abb ldr r3, [r7, #40] @ 0x28 8012a68: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8012a6c: b25b sxtb r3, r3 8012a6e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012a72: d103 bne.n 8012a7c 8012a74: 6abb ldr r3, [r7, #40] @ 0x28 8012a76: 2200 movs r2, #0 8012a78: f883 2044 strb.w r2, [r3, #68] @ 0x44 8012a7c: 6abb ldr r3, [r7, #40] @ 0x28 8012a7e: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8012a82: b25b sxtb r3, r3 8012a84: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012a88: d103 bne.n 8012a92 8012a8a: 6abb ldr r3, [r7, #40] @ 0x28 8012a8c: 2200 movs r2, #0 8012a8e: f883 2045 strb.w r2, [r3, #69] @ 0x45 8012a92: f002 ffe3 bl 8015a5c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8012a96: 1d3a adds r2, r7, #4 8012a98: f107 0310 add.w r3, r7, #16 8012a9c: 4611 mov r1, r2 8012a9e: 4618 mov r0, r3 8012aa0: f001 fcca bl 8014438 8012aa4: 4603 mov r3, r0 8012aa6: 2b00 cmp r3, #0 8012aa8: d123 bne.n 8012af2 { /* 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 ) 8012aaa: 6ab8 ldr r0, [r7, #40] @ 0x28 8012aac: f000 fb22 bl 80130f4 8012ab0: 4603 mov r3, r0 8012ab2: 2b00 cmp r3, #0 8012ab4: d017 beq.n 8012ae6 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 8012ab6: 6abb ldr r3, [r7, #40] @ 0x28 8012ab8: 3324 adds r3, #36 @ 0x24 8012aba: 687a ldr r2, [r7, #4] 8012abc: 4611 mov r1, r2 8012abe: 4618 mov r0, r3 8012ac0: f001 fbc6 bl 8014250 prvUnlockQueue( pxQueue ); 8012ac4: 6ab8 ldr r0, [r7, #40] @ 0x28 8012ac6: f000 fac3 bl 8013050 if( xTaskResumeAll() == pdFALSE ) 8012aca: f001 f9d3 bl 8013e74 8012ace: 4603 mov r3, r0 8012ad0: 2b00 cmp r3, #0 8012ad2: d189 bne.n 80129e8 { portYIELD_WITHIN_API(); 8012ad4: 4b0f ldr r3, [pc, #60] @ (8012b14 ) 8012ad6: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012ada: 601a str r2, [r3, #0] 8012adc: f3bf 8f4f dsb sy 8012ae0: f3bf 8f6f isb sy 8012ae4: e780 b.n 80129e8 } else { /* The queue contains data again. Loop back to try and read the data. */ prvUnlockQueue( pxQueue ); 8012ae6: 6ab8 ldr r0, [r7, #40] @ 0x28 8012ae8: f000 fab2 bl 8013050 ( void ) xTaskResumeAll(); 8012aec: f001 f9c2 bl 8013e74 8012af0: e77a b.n 80129e8 } else { /* Timed out. If there is no data in the queue exit, otherwise loop back and attempt to read the data. */ prvUnlockQueue( pxQueue ); 8012af2: 6ab8 ldr r0, [r7, #40] @ 0x28 8012af4: f000 faac bl 8013050 ( void ) xTaskResumeAll(); 8012af8: f001 f9bc bl 8013e74 if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 8012afc: 6ab8 ldr r0, [r7, #40] @ 0x28 8012afe: f000 faf9 bl 80130f4 8012b02: 4603 mov r3, r0 8012b04: 2b00 cmp r3, #0 8012b06: f43f af6f beq.w 80129e8 { traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012b0a: 2300 movs r3, #0 { mtCOVERAGE_TEST_MARKER(); } } } /*lint -restore */ } 8012b0c: 4618 mov r0, r3 8012b0e: 3730 adds r7, #48 @ 0x30 8012b10: 46bd mov sp, r7 8012b12: bd80 pop {r7, pc} 8012b14: e000ed04 .word 0xe000ed04 08012b18 : /*-----------------------------------------------------------*/ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, TickType_t xTicksToWait ) { 8012b18: b580 push {r7, lr} 8012b1a: b08e sub sp, #56 @ 0x38 8012b1c: af00 add r7, sp, #0 8012b1e: 6078 str r0, [r7, #4] 8012b20: 6039 str r1, [r7, #0] BaseType_t xEntryTimeSet = pdFALSE; 8012b22: 2300 movs r3, #0 8012b24: 637b str r3, [r7, #52] @ 0x34 TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; 8012b26: 687b ldr r3, [r7, #4] 8012b28: 62fb str r3, [r7, #44] @ 0x2c #if( configUSE_MUTEXES == 1 ) BaseType_t xInheritanceOccurred = pdFALSE; 8012b2a: 2300 movs r3, #0 8012b2c: 633b str r3, [r7, #48] @ 0x30 #endif /* Check the queue pointer is not NULL. */ configASSERT( ( pxQueue ) ); 8012b2e: 6afb ldr r3, [r7, #44] @ 0x2c 8012b30: 2b00 cmp r3, #0 8012b32: d10b bne.n 8012b4c __asm volatile 8012b34: f04f 0350 mov.w r3, #80 @ 0x50 8012b38: f383 8811 msr BASEPRI, r3 8012b3c: f3bf 8f6f isb sy 8012b40: f3bf 8f4f dsb sy 8012b44: 623b str r3, [r7, #32] } 8012b46: bf00 nop 8012b48: bf00 nop 8012b4a: e7fd b.n 8012b48 /* Check this really is a semaphore, in which case the item size will be 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 8012b4c: 6afb ldr r3, [r7, #44] @ 0x2c 8012b4e: 6c1b ldr r3, [r3, #64] @ 0x40 8012b50: 2b00 cmp r3, #0 8012b52: d00b beq.n 8012b6c __asm volatile 8012b54: f04f 0350 mov.w r3, #80 @ 0x50 8012b58: f383 8811 msr BASEPRI, r3 8012b5c: f3bf 8f6f isb sy 8012b60: f3bf 8f4f dsb sy 8012b64: 61fb str r3, [r7, #28] } 8012b66: bf00 nop 8012b68: bf00 nop 8012b6a: e7fd b.n 8012b68 /* Cannot block if the scheduler is suspended. */ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); 8012b6c: f001 fdc0 bl 80146f0 8012b70: 4603 mov r3, r0 8012b72: 2b00 cmp r3, #0 8012b74: d102 bne.n 8012b7c 8012b76: 683b ldr r3, [r7, #0] 8012b78: 2b00 cmp r3, #0 8012b7a: d101 bne.n 8012b80 8012b7c: 2301 movs r3, #1 8012b7e: e000 b.n 8012b82 8012b80: 2300 movs r3, #0 8012b82: 2b00 cmp r3, #0 8012b84: d10b bne.n 8012b9e __asm volatile 8012b86: f04f 0350 mov.w r3, #80 @ 0x50 8012b8a: f383 8811 msr BASEPRI, r3 8012b8e: f3bf 8f6f isb sy 8012b92: f3bf 8f4f dsb sy 8012b96: 61bb str r3, [r7, #24] } 8012b98: bf00 nop 8012b9a: bf00 nop 8012b9c: e7fd b.n 8012b9a /*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(); 8012b9e: f002 ff2b bl 80159f8 { /* 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; 8012ba2: 6afb ldr r3, [r7, #44] @ 0x2c 8012ba4: 6b9b ldr r3, [r3, #56] @ 0x38 8012ba6: 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 ) 8012ba8: 6abb ldr r3, [r7, #40] @ 0x28 8012baa: 2b00 cmp r3, #0 8012bac: d024 beq.n 8012bf8 { 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; 8012bae: 6abb ldr r3, [r7, #40] @ 0x28 8012bb0: 1e5a subs r2, r3, #1 8012bb2: 6afb ldr r3, [r7, #44] @ 0x2c 8012bb4: 639a str r2, [r3, #56] @ 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8012bb6: 6afb ldr r3, [r7, #44] @ 0x2c 8012bb8: 681b ldr r3, [r3, #0] 8012bba: 2b00 cmp r3, #0 8012bbc: d104 bne.n 8012bc8 { /* Record the information required to implement priority inheritance should it become necessary. */ pxQueue->u.xSemaphore.xMutexHolder = pvTaskIncrementMutexHeldCount(); 8012bbe: f001 ff11 bl 80149e4 8012bc2: 4602 mov r2, r0 8012bc4: 6afb ldr r3, [r7, #44] @ 0x2c 8012bc6: 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 ) 8012bc8: 6afb ldr r3, [r7, #44] @ 0x2c 8012bca: 691b ldr r3, [r3, #16] 8012bcc: 2b00 cmp r3, #0 8012bce: d00f beq.n 8012bf0 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8012bd0: 6afb ldr r3, [r7, #44] @ 0x2c 8012bd2: 3310 adds r3, #16 8012bd4: 4618 mov r0, r3 8012bd6: f001 fb8d bl 80142f4 8012bda: 4603 mov r3, r0 8012bdc: 2b00 cmp r3, #0 8012bde: d007 beq.n 8012bf0 { queueYIELD_IF_USING_PREEMPTION(); 8012be0: 4b54 ldr r3, [pc, #336] @ (8012d34 ) 8012be2: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012be6: 601a str r2, [r3, #0] 8012be8: f3bf 8f4f dsb sy 8012bec: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } taskEXIT_CRITICAL(); 8012bf0: f002 ff34 bl 8015a5c return pdPASS; 8012bf4: 2301 movs r3, #1 8012bf6: e098 b.n 8012d2a } else { if( xTicksToWait == ( TickType_t ) 0 ) 8012bf8: 683b ldr r3, [r7, #0] 8012bfa: 2b00 cmp r3, #0 8012bfc: d112 bne.n 8012c24 /* 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 ); 8012bfe: 6b3b ldr r3, [r7, #48] @ 0x30 8012c00: 2b00 cmp r3, #0 8012c02: d00b beq.n 8012c1c __asm volatile 8012c04: f04f 0350 mov.w r3, #80 @ 0x50 8012c08: f383 8811 msr BASEPRI, r3 8012c0c: f3bf 8f6f isb sy 8012c10: f3bf 8f4f dsb sy 8012c14: 617b str r3, [r7, #20] } 8012c16: bf00 nop 8012c18: bf00 nop 8012c1a: e7fd b.n 8012c18 } #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(); 8012c1c: f002 ff1e bl 8015a5c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012c20: 2300 movs r3, #0 8012c22: e082 b.n 8012d2a } else if( xEntryTimeSet == pdFALSE ) 8012c24: 6b7b ldr r3, [r7, #52] @ 0x34 8012c26: 2b00 cmp r3, #0 8012c28: d106 bne.n 8012c38 { /* The semaphore count was 0 and a block time was specified so configure the timeout structure ready to block. */ vTaskInternalSetTimeOutState( &xTimeOut ); 8012c2a: f107 030c add.w r3, r7, #12 8012c2e: 4618 mov r0, r3 8012c30: f001 fbec bl 801440c xEntryTimeSet = pdTRUE; 8012c34: 2301 movs r3, #1 8012c36: 637b str r3, [r7, #52] @ 0x34 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8012c38: f002 ff10 bl 8015a5c /* Interrupts and other tasks can give to and take from the semaphore now the critical section has been exited. */ vTaskSuspendAll(); 8012c3c: f001 f90c bl 8013e58 prvLockQueue( pxQueue ); 8012c40: f002 feda bl 80159f8 8012c44: 6afb ldr r3, [r7, #44] @ 0x2c 8012c46: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8012c4a: b25b sxtb r3, r3 8012c4c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012c50: d103 bne.n 8012c5a 8012c52: 6afb ldr r3, [r7, #44] @ 0x2c 8012c54: 2200 movs r2, #0 8012c56: f883 2044 strb.w r2, [r3, #68] @ 0x44 8012c5a: 6afb ldr r3, [r7, #44] @ 0x2c 8012c5c: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8012c60: b25b sxtb r3, r3 8012c62: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012c66: d103 bne.n 8012c70 8012c68: 6afb ldr r3, [r7, #44] @ 0x2c 8012c6a: 2200 movs r2, #0 8012c6c: f883 2045 strb.w r2, [r3, #69] @ 0x45 8012c70: f002 fef4 bl 8015a5c /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 8012c74: 463a mov r2, r7 8012c76: f107 030c add.w r3, r7, #12 8012c7a: 4611 mov r1, r2 8012c7c: 4618 mov r0, r3 8012c7e: f001 fbdb bl 8014438 8012c82: 4603 mov r3, r0 8012c84: 2b00 cmp r3, #0 8012c86: d132 bne.n 8012cee { /* 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 ) 8012c88: 6af8 ldr r0, [r7, #44] @ 0x2c 8012c8a: f000 fa33 bl 80130f4 8012c8e: 4603 mov r3, r0 8012c90: 2b00 cmp r3, #0 8012c92: d026 beq.n 8012ce2 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8012c94: 6afb ldr r3, [r7, #44] @ 0x2c 8012c96: 681b ldr r3, [r3, #0] 8012c98: 2b00 cmp r3, #0 8012c9a: d109 bne.n 8012cb0 { taskENTER_CRITICAL(); 8012c9c: f002 feac bl 80159f8 { xInheritanceOccurred = xTaskPriorityInherit( pxQueue->u.xSemaphore.xMutexHolder ); 8012ca0: 6afb ldr r3, [r7, #44] @ 0x2c 8012ca2: 689b ldr r3, [r3, #8] 8012ca4: 4618 mov r0, r3 8012ca6: f001 fd41 bl 801472c 8012caa: 6338 str r0, [r7, #48] @ 0x30 } taskEXIT_CRITICAL(); 8012cac: f002 fed6 bl 8015a5c mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 8012cb0: 6afb ldr r3, [r7, #44] @ 0x2c 8012cb2: 3324 adds r3, #36 @ 0x24 8012cb4: 683a ldr r2, [r7, #0] 8012cb6: 4611 mov r1, r2 8012cb8: 4618 mov r0, r3 8012cba: f001 fac9 bl 8014250 prvUnlockQueue( pxQueue ); 8012cbe: 6af8 ldr r0, [r7, #44] @ 0x2c 8012cc0: f000 f9c6 bl 8013050 if( xTaskResumeAll() == pdFALSE ) 8012cc4: f001 f8d6 bl 8013e74 8012cc8: 4603 mov r3, r0 8012cca: 2b00 cmp r3, #0 8012ccc: f47f af67 bne.w 8012b9e { portYIELD_WITHIN_API(); 8012cd0: 4b18 ldr r3, [pc, #96] @ (8012d34 ) 8012cd2: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8012cd6: 601a str r2, [r3, #0] 8012cd8: f3bf 8f4f dsb sy 8012cdc: f3bf 8f6f isb sy 8012ce0: e75d b.n 8012b9e } else { /* There was no timeout and the semaphore count was not 0, so attempt to take the semaphore again. */ prvUnlockQueue( pxQueue ); 8012ce2: 6af8 ldr r0, [r7, #44] @ 0x2c 8012ce4: f000 f9b4 bl 8013050 ( void ) xTaskResumeAll(); 8012ce8: f001 f8c4 bl 8013e74 8012cec: e757 b.n 8012b9e } } else { /* Timed out. */ prvUnlockQueue( pxQueue ); 8012cee: 6af8 ldr r0, [r7, #44] @ 0x2c 8012cf0: f000 f9ae bl 8013050 ( void ) xTaskResumeAll(); 8012cf4: f001 f8be bl 8013e74 /* 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 ) 8012cf8: 6af8 ldr r0, [r7, #44] @ 0x2c 8012cfa: f000 f9fb bl 80130f4 8012cfe: 4603 mov r3, r0 8012d00: 2b00 cmp r3, #0 8012d02: f43f af4c beq.w 8012b9e #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 ) 8012d06: 6b3b ldr r3, [r7, #48] @ 0x30 8012d08: 2b00 cmp r3, #0 8012d0a: d00d beq.n 8012d28 { taskENTER_CRITICAL(); 8012d0c: f002 fe74 bl 80159f8 /* 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 ); 8012d10: 6af8 ldr r0, [r7, #44] @ 0x2c 8012d12: f000 f8f5 bl 8012f00 8012d16: 6278 str r0, [r7, #36] @ 0x24 vTaskPriorityDisinheritAfterTimeout( pxQueue->u.xSemaphore.xMutexHolder, uxHighestWaitingPriority ); 8012d18: 6afb ldr r3, [r7, #44] @ 0x2c 8012d1a: 689b ldr r3, [r3, #8] 8012d1c: 6a79 ldr r1, [r7, #36] @ 0x24 8012d1e: 4618 mov r0, r3 8012d20: f001 fddc bl 80148dc } taskEXIT_CRITICAL(); 8012d24: f002 fe9a bl 8015a5c } } #endif /* configUSE_MUTEXES */ traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 8012d28: 2300 movs r3, #0 { mtCOVERAGE_TEST_MARKER(); } } } /*lint -restore */ } 8012d2a: 4618 mov r0, r3 8012d2c: 3738 adds r7, #56 @ 0x38 8012d2e: 46bd mov sp, r7 8012d30: bd80 pop {r7, pc} 8012d32: bf00 nop 8012d34: e000ed04 .word 0xe000ed04 08012d38 : } /*lint -restore */ } /*-----------------------------------------------------------*/ BaseType_t xQueueReceiveFromISR( QueueHandle_t xQueue, void * const pvBuffer, BaseType_t * const pxHigherPriorityTaskWoken ) { 8012d38: b580 push {r7, lr} 8012d3a: b08e sub sp, #56 @ 0x38 8012d3c: af00 add r7, sp, #0 8012d3e: 60f8 str r0, [r7, #12] 8012d40: 60b9 str r1, [r7, #8] 8012d42: 607a str r2, [r7, #4] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; 8012d44: 68fb ldr r3, [r7, #12] 8012d46: 633b str r3, [r7, #48] @ 0x30 configASSERT( pxQueue ); 8012d48: 6b3b ldr r3, [r7, #48] @ 0x30 8012d4a: 2b00 cmp r3, #0 8012d4c: d10b bne.n 8012d66 __asm volatile 8012d4e: f04f 0350 mov.w r3, #80 @ 0x50 8012d52: f383 8811 msr BASEPRI, r3 8012d56: f3bf 8f6f isb sy 8012d5a: f3bf 8f4f dsb sy 8012d5e: 623b str r3, [r7, #32] } 8012d60: bf00 nop 8012d62: bf00 nop 8012d64: e7fd b.n 8012d62 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8012d66: 68bb ldr r3, [r7, #8] 8012d68: 2b00 cmp r3, #0 8012d6a: d103 bne.n 8012d74 8012d6c: 6b3b ldr r3, [r7, #48] @ 0x30 8012d6e: 6c1b ldr r3, [r3, #64] @ 0x40 8012d70: 2b00 cmp r3, #0 8012d72: d101 bne.n 8012d78 8012d74: 2301 movs r3, #1 8012d76: e000 b.n 8012d7a 8012d78: 2300 movs r3, #0 8012d7a: 2b00 cmp r3, #0 8012d7c: d10b bne.n 8012d96 __asm volatile 8012d7e: f04f 0350 mov.w r3, #80 @ 0x50 8012d82: f383 8811 msr BASEPRI, r3 8012d86: f3bf 8f6f isb sy 8012d8a: f3bf 8f4f dsb sy 8012d8e: 61fb str r3, [r7, #28] } 8012d90: bf00 nop 8012d92: bf00 nop 8012d94: e7fd b.n 8012d92 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(); 8012d96: f002 ff0f bl 8015bb8 __asm volatile 8012d9a: f3ef 8211 mrs r2, BASEPRI 8012d9e: f04f 0350 mov.w r3, #80 @ 0x50 8012da2: f383 8811 msr BASEPRI, r3 8012da6: f3bf 8f6f isb sy 8012daa: f3bf 8f4f dsb sy 8012dae: 61ba str r2, [r7, #24] 8012db0: 617b str r3, [r7, #20] return ulOriginalBASEPRI; 8012db2: 69bb ldr r3, [r7, #24] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 8012db4: 62fb str r3, [r7, #44] @ 0x2c { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8012db6: 6b3b ldr r3, [r7, #48] @ 0x30 8012db8: 6b9b ldr r3, [r3, #56] @ 0x38 8012dba: 62bb str r3, [r7, #40] @ 0x28 /* Cannot block in an ISR, so check there is data available. */ if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 8012dbc: 6abb ldr r3, [r7, #40] @ 0x28 8012dbe: 2b00 cmp r3, #0 8012dc0: d02f beq.n 8012e22 { const int8_t cRxLock = pxQueue->cRxLock; 8012dc2: 6b3b ldr r3, [r7, #48] @ 0x30 8012dc4: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8012dc8: f887 3027 strb.w r3, [r7, #39] @ 0x27 traceQUEUE_RECEIVE_FROM_ISR( pxQueue ); prvCopyDataFromQueue( pxQueue, pvBuffer ); 8012dcc: 68b9 ldr r1, [r7, #8] 8012dce: 6b38 ldr r0, [r7, #48] @ 0x30 8012dd0: f000 f918 bl 8013004 pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; 8012dd4: 6abb ldr r3, [r7, #40] @ 0x28 8012dd6: 1e5a subs r2, r3, #1 8012dd8: 6b3b ldr r3, [r7, #48] @ 0x30 8012dda: 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 ) 8012ddc: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8012de0: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8012de4: d112 bne.n 8012e0c { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8012de6: 6b3b ldr r3, [r7, #48] @ 0x30 8012de8: 691b ldr r3, [r3, #16] 8012dea: 2b00 cmp r3, #0 8012dec: d016 beq.n 8012e1c { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8012dee: 6b3b ldr r3, [r7, #48] @ 0x30 8012df0: 3310 adds r3, #16 8012df2: 4618 mov r0, r3 8012df4: f001 fa7e bl 80142f4 8012df8: 4603 mov r3, r0 8012dfa: 2b00 cmp r3, #0 8012dfc: d00e beq.n 8012e1c { /* The task waiting has a higher priority than us so force a context switch. */ if( pxHigherPriorityTaskWoken != NULL ) 8012dfe: 687b ldr r3, [r7, #4] 8012e00: 2b00 cmp r3, #0 8012e02: d00b beq.n 8012e1c { *pxHigherPriorityTaskWoken = pdTRUE; 8012e04: 687b ldr r3, [r7, #4] 8012e06: 2201 movs r2, #1 8012e08: 601a str r2, [r3, #0] 8012e0a: e007 b.n 8012e1c } 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 ); 8012e0c: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 8012e10: 3301 adds r3, #1 8012e12: b2db uxtb r3, r3 8012e14: b25a sxtb r2, r3 8012e16: 6b3b ldr r3, [r7, #48] @ 0x30 8012e18: f883 2044 strb.w r2, [r3, #68] @ 0x44 } xReturn = pdPASS; 8012e1c: 2301 movs r3, #1 8012e1e: 637b str r3, [r7, #52] @ 0x34 8012e20: e001 b.n 8012e26 } else { xReturn = pdFAIL; 8012e22: 2300 movs r3, #0 8012e24: 637b str r3, [r7, #52] @ 0x34 8012e26: 6afb ldr r3, [r7, #44] @ 0x2c 8012e28: 613b str r3, [r7, #16] __asm volatile 8012e2a: 693b ldr r3, [r7, #16] 8012e2c: f383 8811 msr BASEPRI, r3 } 8012e30: bf00 nop traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ); } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8012e32: 6b7b ldr r3, [r7, #52] @ 0x34 } 8012e34: 4618 mov r0, r3 8012e36: 3738 adds r7, #56 @ 0x38 8012e38: 46bd mov sp, r7 8012e3a: bd80 pop {r7, pc} 08012e3c : return xReturn; } /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue ) { 8012e3c: b580 push {r7, lr} 8012e3e: b084 sub sp, #16 8012e40: af00 add r7, sp, #0 8012e42: 6078 str r0, [r7, #4] UBaseType_t uxReturn; configASSERT( xQueue ); 8012e44: 687b ldr r3, [r7, #4] 8012e46: 2b00 cmp r3, #0 8012e48: d10b bne.n 8012e62 __asm volatile 8012e4a: f04f 0350 mov.w r3, #80 @ 0x50 8012e4e: f383 8811 msr BASEPRI, r3 8012e52: f3bf 8f6f isb sy 8012e56: f3bf 8f4f dsb sy 8012e5a: 60bb str r3, [r7, #8] } 8012e5c: bf00 nop 8012e5e: bf00 nop 8012e60: e7fd b.n 8012e5e taskENTER_CRITICAL(); 8012e62: f002 fdc9 bl 80159f8 { uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting; 8012e66: 687b ldr r3, [r7, #4] 8012e68: 6b9b ldr r3, [r3, #56] @ 0x38 8012e6a: 60fb str r3, [r7, #12] } taskEXIT_CRITICAL(); 8012e6c: f002 fdf6 bl 8015a5c return uxReturn; 8012e70: 68fb ldr r3, [r7, #12] } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 8012e72: 4618 mov r0, r3 8012e74: 3710 adds r7, #16 8012e76: 46bd mov sp, r7 8012e78: bd80 pop {r7, pc} 08012e7a : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ UBaseType_t uxQueueMessagesWaitingFromISR( const QueueHandle_t xQueue ) { 8012e7a: b480 push {r7} 8012e7c: b087 sub sp, #28 8012e7e: af00 add r7, sp, #0 8012e80: 6078 str r0, [r7, #4] UBaseType_t uxReturn; Queue_t * const pxQueue = xQueue; 8012e82: 687b ldr r3, [r7, #4] 8012e84: 617b str r3, [r7, #20] configASSERT( pxQueue ); 8012e86: 697b ldr r3, [r7, #20] 8012e88: 2b00 cmp r3, #0 8012e8a: d10b bne.n 8012ea4 __asm volatile 8012e8c: f04f 0350 mov.w r3, #80 @ 0x50 8012e90: f383 8811 msr BASEPRI, r3 8012e94: f3bf 8f6f isb sy 8012e98: f3bf 8f4f dsb sy 8012e9c: 60fb str r3, [r7, #12] } 8012e9e: bf00 nop 8012ea0: bf00 nop 8012ea2: e7fd b.n 8012ea0 uxReturn = pxQueue->uxMessagesWaiting; 8012ea4: 697b ldr r3, [r7, #20] 8012ea6: 6b9b ldr r3, [r3, #56] @ 0x38 8012ea8: 613b str r3, [r7, #16] return uxReturn; 8012eaa: 693b ldr r3, [r7, #16] } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 8012eac: 4618 mov r0, r3 8012eae: 371c adds r7, #28 8012eb0: 46bd mov sp, r7 8012eb2: f85d 7b04 ldr.w r7, [sp], #4 8012eb6: 4770 bx lr 08012eb8 : /*-----------------------------------------------------------*/ void vQueueDelete( QueueHandle_t xQueue ) { 8012eb8: b580 push {r7, lr} 8012eba: b084 sub sp, #16 8012ebc: af00 add r7, sp, #0 8012ebe: 6078 str r0, [r7, #4] Queue_t * const pxQueue = xQueue; 8012ec0: 687b ldr r3, [r7, #4] 8012ec2: 60fb str r3, [r7, #12] configASSERT( pxQueue ); 8012ec4: 68fb ldr r3, [r7, #12] 8012ec6: 2b00 cmp r3, #0 8012ec8: d10b bne.n 8012ee2 __asm volatile 8012eca: f04f 0350 mov.w r3, #80 @ 0x50 8012ece: f383 8811 msr BASEPRI, r3 8012ed2: f3bf 8f6f isb sy 8012ed6: f3bf 8f4f dsb sy 8012eda: 60bb str r3, [r7, #8] } 8012edc: bf00 nop 8012ede: bf00 nop 8012ee0: e7fd b.n 8012ede traceQUEUE_DELETE( pxQueue ); #if ( configQUEUE_REGISTRY_SIZE > 0 ) { vQueueUnregisterQueue( pxQueue ); 8012ee2: 68f8 ldr r0, [r7, #12] 8012ee4: f000 f95e bl 80131a4 } #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 ) 8012ee8: 68fb ldr r3, [r7, #12] 8012eea: f893 3046 ldrb.w r3, [r3, #70] @ 0x46 8012eee: 2b00 cmp r3, #0 8012ef0: d102 bne.n 8012ef8 { vPortFree( pxQueue ); 8012ef2: 68f8 ldr r0, [r7, #12] 8012ef4: f002 ff70 bl 8015dd8 /* 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 */ } 8012ef8: bf00 nop 8012efa: 3710 adds r7, #16 8012efc: 46bd mov sp, r7 8012efe: bd80 pop {r7, pc} 08012f00 : /*-----------------------------------------------------------*/ #if( configUSE_MUTEXES == 1 ) static UBaseType_t prvGetDisinheritPriorityAfterTimeout( const Queue_t * const pxQueue ) { 8012f00: b480 push {r7} 8012f02: b085 sub sp, #20 8012f04: af00 add r7, sp, #0 8012f06: 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 ) 8012f08: 687b ldr r3, [r7, #4] 8012f0a: 6a5b ldr r3, [r3, #36] @ 0x24 8012f0c: 2b00 cmp r3, #0 8012f0e: d006 beq.n 8012f1e { uxHighestPriorityOfWaitingTasks = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) listGET_ITEM_VALUE_OF_HEAD_ENTRY( &( pxQueue->xTasksWaitingToReceive ) ); 8012f10: 687b ldr r3, [r7, #4] 8012f12: 6b1b ldr r3, [r3, #48] @ 0x30 8012f14: 681b ldr r3, [r3, #0] 8012f16: f1c3 0338 rsb r3, r3, #56 @ 0x38 8012f1a: 60fb str r3, [r7, #12] 8012f1c: e001 b.n 8012f22 } else { uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY; 8012f1e: 2300 movs r3, #0 8012f20: 60fb str r3, [r7, #12] } return uxHighestPriorityOfWaitingTasks; 8012f22: 68fb ldr r3, [r7, #12] } 8012f24: 4618 mov r0, r3 8012f26: 3714 adds r7, #20 8012f28: 46bd mov sp, r7 8012f2a: f85d 7b04 ldr.w r7, [sp], #4 8012f2e: 4770 bx lr 08012f30 : #endif /* configUSE_MUTEXES */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 8012f30: b580 push {r7, lr} 8012f32: b086 sub sp, #24 8012f34: af00 add r7, sp, #0 8012f36: 60f8 str r0, [r7, #12] 8012f38: 60b9 str r1, [r7, #8] 8012f3a: 607a str r2, [r7, #4] BaseType_t xReturn = pdFALSE; 8012f3c: 2300 movs r3, #0 8012f3e: 617b str r3, [r7, #20] UBaseType_t uxMessagesWaiting; /* This function is called from a critical section. */ uxMessagesWaiting = pxQueue->uxMessagesWaiting; 8012f40: 68fb ldr r3, [r7, #12] 8012f42: 6b9b ldr r3, [r3, #56] @ 0x38 8012f44: 613b str r3, [r7, #16] if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 8012f46: 68fb ldr r3, [r7, #12] 8012f48: 6c1b ldr r3, [r3, #64] @ 0x40 8012f4a: 2b00 cmp r3, #0 8012f4c: d10d bne.n 8012f6a { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8012f4e: 68fb ldr r3, [r7, #12] 8012f50: 681b ldr r3, [r3, #0] 8012f52: 2b00 cmp r3, #0 8012f54: d14d bne.n 8012ff2 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder ); 8012f56: 68fb ldr r3, [r7, #12] 8012f58: 689b ldr r3, [r3, #8] 8012f5a: 4618 mov r0, r3 8012f5c: f001 fc4e bl 80147fc 8012f60: 6178 str r0, [r7, #20] pxQueue->u.xSemaphore.xMutexHolder = NULL; 8012f62: 68fb ldr r3, [r7, #12] 8012f64: 2200 movs r2, #0 8012f66: 609a str r2, [r3, #8] 8012f68: e043 b.n 8012ff2 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 8012f6a: 687b ldr r3, [r7, #4] 8012f6c: 2b00 cmp r3, #0 8012f6e: d119 bne.n 8012fa4 { ( 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. */ 8012f70: 68fb ldr r3, [r7, #12] 8012f72: 6858 ldr r0, [r3, #4] 8012f74: 68fb ldr r3, [r7, #12] 8012f76: 6c1b ldr r3, [r3, #64] @ 0x40 8012f78: 461a mov r2, r3 8012f7a: 68b9 ldr r1, [r7, #8] 8012f7c: f017 ff17 bl 802adae 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. */ 8012f80: 68fb ldr r3, [r7, #12] 8012f82: 685a ldr r2, [r3, #4] 8012f84: 68fb ldr r3, [r7, #12] 8012f86: 6c1b ldr r3, [r3, #64] @ 0x40 8012f88: 441a add r2, r3 8012f8a: 68fb ldr r3, [r7, #12] 8012f8c: 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. */ 8012f8e: 68fb ldr r3, [r7, #12] 8012f90: 685a ldr r2, [r3, #4] 8012f92: 68fb ldr r3, [r7, #12] 8012f94: 689b ldr r3, [r3, #8] 8012f96: 429a cmp r2, r3 8012f98: d32b bcc.n 8012ff2 { pxQueue->pcWriteTo = pxQueue->pcHead; 8012f9a: 68fb ldr r3, [r7, #12] 8012f9c: 681a ldr r2, [r3, #0] 8012f9e: 68fb ldr r3, [r7, #12] 8012fa0: 605a str r2, [r3, #4] 8012fa2: e026 b.n 8012ff2 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. */ 8012fa4: 68fb ldr r3, [r7, #12] 8012fa6: 68d8 ldr r0, [r3, #12] 8012fa8: 68fb ldr r3, [r7, #12] 8012faa: 6c1b ldr r3, [r3, #64] @ 0x40 8012fac: 461a mov r2, r3 8012fae: 68b9 ldr r1, [r7, #8] 8012fb0: f017 fefd bl 802adae pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize; 8012fb4: 68fb ldr r3, [r7, #12] 8012fb6: 68da ldr r2, [r3, #12] 8012fb8: 68fb ldr r3, [r7, #12] 8012fba: 6c1b ldr r3, [r3, #64] @ 0x40 8012fbc: 425b negs r3, r3 8012fbe: 441a add r2, r3 8012fc0: 68fb ldr r3, [r7, #12] 8012fc2: 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. */ 8012fc4: 68fb ldr r3, [r7, #12] 8012fc6: 68da ldr r2, [r3, #12] 8012fc8: 68fb ldr r3, [r7, #12] 8012fca: 681b ldr r3, [r3, #0] 8012fcc: 429a cmp r2, r3 8012fce: d207 bcs.n 8012fe0 { pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize ); 8012fd0: 68fb ldr r3, [r7, #12] 8012fd2: 689a ldr r2, [r3, #8] 8012fd4: 68fb ldr r3, [r7, #12] 8012fd6: 6c1b ldr r3, [r3, #64] @ 0x40 8012fd8: 425b negs r3, r3 8012fda: 441a add r2, r3 8012fdc: 68fb ldr r3, [r7, #12] 8012fde: 60da str r2, [r3, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 8012fe0: 687b ldr r3, [r7, #4] 8012fe2: 2b02 cmp r3, #2 8012fe4: d105 bne.n 8012ff2 { if( uxMessagesWaiting > ( UBaseType_t ) 0 ) 8012fe6: 693b ldr r3, [r7, #16] 8012fe8: 2b00 cmp r3, #0 8012fea: d002 beq.n 8012ff2 { /* 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; 8012fec: 693b ldr r3, [r7, #16] 8012fee: 3b01 subs r3, #1 8012ff0: 613b str r3, [r7, #16] { mtCOVERAGE_TEST_MARKER(); } } pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1; 8012ff2: 693b ldr r3, [r7, #16] 8012ff4: 1c5a adds r2, r3, #1 8012ff6: 68fb ldr r3, [r7, #12] 8012ff8: 639a str r2, [r3, #56] @ 0x38 return xReturn; 8012ffa: 697b ldr r3, [r7, #20] } 8012ffc: 4618 mov r0, r3 8012ffe: 3718 adds r7, #24 8013000: 46bd mov sp, r7 8013002: bd80 pop {r7, pc} 08013004 : /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 8013004: b580 push {r7, lr} 8013006: b082 sub sp, #8 8013008: af00 add r7, sp, #0 801300a: 6078 str r0, [r7, #4] 801300c: 6039 str r1, [r7, #0] if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 801300e: 687b ldr r3, [r7, #4] 8013010: 6c1b ldr r3, [r3, #64] @ 0x40 8013012: 2b00 cmp r3, #0 8013014: d018 beq.n 8013048 { 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. */ 8013016: 687b ldr r3, [r7, #4] 8013018: 68da ldr r2, [r3, #12] 801301a: 687b ldr r3, [r7, #4] 801301c: 6c1b ldr r3, [r3, #64] @ 0x40 801301e: 441a add r2, r3 8013020: 687b ldr r3, [r7, #4] 8013022: 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. */ 8013024: 687b ldr r3, [r7, #4] 8013026: 68da ldr r2, [r3, #12] 8013028: 687b ldr r3, [r7, #4] 801302a: 689b ldr r3, [r3, #8] 801302c: 429a cmp r2, r3 801302e: d303 bcc.n 8013038 { pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; 8013030: 687b ldr r3, [r7, #4] 8013032: 681a ldr r2, [r3, #0] 8013034: 687b ldr r3, [r7, #4] 8013036: 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. */ 8013038: 687b ldr r3, [r7, #4] 801303a: 68d9 ldr r1, [r3, #12] 801303c: 687b ldr r3, [r7, #4] 801303e: 6c1b ldr r3, [r3, #64] @ 0x40 8013040: 461a mov r2, r3 8013042: 6838 ldr r0, [r7, #0] 8013044: f017 feb3 bl 802adae } } 8013048: bf00 nop 801304a: 3708 adds r7, #8 801304c: 46bd mov sp, r7 801304e: bd80 pop {r7, pc} 08013050 : /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 8013050: b580 push {r7, lr} 8013052: b084 sub sp, #16 8013054: af00 add r7, sp, #0 8013056: 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(); 8013058: f002 fcce bl 80159f8 { int8_t cTxLock = pxQueue->cTxLock; 801305c: 687b ldr r3, [r7, #4] 801305e: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8013062: 73fb strb r3, [r7, #15] /* See if data was added to the queue while it was locked. */ while( cTxLock > queueLOCKED_UNMODIFIED ) 8013064: e011 b.n 801308a } #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 ) 8013066: 687b ldr r3, [r7, #4] 8013068: 6a5b ldr r3, [r3, #36] @ 0x24 801306a: 2b00 cmp r3, #0 801306c: d012 beq.n 8013094 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 801306e: 687b ldr r3, [r7, #4] 8013070: 3324 adds r3, #36 @ 0x24 8013072: 4618 mov r0, r3 8013074: f001 f93e bl 80142f4 8013078: 4603 mov r3, r0 801307a: 2b00 cmp r3, #0 801307c: d001 beq.n 8013082 { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 801307e: f001 fa3f bl 8014500 break; } } #endif /* configUSE_QUEUE_SETS */ --cTxLock; 8013082: 7bfb ldrb r3, [r7, #15] 8013084: 3b01 subs r3, #1 8013086: b2db uxtb r3, r3 8013088: 73fb strb r3, [r7, #15] while( cTxLock > queueLOCKED_UNMODIFIED ) 801308a: f997 300f ldrsb.w r3, [r7, #15] 801308e: 2b00 cmp r3, #0 8013090: dce9 bgt.n 8013066 8013092: e000 b.n 8013096 break; 8013094: bf00 nop } pxQueue->cTxLock = queueUNLOCKED; 8013096: 687b ldr r3, [r7, #4] 8013098: 22ff movs r2, #255 @ 0xff 801309a: f883 2045 strb.w r2, [r3, #69] @ 0x45 } taskEXIT_CRITICAL(); 801309e: f002 fcdd bl 8015a5c /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 80130a2: f002 fca9 bl 80159f8 { int8_t cRxLock = pxQueue->cRxLock; 80130a6: 687b ldr r3, [r7, #4] 80130a8: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 80130ac: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) 80130ae: e011 b.n 80130d4 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 80130b0: 687b ldr r3, [r7, #4] 80130b2: 691b ldr r3, [r3, #16] 80130b4: 2b00 cmp r3, #0 80130b6: d012 beq.n 80130de { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 80130b8: 687b ldr r3, [r7, #4] 80130ba: 3310 adds r3, #16 80130bc: 4618 mov r0, r3 80130be: f001 f919 bl 80142f4 80130c2: 4603 mov r3, r0 80130c4: 2b00 cmp r3, #0 80130c6: d001 beq.n 80130cc { vTaskMissedYield(); 80130c8: f001 fa1a bl 8014500 else { mtCOVERAGE_TEST_MARKER(); } --cRxLock; 80130cc: 7bbb ldrb r3, [r7, #14] 80130ce: 3b01 subs r3, #1 80130d0: b2db uxtb r3, r3 80130d2: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) 80130d4: f997 300e ldrsb.w r3, [r7, #14] 80130d8: 2b00 cmp r3, #0 80130da: dce9 bgt.n 80130b0 80130dc: e000 b.n 80130e0 } else { break; 80130de: bf00 nop } } pxQueue->cRxLock = queueUNLOCKED; 80130e0: 687b ldr r3, [r7, #4] 80130e2: 22ff movs r2, #255 @ 0xff 80130e4: f883 2044 strb.w r2, [r3, #68] @ 0x44 } taskEXIT_CRITICAL(); 80130e8: f002 fcb8 bl 8015a5c } 80130ec: bf00 nop 80130ee: 3710 adds r7, #16 80130f0: 46bd mov sp, r7 80130f2: bd80 pop {r7, pc} 080130f4 : /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueEmpty( 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 fc7c bl 80159f8 { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 8013100: 687b ldr r3, [r7, #4] 8013102: 6b9b ldr r3, [r3, #56] @ 0x38 8013104: 2b00 cmp r3, #0 8013106: d102 bne.n 801310e { xReturn = pdTRUE; 8013108: 2301 movs r3, #1 801310a: 60fb str r3, [r7, #12] 801310c: e001 b.n 8013112 } else { xReturn = pdFALSE; 801310e: 2300 movs r3, #0 8013110: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 8013112: f002 fca3 bl 8015a5c return xReturn; 8013116: 68fb ldr r3, [r7, #12] } 8013118: 4618 mov r0, r3 801311a: 3710 adds r7, #16 801311c: 46bd mov sp, r7 801311e: bd80 pop {r7, pc} 08013120 : return xReturn; } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { 8013120: b580 push {r7, lr} 8013122: b084 sub sp, #16 8013124: af00 add r7, sp, #0 8013126: 6078 str r0, [r7, #4] BaseType_t xReturn; taskENTER_CRITICAL(); 8013128: f002 fc66 bl 80159f8 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 801312c: 687b ldr r3, [r7, #4] 801312e: 6b9a ldr r2, [r3, #56] @ 0x38 8013130: 687b ldr r3, [r7, #4] 8013132: 6bdb ldr r3, [r3, #60] @ 0x3c 8013134: 429a cmp r2, r3 8013136: d102 bne.n 801313e { xReturn = pdTRUE; 8013138: 2301 movs r3, #1 801313a: 60fb str r3, [r7, #12] 801313c: e001 b.n 8013142 } else { xReturn = pdFALSE; 801313e: 2300 movs r3, #0 8013140: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 8013142: f002 fc8b bl 8015a5c return xReturn; 8013146: 68fb ldr r3, [r7, #12] } 8013148: 4618 mov r0, r3 801314a: 3710 adds r7, #16 801314c: 46bd mov sp, r7 801314e: bd80 pop {r7, pc} 08013150 : /*-----------------------------------------------------------*/ #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. */ { 8013150: b480 push {r7} 8013152: b085 sub sp, #20 8013154: af00 add r7, sp, #0 8013156: 6078 str r0, [r7, #4] 8013158: 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++ ) 801315a: 2300 movs r3, #0 801315c: 60fb str r3, [r7, #12] 801315e: e014 b.n 801318a { if( xQueueRegistry[ ux ].pcQueueName == NULL ) 8013160: 4a0f ldr r2, [pc, #60] @ (80131a0 ) 8013162: 68fb ldr r3, [r7, #12] 8013164: f852 3033 ldr.w r3, [r2, r3, lsl #3] 8013168: 2b00 cmp r3, #0 801316a: d10b bne.n 8013184 { /* Store the information on this queue. */ xQueueRegistry[ ux ].pcQueueName = pcQueueName; 801316c: 490c ldr r1, [pc, #48] @ (80131a0 ) 801316e: 68fb ldr r3, [r7, #12] 8013170: 683a ldr r2, [r7, #0] 8013172: f841 2033 str.w r2, [r1, r3, lsl #3] xQueueRegistry[ ux ].xHandle = xQueue; 8013176: 4a0a ldr r2, [pc, #40] @ (80131a0 ) 8013178: 68fb ldr r3, [r7, #12] 801317a: 00db lsls r3, r3, #3 801317c: 4413 add r3, r2 801317e: 687a ldr r2, [r7, #4] 8013180: 605a str r2, [r3, #4] traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ); break; 8013182: e006 b.n 8013192 for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 8013184: 68fb ldr r3, [r7, #12] 8013186: 3301 adds r3, #1 8013188: 60fb str r3, [r7, #12] 801318a: 68fb ldr r3, [r7, #12] 801318c: 2b07 cmp r3, #7 801318e: d9e7 bls.n 8013160 else { mtCOVERAGE_TEST_MARKER(); } } } 8013190: bf00 nop 8013192: bf00 nop 8013194: 3714 adds r7, #20 8013196: 46bd mov sp, r7 8013198: f85d 7b04 ldr.w r7, [sp], #4 801319c: 4770 bx lr 801319e: bf00 nop 80131a0: 24003d40 .word 0x24003d40 080131a4 : /*-----------------------------------------------------------*/ #if ( configQUEUE_REGISTRY_SIZE > 0 ) void vQueueUnregisterQueue( QueueHandle_t xQueue ) { 80131a4: b480 push {r7} 80131a6: b085 sub sp, #20 80131a8: af00 add r7, sp, #0 80131aa: 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++ ) 80131ac: 2300 movs r3, #0 80131ae: 60fb str r3, [r7, #12] 80131b0: e016 b.n 80131e0 { if( xQueueRegistry[ ux ].xHandle == xQueue ) 80131b2: 4a10 ldr r2, [pc, #64] @ (80131f4 ) 80131b4: 68fb ldr r3, [r7, #12] 80131b6: 00db lsls r3, r3, #3 80131b8: 4413 add r3, r2 80131ba: 685b ldr r3, [r3, #4] 80131bc: 687a ldr r2, [r7, #4] 80131be: 429a cmp r2, r3 80131c0: d10b bne.n 80131da { /* Set the name to NULL to show that this slot if free again. */ xQueueRegistry[ ux ].pcQueueName = NULL; 80131c2: 4a0c ldr r2, [pc, #48] @ (80131f4 ) 80131c4: 68fb ldr r3, [r7, #12] 80131c6: 2100 movs r1, #0 80131c8: 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; 80131cc: 4a09 ldr r2, [pc, #36] @ (80131f4 ) 80131ce: 68fb ldr r3, [r7, #12] 80131d0: 00db lsls r3, r3, #3 80131d2: 4413 add r3, r2 80131d4: 2200 movs r2, #0 80131d6: 605a str r2, [r3, #4] break; 80131d8: e006 b.n 80131e8 for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) 80131da: 68fb ldr r3, [r7, #12] 80131dc: 3301 adds r3, #1 80131de: 60fb str r3, [r7, #12] 80131e0: 68fb ldr r3, [r7, #12] 80131e2: 2b07 cmp r3, #7 80131e4: d9e5 bls.n 80131b2 { mtCOVERAGE_TEST_MARKER(); } } } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ 80131e6: bf00 nop 80131e8: bf00 nop 80131ea: 3714 adds r7, #20 80131ec: 46bd mov sp, r7 80131ee: f85d 7b04 ldr.w r7, [sp], #4 80131f2: 4770 bx lr 80131f4: 24003d40 .word 0x24003d40 080131f8 : /*-----------------------------------------------------------*/ #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { 80131f8: b580 push {r7, lr} 80131fa: b086 sub sp, #24 80131fc: af00 add r7, sp, #0 80131fe: 60f8 str r0, [r7, #12] 8013200: 60b9 str r1, [r7, #8] 8013202: 607a str r2, [r7, #4] Queue_t * const pxQueue = xQueue; 8013204: 68fb ldr r3, [r7, #12] 8013206: 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 ); 8013208: f002 fbf6 bl 80159f8 801320c: 697b ldr r3, [r7, #20] 801320e: f893 3044 ldrb.w r3, [r3, #68] @ 0x44 8013212: b25b sxtb r3, r3 8013214: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8013218: d103 bne.n 8013222 801321a: 697b ldr r3, [r7, #20] 801321c: 2200 movs r2, #0 801321e: f883 2044 strb.w r2, [r3, #68] @ 0x44 8013222: 697b ldr r3, [r7, #20] 8013224: f893 3045 ldrb.w r3, [r3, #69] @ 0x45 8013228: b25b sxtb r3, r3 801322a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801322e: d103 bne.n 8013238 8013230: 697b ldr r3, [r7, #20] 8013232: 2200 movs r2, #0 8013234: f883 2045 strb.w r2, [r3, #69] @ 0x45 8013238: f002 fc10 bl 8015a5c if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) 801323c: 697b ldr r3, [r7, #20] 801323e: 6b9b ldr r3, [r3, #56] @ 0x38 8013240: 2b00 cmp r3, #0 8013242: d106 bne.n 8013252 { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely ); 8013244: 697b ldr r3, [r7, #20] 8013246: 3324 adds r3, #36 @ 0x24 8013248: 687a ldr r2, [r7, #4] 801324a: 68b9 ldr r1, [r7, #8] 801324c: 4618 mov r0, r3 801324e: f001 f825 bl 801429c } else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); 8013252: 6978 ldr r0, [r7, #20] 8013254: f7ff fefc bl 8013050 } 8013258: bf00 nop 801325a: 3718 adds r7, #24 801325c: 46bd mov sp, r7 801325e: bd80 pop {r7, pc} 08013260 : /*-----------------------------------------------------------*/ #if( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) StreamBufferHandle_t xStreamBufferGenericCreate( size_t xBufferSizeBytes, size_t xTriggerLevelBytes, BaseType_t xIsMessageBuffer ) { 8013260: b580 push {r7, lr} 8013262: b08c sub sp, #48 @ 0x30 8013264: af02 add r7, sp, #8 8013266: 60f8 str r0, [r7, #12] 8013268: 60b9 str r1, [r7, #8] 801326a: 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 ) 801326c: 687b ldr r3, [r7, #4] 801326e: 2b01 cmp r3, #1 8013270: d111 bne.n 8013296 { /* Is a message buffer but not statically allocated. */ ucFlags = sbFLAGS_IS_MESSAGE_BUFFER; 8013272: 2301 movs r3, #1 8013274: f887 3027 strb.w r3, [r7, #39] @ 0x27 configASSERT( xBufferSizeBytes > sbBYTES_TO_STORE_MESSAGE_LENGTH ); 8013278: 68fb ldr r3, [r7, #12] 801327a: 2b04 cmp r3, #4 801327c: d81d bhi.n 80132ba __asm volatile 801327e: f04f 0350 mov.w r3, #80 @ 0x50 8013282: f383 8811 msr BASEPRI, r3 8013286: f3bf 8f6f isb sy 801328a: f3bf 8f4f dsb sy 801328e: 61fb str r3, [r7, #28] } 8013290: bf00 nop 8013292: bf00 nop 8013294: e7fd b.n 8013292 } else { /* Not a message buffer and not statically allocated. */ ucFlags = 0; 8013296: 2300 movs r3, #0 8013298: f887 3027 strb.w r3, [r7, #39] @ 0x27 configASSERT( xBufferSizeBytes > 0 ); 801329c: 68fb ldr r3, [r7, #12] 801329e: 2b00 cmp r3, #0 80132a0: d10b bne.n 80132ba __asm volatile 80132a2: f04f 0350 mov.w r3, #80 @ 0x50 80132a6: f383 8811 msr BASEPRI, r3 80132aa: f3bf 8f6f isb sy 80132ae: f3bf 8f4f dsb sy 80132b2: 61bb str r3, [r7, #24] } 80132b4: bf00 nop 80132b6: bf00 nop 80132b8: e7fd b.n 80132b6 } configASSERT( xTriggerLevelBytes <= xBufferSizeBytes ); 80132ba: 68ba ldr r2, [r7, #8] 80132bc: 68fb ldr r3, [r7, #12] 80132be: 429a cmp r2, r3 80132c0: d90b bls.n 80132da __asm volatile 80132c2: f04f 0350 mov.w r3, #80 @ 0x50 80132c6: f383 8811 msr BASEPRI, r3 80132ca: f3bf 8f6f isb sy 80132ce: f3bf 8f4f dsb sy 80132d2: 617b str r3, [r7, #20] } 80132d4: bf00 nop 80132d6: bf00 nop 80132d8: e7fd b.n 80132d6 /* A trigger level of 0 would cause a waiting task to unblock even when the buffer was empty. */ if( xTriggerLevelBytes == ( size_t ) 0 ) 80132da: 68bb ldr r3, [r7, #8] 80132dc: 2b00 cmp r3, #0 80132de: d101 bne.n 80132e4 { xTriggerLevelBytes = ( size_t ) 1; 80132e0: 2301 movs r3, #1 80132e2: 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++; 80132e4: 68fb ldr r3, [r7, #12] 80132e6: 3301 adds r3, #1 80132e8: 60fb str r3, [r7, #12] pucAllocatedMemory = ( uint8_t * ) pvPortMalloc( xBufferSizeBytes + sizeof( StreamBuffer_t ) ); /*lint !e9079 malloc() only returns void*. */ 80132ea: 68fb ldr r3, [r7, #12] 80132ec: 3324 adds r3, #36 @ 0x24 80132ee: 4618 mov r0, r3 80132f0: f002 fca4 bl 8015c3c 80132f4: 6238 str r0, [r7, #32] if( pucAllocatedMemory != NULL ) 80132f6: 6a3b ldr r3, [r7, #32] 80132f8: 2b00 cmp r3, #0 80132fa: d00a beq.n 8013312 { 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. */ 80132fc: 6a3b ldr r3, [r7, #32] 80132fe: f103 0124 add.w r1, r3, #36 @ 0x24 8013302: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 8013306: 9300 str r3, [sp, #0] 8013308: 68bb ldr r3, [r7, #8] 801330a: 68fa ldr r2, [r7, #12] 801330c: 6a38 ldr r0, [r7, #32] 801330e: f000 fb0b bl 8013928 else { traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ); } return ( StreamBufferHandle_t ) pucAllocatedMemory; /*lint !e9087 !e826 Safe cast as allocated memory is aligned. */ 8013312: 6a3b ldr r3, [r7, #32] } 8013314: 4618 mov r0, r3 8013316: 3728 adds r7, #40 @ 0x28 8013318: 46bd mov sp, r7 801331a: bd80 pop {r7, pc} 0801331c : return xReturn; } /*-----------------------------------------------------------*/ size_t xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) { 801331c: b480 push {r7} 801331e: b087 sub sp, #28 8013320: af00 add r7, sp, #0 8013322: 6078 str r0, [r7, #4] const StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 8013324: 687b ldr r3, [r7, #4] 8013326: 613b str r3, [r7, #16] size_t xSpace; configASSERT( pxStreamBuffer ); 8013328: 693b ldr r3, [r7, #16] 801332a: 2b00 cmp r3, #0 801332c: d10b bne.n 8013346 __asm volatile 801332e: f04f 0350 mov.w r3, #80 @ 0x50 8013332: f383 8811 msr BASEPRI, r3 8013336: f3bf 8f6f isb sy 801333a: f3bf 8f4f dsb sy 801333e: 60fb str r3, [r7, #12] } 8013340: bf00 nop 8013342: bf00 nop 8013344: e7fd b.n 8013342 xSpace = pxStreamBuffer->xLength + pxStreamBuffer->xTail; 8013346: 693b ldr r3, [r7, #16] 8013348: 689a ldr r2, [r3, #8] 801334a: 693b ldr r3, [r7, #16] 801334c: 681b ldr r3, [r3, #0] 801334e: 4413 add r3, r2 8013350: 617b str r3, [r7, #20] xSpace -= pxStreamBuffer->xHead; 8013352: 693b ldr r3, [r7, #16] 8013354: 685b ldr r3, [r3, #4] 8013356: 697a ldr r2, [r7, #20] 8013358: 1ad3 subs r3, r2, r3 801335a: 617b str r3, [r7, #20] xSpace -= ( size_t ) 1; 801335c: 697b ldr r3, [r7, #20] 801335e: 3b01 subs r3, #1 8013360: 617b str r3, [r7, #20] if( xSpace >= pxStreamBuffer->xLength ) 8013362: 693b ldr r3, [r7, #16] 8013364: 689b ldr r3, [r3, #8] 8013366: 697a ldr r2, [r7, #20] 8013368: 429a cmp r2, r3 801336a: d304 bcc.n 8013376 { xSpace -= pxStreamBuffer->xLength; 801336c: 693b ldr r3, [r7, #16] 801336e: 689b ldr r3, [r3, #8] 8013370: 697a ldr r2, [r7, #20] 8013372: 1ad3 subs r3, r2, r3 8013374: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } return xSpace; 8013376: 697b ldr r3, [r7, #20] } 8013378: 4618 mov r0, r3 801337a: 371c adds r7, #28 801337c: 46bd mov sp, r7 801337e: f85d 7b04 ldr.w r7, [sp], #4 8013382: 4770 bx lr 08013384 : size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait ) { 8013384: b580 push {r7, lr} 8013386: b090 sub sp, #64 @ 0x40 8013388: af02 add r7, sp, #8 801338a: 60f8 str r0, [r7, #12] 801338c: 60b9 str r1, [r7, #8] 801338e: 607a str r2, [r7, #4] 8013390: 603b str r3, [r7, #0] StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 8013392: 68fb ldr r3, [r7, #12] 8013394: 62fb str r3, [r7, #44] @ 0x2c size_t xReturn, xSpace = 0; 8013396: 2300 movs r3, #0 8013398: 637b str r3, [r7, #52] @ 0x34 size_t xRequiredSpace = xDataLengthBytes; 801339a: 687b ldr r3, [r7, #4] 801339c: 633b str r3, [r7, #48] @ 0x30 TimeOut_t xTimeOut; configASSERT( pvTxData ); 801339e: 68bb ldr r3, [r7, #8] 80133a0: 2b00 cmp r3, #0 80133a2: d10b bne.n 80133bc __asm volatile 80133a4: f04f 0350 mov.w r3, #80 @ 0x50 80133a8: f383 8811 msr BASEPRI, r3 80133ac: f3bf 8f6f isb sy 80133b0: f3bf 8f4f dsb sy 80133b4: 627b str r3, [r7, #36] @ 0x24 } 80133b6: bf00 nop 80133b8: bf00 nop 80133ba: e7fd b.n 80133b8 configASSERT( pxStreamBuffer ); 80133bc: 6afb ldr r3, [r7, #44] @ 0x2c 80133be: 2b00 cmp r3, #0 80133c0: d10b bne.n 80133da __asm volatile 80133c2: f04f 0350 mov.w r3, #80 @ 0x50 80133c6: f383 8811 msr BASEPRI, r3 80133ca: f3bf 8f6f isb sy 80133ce: f3bf 8f4f dsb sy 80133d2: 623b str r3, [r7, #32] } 80133d4: bf00 nop 80133d6: bf00 nop 80133d8: e7fd b.n 80133d6 /* 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 ) 80133da: 6afb ldr r3, [r7, #44] @ 0x2c 80133dc: 7f1b ldrb r3, [r3, #28] 80133de: f003 0301 and.w r3, r3, #1 80133e2: 2b00 cmp r3, #0 80133e4: d012 beq.n 801340c { xRequiredSpace += sbBYTES_TO_STORE_MESSAGE_LENGTH; 80133e6: 6b3b ldr r3, [r7, #48] @ 0x30 80133e8: 3304 adds r3, #4 80133ea: 633b str r3, [r7, #48] @ 0x30 /* Overflow? */ configASSERT( xRequiredSpace > xDataLengthBytes ); 80133ec: 6b3a ldr r2, [r7, #48] @ 0x30 80133ee: 687b ldr r3, [r7, #4] 80133f0: 429a cmp r2, r3 80133f2: d80b bhi.n 801340c __asm volatile 80133f4: f04f 0350 mov.w r3, #80 @ 0x50 80133f8: f383 8811 msr BASEPRI, r3 80133fc: f3bf 8f6f isb sy 8013400: f3bf 8f4f dsb sy 8013404: 61fb str r3, [r7, #28] } 8013406: bf00 nop 8013408: bf00 nop 801340a: e7fd b.n 8013408 else { mtCOVERAGE_TEST_MARKER(); } if( xTicksToWait != ( TickType_t ) 0 ) 801340c: 683b ldr r3, [r7, #0] 801340e: 2b00 cmp r3, #0 8013410: d03f beq.n 8013492 { vTaskSetTimeOutState( &xTimeOut ); 8013412: f107 0310 add.w r3, r7, #16 8013416: 4618 mov r0, r3 8013418: f000 ffd0 bl 80143bc do { /* Wait until the required number of bytes are free in the message buffer. */ taskENTER_CRITICAL(); 801341c: f002 faec bl 80159f8 { xSpace = xStreamBufferSpacesAvailable( pxStreamBuffer ); 8013420: 6af8 ldr r0, [r7, #44] @ 0x2c 8013422: f7ff ff7b bl 801331c 8013426: 6378 str r0, [r7, #52] @ 0x34 if( xSpace < xRequiredSpace ) 8013428: 6b7a ldr r2, [r7, #52] @ 0x34 801342a: 6b3b ldr r3, [r7, #48] @ 0x30 801342c: 429a cmp r2, r3 801342e: d218 bcs.n 8013462 { /* Clear notification state as going to wait for space. */ ( void ) xTaskNotifyStateClear( NULL ); 8013430: 2000 movs r0, #0 8013432: f001 fcf3 bl 8014e1c /* Should only be one writer. */ configASSERT( pxStreamBuffer->xTaskWaitingToSend == NULL ); 8013436: 6afb ldr r3, [r7, #44] @ 0x2c 8013438: 695b ldr r3, [r3, #20] 801343a: 2b00 cmp r3, #0 801343c: d00b beq.n 8013456 __asm volatile 801343e: f04f 0350 mov.w r3, #80 @ 0x50 8013442: f383 8811 msr BASEPRI, r3 8013446: f3bf 8f6f isb sy 801344a: f3bf 8f4f dsb sy 801344e: 61bb str r3, [r7, #24] } 8013450: bf00 nop 8013452: bf00 nop 8013454: e7fd b.n 8013452 pxStreamBuffer->xTaskWaitingToSend = xTaskGetCurrentTaskHandle(); 8013456: f001 f93b bl 80146d0 801345a: 4602 mov r2, r0 801345c: 6afb ldr r3, [r7, #44] @ 0x2c 801345e: 615a str r2, [r3, #20] 8013460: e002 b.n 8013468 } else { taskEXIT_CRITICAL(); 8013462: f002 fafb bl 8015a5c break; 8013466: e014 b.n 8013492 } } taskEXIT_CRITICAL(); 8013468: f002 faf8 bl 8015a5c traceBLOCKING_ON_STREAM_BUFFER_SEND( xStreamBuffer ); ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait ); 801346c: 683b ldr r3, [r7, #0] 801346e: 2200 movs r2, #0 8013470: 2100 movs r1, #0 8013472: 2000 movs r0, #0 8013474: f001 faca bl 8014a0c pxStreamBuffer->xTaskWaitingToSend = NULL; 8013478: 6afb ldr r3, [r7, #44] @ 0x2c 801347a: 2200 movs r2, #0 801347c: 615a str r2, [r3, #20] } while( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ); 801347e: 463a mov r2, r7 8013480: f107 0310 add.w r3, r7, #16 8013484: 4611 mov r1, r2 8013486: 4618 mov r0, r3 8013488: f000 ffd6 bl 8014438 801348c: 4603 mov r3, r0 801348e: 2b00 cmp r3, #0 8013490: d0c4 beq.n 801341c else { mtCOVERAGE_TEST_MARKER(); } if( xSpace == ( size_t ) 0 ) 8013492: 6b7b ldr r3, [r7, #52] @ 0x34 8013494: 2b00 cmp r3, #0 8013496: d103 bne.n 80134a0 { xSpace = xStreamBufferSpacesAvailable( pxStreamBuffer ); 8013498: 6af8 ldr r0, [r7, #44] @ 0x2c 801349a: f7ff ff3f bl 801331c 801349e: 6378 str r0, [r7, #52] @ 0x34 else { mtCOVERAGE_TEST_MARKER(); } xReturn = prvWriteMessageToBuffer( pxStreamBuffer, pvTxData, xDataLengthBytes, xSpace, xRequiredSpace ); 80134a0: 6b3b ldr r3, [r7, #48] @ 0x30 80134a2: 9300 str r3, [sp, #0] 80134a4: 6b7b ldr r3, [r7, #52] @ 0x34 80134a6: 687a ldr r2, [r7, #4] 80134a8: 68b9 ldr r1, [r7, #8] 80134aa: 6af8 ldr r0, [r7, #44] @ 0x2c 80134ac: f000 f823 bl 80134f6 80134b0: 62b8 str r0, [r7, #40] @ 0x28 if( xReturn > ( size_t ) 0 ) 80134b2: 6abb ldr r3, [r7, #40] @ 0x28 80134b4: 2b00 cmp r3, #0 80134b6: d019 beq.n 80134ec { traceSTREAM_BUFFER_SEND( xStreamBuffer, xReturn ); /* Was a task waiting for the data? */ if( prvBytesInBuffer( pxStreamBuffer ) >= pxStreamBuffer->xTriggerLevelBytes ) 80134b8: 6af8 ldr r0, [r7, #44] @ 0x2c 80134ba: f000 fa15 bl 80138e8 80134be: 4602 mov r2, r0 80134c0: 6afb ldr r3, [r7, #44] @ 0x2c 80134c2: 68db ldr r3, [r3, #12] 80134c4: 429a cmp r2, r3 80134c6: d311 bcc.n 80134ec { sbSEND_COMPLETED( pxStreamBuffer ); 80134c8: f000 fcc6 bl 8013e58 80134cc: 6afb ldr r3, [r7, #44] @ 0x2c 80134ce: 691b ldr r3, [r3, #16] 80134d0: 2b00 cmp r3, #0 80134d2: d009 beq.n 80134e8 80134d4: 6afb ldr r3, [r7, #44] @ 0x2c 80134d6: 6918 ldr r0, [r3, #16] 80134d8: 2300 movs r3, #0 80134da: 2200 movs r2, #0 80134dc: 2100 movs r1, #0 80134de: f001 faf5 bl 8014acc 80134e2: 6afb ldr r3, [r7, #44] @ 0x2c 80134e4: 2200 movs r2, #0 80134e6: 611a str r2, [r3, #16] 80134e8: f000 fcc4 bl 8013e74 { mtCOVERAGE_TEST_MARKER(); traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer ); } return xReturn; 80134ec: 6abb ldr r3, [r7, #40] @ 0x28 } 80134ee: 4618 mov r0, r3 80134f0: 3738 adds r7, #56 @ 0x38 80134f2: 46bd mov sp, r7 80134f4: bd80 pop {r7, pc} 080134f6 : static size_t prvWriteMessageToBuffer( StreamBuffer_t * const pxStreamBuffer, const void * pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace ) { 80134f6: b580 push {r7, lr} 80134f8: b086 sub sp, #24 80134fa: af00 add r7, sp, #0 80134fc: 60f8 str r0, [r7, #12] 80134fe: 60b9 str r1, [r7, #8] 8013500: 607a str r2, [r7, #4] 8013502: 603b str r3, [r7, #0] BaseType_t xShouldWrite; size_t xReturn; if( xSpace == ( size_t ) 0 ) 8013504: 683b ldr r3, [r7, #0] 8013506: 2b00 cmp r3, #0 8013508: d102 bne.n 8013510 { /* Doesn't matter if this is a stream buffer or a message buffer, there is no space to write. */ xShouldWrite = pdFALSE; 801350a: 2300 movs r3, #0 801350c: 617b str r3, [r7, #20] 801350e: e01d b.n 801354c } else if( ( pxStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) == ( uint8_t ) 0 ) 8013510: 68fb ldr r3, [r7, #12] 8013512: 7f1b ldrb r3, [r3, #28] 8013514: f003 0301 and.w r3, r3, #1 8013518: 2b00 cmp r3, #0 801351a: d108 bne.n 801352e { /* 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; 801351c: 2301 movs r3, #1 801351e: 617b str r3, [r7, #20] xDataLengthBytes = configMIN( xDataLengthBytes, xSpace ); 8013520: 687a ldr r2, [r7, #4] 8013522: 683b ldr r3, [r7, #0] 8013524: 4293 cmp r3, r2 8013526: bf28 it cs 8013528: 4613 movcs r3, r2 801352a: 607b str r3, [r7, #4] 801352c: e00e b.n 801354c } else if( xSpace >= xRequiredSpace ) 801352e: 683a ldr r2, [r7, #0] 8013530: 6a3b ldr r3, [r7, #32] 8013532: 429a cmp r2, r3 8013534: d308 bcc.n 8013548 { /* 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; 8013536: 2301 movs r3, #1 8013538: 617b str r3, [r7, #20] ( void ) prvWriteBytesToBuffer( pxStreamBuffer, ( const uint8_t * ) &( xDataLengthBytes ), sbBYTES_TO_STORE_MESSAGE_LENGTH ); 801353a: 1d3b adds r3, r7, #4 801353c: 2204 movs r2, #4 801353e: 4619 mov r1, r3 8013540: 68f8 ldr r0, [r7, #12] 8013542: f000 f8df bl 8013704 8013546: e001 b.n 801354c } else { /* There is space available, but not enough space. */ xShouldWrite = pdFALSE; 8013548: 2300 movs r3, #0 801354a: 617b str r3, [r7, #20] } if( xShouldWrite != pdFALSE ) 801354c: 697b ldr r3, [r7, #20] 801354e: 2b00 cmp r3, #0 8013550: d007 beq.n 8013562 { /* 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. */ 8013552: 687b ldr r3, [r7, #4] 8013554: 461a mov r2, r3 8013556: 68b9 ldr r1, [r7, #8] 8013558: 68f8 ldr r0, [r7, #12] 801355a: f000 f8d3 bl 8013704 801355e: 6138 str r0, [r7, #16] 8013560: e001 b.n 8013566 } else { xReturn = 0; 8013562: 2300 movs r3, #0 8013564: 613b str r3, [r7, #16] } return xReturn; 8013566: 693b ldr r3, [r7, #16] } 8013568: 4618 mov r0, r3 801356a: 3718 adds r7, #24 801356c: 46bd mov sp, r7 801356e: bd80 pop {r7, pc} 08013570 : size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait ) { 8013570: b580 push {r7, lr} 8013572: b08e sub sp, #56 @ 0x38 8013574: af02 add r7, sp, #8 8013576: 60f8 str r0, [r7, #12] 8013578: 60b9 str r1, [r7, #8] 801357a: 607a str r2, [r7, #4] 801357c: 603b str r3, [r7, #0] StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; 801357e: 68fb ldr r3, [r7, #12] 8013580: 623b str r3, [r7, #32] size_t xReceivedLength = 0, xBytesAvailable, xBytesToStoreMessageLength; 8013582: 2300 movs r3, #0 8013584: 62fb str r3, [r7, #44] @ 0x2c configASSERT( pvRxData ); 8013586: 68bb ldr r3, [r7, #8] 8013588: 2b00 cmp r3, #0 801358a: d10b bne.n 80135a4 __asm volatile 801358c: f04f 0350 mov.w r3, #80 @ 0x50 8013590: f383 8811 msr BASEPRI, r3 8013594: f3bf 8f6f isb sy 8013598: f3bf 8f4f dsb sy 801359c: 61fb str r3, [r7, #28] } 801359e: bf00 nop 80135a0: bf00 nop 80135a2: e7fd b.n 80135a0 configASSERT( pxStreamBuffer ); 80135a4: 6a3b ldr r3, [r7, #32] 80135a6: 2b00 cmp r3, #0 80135a8: d10b bne.n 80135c2 __asm volatile 80135aa: f04f 0350 mov.w r3, #80 @ 0x50 80135ae: f383 8811 msr BASEPRI, r3 80135b2: f3bf 8f6f isb sy 80135b6: f3bf 8f4f dsb sy 80135ba: 61bb str r3, [r7, #24] } 80135bc: bf00 nop 80135be: bf00 nop 80135c0: e7fd b.n 80135be /* 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 ) 80135c2: 6a3b ldr r3, [r7, #32] 80135c4: 7f1b ldrb r3, [r3, #28] 80135c6: f003 0301 and.w r3, r3, #1 80135ca: 2b00 cmp r3, #0 80135cc: d002 beq.n 80135d4 { xBytesToStoreMessageLength = sbBYTES_TO_STORE_MESSAGE_LENGTH; 80135ce: 2304 movs r3, #4 80135d0: 627b str r3, [r7, #36] @ 0x24 80135d2: e001 b.n 80135d8 } else { xBytesToStoreMessageLength = 0; 80135d4: 2300 movs r3, #0 80135d6: 627b str r3, [r7, #36] @ 0x24 } if( xTicksToWait != ( TickType_t ) 0 ) 80135d8: 683b ldr r3, [r7, #0] 80135da: 2b00 cmp r3, #0 80135dc: d035 beq.n 801364a { /* Checking if there is data and clearing the notification state must be performed atomically. */ taskENTER_CRITICAL(); 80135de: f002 fa0b bl 80159f8 { xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 80135e2: 6a38 ldr r0, [r7, #32] 80135e4: f000 f980 bl 80138e8 80135e8: 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 ) 80135ea: 6aba ldr r2, [r7, #40] @ 0x28 80135ec: 6a7b ldr r3, [r7, #36] @ 0x24 80135ee: 429a cmp r2, r3 80135f0: d817 bhi.n 8013622 { /* Clear notification state as going to wait for data. */ ( void ) xTaskNotifyStateClear( NULL ); 80135f2: 2000 movs r0, #0 80135f4: f001 fc12 bl 8014e1c /* Should only be one reader. */ configASSERT( pxStreamBuffer->xTaskWaitingToReceive == NULL ); 80135f8: 6a3b ldr r3, [r7, #32] 80135fa: 691b ldr r3, [r3, #16] 80135fc: 2b00 cmp r3, #0 80135fe: d00b beq.n 8013618 __asm volatile 8013600: f04f 0350 mov.w r3, #80 @ 0x50 8013604: f383 8811 msr BASEPRI, r3 8013608: f3bf 8f6f isb sy 801360c: f3bf 8f4f dsb sy 8013610: 617b str r3, [r7, #20] } 8013612: bf00 nop 8013614: bf00 nop 8013616: e7fd b.n 8013614 pxStreamBuffer->xTaskWaitingToReceive = xTaskGetCurrentTaskHandle(); 8013618: f001 f85a bl 80146d0 801361c: 4602 mov r2, r0 801361e: 6a3b ldr r3, [r7, #32] 8013620: 611a str r2, [r3, #16] else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8013622: f002 fa1b bl 8015a5c if( xBytesAvailable <= xBytesToStoreMessageLength ) 8013626: 6aba ldr r2, [r7, #40] @ 0x28 8013628: 6a7b ldr r3, [r7, #36] @ 0x24 801362a: 429a cmp r2, r3 801362c: d811 bhi.n 8013652 { /* Wait for data to be available. */ traceBLOCKING_ON_STREAM_BUFFER_RECEIVE( xStreamBuffer ); ( void ) xTaskNotifyWait( ( uint32_t ) 0, ( uint32_t ) 0, NULL, xTicksToWait ); 801362e: 683b ldr r3, [r7, #0] 8013630: 2200 movs r2, #0 8013632: 2100 movs r1, #0 8013634: 2000 movs r0, #0 8013636: f001 f9e9 bl 8014a0c pxStreamBuffer->xTaskWaitingToReceive = NULL; 801363a: 6a3b ldr r3, [r7, #32] 801363c: 2200 movs r2, #0 801363e: 611a str r2, [r3, #16] /* Recheck the data available after blocking. */ xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 8013640: 6a38 ldr r0, [r7, #32] 8013642: f000 f951 bl 80138e8 8013646: 62b8 str r0, [r7, #40] @ 0x28 8013648: e003 b.n 8013652 mtCOVERAGE_TEST_MARKER(); } } else { xBytesAvailable = prvBytesInBuffer( pxStreamBuffer ); 801364a: 6a38 ldr r0, [r7, #32] 801364c: f000 f94c bl 80138e8 8013650: 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 ) 8013652: 6aba ldr r2, [r7, #40] @ 0x28 8013654: 6a7b ldr r3, [r7, #36] @ 0x24 8013656: 429a cmp r2, r3 8013658: d91d bls.n 8013696 { xReceivedLength = prvReadMessageFromBuffer( pxStreamBuffer, pvRxData, xBufferLengthBytes, xBytesAvailable, xBytesToStoreMessageLength ); 801365a: 6a7b ldr r3, [r7, #36] @ 0x24 801365c: 9300 str r3, [sp, #0] 801365e: 6abb ldr r3, [r7, #40] @ 0x28 8013660: 687a ldr r2, [r7, #4] 8013662: 68b9 ldr r1, [r7, #8] 8013664: 6a38 ldr r0, [r7, #32] 8013666: f000 f81b bl 80136a0 801366a: 62f8 str r0, [r7, #44] @ 0x2c /* Was a task waiting for space in the buffer? */ if( xReceivedLength != ( size_t ) 0 ) 801366c: 6afb ldr r3, [r7, #44] @ 0x2c 801366e: 2b00 cmp r3, #0 8013670: d011 beq.n 8013696 { traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength ); sbRECEIVE_COMPLETED( pxStreamBuffer ); 8013672: f000 fbf1 bl 8013e58 8013676: 6a3b ldr r3, [r7, #32] 8013678: 695b ldr r3, [r3, #20] 801367a: 2b00 cmp r3, #0 801367c: d009 beq.n 8013692 801367e: 6a3b ldr r3, [r7, #32] 8013680: 6958 ldr r0, [r3, #20] 8013682: 2300 movs r3, #0 8013684: 2200 movs r2, #0 8013686: 2100 movs r1, #0 8013688: f001 fa20 bl 8014acc 801368c: 6a3b ldr r3, [r7, #32] 801368e: 2200 movs r2, #0 8013690: 615a str r2, [r3, #20] 8013692: f000 fbef bl 8013e74 { traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer ); mtCOVERAGE_TEST_MARKER(); } return xReceivedLength; 8013696: 6afb ldr r3, [r7, #44] @ 0x2c } 8013698: 4618 mov r0, r3 801369a: 3730 adds r7, #48 @ 0x30 801369c: 46bd mov sp, r7 801369e: bd80 pop {r7, pc} 080136a0 : static size_t prvReadMessageFromBuffer( StreamBuffer_t *pxStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable, size_t xBytesToStoreMessageLength ) { 80136a0: b580 push {r7, lr} 80136a2: b088 sub sp, #32 80136a4: af00 add r7, sp, #0 80136a6: 60f8 str r0, [r7, #12] 80136a8: 60b9 str r1, [r7, #8] 80136aa: 607a str r2, [r7, #4] 80136ac: 603b str r3, [r7, #0] size_t xOriginalTail, xReceivedLength, xNextMessageLength; configMESSAGE_BUFFER_LENGTH_TYPE xTempNextMessageLength; if( xBytesToStoreMessageLength != ( size_t ) 0 ) 80136ae: 6abb ldr r3, [r7, #40] @ 0x28 80136b0: 2b00 cmp r3, #0 80136b2: d019 beq.n 80136e8 { /* 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; 80136b4: 68fb ldr r3, [r7, #12] 80136b6: 681b ldr r3, [r3, #0] 80136b8: 61bb str r3, [r7, #24] ( void ) prvReadBytesFromBuffer( pxStreamBuffer, ( uint8_t * ) &xTempNextMessageLength, xBytesToStoreMessageLength, xBytesAvailable ); 80136ba: f107 0110 add.w r1, r7, #16 80136be: 683b ldr r3, [r7, #0] 80136c0: 6aba ldr r2, [r7, #40] @ 0x28 80136c2: 68f8 ldr r0, [r7, #12] 80136c4: f000 f893 bl 80137ee xNextMessageLength = ( size_t ) xTempNextMessageLength; 80136c8: 693b ldr r3, [r7, #16] 80136ca: 61fb str r3, [r7, #28] /* Reduce the number of bytes available by the number of bytes just read out. */ xBytesAvailable -= xBytesToStoreMessageLength; 80136cc: 683a ldr r2, [r7, #0] 80136ce: 6abb ldr r3, [r7, #40] @ 0x28 80136d0: 1ad3 subs r3, r2, r3 80136d2: 603b str r3, [r7, #0] /* Check there is enough space in the buffer provided by the user. */ if( xNextMessageLength > xBufferLengthBytes ) 80136d4: 69fa ldr r2, [r7, #28] 80136d6: 687b ldr r3, [r7, #4] 80136d8: 429a cmp r2, r3 80136da: d907 bls.n 80136ec { /* 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; 80136dc: 68fb ldr r3, [r7, #12] 80136de: 69ba ldr r2, [r7, #24] 80136e0: 601a str r2, [r3, #0] xNextMessageLength = 0; 80136e2: 2300 movs r3, #0 80136e4: 61fb str r3, [r7, #28] 80136e6: e001 b.n 80136ec } else { /* A stream of bytes is being received (as opposed to a discrete message), so read as many bytes as possible. */ xNextMessageLength = xBufferLengthBytes; 80136e8: 687b ldr r3, [r7, #4] 80136ea: 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. */ 80136ec: 683b ldr r3, [r7, #0] 80136ee: 69fa ldr r2, [r7, #28] 80136f0: 68b9 ldr r1, [r7, #8] 80136f2: 68f8 ldr r0, [r7, #12] 80136f4: f000 f87b bl 80137ee 80136f8: 6178 str r0, [r7, #20] return xReceivedLength; 80136fa: 697b ldr r3, [r7, #20] } 80136fc: 4618 mov r0, r3 80136fe: 3720 adds r7, #32 8013700: 46bd mov sp, r7 8013702: bd80 pop {r7, pc} 08013704 : return xReturn; } /*-----------------------------------------------------------*/ static size_t prvWriteBytesToBuffer( StreamBuffer_t * const pxStreamBuffer, const uint8_t *pucData, size_t xCount ) { 8013704: b580 push {r7, lr} 8013706: b08a sub sp, #40 @ 0x28 8013708: af00 add r7, sp, #0 801370a: 60f8 str r0, [r7, #12] 801370c: 60b9 str r1, [r7, #8] 801370e: 607a str r2, [r7, #4] size_t xNextHead, xFirstLength; configASSERT( xCount > ( size_t ) 0 ); 8013710: 687b ldr r3, [r7, #4] 8013712: 2b00 cmp r3, #0 8013714: d10b bne.n 801372e __asm volatile 8013716: f04f 0350 mov.w r3, #80 @ 0x50 801371a: f383 8811 msr BASEPRI, r3 801371e: f3bf 8f6f isb sy 8013722: f3bf 8f4f dsb sy 8013726: 61fb str r3, [r7, #28] } 8013728: bf00 nop 801372a: bf00 nop 801372c: e7fd b.n 801372a xNextHead = pxStreamBuffer->xHead; 801372e: 68fb ldr r3, [r7, #12] 8013730: 685b ldr r3, [r3, #4] 8013732: 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 ); 8013734: 68fb ldr r3, [r7, #12] 8013736: 689a ldr r2, [r3, #8] 8013738: 6a7b ldr r3, [r7, #36] @ 0x24 801373a: 1ad3 subs r3, r2, r3 801373c: 687a ldr r2, [r7, #4] 801373e: 4293 cmp r3, r2 8013740: bf28 it cs 8013742: 4613 movcs r3, r2 8013744: 623b str r3, [r7, #32] /* Write as many bytes as can be written in the first write. */ configASSERT( ( xNextHead + xFirstLength ) <= pxStreamBuffer->xLength ); 8013746: 6a7a ldr r2, [r7, #36] @ 0x24 8013748: 6a3b ldr r3, [r7, #32] 801374a: 441a add r2, r3 801374c: 68fb ldr r3, [r7, #12] 801374e: 689b ldr r3, [r3, #8] 8013750: 429a cmp r2, r3 8013752: d90b bls.n 801376c __asm volatile 8013754: f04f 0350 mov.w r3, #80 @ 0x50 8013758: f383 8811 msr BASEPRI, r3 801375c: f3bf 8f6f isb sy 8013760: f3bf 8f4f dsb sy 8013764: 61bb str r3, [r7, #24] } 8013766: bf00 nop 8013768: bf00 nop 801376a: e7fd b.n 8013768 ( void ) memcpy( ( void* ) ( &( pxStreamBuffer->pucBuffer[ xNextHead ] ) ), ( const void * ) pucData, xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 801376c: 68fb ldr r3, [r7, #12] 801376e: 699a ldr r2, [r3, #24] 8013770: 6a7b ldr r3, [r7, #36] @ 0x24 8013772: 4413 add r3, r2 8013774: 6a3a ldr r2, [r7, #32] 8013776: 68b9 ldr r1, [r7, #8] 8013778: 4618 mov r0, r3 801377a: f017 fb18 bl 802adae /* If the number of bytes written was less than the number that could be written in the first write... */ if( xCount > xFirstLength ) 801377e: 687a ldr r2, [r7, #4] 8013780: 6a3b ldr r3, [r7, #32] 8013782: 429a cmp r2, r3 8013784: d91d bls.n 80137c2 { /* ...then write the remaining bytes to the start of the buffer. */ configASSERT( ( xCount - xFirstLength ) <= pxStreamBuffer->xLength ); 8013786: 687a ldr r2, [r7, #4] 8013788: 6a3b ldr r3, [r7, #32] 801378a: 1ad2 subs r2, r2, r3 801378c: 68fb ldr r3, [r7, #12] 801378e: 689b ldr r3, [r3, #8] 8013790: 429a cmp r2, r3 8013792: d90b bls.n 80137ac __asm volatile 8013794: f04f 0350 mov.w r3, #80 @ 0x50 8013798: f383 8811 msr BASEPRI, r3 801379c: f3bf 8f6f isb sy 80137a0: f3bf 8f4f dsb sy 80137a4: 617b str r3, [r7, #20] } 80137a6: bf00 nop 80137a8: bf00 nop 80137aa: e7fd b.n 80137a8 ( void ) memcpy( ( void * ) pxStreamBuffer->pucBuffer, ( const void * ) &( pucData[ xFirstLength ] ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 80137ac: 68fb ldr r3, [r7, #12] 80137ae: 6998 ldr r0, [r3, #24] 80137b0: 68ba ldr r2, [r7, #8] 80137b2: 6a3b ldr r3, [r7, #32] 80137b4: 18d1 adds r1, r2, r3 80137b6: 687a ldr r2, [r7, #4] 80137b8: 6a3b ldr r3, [r7, #32] 80137ba: 1ad3 subs r3, r2, r3 80137bc: 461a mov r2, r3 80137be: f017 faf6 bl 802adae else { mtCOVERAGE_TEST_MARKER(); } xNextHead += xCount; 80137c2: 6a7a ldr r2, [r7, #36] @ 0x24 80137c4: 687b ldr r3, [r7, #4] 80137c6: 4413 add r3, r2 80137c8: 627b str r3, [r7, #36] @ 0x24 if( xNextHead >= pxStreamBuffer->xLength ) 80137ca: 68fb ldr r3, [r7, #12] 80137cc: 689b ldr r3, [r3, #8] 80137ce: 6a7a ldr r2, [r7, #36] @ 0x24 80137d0: 429a cmp r2, r3 80137d2: d304 bcc.n 80137de { xNextHead -= pxStreamBuffer->xLength; 80137d4: 68fb ldr r3, [r7, #12] 80137d6: 689b ldr r3, [r3, #8] 80137d8: 6a7a ldr r2, [r7, #36] @ 0x24 80137da: 1ad3 subs r3, r2, r3 80137dc: 627b str r3, [r7, #36] @ 0x24 else { mtCOVERAGE_TEST_MARKER(); } pxStreamBuffer->xHead = xNextHead; 80137de: 68fb ldr r3, [r7, #12] 80137e0: 6a7a ldr r2, [r7, #36] @ 0x24 80137e2: 605a str r2, [r3, #4] return xCount; 80137e4: 687b ldr r3, [r7, #4] } 80137e6: 4618 mov r0, r3 80137e8: 3728 adds r7, #40 @ 0x28 80137ea: 46bd mov sp, r7 80137ec: bd80 pop {r7, pc} 080137ee : /*-----------------------------------------------------------*/ static size_t prvReadBytesFromBuffer( StreamBuffer_t *pxStreamBuffer, uint8_t *pucData, size_t xMaxCount, size_t xBytesAvailable ) { 80137ee: b580 push {r7, lr} 80137f0: b08a sub sp, #40 @ 0x28 80137f2: af00 add r7, sp, #0 80137f4: 60f8 str r0, [r7, #12] 80137f6: 60b9 str r1, [r7, #8] 80137f8: 607a str r2, [r7, #4] 80137fa: 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 ); 80137fc: 687a ldr r2, [r7, #4] 80137fe: 683b ldr r3, [r7, #0] 8013800: 4293 cmp r3, r2 8013802: bf28 it cs 8013804: 4613 movcs r3, r2 8013806: 623b str r3, [r7, #32] if( xCount > ( size_t ) 0 ) 8013808: 6a3b ldr r3, [r7, #32] 801380a: 2b00 cmp r3, #0 801380c: d067 beq.n 80138de { xNextTail = pxStreamBuffer->xTail; 801380e: 68fb ldr r3, [r7, #12] 8013810: 681b ldr r3, [r3, #0] 8013812: 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 ); 8013814: 68fb ldr r3, [r7, #12] 8013816: 689a ldr r2, [r3, #8] 8013818: 6a7b ldr r3, [r7, #36] @ 0x24 801381a: 1ad3 subs r3, r2, r3 801381c: 6a3a ldr r2, [r7, #32] 801381e: 4293 cmp r3, r2 8013820: bf28 it cs 8013822: 4613 movcs r3, r2 8013824: 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 ); 8013826: 69fa ldr r2, [r7, #28] 8013828: 687b ldr r3, [r7, #4] 801382a: 429a cmp r2, r3 801382c: d90b bls.n 8013846 __asm volatile 801382e: f04f 0350 mov.w r3, #80 @ 0x50 8013832: f383 8811 msr BASEPRI, r3 8013836: f3bf 8f6f isb sy 801383a: f3bf 8f4f dsb sy 801383e: 61bb str r3, [r7, #24] } 8013840: bf00 nop 8013842: bf00 nop 8013844: e7fd b.n 8013842 configASSERT( ( xNextTail + xFirstLength ) <= pxStreamBuffer->xLength ); 8013846: 6a7a ldr r2, [r7, #36] @ 0x24 8013848: 69fb ldr r3, [r7, #28] 801384a: 441a add r2, r3 801384c: 68fb ldr r3, [r7, #12] 801384e: 689b ldr r3, [r3, #8] 8013850: 429a cmp r2, r3 8013852: d90b bls.n 801386c __asm volatile 8013854: f04f 0350 mov.w r3, #80 @ 0x50 8013858: f383 8811 msr BASEPRI, r3 801385c: f3bf 8f6f isb sy 8013860: f3bf 8f4f dsb sy 8013864: 617b str r3, [r7, #20] } 8013866: bf00 nop 8013868: bf00 nop 801386a: e7fd b.n 8013868 ( void ) memcpy( ( void * ) pucData, ( const void * ) &( pxStreamBuffer->pucBuffer[ xNextTail ] ), xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 801386c: 68fb ldr r3, [r7, #12] 801386e: 699a ldr r2, [r3, #24] 8013870: 6a7b ldr r3, [r7, #36] @ 0x24 8013872: 4413 add r3, r2 8013874: 69fa ldr r2, [r7, #28] 8013876: 4619 mov r1, r3 8013878: 68b8 ldr r0, [r7, #8] 801387a: f017 fa98 bl 802adae /* If the total number of wanted bytes is greater than the number that could be read in the first read... */ if( xCount > xFirstLength ) 801387e: 6a3a ldr r2, [r7, #32] 8013880: 69fb ldr r3, [r7, #28] 8013882: 429a cmp r2, r3 8013884: d91a bls.n 80138bc { /*...then read the remaining bytes from the start of the buffer. */ configASSERT( xCount <= xMaxCount ); 8013886: 6a3a ldr r2, [r7, #32] 8013888: 687b ldr r3, [r7, #4] 801388a: 429a cmp r2, r3 801388c: d90b bls.n 80138a6 __asm volatile 801388e: f04f 0350 mov.w r3, #80 @ 0x50 8013892: f383 8811 msr BASEPRI, r3 8013896: f3bf 8f6f isb sy 801389a: f3bf 8f4f dsb sy 801389e: 613b str r3, [r7, #16] } 80138a0: bf00 nop 80138a2: bf00 nop 80138a4: e7fd b.n 80138a2 ( void ) memcpy( ( void * ) &( pucData[ xFirstLength ] ), ( void * ) ( pxStreamBuffer->pucBuffer ), xCount - xFirstLength ); /*lint !e9087 memcpy() requires void *. */ 80138a6: 68ba ldr r2, [r7, #8] 80138a8: 69fb ldr r3, [r7, #28] 80138aa: 18d0 adds r0, r2, r3 80138ac: 68fb ldr r3, [r7, #12] 80138ae: 6999 ldr r1, [r3, #24] 80138b0: 6a3a ldr r2, [r7, #32] 80138b2: 69fb ldr r3, [r7, #28] 80138b4: 1ad3 subs r3, r2, r3 80138b6: 461a mov r2, r3 80138b8: f017 fa79 bl 802adae mtCOVERAGE_TEST_MARKER(); } /* Move the tail pointer to effectively remove the data read from the buffer. */ xNextTail += xCount; 80138bc: 6a7a ldr r2, [r7, #36] @ 0x24 80138be: 6a3b ldr r3, [r7, #32] 80138c0: 4413 add r3, r2 80138c2: 627b str r3, [r7, #36] @ 0x24 if( xNextTail >= pxStreamBuffer->xLength ) 80138c4: 68fb ldr r3, [r7, #12] 80138c6: 689b ldr r3, [r3, #8] 80138c8: 6a7a ldr r2, [r7, #36] @ 0x24 80138ca: 429a cmp r2, r3 80138cc: d304 bcc.n 80138d8 { xNextTail -= pxStreamBuffer->xLength; 80138ce: 68fb ldr r3, [r7, #12] 80138d0: 689b ldr r3, [r3, #8] 80138d2: 6a7a ldr r2, [r7, #36] @ 0x24 80138d4: 1ad3 subs r3, r2, r3 80138d6: 627b str r3, [r7, #36] @ 0x24 } pxStreamBuffer->xTail = xNextTail; 80138d8: 68fb ldr r3, [r7, #12] 80138da: 6a7a ldr r2, [r7, #36] @ 0x24 80138dc: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } return xCount; 80138de: 6a3b ldr r3, [r7, #32] } 80138e0: 4618 mov r0, r3 80138e2: 3728 adds r7, #40 @ 0x28 80138e4: 46bd mov sp, r7 80138e6: bd80 pop {r7, pc} 080138e8 : /*-----------------------------------------------------------*/ static size_t prvBytesInBuffer( const StreamBuffer_t * const pxStreamBuffer ) { 80138e8: b480 push {r7} 80138ea: b085 sub sp, #20 80138ec: af00 add r7, sp, #0 80138ee: 6078 str r0, [r7, #4] /* Returns the distance between xTail and xHead. */ size_t xCount; xCount = pxStreamBuffer->xLength + pxStreamBuffer->xHead; 80138f0: 687b ldr r3, [r7, #4] 80138f2: 689a ldr r2, [r3, #8] 80138f4: 687b ldr r3, [r7, #4] 80138f6: 685b ldr r3, [r3, #4] 80138f8: 4413 add r3, r2 80138fa: 60fb str r3, [r7, #12] xCount -= pxStreamBuffer->xTail; 80138fc: 687b ldr r3, [r7, #4] 80138fe: 681b ldr r3, [r3, #0] 8013900: 68fa ldr r2, [r7, #12] 8013902: 1ad3 subs r3, r2, r3 8013904: 60fb str r3, [r7, #12] if ( xCount >= pxStreamBuffer->xLength ) 8013906: 687b ldr r3, [r7, #4] 8013908: 689b ldr r3, [r3, #8] 801390a: 68fa ldr r2, [r7, #12] 801390c: 429a cmp r2, r3 801390e: d304 bcc.n 801391a { xCount -= pxStreamBuffer->xLength; 8013910: 687b ldr r3, [r7, #4] 8013912: 689b ldr r3, [r3, #8] 8013914: 68fa ldr r2, [r7, #12] 8013916: 1ad3 subs r3, r2, r3 8013918: 60fb str r3, [r7, #12] else { mtCOVERAGE_TEST_MARKER(); } return xCount; 801391a: 68fb ldr r3, [r7, #12] } 801391c: 4618 mov r0, r3 801391e: 3714 adds r7, #20 8013920: 46bd mov sp, r7 8013922: f85d 7b04 ldr.w r7, [sp], #4 8013926: 4770 bx lr 08013928 : static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer, uint8_t * const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags ) { 8013928: b580 push {r7, lr} 801392a: b086 sub sp, #24 801392c: af00 add r7, sp, #0 801392e: 60f8 str r0, [r7, #12] 8013930: 60b9 str r1, [r7, #8] 8013932: 607a str r2, [r7, #4] 8013934: 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; 8013936: 2355 movs r3, #85 @ 0x55 8013938: 617b str r3, [r7, #20] configASSERT( memset( pucBuffer, ( int ) xWriteValue, xBufferSizeBytes ) == pucBuffer ); 801393a: 687a ldr r2, [r7, #4] 801393c: 6979 ldr r1, [r7, #20] 801393e: 68b8 ldr r0, [r7, #8] 8013940: f017 f93e bl 802abc0 8013944: 4602 mov r2, r0 8013946: 68bb ldr r3, [r7, #8] 8013948: 4293 cmp r3, r2 801394a: d00b beq.n 8013964 __asm volatile 801394c: f04f 0350 mov.w r3, #80 @ 0x50 8013950: f383 8811 msr BASEPRI, r3 8013954: f3bf 8f6f isb sy 8013958: f3bf 8f4f dsb sy 801395c: 613b str r3, [r7, #16] } 801395e: bf00 nop 8013960: bf00 nop 8013962: e7fd b.n 8013960 } /*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 *. */ 8013964: 2224 movs r2, #36 @ 0x24 8013966: 2100 movs r1, #0 8013968: 68f8 ldr r0, [r7, #12] 801396a: f017 f929 bl 802abc0 pxStreamBuffer->pucBuffer = pucBuffer; 801396e: 68fb ldr r3, [r7, #12] 8013970: 68ba ldr r2, [r7, #8] 8013972: 619a str r2, [r3, #24] pxStreamBuffer->xLength = xBufferSizeBytes; 8013974: 68fb ldr r3, [r7, #12] 8013976: 687a ldr r2, [r7, #4] 8013978: 609a str r2, [r3, #8] pxStreamBuffer->xTriggerLevelBytes = xTriggerLevelBytes; 801397a: 68fb ldr r3, [r7, #12] 801397c: 683a ldr r2, [r7, #0] 801397e: 60da str r2, [r3, #12] pxStreamBuffer->ucFlags = ucFlags; 8013980: 68fb ldr r3, [r7, #12] 8013982: f897 2020 ldrb.w r2, [r7, #32] 8013986: 771a strb r2, [r3, #28] } 8013988: bf00 nop 801398a: 3718 adds r7, #24 801398c: 46bd mov sp, r7 801398e: bd80 pop {r7, pc} 08013990 : const uint32_t ulStackDepth, void * const pvParameters, UBaseType_t uxPriority, StackType_t * const puxStackBuffer, StaticTask_t * const pxTaskBuffer ) { 8013990: b580 push {r7, lr} 8013992: b08e sub sp, #56 @ 0x38 8013994: af04 add r7, sp, #16 8013996: 60f8 str r0, [r7, #12] 8013998: 60b9 str r1, [r7, #8] 801399a: 607a str r2, [r7, #4] 801399c: 603b str r3, [r7, #0] TCB_t *pxNewTCB; TaskHandle_t xReturn; configASSERT( puxStackBuffer != NULL ); 801399e: 6b7b ldr r3, [r7, #52] @ 0x34 80139a0: 2b00 cmp r3, #0 80139a2: d10b bne.n 80139bc __asm volatile 80139a4: f04f 0350 mov.w r3, #80 @ 0x50 80139a8: f383 8811 msr BASEPRI, r3 80139ac: f3bf 8f6f isb sy 80139b0: f3bf 8f4f dsb sy 80139b4: 623b str r3, [r7, #32] } 80139b6: bf00 nop 80139b8: bf00 nop 80139ba: e7fd b.n 80139b8 configASSERT( pxTaskBuffer != NULL ); 80139bc: 6bbb ldr r3, [r7, #56] @ 0x38 80139be: 2b00 cmp r3, #0 80139c0: d10b bne.n 80139da __asm volatile 80139c2: f04f 0350 mov.w r3, #80 @ 0x50 80139c6: f383 8811 msr BASEPRI, r3 80139ca: f3bf 8f6f isb sy 80139ce: f3bf 8f4f dsb sy 80139d2: 61fb str r3, [r7, #28] } 80139d4: bf00 nop 80139d6: bf00 nop 80139d8: e7fd b.n 80139d6 #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 ); 80139da: 23a8 movs r3, #168 @ 0xa8 80139dc: 613b str r3, [r7, #16] configASSERT( xSize == sizeof( TCB_t ) ); 80139de: 693b ldr r3, [r7, #16] 80139e0: 2ba8 cmp r3, #168 @ 0xa8 80139e2: d00b beq.n 80139fc __asm volatile 80139e4: f04f 0350 mov.w r3, #80 @ 0x50 80139e8: f383 8811 msr BASEPRI, r3 80139ec: f3bf 8f6f isb sy 80139f0: f3bf 8f4f dsb sy 80139f4: 61bb str r3, [r7, #24] } 80139f6: bf00 nop 80139f8: bf00 nop 80139fa: e7fd b.n 80139f8 ( void ) xSize; /* Prevent lint warning when configASSERT() is not used. */ 80139fc: 693b ldr r3, [r7, #16] } #endif /* configASSERT_DEFINED */ if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) ) 80139fe: 6bbb ldr r3, [r7, #56] @ 0x38 8013a00: 2b00 cmp r3, #0 8013a02: d01e beq.n 8013a42 8013a04: 6b7b ldr r3, [r7, #52] @ 0x34 8013a06: 2b00 cmp r3, #0 8013a08: d01b beq.n 8013a42 { /* 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. */ 8013a0a: 6bbb ldr r3, [r7, #56] @ 0x38 8013a0c: 627b str r3, [r7, #36] @ 0x24 pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer; 8013a0e: 6a7b ldr r3, [r7, #36] @ 0x24 8013a10: 6b7a ldr r2, [r7, #52] @ 0x34 8013a12: 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; 8013a14: 6a7b ldr r3, [r7, #36] @ 0x24 8013a16: 2202 movs r2, #2 8013a18: f883 20a5 strb.w r2, [r3, #165] @ 0xa5 } #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */ prvInitialiseNewTask( pxTaskCode, pcName, ulStackDepth, pvParameters, uxPriority, &xReturn, pxNewTCB, NULL ); 8013a1c: 2300 movs r3, #0 8013a1e: 9303 str r3, [sp, #12] 8013a20: 6a7b ldr r3, [r7, #36] @ 0x24 8013a22: 9302 str r3, [sp, #8] 8013a24: f107 0314 add.w r3, r7, #20 8013a28: 9301 str r3, [sp, #4] 8013a2a: 6b3b ldr r3, [r7, #48] @ 0x30 8013a2c: 9300 str r3, [sp, #0] 8013a2e: 683b ldr r3, [r7, #0] 8013a30: 687a ldr r2, [r7, #4] 8013a32: 68b9 ldr r1, [r7, #8] 8013a34: 68f8 ldr r0, [r7, #12] 8013a36: f000 f851 bl 8013adc prvAddNewTaskToReadyList( pxNewTCB ); 8013a3a: 6a78 ldr r0, [r7, #36] @ 0x24 8013a3c: f000 f8f6 bl 8013c2c 8013a40: e001 b.n 8013a46 } else { xReturn = NULL; 8013a42: 2300 movs r3, #0 8013a44: 617b str r3, [r7, #20] } return xReturn; 8013a46: 697b ldr r3, [r7, #20] } 8013a48: 4618 mov r0, r3 8013a4a: 3728 adds r7, #40 @ 0x28 8013a4c: 46bd mov sp, r7 8013a4e: bd80 pop {r7, pc} 08013a50 : 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 ) { 8013a50: b580 push {r7, lr} 8013a52: b08c sub sp, #48 @ 0x30 8013a54: af04 add r7, sp, #16 8013a56: 60f8 str r0, [r7, #12] 8013a58: 60b9 str r1, [r7, #8] 8013a5a: 603b str r3, [r7, #0] 8013a5c: 4613 mov r3, r2 8013a5e: 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. */ 8013a60: 88fb ldrh r3, [r7, #6] 8013a62: 009b lsls r3, r3, #2 8013a64: 4618 mov r0, r3 8013a66: f002 f8e9 bl 8015c3c 8013a6a: 6178 str r0, [r7, #20] if( pxStack != NULL ) 8013a6c: 697b ldr r3, [r7, #20] 8013a6e: 2b00 cmp r3, #0 8013a70: d00e beq.n 8013a90 { /* 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. */ 8013a72: 20a8 movs r0, #168 @ 0xa8 8013a74: f002 f8e2 bl 8015c3c 8013a78: 61f8 str r0, [r7, #28] if( pxNewTCB != NULL ) 8013a7a: 69fb ldr r3, [r7, #28] 8013a7c: 2b00 cmp r3, #0 8013a7e: d003 beq.n 8013a88 { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 8013a80: 69fb ldr r3, [r7, #28] 8013a82: 697a ldr r2, [r7, #20] 8013a84: 631a str r2, [r3, #48] @ 0x30 8013a86: e005 b.n 8013a94 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 8013a88: 6978 ldr r0, [r7, #20] 8013a8a: f002 f9a5 bl 8015dd8 8013a8e: e001 b.n 8013a94 } } else { pxNewTCB = NULL; 8013a90: 2300 movs r3, #0 8013a92: 61fb str r3, [r7, #28] } } #endif /* portSTACK_GROWTH */ if( pxNewTCB != NULL ) 8013a94: 69fb ldr r3, [r7, #28] 8013a96: 2b00 cmp r3, #0 8013a98: d017 beq.n 8013aca { #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; 8013a9a: 69fb ldr r3, [r7, #28] 8013a9c: 2200 movs r2, #0 8013a9e: 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 ); 8013aa2: 88fa ldrh r2, [r7, #6] 8013aa4: 2300 movs r3, #0 8013aa6: 9303 str r3, [sp, #12] 8013aa8: 69fb ldr r3, [r7, #28] 8013aaa: 9302 str r3, [sp, #8] 8013aac: 6afb ldr r3, [r7, #44] @ 0x2c 8013aae: 9301 str r3, [sp, #4] 8013ab0: 6abb ldr r3, [r7, #40] @ 0x28 8013ab2: 9300 str r3, [sp, #0] 8013ab4: 683b ldr r3, [r7, #0] 8013ab6: 68b9 ldr r1, [r7, #8] 8013ab8: 68f8 ldr r0, [r7, #12] 8013aba: f000 f80f bl 8013adc prvAddNewTaskToReadyList( pxNewTCB ); 8013abe: 69f8 ldr r0, [r7, #28] 8013ac0: f000 f8b4 bl 8013c2c xReturn = pdPASS; 8013ac4: 2301 movs r3, #1 8013ac6: 61bb str r3, [r7, #24] 8013ac8: e002 b.n 8013ad0 } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 8013aca: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8013ace: 61bb str r3, [r7, #24] } return xReturn; 8013ad0: 69bb ldr r3, [r7, #24] } 8013ad2: 4618 mov r0, r3 8013ad4: 3720 adds r7, #32 8013ad6: 46bd mov sp, r7 8013ad8: bd80 pop {r7, pc} ... 08013adc : void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, TCB_t *pxNewTCB, const MemoryRegion_t * const xRegions ) { 8013adc: b580 push {r7, lr} 8013ade: b088 sub sp, #32 8013ae0: af00 add r7, sp, #0 8013ae2: 60f8 str r0, [r7, #12] 8013ae4: 60b9 str r1, [r7, #8] 8013ae6: 607a str r2, [r7, #4] 8013ae8: 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 ) ); 8013aea: 6b3b ldr r3, [r7, #48] @ 0x30 8013aec: 6b18 ldr r0, [r3, #48] @ 0x30 8013aee: 687b ldr r3, [r7, #4] 8013af0: 009b lsls r3, r3, #2 8013af2: 461a mov r2, r3 8013af4: 21a5 movs r1, #165 @ 0xa5 8013af6: f017 f863 bl 802abc0 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 ] ); 8013afa: 6b3b ldr r3, [r7, #48] @ 0x30 8013afc: 6b1a ldr r2, [r3, #48] @ 0x30 8013afe: 6879 ldr r1, [r7, #4] 8013b00: f06f 4340 mvn.w r3, #3221225472 @ 0xc0000000 8013b04: 440b add r3, r1 8013b06: 009b lsls r3, r3, #2 8013b08: 4413 add r3, r2 8013b0a: 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(). */ 8013b0c: 69bb ldr r3, [r7, #24] 8013b0e: f023 0307 bic.w r3, r3, #7 8013b12: 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 ) ); 8013b14: 69bb ldr r3, [r7, #24] 8013b16: f003 0307 and.w r3, r3, #7 8013b1a: 2b00 cmp r3, #0 8013b1c: d00b beq.n 8013b36 __asm volatile 8013b1e: f04f 0350 mov.w r3, #80 @ 0x50 8013b22: f383 8811 msr BASEPRI, r3 8013b26: f3bf 8f6f isb sy 8013b2a: f3bf 8f4f dsb sy 8013b2e: 617b str r3, [r7, #20] } 8013b30: bf00 nop 8013b32: bf00 nop 8013b34: e7fd b.n 8013b32 pxNewTCB->pxEndOfStack = pxNewTCB->pxStack + ( ulStackDepth - ( uint32_t ) 1 ); } #endif /* portSTACK_GROWTH */ /* Store the task name in the TCB. */ if( pcName != NULL ) 8013b36: 68bb ldr r3, [r7, #8] 8013b38: 2b00 cmp r3, #0 8013b3a: d01f beq.n 8013b7c { for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8013b3c: 2300 movs r3, #0 8013b3e: 61fb str r3, [r7, #28] 8013b40: e012 b.n 8013b68 { pxNewTCB->pcTaskName[ x ] = pcName[ x ]; 8013b42: 68ba ldr r2, [r7, #8] 8013b44: 69fb ldr r3, [r7, #28] 8013b46: 4413 add r3, r2 8013b48: 7819 ldrb r1, [r3, #0] 8013b4a: 6b3a ldr r2, [r7, #48] @ 0x30 8013b4c: 69fb ldr r3, [r7, #28] 8013b4e: 4413 add r3, r2 8013b50: 3334 adds r3, #52 @ 0x34 8013b52: 460a mov r2, r1 8013b54: 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 ) 8013b56: 68ba ldr r2, [r7, #8] 8013b58: 69fb ldr r3, [r7, #28] 8013b5a: 4413 add r3, r2 8013b5c: 781b ldrb r3, [r3, #0] 8013b5e: 2b00 cmp r3, #0 8013b60: d006 beq.n 8013b70 for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8013b62: 69fb ldr r3, [r7, #28] 8013b64: 3301 adds r3, #1 8013b66: 61fb str r3, [r7, #28] 8013b68: 69fb ldr r3, [r7, #28] 8013b6a: 2b0f cmp r3, #15 8013b6c: d9e9 bls.n 8013b42 8013b6e: e000 b.n 8013b72 { break; 8013b70: 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'; 8013b72: 6b3b ldr r3, [r7, #48] @ 0x30 8013b74: 2200 movs r2, #0 8013b76: f883 2043 strb.w r2, [r3, #67] @ 0x43 8013b7a: e003 b.n 8013b84 } 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; 8013b7c: 6b3b ldr r3, [r7, #48] @ 0x30 8013b7e: 2200 movs r2, #0 8013b80: 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 ) 8013b84: 6abb ldr r3, [r7, #40] @ 0x28 8013b86: 2b37 cmp r3, #55 @ 0x37 8013b88: d901 bls.n 8013b8e { uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U; 8013b8a: 2337 movs r3, #55 @ 0x37 8013b8c: 62bb str r3, [r7, #40] @ 0x28 else { mtCOVERAGE_TEST_MARKER(); } pxNewTCB->uxPriority = uxPriority; 8013b8e: 6b3b ldr r3, [r7, #48] @ 0x30 8013b90: 6aba ldr r2, [r7, #40] @ 0x28 8013b92: 62da str r2, [r3, #44] @ 0x2c #if ( configUSE_MUTEXES == 1 ) { pxNewTCB->uxBasePriority = uxPriority; 8013b94: 6b3b ldr r3, [r7, #48] @ 0x30 8013b96: 6aba ldr r2, [r7, #40] @ 0x28 8013b98: 64da str r2, [r3, #76] @ 0x4c pxNewTCB->uxMutexesHeld = 0; 8013b9a: 6b3b ldr r3, [r7, #48] @ 0x30 8013b9c: 2200 movs r2, #0 8013b9e: 651a str r2, [r3, #80] @ 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxNewTCB->xStateListItem ) ); 8013ba0: 6b3b ldr r3, [r7, #48] @ 0x30 8013ba2: 3304 adds r3, #4 8013ba4: 4618 mov r0, r3 8013ba6: f7fe f9a5 bl 8011ef4 vListInitialiseItem( &( pxNewTCB->xEventListItem ) ); 8013baa: 6b3b ldr r3, [r7, #48] @ 0x30 8013bac: 3318 adds r3, #24 8013bae: 4618 mov r0, r3 8013bb0: f7fe f9a0 bl 8011ef4 /* 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 ); 8013bb4: 6b3b ldr r3, [r7, #48] @ 0x30 8013bb6: 6b3a ldr r2, [r7, #48] @ 0x30 8013bb8: 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. */ 8013bba: 6abb ldr r3, [r7, #40] @ 0x28 8013bbc: f1c3 0238 rsb r2, r3, #56 @ 0x38 8013bc0: 6b3b ldr r3, [r7, #48] @ 0x30 8013bc2: 619a str r2, [r3, #24] listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB ); 8013bc4: 6b3b ldr r3, [r7, #48] @ 0x30 8013bc6: 6b3a ldr r2, [r7, #48] @ 0x30 8013bc8: 625a str r2, [r3, #36] @ 0x24 } #endif #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxNewTCB->ulNotifiedValue = 0; 8013bca: 6b3b ldr r3, [r7, #48] @ 0x30 8013bcc: 2200 movs r2, #0 8013bce: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 pxNewTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8013bd2: 6b3b ldr r3, [r7, #48] @ 0x30 8013bd4: 2200 movs r2, #0 8013bd6: 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 ) ) ); 8013bda: 6b3b ldr r3, [r7, #48] @ 0x30 8013bdc: 3354 adds r3, #84 @ 0x54 8013bde: 224c movs r2, #76 @ 0x4c 8013be0: 2100 movs r1, #0 8013be2: 4618 mov r0, r3 8013be4: f016 ffec bl 802abc0 8013be8: 6b3b ldr r3, [r7, #48] @ 0x30 8013bea: 4a0d ldr r2, [pc, #52] @ (8013c20 ) 8013bec: 659a str r2, [r3, #88] @ 0x58 8013bee: 6b3b ldr r3, [r7, #48] @ 0x30 8013bf0: 4a0c ldr r2, [pc, #48] @ (8013c24 ) 8013bf2: 65da str r2, [r3, #92] @ 0x5c 8013bf4: 6b3b ldr r3, [r7, #48] @ 0x30 8013bf6: 4a0c ldr r2, [pc, #48] @ (8013c28 ) 8013bf8: 661a str r2, [r3, #96] @ 0x60 } #endif /* portSTACK_GROWTH */ } #else /* portHAS_STACK_OVERFLOW_CHECKING */ { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters ); 8013bfa: 683a ldr r2, [r7, #0] 8013bfc: 68f9 ldr r1, [r7, #12] 8013bfe: 69b8 ldr r0, [r7, #24] 8013c00: f001 fdca bl 8015798 8013c04: 4602 mov r2, r0 8013c06: 6b3b ldr r3, [r7, #48] @ 0x30 8013c08: 601a str r2, [r3, #0] } #endif /* portHAS_STACK_OVERFLOW_CHECKING */ } #endif /* portUSING_MPU_WRAPPERS */ if( pxCreatedTask != NULL ) 8013c0a: 6afb ldr r3, [r7, #44] @ 0x2c 8013c0c: 2b00 cmp r3, #0 8013c0e: d002 beq.n 8013c16 { /* 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; 8013c10: 6afb ldr r3, [r7, #44] @ 0x2c 8013c12: 6b3a ldr r2, [r7, #48] @ 0x30 8013c14: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } 8013c16: bf00 nop 8013c18: 3720 adds r7, #32 8013c1a: 46bd mov sp, r7 8013c1c: bd80 pop {r7, pc} 8013c1e: bf00 nop 8013c20: 2402b134 .word 0x2402b134 8013c24: 2402b19c .word 0x2402b19c 8013c28: 2402b204 .word 0x2402b204 08013c2c : /*-----------------------------------------------------------*/ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB ) { 8013c2c: b580 push {r7, lr} 8013c2e: b082 sub sp, #8 8013c30: af00 add r7, sp, #0 8013c32: 6078 str r0, [r7, #4] /* Ensure interrupts don't access the task lists while the lists are being updated. */ taskENTER_CRITICAL(); 8013c34: f001 fee0 bl 80159f8 { uxCurrentNumberOfTasks++; 8013c38: 4b2d ldr r3, [pc, #180] @ (8013cf0 ) 8013c3a: 681b ldr r3, [r3, #0] 8013c3c: 3301 adds r3, #1 8013c3e: 4a2c ldr r2, [pc, #176] @ (8013cf0 ) 8013c40: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 8013c42: 4b2c ldr r3, [pc, #176] @ (8013cf4 ) 8013c44: 681b ldr r3, [r3, #0] 8013c46: 2b00 cmp r3, #0 8013c48: d109 bne.n 8013c5e { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 8013c4a: 4a2a ldr r2, [pc, #168] @ (8013cf4 ) 8013c4c: 687b ldr r3, [r7, #4] 8013c4e: 6013 str r3, [r2, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 8013c50: 4b27 ldr r3, [pc, #156] @ (8013cf0 ) 8013c52: 681b ldr r3, [r3, #0] 8013c54: 2b01 cmp r3, #1 8013c56: d110 bne.n 8013c7a { /* 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(); 8013c58: f000 fc76 bl 8014548 8013c5c: e00d b.n 8013c7a 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 ) 8013c5e: 4b26 ldr r3, [pc, #152] @ (8013cf8 ) 8013c60: 681b ldr r3, [r3, #0] 8013c62: 2b00 cmp r3, #0 8013c64: d109 bne.n 8013c7a { if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority ) 8013c66: 4b23 ldr r3, [pc, #140] @ (8013cf4 ) 8013c68: 681b ldr r3, [r3, #0] 8013c6a: 6ada ldr r2, [r3, #44] @ 0x2c 8013c6c: 687b ldr r3, [r7, #4] 8013c6e: 6adb ldr r3, [r3, #44] @ 0x2c 8013c70: 429a cmp r2, r3 8013c72: d802 bhi.n 8013c7a { pxCurrentTCB = pxNewTCB; 8013c74: 4a1f ldr r2, [pc, #124] @ (8013cf4 ) 8013c76: 687b ldr r3, [r7, #4] 8013c78: 6013 str r3, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 8013c7a: 4b20 ldr r3, [pc, #128] @ (8013cfc ) 8013c7c: 681b ldr r3, [r3, #0] 8013c7e: 3301 adds r3, #1 8013c80: 4a1e ldr r2, [pc, #120] @ (8013cfc ) 8013c82: 6013 str r3, [r2, #0] #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 8013c84: 4b1d ldr r3, [pc, #116] @ (8013cfc ) 8013c86: 681a ldr r2, [r3, #0] 8013c88: 687b ldr r3, [r7, #4] 8013c8a: 645a str r2, [r3, #68] @ 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 8013c8c: 687b ldr r3, [r7, #4] 8013c8e: 6ada ldr r2, [r3, #44] @ 0x2c 8013c90: 4b1b ldr r3, [pc, #108] @ (8013d00 ) 8013c92: 681b ldr r3, [r3, #0] 8013c94: 429a cmp r2, r3 8013c96: d903 bls.n 8013ca0 8013c98: 687b ldr r3, [r7, #4] 8013c9a: 6adb ldr r3, [r3, #44] @ 0x2c 8013c9c: 4a18 ldr r2, [pc, #96] @ (8013d00 ) 8013c9e: 6013 str r3, [r2, #0] 8013ca0: 687b ldr r3, [r7, #4] 8013ca2: 6ada ldr r2, [r3, #44] @ 0x2c 8013ca4: 4613 mov r3, r2 8013ca6: 009b lsls r3, r3, #2 8013ca8: 4413 add r3, r2 8013caa: 009b lsls r3, r3, #2 8013cac: 4a15 ldr r2, [pc, #84] @ (8013d04 ) 8013cae: 441a add r2, r3 8013cb0: 687b ldr r3, [r7, #4] 8013cb2: 3304 adds r3, #4 8013cb4: 4619 mov r1, r3 8013cb6: 4610 mov r0, r2 8013cb8: f7fe f929 bl 8011f0e portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 8013cbc: f001 fece bl 8015a5c if( xSchedulerRunning != pdFALSE ) 8013cc0: 4b0d ldr r3, [pc, #52] @ (8013cf8 ) 8013cc2: 681b ldr r3, [r3, #0] 8013cc4: 2b00 cmp r3, #0 8013cc6: d00e beq.n 8013ce6 { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority ) 8013cc8: 4b0a ldr r3, [pc, #40] @ (8013cf4 ) 8013cca: 681b ldr r3, [r3, #0] 8013ccc: 6ada ldr r2, [r3, #44] @ 0x2c 8013cce: 687b ldr r3, [r7, #4] 8013cd0: 6adb ldr r3, [r3, #44] @ 0x2c 8013cd2: 429a cmp r2, r3 8013cd4: d207 bcs.n 8013ce6 { taskYIELD_IF_USING_PREEMPTION(); 8013cd6: 4b0c ldr r3, [pc, #48] @ (8013d08 ) 8013cd8: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013cdc: 601a str r2, [r3, #0] 8013cde: f3bf 8f4f dsb sy 8013ce2: f3bf 8f6f isb sy } else { mtCOVERAGE_TEST_MARKER(); } } 8013ce6: bf00 nop 8013ce8: 3708 adds r7, #8 8013cea: 46bd mov sp, r7 8013cec: bd80 pop {r7, pc} 8013cee: bf00 nop 8013cf0: 24004254 .word 0x24004254 8013cf4: 24003d80 .word 0x24003d80 8013cf8: 24004260 .word 0x24004260 8013cfc: 24004270 .word 0x24004270 8013d00: 2400425c .word 0x2400425c 8013d04: 24003d84 .word 0x24003d84 8013d08: e000ed04 .word 0xe000ed04 08013d0c : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 8013d0c: b580 push {r7, lr} 8013d0e: b084 sub sp, #16 8013d10: af00 add r7, sp, #0 8013d12: 6078 str r0, [r7, #4] BaseType_t xAlreadyYielded = pdFALSE; 8013d14: 2300 movs r3, #0 8013d16: 60fb str r3, [r7, #12] /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) 8013d18: 687b ldr r3, [r7, #4] 8013d1a: 2b00 cmp r3, #0 8013d1c: d018 beq.n 8013d50 { configASSERT( uxSchedulerSuspended == 0 ); 8013d1e: 4b14 ldr r3, [pc, #80] @ (8013d70 ) 8013d20: 681b ldr r3, [r3, #0] 8013d22: 2b00 cmp r3, #0 8013d24: d00b beq.n 8013d3e __asm volatile 8013d26: f04f 0350 mov.w r3, #80 @ 0x50 8013d2a: f383 8811 msr BASEPRI, r3 8013d2e: f3bf 8f6f isb sy 8013d32: f3bf 8f4f dsb sy 8013d36: 60bb str r3, [r7, #8] } 8013d38: bf00 nop 8013d3a: bf00 nop 8013d3c: e7fd b.n 8013d3a vTaskSuspendAll(); 8013d3e: f000 f88b bl 8013e58 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 ); 8013d42: 2100 movs r1, #0 8013d44: 6878 ldr r0, [r7, #4] 8013d46: f001 f88f bl 8014e68 } xAlreadyYielded = xTaskResumeAll(); 8013d4a: f000 f893 bl 8013e74 8013d4e: 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 ) 8013d50: 68fb ldr r3, [r7, #12] 8013d52: 2b00 cmp r3, #0 8013d54: d107 bne.n 8013d66 { portYIELD_WITHIN_API(); 8013d56: 4b07 ldr r3, [pc, #28] @ (8013d74 ) 8013d58: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013d5c: 601a str r2, [r3, #0] 8013d5e: f3bf 8f4f dsb sy 8013d62: f3bf 8f6f isb sy } else { mtCOVERAGE_TEST_MARKER(); } } 8013d66: bf00 nop 8013d68: 3710 adds r7, #16 8013d6a: 46bd mov sp, r7 8013d6c: bd80 pop {r7, pc} 8013d6e: bf00 nop 8013d70: 2400427c .word 0x2400427c 8013d74: e000ed04 .word 0xe000ed04 08013d78 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 8013d78: b580 push {r7, lr} 8013d7a: b08a sub sp, #40 @ 0x28 8013d7c: 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; 8013d7e: 2300 movs r3, #0 8013d80: 60bb str r3, [r7, #8] StackType_t *pxIdleTaskStackBuffer = NULL; 8013d82: 2300 movs r3, #0 8013d84: 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 ); 8013d86: 463a mov r2, r7 8013d88: 1d39 adds r1, r7, #4 8013d8a: f107 0308 add.w r3, r7, #8 8013d8e: 4618 mov r0, r3 8013d90: f7fe f85c bl 8011e4c xIdleTaskHandle = xTaskCreateStatic( prvIdleTask, 8013d94: 6839 ldr r1, [r7, #0] 8013d96: 687b ldr r3, [r7, #4] 8013d98: 68ba ldr r2, [r7, #8] 8013d9a: 9202 str r2, [sp, #8] 8013d9c: 9301 str r3, [sp, #4] 8013d9e: 2300 movs r3, #0 8013da0: 9300 str r3, [sp, #0] 8013da2: 2300 movs r3, #0 8013da4: 460a mov r2, r1 8013da6: 4924 ldr r1, [pc, #144] @ (8013e38 ) 8013da8: 4824 ldr r0, [pc, #144] @ (8013e3c ) 8013daa: f7ff fdf1 bl 8013990 8013dae: 4603 mov r3, r0 8013db0: 4a23 ldr r2, [pc, #140] @ (8013e40 ) 8013db2: 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 ) 8013db4: 4b22 ldr r3, [pc, #136] @ (8013e40 ) 8013db6: 681b ldr r3, [r3, #0] 8013db8: 2b00 cmp r3, #0 8013dba: d002 beq.n 8013dc2 { xReturn = pdPASS; 8013dbc: 2301 movs r3, #1 8013dbe: 617b str r3, [r7, #20] 8013dc0: e001 b.n 8013dc6 } else { xReturn = pdFAIL; 8013dc2: 2300 movs r3, #0 8013dc4: 617b str r3, [r7, #20] } #endif /* configSUPPORT_STATIC_ALLOCATION */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) 8013dc6: 697b ldr r3, [r7, #20] 8013dc8: 2b01 cmp r3, #1 8013dca: d102 bne.n 8013dd2 { xReturn = xTimerCreateTimerTask(); 8013dcc: f001 f8a0 bl 8014f10 8013dd0: 6178 str r0, [r7, #20] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 8013dd2: 697b ldr r3, [r7, #20] 8013dd4: 2b01 cmp r3, #1 8013dd6: d11b bne.n 8013e10 __asm volatile 8013dd8: f04f 0350 mov.w r3, #80 @ 0x50 8013ddc: f383 8811 msr BASEPRI, r3 8013de0: f3bf 8f6f isb sy 8013de4: f3bf 8f4f dsb sy 8013de8: 613b str r3, [r7, #16] } 8013dea: 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 ); 8013dec: 4b15 ldr r3, [pc, #84] @ (8013e44 ) 8013dee: 681b ldr r3, [r3, #0] 8013df0: 3354 adds r3, #84 @ 0x54 8013df2: 4a15 ldr r2, [pc, #84] @ (8013e48 ) 8013df4: 6013 str r3, [r2, #0] } #endif /* configUSE_NEWLIB_REENTRANT */ xNextTaskUnblockTime = portMAX_DELAY; 8013df6: 4b15 ldr r3, [pc, #84] @ (8013e4c ) 8013df8: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8013dfc: 601a str r2, [r3, #0] xSchedulerRunning = pdTRUE; 8013dfe: 4b14 ldr r3, [pc, #80] @ (8013e50 ) 8013e00: 2201 movs r2, #1 8013e02: 601a str r2, [r3, #0] xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT; 8013e04: 4b13 ldr r3, [pc, #76] @ (8013e54 ) 8013e06: 2200 movs r2, #0 8013e08: 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 ) 8013e0a: f001 fd51 bl 80158b0 } /* Prevent compiler warnings if INCLUDE_xTaskGetIdleTaskHandle is set to 0, meaning xIdleTaskHandle is not used anywhere else. */ ( void ) xIdleTaskHandle; } 8013e0e: e00f b.n 8013e30 configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ); 8013e10: 697b ldr r3, [r7, #20] 8013e12: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8013e16: d10b bne.n 8013e30 __asm volatile 8013e18: f04f 0350 mov.w r3, #80 @ 0x50 8013e1c: f383 8811 msr BASEPRI, r3 8013e20: f3bf 8f6f isb sy 8013e24: f3bf 8f4f dsb sy 8013e28: 60fb str r3, [r7, #12] } 8013e2a: bf00 nop 8013e2c: bf00 nop 8013e2e: e7fd b.n 8013e2c } 8013e30: bf00 nop 8013e32: 3718 adds r7, #24 8013e34: 46bd mov sp, r7 8013e36: bd80 pop {r7, pc} 8013e38: 0802db9c .word 0x0802db9c 8013e3c: 08014519 .word 0x08014519 8013e40: 24004278 .word 0x24004278 8013e44: 24003d80 .word 0x24003d80 8013e48: 240001d4 .word 0x240001d4 8013e4c: 24004274 .word 0x24004274 8013e50: 24004260 .word 0x24004260 8013e54: 24004258 .word 0x24004258 08013e58 : vPortEndScheduler(); } /*----------------------------------------------------------*/ void vTaskSuspendAll( void ) { 8013e58: b480 push {r7} 8013e5a: 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; 8013e5c: 4b04 ldr r3, [pc, #16] @ (8013e70 ) 8013e5e: 681b ldr r3, [r3, #0] 8013e60: 3301 adds r3, #1 8013e62: 4a03 ldr r2, [pc, #12] @ (8013e70 ) 8013e64: 6013 str r3, [r2, #0] /* Enforces ordering for ports and optimised compilers that may otherwise place the above increment elsewhere. */ portMEMORY_BARRIER(); } 8013e66: bf00 nop 8013e68: 46bd mov sp, r7 8013e6a: f85d 7b04 ldr.w r7, [sp], #4 8013e6e: 4770 bx lr 8013e70: 2400427c .word 0x2400427c 08013e74 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 8013e74: b580 push {r7, lr} 8013e76: b084 sub sp, #16 8013e78: af00 add r7, sp, #0 TCB_t *pxTCB = NULL; 8013e7a: 2300 movs r3, #0 8013e7c: 60fb str r3, [r7, #12] BaseType_t xAlreadyYielded = pdFALSE; 8013e7e: 2300 movs r3, #0 8013e80: 60bb str r3, [r7, #8] /* If uxSchedulerSuspended is zero then this function does not match a previous call to vTaskSuspendAll(). */ configASSERT( uxSchedulerSuspended ); 8013e82: 4b42 ldr r3, [pc, #264] @ (8013f8c ) 8013e84: 681b ldr r3, [r3, #0] 8013e86: 2b00 cmp r3, #0 8013e88: d10b bne.n 8013ea2 __asm volatile 8013e8a: f04f 0350 mov.w r3, #80 @ 0x50 8013e8e: f383 8811 msr BASEPRI, r3 8013e92: f3bf 8f6f isb sy 8013e96: f3bf 8f4f dsb sy 8013e9a: 603b str r3, [r7, #0] } 8013e9c: bf00 nop 8013e9e: bf00 nop 8013ea0: e7fd b.n 8013e9e /* 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(); 8013ea2: f001 fda9 bl 80159f8 { --uxSchedulerSuspended; 8013ea6: 4b39 ldr r3, [pc, #228] @ (8013f8c ) 8013ea8: 681b ldr r3, [r3, #0] 8013eaa: 3b01 subs r3, #1 8013eac: 4a37 ldr r2, [pc, #220] @ (8013f8c ) 8013eae: 6013 str r3, [r2, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8013eb0: 4b36 ldr r3, [pc, #216] @ (8013f8c ) 8013eb2: 681b ldr r3, [r3, #0] 8013eb4: 2b00 cmp r3, #0 8013eb6: d162 bne.n 8013f7e { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 8013eb8: 4b35 ldr r3, [pc, #212] @ (8013f90 ) 8013eba: 681b ldr r3, [r3, #0] 8013ebc: 2b00 cmp r3, #0 8013ebe: d05e beq.n 8013f7e { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8013ec0: e02f b.n 8013f22 { 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. */ 8013ec2: 4b34 ldr r3, [pc, #208] @ (8013f94 ) 8013ec4: 68db ldr r3, [r3, #12] 8013ec6: 68db ldr r3, [r3, #12] 8013ec8: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8013eca: 68fb ldr r3, [r7, #12] 8013ecc: 3318 adds r3, #24 8013ece: 4618 mov r0, r3 8013ed0: f7fe f87a bl 8011fc8 ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8013ed4: 68fb ldr r3, [r7, #12] 8013ed6: 3304 adds r3, #4 8013ed8: 4618 mov r0, r3 8013eda: f7fe f875 bl 8011fc8 prvAddTaskToReadyList( pxTCB ); 8013ede: 68fb ldr r3, [r7, #12] 8013ee0: 6ada ldr r2, [r3, #44] @ 0x2c 8013ee2: 4b2d ldr r3, [pc, #180] @ (8013f98 ) 8013ee4: 681b ldr r3, [r3, #0] 8013ee6: 429a cmp r2, r3 8013ee8: d903 bls.n 8013ef2 8013eea: 68fb ldr r3, [r7, #12] 8013eec: 6adb ldr r3, [r3, #44] @ 0x2c 8013eee: 4a2a ldr r2, [pc, #168] @ (8013f98 ) 8013ef0: 6013 str r3, [r2, #0] 8013ef2: 68fb ldr r3, [r7, #12] 8013ef4: 6ada ldr r2, [r3, #44] @ 0x2c 8013ef6: 4613 mov r3, r2 8013ef8: 009b lsls r3, r3, #2 8013efa: 4413 add r3, r2 8013efc: 009b lsls r3, r3, #2 8013efe: 4a27 ldr r2, [pc, #156] @ (8013f9c ) 8013f00: 441a add r2, r3 8013f02: 68fb ldr r3, [r7, #12] 8013f04: 3304 adds r3, #4 8013f06: 4619 mov r1, r3 8013f08: 4610 mov r0, r2 8013f0a: f7fe f800 bl 8011f0e /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 8013f0e: 68fb ldr r3, [r7, #12] 8013f10: 6ada ldr r2, [r3, #44] @ 0x2c 8013f12: 4b23 ldr r3, [pc, #140] @ (8013fa0 ) 8013f14: 681b ldr r3, [r3, #0] 8013f16: 6adb ldr r3, [r3, #44] @ 0x2c 8013f18: 429a cmp r2, r3 8013f1a: d302 bcc.n 8013f22 { xYieldPending = pdTRUE; 8013f1c: 4b21 ldr r3, [pc, #132] @ (8013fa4 ) 8013f1e: 2201 movs r2, #1 8013f20: 601a str r2, [r3, #0] while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8013f22: 4b1c ldr r3, [pc, #112] @ (8013f94 ) 8013f24: 681b ldr r3, [r3, #0] 8013f26: 2b00 cmp r3, #0 8013f28: d1cb bne.n 8013ec2 { mtCOVERAGE_TEST_MARKER(); } } if( pxTCB != NULL ) 8013f2a: 68fb ldr r3, [r7, #12] 8013f2c: 2b00 cmp r3, #0 8013f2e: d001 beq.n 8013f34 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(); 8013f30: f000 fbae bl 8014690 /* 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. */ 8013f34: 4b1c ldr r3, [pc, #112] @ (8013fa8 ) 8013f36: 681b ldr r3, [r3, #0] 8013f38: 607b str r3, [r7, #4] if( xPendedCounts > ( TickType_t ) 0U ) 8013f3a: 687b ldr r3, [r7, #4] 8013f3c: 2b00 cmp r3, #0 8013f3e: d010 beq.n 8013f62 { do { if( xTaskIncrementTick() != pdFALSE ) 8013f40: f000 f858 bl 8013ff4 8013f44: 4603 mov r3, r0 8013f46: 2b00 cmp r3, #0 8013f48: d002 beq.n 8013f50 { xYieldPending = pdTRUE; 8013f4a: 4b16 ldr r3, [pc, #88] @ (8013fa4 ) 8013f4c: 2201 movs r2, #1 8013f4e: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } --xPendedCounts; 8013f50: 687b ldr r3, [r7, #4] 8013f52: 3b01 subs r3, #1 8013f54: 607b str r3, [r7, #4] } while( xPendedCounts > ( TickType_t ) 0U ); 8013f56: 687b ldr r3, [r7, #4] 8013f58: 2b00 cmp r3, #0 8013f5a: d1f1 bne.n 8013f40 xPendedTicks = 0; 8013f5c: 4b12 ldr r3, [pc, #72] @ (8013fa8 ) 8013f5e: 2200 movs r2, #0 8013f60: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } if( xYieldPending != pdFALSE ) 8013f62: 4b10 ldr r3, [pc, #64] @ (8013fa4 ) 8013f64: 681b ldr r3, [r3, #0] 8013f66: 2b00 cmp r3, #0 8013f68: d009 beq.n 8013f7e { #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; 8013f6a: 2301 movs r3, #1 8013f6c: 60bb str r3, [r7, #8] } #endif taskYIELD_IF_USING_PREEMPTION(); 8013f6e: 4b0f ldr r3, [pc, #60] @ (8013fac ) 8013f70: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8013f74: 601a str r2, [r3, #0] 8013f76: f3bf 8f4f dsb sy 8013f7a: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8013f7e: f001 fd6d bl 8015a5c return xAlreadyYielded; 8013f82: 68bb ldr r3, [r7, #8] } 8013f84: 4618 mov r0, r3 8013f86: 3710 adds r7, #16 8013f88: 46bd mov sp, r7 8013f8a: bd80 pop {r7, pc} 8013f8c: 2400427c .word 0x2400427c 8013f90: 24004254 .word 0x24004254 8013f94: 24004214 .word 0x24004214 8013f98: 2400425c .word 0x2400425c 8013f9c: 24003d84 .word 0x24003d84 8013fa0: 24003d80 .word 0x24003d80 8013fa4: 24004268 .word 0x24004268 8013fa8: 24004264 .word 0x24004264 8013fac: e000ed04 .word 0xe000ed04 08013fb0 : /*-----------------------------------------------------------*/ TickType_t xTaskGetTickCount( void ) { 8013fb0: b480 push {r7} 8013fb2: b083 sub sp, #12 8013fb4: af00 add r7, sp, #0 TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 8013fb6: 4b05 ldr r3, [pc, #20] @ (8013fcc ) 8013fb8: 681b ldr r3, [r3, #0] 8013fba: 607b str r3, [r7, #4] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; 8013fbc: 687b ldr r3, [r7, #4] } 8013fbe: 4618 mov r0, r3 8013fc0: 370c adds r7, #12 8013fc2: 46bd mov sp, r7 8013fc4: f85d 7b04 ldr.w r7, [sp], #4 8013fc8: 4770 bx lr 8013fca: bf00 nop 8013fcc: 24004258 .word 0x24004258 08013fd0 : /*-----------------------------------------------------------*/ TickType_t xTaskGetTickCountFromISR( void ) { 8013fd0: b580 push {r7, lr} 8013fd2: b082 sub sp, #8 8013fd4: 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(); 8013fd6: f001 fdef bl 8015bb8 uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR(); 8013fda: 2300 movs r3, #0 8013fdc: 607b str r3, [r7, #4] { xReturn = xTickCount; 8013fde: 4b04 ldr r3, [pc, #16] @ (8013ff0 ) 8013fe0: 681b ldr r3, [r3, #0] 8013fe2: 603b str r3, [r7, #0] } portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8013fe4: 683b ldr r3, [r7, #0] } 8013fe6: 4618 mov r0, r3 8013fe8: 3708 adds r7, #8 8013fea: 46bd mov sp, r7 8013fec: bd80 pop {r7, pc} 8013fee: bf00 nop 8013ff0: 24004258 .word 0x24004258 08013ff4 : #endif /* INCLUDE_xTaskAbortDelay */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 8013ff4: b580 push {r7, lr} 8013ff6: b086 sub sp, #24 8013ff8: af00 add r7, sp, #0 TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 8013ffa: 2300 movs r3, #0 8013ffc: 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 ) 8013ffe: 4b4f ldr r3, [pc, #316] @ (801413c ) 8014000: 681b ldr r3, [r3, #0] 8014002: 2b00 cmp r3, #0 8014004: f040 8090 bne.w 8014128 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1; 8014008: 4b4d ldr r3, [pc, #308] @ (8014140 ) 801400a: 681b ldr r3, [r3, #0] 801400c: 3301 adds r3, #1 801400e: 613b str r3, [r7, #16] /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ xTickCount = xConstTickCount; 8014010: 4a4b ldr r2, [pc, #300] @ (8014140 ) 8014012: 693b ldr r3, [r7, #16] 8014014: 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. */ 8014016: 693b ldr r3, [r7, #16] 8014018: 2b00 cmp r3, #0 801401a: d121 bne.n 8014060 { taskSWITCH_DELAYED_LISTS(); 801401c: 4b49 ldr r3, [pc, #292] @ (8014144 ) 801401e: 681b ldr r3, [r3, #0] 8014020: 681b ldr r3, [r3, #0] 8014022: 2b00 cmp r3, #0 8014024: d00b beq.n 801403e __asm volatile 8014026: f04f 0350 mov.w r3, #80 @ 0x50 801402a: f383 8811 msr BASEPRI, r3 801402e: f3bf 8f6f isb sy 8014032: f3bf 8f4f dsb sy 8014036: 603b str r3, [r7, #0] } 8014038: bf00 nop 801403a: bf00 nop 801403c: e7fd b.n 801403a 801403e: 4b41 ldr r3, [pc, #260] @ (8014144 ) 8014040: 681b ldr r3, [r3, #0] 8014042: 60fb str r3, [r7, #12] 8014044: 4b40 ldr r3, [pc, #256] @ (8014148 ) 8014046: 681b ldr r3, [r3, #0] 8014048: 4a3e ldr r2, [pc, #248] @ (8014144 ) 801404a: 6013 str r3, [r2, #0] 801404c: 4a3e ldr r2, [pc, #248] @ (8014148 ) 801404e: 68fb ldr r3, [r7, #12] 8014050: 6013 str r3, [r2, #0] 8014052: 4b3e ldr r3, [pc, #248] @ (801414c ) 8014054: 681b ldr r3, [r3, #0] 8014056: 3301 adds r3, #1 8014058: 4a3c ldr r2, [pc, #240] @ (801414c ) 801405a: 6013 str r3, [r2, #0] 801405c: f000 fb18 bl 8014690 /* 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 ) 8014060: 4b3b ldr r3, [pc, #236] @ (8014150 ) 8014062: 681b ldr r3, [r3, #0] 8014064: 693a ldr r2, [r7, #16] 8014066: 429a cmp r2, r3 8014068: d349 bcc.n 80140fe { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 801406a: 4b36 ldr r3, [pc, #216] @ (8014144 ) 801406c: 681b ldr r3, [r3, #0] 801406e: 681b ldr r3, [r3, #0] 8014070: 2b00 cmp r3, #0 8014072: d104 bne.n 801407e /* 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. */ 8014074: 4b36 ldr r3, [pc, #216] @ (8014150 ) 8014076: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 801407a: 601a str r2, [r3, #0] break; 801407c: e03f b.n 80140fe { /* 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. */ 801407e: 4b31 ldr r3, [pc, #196] @ (8014144 ) 8014080: 681b ldr r3, [r3, #0] 8014082: 68db ldr r3, [r3, #12] 8014084: 68db ldr r3, [r3, #12] 8014086: 60bb str r3, [r7, #8] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) ); 8014088: 68bb ldr r3, [r7, #8] 801408a: 685b ldr r3, [r3, #4] 801408c: 607b str r3, [r7, #4] if( xConstTickCount < xItemValue ) 801408e: 693a ldr r2, [r7, #16] 8014090: 687b ldr r3, [r7, #4] 8014092: 429a cmp r2, r3 8014094: d203 bcs.n 801409e /* 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; 8014096: 4a2e ldr r2, [pc, #184] @ (8014150 ) 8014098: 687b ldr r3, [r7, #4] 801409a: 6013 str r3, [r2, #0] break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */ 801409c: e02f b.n 80140fe { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 801409e: 68bb ldr r3, [r7, #8] 80140a0: 3304 adds r3, #4 80140a2: 4618 mov r0, r3 80140a4: f7fd ff90 bl 8011fc8 /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 80140a8: 68bb ldr r3, [r7, #8] 80140aa: 6a9b ldr r3, [r3, #40] @ 0x28 80140ac: 2b00 cmp r3, #0 80140ae: d004 beq.n 80140ba { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 80140b0: 68bb ldr r3, [r7, #8] 80140b2: 3318 adds r3, #24 80140b4: 4618 mov r0, r3 80140b6: f7fd ff87 bl 8011fc8 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 80140ba: 68bb ldr r3, [r7, #8] 80140bc: 6ada ldr r2, [r3, #44] @ 0x2c 80140be: 4b25 ldr r3, [pc, #148] @ (8014154 ) 80140c0: 681b ldr r3, [r3, #0] 80140c2: 429a cmp r2, r3 80140c4: d903 bls.n 80140ce 80140c6: 68bb ldr r3, [r7, #8] 80140c8: 6adb ldr r3, [r3, #44] @ 0x2c 80140ca: 4a22 ldr r2, [pc, #136] @ (8014154 ) 80140cc: 6013 str r3, [r2, #0] 80140ce: 68bb ldr r3, [r7, #8] 80140d0: 6ada ldr r2, [r3, #44] @ 0x2c 80140d2: 4613 mov r3, r2 80140d4: 009b lsls r3, r3, #2 80140d6: 4413 add r3, r2 80140d8: 009b lsls r3, r3, #2 80140da: 4a1f ldr r2, [pc, #124] @ (8014158 ) 80140dc: 441a add r2, r3 80140de: 68bb ldr r3, [r7, #8] 80140e0: 3304 adds r3, #4 80140e2: 4619 mov r1, r3 80140e4: 4610 mov r0, r2 80140e6: f7fd ff12 bl 8011f0e { /* 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 ) 80140ea: 68bb ldr r3, [r7, #8] 80140ec: 6ada ldr r2, [r3, #44] @ 0x2c 80140ee: 4b1b ldr r3, [pc, #108] @ (801415c ) 80140f0: 681b ldr r3, [r3, #0] 80140f2: 6adb ldr r3, [r3, #44] @ 0x2c 80140f4: 429a cmp r2, r3 80140f6: d3b8 bcc.n 801406a { xSwitchRequired = pdTRUE; 80140f8: 2301 movs r3, #1 80140fa: 617b str r3, [r7, #20] if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 80140fc: e7b5 b.n 801406a /* 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 ) 80140fe: 4b17 ldr r3, [pc, #92] @ (801415c ) 8014100: 681b ldr r3, [r3, #0] 8014102: 6ada ldr r2, [r3, #44] @ 0x2c 8014104: 4914 ldr r1, [pc, #80] @ (8014158 ) 8014106: 4613 mov r3, r2 8014108: 009b lsls r3, r3, #2 801410a: 4413 add r3, r2 801410c: 009b lsls r3, r3, #2 801410e: 440b add r3, r1 8014110: 681b ldr r3, [r3, #0] 8014112: 2b01 cmp r3, #1 8014114: d901 bls.n 801411a { xSwitchRequired = pdTRUE; 8014116: 2301 movs r3, #1 8014118: 617b str r3, [r7, #20] } #endif /* configUSE_TICK_HOOK */ #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 801411a: 4b11 ldr r3, [pc, #68] @ (8014160 ) 801411c: 681b ldr r3, [r3, #0] 801411e: 2b00 cmp r3, #0 8014120: d007 beq.n 8014132 { xSwitchRequired = pdTRUE; 8014122: 2301 movs r3, #1 8014124: 617b str r3, [r7, #20] 8014126: e004 b.n 8014132 } #endif /* configUSE_PREEMPTION */ } else { ++xPendedTicks; 8014128: 4b0e ldr r3, [pc, #56] @ (8014164 ) 801412a: 681b ldr r3, [r3, #0] 801412c: 3301 adds r3, #1 801412e: 4a0d ldr r2, [pc, #52] @ (8014164 ) 8014130: 6013 str r3, [r2, #0] vApplicationTickHook(); } #endif } return xSwitchRequired; 8014132: 697b ldr r3, [r7, #20] } 8014134: 4618 mov r0, r3 8014136: 3718 adds r7, #24 8014138: 46bd mov sp, r7 801413a: bd80 pop {r7, pc} 801413c: 2400427c .word 0x2400427c 8014140: 24004258 .word 0x24004258 8014144: 2400420c .word 0x2400420c 8014148: 24004210 .word 0x24004210 801414c: 2400426c .word 0x2400426c 8014150: 24004274 .word 0x24004274 8014154: 2400425c .word 0x2400425c 8014158: 24003d84 .word 0x24003d84 801415c: 24003d80 .word 0x24003d80 8014160: 24004268 .word 0x24004268 8014164: 24004264 .word 0x24004264 08014168 : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 8014168: b580 push {r7, lr} 801416a: b084 sub sp, #16 801416c: af00 add r7, sp, #0 if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 801416e: 4b32 ldr r3, [pc, #200] @ (8014238 ) 8014170: 681b ldr r3, [r3, #0] 8014172: 2b00 cmp r3, #0 8014174: d003 beq.n 801417e { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 8014176: 4b31 ldr r3, [pc, #196] @ (801423c ) 8014178: 2201 movs r2, #1 801417a: 601a str r2, [r3, #0] for additional information. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ } } 801417c: e058 b.n 8014230 xYieldPending = pdFALSE; 801417e: 4b2f ldr r3, [pc, #188] @ (801423c ) 8014180: 2200 movs r2, #0 8014182: 601a str r2, [r3, #0] taskCHECK_FOR_STACK_OVERFLOW(); 8014184: 4b2e ldr r3, [pc, #184] @ (8014240 ) 8014186: 681b ldr r3, [r3, #0] 8014188: 681a ldr r2, [r3, #0] 801418a: 4b2d ldr r3, [pc, #180] @ (8014240 ) 801418c: 681b ldr r3, [r3, #0] 801418e: 6b1b ldr r3, [r3, #48] @ 0x30 8014190: 429a cmp r2, r3 8014192: d808 bhi.n 80141a6 8014194: 4b2a ldr r3, [pc, #168] @ (8014240 ) 8014196: 681a ldr r2, [r3, #0] 8014198: 4b29 ldr r3, [pc, #164] @ (8014240 ) 801419a: 681b ldr r3, [r3, #0] 801419c: 3334 adds r3, #52 @ 0x34 801419e: 4619 mov r1, r3 80141a0: 4610 mov r0, r2 80141a2: f7ed fd7e 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. */ 80141a6: 4b27 ldr r3, [pc, #156] @ (8014244 ) 80141a8: 681b ldr r3, [r3, #0] 80141aa: 60fb str r3, [r7, #12] 80141ac: e011 b.n 80141d2 80141ae: 68fb ldr r3, [r7, #12] 80141b0: 2b00 cmp r3, #0 80141b2: d10b bne.n 80141cc __asm volatile 80141b4: f04f 0350 mov.w r3, #80 @ 0x50 80141b8: f383 8811 msr BASEPRI, r3 80141bc: f3bf 8f6f isb sy 80141c0: f3bf 8f4f dsb sy 80141c4: 607b str r3, [r7, #4] } 80141c6: bf00 nop 80141c8: bf00 nop 80141ca: e7fd b.n 80141c8 80141cc: 68fb ldr r3, [r7, #12] 80141ce: 3b01 subs r3, #1 80141d0: 60fb str r3, [r7, #12] 80141d2: 491d ldr r1, [pc, #116] @ (8014248 ) 80141d4: 68fa ldr r2, [r7, #12] 80141d6: 4613 mov r3, r2 80141d8: 009b lsls r3, r3, #2 80141da: 4413 add r3, r2 80141dc: 009b lsls r3, r3, #2 80141de: 440b add r3, r1 80141e0: 681b ldr r3, [r3, #0] 80141e2: 2b00 cmp r3, #0 80141e4: d0e3 beq.n 80141ae 80141e6: 68fa ldr r2, [r7, #12] 80141e8: 4613 mov r3, r2 80141ea: 009b lsls r3, r3, #2 80141ec: 4413 add r3, r2 80141ee: 009b lsls r3, r3, #2 80141f0: 4a15 ldr r2, [pc, #84] @ (8014248 ) 80141f2: 4413 add r3, r2 80141f4: 60bb str r3, [r7, #8] 80141f6: 68bb ldr r3, [r7, #8] 80141f8: 685b ldr r3, [r3, #4] 80141fa: 685a ldr r2, [r3, #4] 80141fc: 68bb ldr r3, [r7, #8] 80141fe: 605a str r2, [r3, #4] 8014200: 68bb ldr r3, [r7, #8] 8014202: 685a ldr r2, [r3, #4] 8014204: 68bb ldr r3, [r7, #8] 8014206: 3308 adds r3, #8 8014208: 429a cmp r2, r3 801420a: d104 bne.n 8014216 801420c: 68bb ldr r3, [r7, #8] 801420e: 685b ldr r3, [r3, #4] 8014210: 685a ldr r2, [r3, #4] 8014212: 68bb ldr r3, [r7, #8] 8014214: 605a str r2, [r3, #4] 8014216: 68bb ldr r3, [r7, #8] 8014218: 685b ldr r3, [r3, #4] 801421a: 68db ldr r3, [r3, #12] 801421c: 4a08 ldr r2, [pc, #32] @ (8014240 ) 801421e: 6013 str r3, [r2, #0] 8014220: 4a08 ldr r2, [pc, #32] @ (8014244 ) 8014222: 68fb ldr r3, [r7, #12] 8014224: 6013 str r3, [r2, #0] _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); 8014226: 4b06 ldr r3, [pc, #24] @ (8014240 ) 8014228: 681b ldr r3, [r3, #0] 801422a: 3354 adds r3, #84 @ 0x54 801422c: 4a07 ldr r2, [pc, #28] @ (801424c ) 801422e: 6013 str r3, [r2, #0] } 8014230: bf00 nop 8014232: 3710 adds r7, #16 8014234: 46bd mov sp, r7 8014236: bd80 pop {r7, pc} 8014238: 2400427c .word 0x2400427c 801423c: 24004268 .word 0x24004268 8014240: 24003d80 .word 0x24003d80 8014244: 2400425c .word 0x2400425c 8014248: 24003d84 .word 0x24003d84 801424c: 240001d4 .word 0x240001d4 08014250 : /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 8014250: b580 push {r7, lr} 8014252: b084 sub sp, #16 8014254: af00 add r7, sp, #0 8014256: 6078 str r0, [r7, #4] 8014258: 6039 str r1, [r7, #0] configASSERT( pxEventList ); 801425a: 687b ldr r3, [r7, #4] 801425c: 2b00 cmp r3, #0 801425e: d10b bne.n 8014278 __asm volatile 8014260: f04f 0350 mov.w r3, #80 @ 0x50 8014264: f383 8811 msr BASEPRI, r3 8014268: f3bf 8f6f isb sy 801426c: f3bf 8f4f dsb sy 8014270: 60fb str r3, [r7, #12] } 8014272: bf00 nop 8014274: bf00 nop 8014276: e7fd b.n 8014274 /* 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 ) ); 8014278: 4b07 ldr r3, [pc, #28] @ (8014298 ) 801427a: 681b ldr r3, [r3, #0] 801427c: 3318 adds r3, #24 801427e: 4619 mov r1, r3 8014280: 6878 ldr r0, [r7, #4] 8014282: f7fd fe68 bl 8011f56 prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); 8014286: 2101 movs r1, #1 8014288: 6838 ldr r0, [r7, #0] 801428a: f000 fded bl 8014e68 } 801428e: bf00 nop 8014290: 3710 adds r7, #16 8014292: 46bd mov sp, r7 8014294: bd80 pop {r7, pc} 8014296: bf00 nop 8014298: 24003d80 .word 0x24003d80 0801429c : /*-----------------------------------------------------------*/ #if( configUSE_TIMERS == 1 ) void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { 801429c: b580 push {r7, lr} 801429e: b086 sub sp, #24 80142a0: af00 add r7, sp, #0 80142a2: 60f8 str r0, [r7, #12] 80142a4: 60b9 str r1, [r7, #8] 80142a6: 607a str r2, [r7, #4] configASSERT( pxEventList ); 80142a8: 68fb ldr r3, [r7, #12] 80142aa: 2b00 cmp r3, #0 80142ac: d10b bne.n 80142c6 __asm volatile 80142ae: f04f 0350 mov.w r3, #80 @ 0x50 80142b2: f383 8811 msr BASEPRI, r3 80142b6: f3bf 8f6f isb sy 80142ba: f3bf 8f4f dsb sy 80142be: 617b str r3, [r7, #20] } 80142c0: bf00 nop 80142c2: bf00 nop 80142c4: e7fd b.n 80142c2 /* 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 ) ); 80142c6: 4b0a ldr r3, [pc, #40] @ (80142f0 ) 80142c8: 681b ldr r3, [r3, #0] 80142ca: 3318 adds r3, #24 80142cc: 4619 mov r1, r3 80142ce: 68f8 ldr r0, [r7, #12] 80142d0: f7fd fe1d bl 8011f0e /* 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 ) 80142d4: 687b ldr r3, [r7, #4] 80142d6: 2b00 cmp r3, #0 80142d8: d002 beq.n 80142e0 { xTicksToWait = portMAX_DELAY; 80142da: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80142de: 60bb str r3, [r7, #8] } traceTASK_DELAY_UNTIL( ( xTickCount + xTicksToWait ) ); prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely ); 80142e0: 6879 ldr r1, [r7, #4] 80142e2: 68b8 ldr r0, [r7, #8] 80142e4: f000 fdc0 bl 8014e68 } 80142e8: bf00 nop 80142ea: 3718 adds r7, #24 80142ec: 46bd mov sp, r7 80142ee: bd80 pop {r7, pc} 80142f0: 24003d80 .word 0x24003d80 080142f4 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 80142f4: b580 push {r7, lr} 80142f6: b086 sub sp, #24 80142f8: af00 add r7, sp, #0 80142fa: 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. */ 80142fc: 687b ldr r3, [r7, #4] 80142fe: 68db ldr r3, [r3, #12] 8014300: 68db ldr r3, [r3, #12] 8014302: 613b str r3, [r7, #16] configASSERT( pxUnblockedTCB ); 8014304: 693b ldr r3, [r7, #16] 8014306: 2b00 cmp r3, #0 8014308: d10b bne.n 8014322 __asm volatile 801430a: f04f 0350 mov.w r3, #80 @ 0x50 801430e: f383 8811 msr BASEPRI, r3 8014312: f3bf 8f6f isb sy 8014316: f3bf 8f4f dsb sy 801431a: 60fb str r3, [r7, #12] } 801431c: bf00 nop 801431e: bf00 nop 8014320: e7fd b.n 801431e ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 8014322: 693b ldr r3, [r7, #16] 8014324: 3318 adds r3, #24 8014326: 4618 mov r0, r3 8014328: f7fd fe4e bl 8011fc8 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 801432c: 4b1d ldr r3, [pc, #116] @ (80143a4 ) 801432e: 681b ldr r3, [r3, #0] 8014330: 2b00 cmp r3, #0 8014332: d11d bne.n 8014370 { ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) ); 8014334: 693b ldr r3, [r7, #16] 8014336: 3304 adds r3, #4 8014338: 4618 mov r0, r3 801433a: f7fd fe45 bl 8011fc8 prvAddTaskToReadyList( pxUnblockedTCB ); 801433e: 693b ldr r3, [r7, #16] 8014340: 6ada ldr r2, [r3, #44] @ 0x2c 8014342: 4b19 ldr r3, [pc, #100] @ (80143a8 ) 8014344: 681b ldr r3, [r3, #0] 8014346: 429a cmp r2, r3 8014348: d903 bls.n 8014352 801434a: 693b ldr r3, [r7, #16] 801434c: 6adb ldr r3, [r3, #44] @ 0x2c 801434e: 4a16 ldr r2, [pc, #88] @ (80143a8 ) 8014350: 6013 str r3, [r2, #0] 8014352: 693b ldr r3, [r7, #16] 8014354: 6ada ldr r2, [r3, #44] @ 0x2c 8014356: 4613 mov r3, r2 8014358: 009b lsls r3, r3, #2 801435a: 4413 add r3, r2 801435c: 009b lsls r3, r3, #2 801435e: 4a13 ldr r2, [pc, #76] @ (80143ac ) 8014360: 441a add r2, r3 8014362: 693b ldr r3, [r7, #16] 8014364: 3304 adds r3, #4 8014366: 4619 mov r1, r3 8014368: 4610 mov r0, r2 801436a: f7fd fdd0 bl 8011f0e 801436e: e005 b.n 801437c } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 8014370: 693b ldr r3, [r7, #16] 8014372: 3318 adds r3, #24 8014374: 4619 mov r1, r3 8014376: 480e ldr r0, [pc, #56] @ (80143b0 ) 8014378: f7fd fdc9 bl 8011f0e } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 801437c: 693b ldr r3, [r7, #16] 801437e: 6ada ldr r2, [r3, #44] @ 0x2c 8014380: 4b0c ldr r3, [pc, #48] @ (80143b4 ) 8014382: 681b ldr r3, [r3, #0] 8014384: 6adb ldr r3, [r3, #44] @ 0x2c 8014386: 429a cmp r2, r3 8014388: d905 bls.n 8014396 { /* 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; 801438a: 2301 movs r3, #1 801438c: 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; 801438e: 4b0a ldr r3, [pc, #40] @ (80143b8 ) 8014390: 2201 movs r2, #1 8014392: 601a str r2, [r3, #0] 8014394: e001 b.n 801439a } else { xReturn = pdFALSE; 8014396: 2300 movs r3, #0 8014398: 617b str r3, [r7, #20] } return xReturn; 801439a: 697b ldr r3, [r7, #20] } 801439c: 4618 mov r0, r3 801439e: 3718 adds r7, #24 80143a0: 46bd mov sp, r7 80143a2: bd80 pop {r7, pc} 80143a4: 2400427c .word 0x2400427c 80143a8: 2400425c .word 0x2400425c 80143ac: 24003d84 .word 0x24003d84 80143b0: 24004214 .word 0x24004214 80143b4: 24003d80 .word 0x24003d80 80143b8: 24004268 .word 0x24004268 080143bc : } } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 80143bc: b580 push {r7, lr} 80143be: b084 sub sp, #16 80143c0: af00 add r7, sp, #0 80143c2: 6078 str r0, [r7, #4] configASSERT( pxTimeOut ); 80143c4: 687b ldr r3, [r7, #4] 80143c6: 2b00 cmp r3, #0 80143c8: d10b bne.n 80143e2 __asm volatile 80143ca: f04f 0350 mov.w r3, #80 @ 0x50 80143ce: f383 8811 msr BASEPRI, r3 80143d2: f3bf 8f6f isb sy 80143d6: f3bf 8f4f dsb sy 80143da: 60fb str r3, [r7, #12] } 80143dc: bf00 nop 80143de: bf00 nop 80143e0: e7fd b.n 80143de taskENTER_CRITICAL(); 80143e2: f001 fb09 bl 80159f8 { pxTimeOut->xOverflowCount = xNumOfOverflows; 80143e6: 4b07 ldr r3, [pc, #28] @ (8014404 ) 80143e8: 681a ldr r2, [r3, #0] 80143ea: 687b ldr r3, [r7, #4] 80143ec: 601a str r2, [r3, #0] pxTimeOut->xTimeOnEntering = xTickCount; 80143ee: 4b06 ldr r3, [pc, #24] @ (8014408 ) 80143f0: 681a ldr r2, [r3, #0] 80143f2: 687b ldr r3, [r7, #4] 80143f4: 605a str r2, [r3, #4] } taskEXIT_CRITICAL(); 80143f6: f001 fb31 bl 8015a5c } 80143fa: bf00 nop 80143fc: 3710 adds r7, #16 80143fe: 46bd mov sp, r7 8014400: bd80 pop {r7, pc} 8014402: bf00 nop 8014404: 2400426c .word 0x2400426c 8014408: 24004258 .word 0x24004258 0801440c : /*-----------------------------------------------------------*/ void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ) { 801440c: b480 push {r7} 801440e: b083 sub sp, #12 8014410: af00 add r7, sp, #0 8014412: 6078 str r0, [r7, #4] /* For internal use only as it does not use a critical section. */ pxTimeOut->xOverflowCount = xNumOfOverflows; 8014414: 4b06 ldr r3, [pc, #24] @ (8014430 ) 8014416: 681a ldr r2, [r3, #0] 8014418: 687b ldr r3, [r7, #4] 801441a: 601a str r2, [r3, #0] pxTimeOut->xTimeOnEntering = xTickCount; 801441c: 4b05 ldr r3, [pc, #20] @ (8014434 ) 801441e: 681a ldr r2, [r3, #0] 8014420: 687b ldr r3, [r7, #4] 8014422: 605a str r2, [r3, #4] } 8014424: bf00 nop 8014426: 370c adds r7, #12 8014428: 46bd mov sp, r7 801442a: f85d 7b04 ldr.w r7, [sp], #4 801442e: 4770 bx lr 8014430: 2400426c .word 0x2400426c 8014434: 24004258 .word 0x24004258 08014438 : /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 8014438: b580 push {r7, lr} 801443a: b088 sub sp, #32 801443c: af00 add r7, sp, #0 801443e: 6078 str r0, [r7, #4] 8014440: 6039 str r1, [r7, #0] BaseType_t xReturn; configASSERT( pxTimeOut ); 8014442: 687b ldr r3, [r7, #4] 8014444: 2b00 cmp r3, #0 8014446: d10b bne.n 8014460 __asm volatile 8014448: f04f 0350 mov.w r3, #80 @ 0x50 801444c: f383 8811 msr BASEPRI, r3 8014450: f3bf 8f6f isb sy 8014454: f3bf 8f4f dsb sy 8014458: 613b str r3, [r7, #16] } 801445a: bf00 nop 801445c: bf00 nop 801445e: e7fd b.n 801445c configASSERT( pxTicksToWait ); 8014460: 683b ldr r3, [r7, #0] 8014462: 2b00 cmp r3, #0 8014464: d10b bne.n 801447e __asm volatile 8014466: f04f 0350 mov.w r3, #80 @ 0x50 801446a: f383 8811 msr BASEPRI, r3 801446e: f3bf 8f6f isb sy 8014472: f3bf 8f4f dsb sy 8014476: 60fb str r3, [r7, #12] } 8014478: bf00 nop 801447a: bf00 nop 801447c: e7fd b.n 801447a taskENTER_CRITICAL(); 801447e: f001 fabb bl 80159f8 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 8014482: 4b1d ldr r3, [pc, #116] @ (80144f8 ) 8014484: 681b ldr r3, [r3, #0] 8014486: 61bb str r3, [r7, #24] const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering; 8014488: 687b ldr r3, [r7, #4] 801448a: 685b ldr r3, [r3, #4] 801448c: 69ba ldr r2, [r7, #24] 801448e: 1ad3 subs r3, r2, r3 8014490: 617b str r3, [r7, #20] } else #endif #if ( INCLUDE_vTaskSuspend == 1 ) if( *pxTicksToWait == portMAX_DELAY ) 8014492: 683b ldr r3, [r7, #0] 8014494: 681b ldr r3, [r3, #0] 8014496: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801449a: d102 bne.n 80144a2 { /* 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; 801449c: 2300 movs r3, #0 801449e: 61fb str r3, [r7, #28] 80144a0: e023 b.n 80144ea } else #endif if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */ 80144a2: 687b ldr r3, [r7, #4] 80144a4: 681a ldr r2, [r3, #0] 80144a6: 4b15 ldr r3, [pc, #84] @ (80144fc ) 80144a8: 681b ldr r3, [r3, #0] 80144aa: 429a cmp r2, r3 80144ac: d007 beq.n 80144be 80144ae: 687b ldr r3, [r7, #4] 80144b0: 685b ldr r3, [r3, #4] 80144b2: 69ba ldr r2, [r7, #24] 80144b4: 429a cmp r2, r3 80144b6: d302 bcc.n 80144be /* 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; 80144b8: 2301 movs r3, #1 80144ba: 61fb str r3, [r7, #28] 80144bc: e015 b.n 80144ea } else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */ 80144be: 683b ldr r3, [r7, #0] 80144c0: 681b ldr r3, [r3, #0] 80144c2: 697a ldr r2, [r7, #20] 80144c4: 429a cmp r2, r3 80144c6: d20b bcs.n 80144e0 { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= xElapsedTime; 80144c8: 683b ldr r3, [r7, #0] 80144ca: 681a ldr r2, [r3, #0] 80144cc: 697b ldr r3, [r7, #20] 80144ce: 1ad2 subs r2, r2, r3 80144d0: 683b ldr r3, [r7, #0] 80144d2: 601a str r2, [r3, #0] vTaskInternalSetTimeOutState( pxTimeOut ); 80144d4: 6878 ldr r0, [r7, #4] 80144d6: f7ff ff99 bl 801440c xReturn = pdFALSE; 80144da: 2300 movs r3, #0 80144dc: 61fb str r3, [r7, #28] 80144de: e004 b.n 80144ea } else { *pxTicksToWait = 0; 80144e0: 683b ldr r3, [r7, #0] 80144e2: 2200 movs r2, #0 80144e4: 601a str r2, [r3, #0] xReturn = pdTRUE; 80144e6: 2301 movs r3, #1 80144e8: 61fb str r3, [r7, #28] } } taskEXIT_CRITICAL(); 80144ea: f001 fab7 bl 8015a5c return xReturn; 80144ee: 69fb ldr r3, [r7, #28] } 80144f0: 4618 mov r0, r3 80144f2: 3720 adds r7, #32 80144f4: 46bd mov sp, r7 80144f6: bd80 pop {r7, pc} 80144f8: 24004258 .word 0x24004258 80144fc: 2400426c .word 0x2400426c 08014500 : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { 8014500: b480 push {r7} 8014502: af00 add r7, sp, #0 xYieldPending = pdTRUE; 8014504: 4b03 ldr r3, [pc, #12] @ (8014514 ) 8014506: 2201 movs r2, #1 8014508: 601a str r2, [r3, #0] } 801450a: bf00 nop 801450c: 46bd mov sp, r7 801450e: f85d 7b04 ldr.w r7, [sp], #4 8014512: 4770 bx lr 8014514: 24004268 .word 0x24004268 08014518 : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 8014518: b580 push {r7, lr} 801451a: b082 sub sp, #8 801451c: af00 add r7, sp, #0 801451e: 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(); 8014520: f000 f852 bl 80145c8 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 ) 8014524: 4b06 ldr r3, [pc, #24] @ (8014540 ) 8014526: 681b ldr r3, [r3, #0] 8014528: 2b01 cmp r3, #1 801452a: d9f9 bls.n 8014520 { taskYIELD(); 801452c: 4b05 ldr r3, [pc, #20] @ (8014544 ) 801452e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014532: 601a str r2, [r3, #0] 8014534: f3bf 8f4f dsb sy 8014538: f3bf 8f6f isb sy prvCheckTasksWaitingTermination(); 801453c: e7f0 b.n 8014520 801453e: bf00 nop 8014540: 24003d84 .word 0x24003d84 8014544: e000ed04 .word 0xe000ed04 08014548 : #endif /* portUSING_MPU_WRAPPERS */ /*-----------------------------------------------------------*/ static void prvInitialiseTaskLists( void ) { 8014548: b580 push {r7, lr} 801454a: b082 sub sp, #8 801454c: af00 add r7, sp, #0 UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 801454e: 2300 movs r3, #0 8014550: 607b str r3, [r7, #4] 8014552: e00c b.n 801456e { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 8014554: 687a ldr r2, [r7, #4] 8014556: 4613 mov r3, r2 8014558: 009b lsls r3, r3, #2 801455a: 4413 add r3, r2 801455c: 009b lsls r3, r3, #2 801455e: 4a12 ldr r2, [pc, #72] @ (80145a8 ) 8014560: 4413 add r3, r2 8014562: 4618 mov r0, r3 8014564: f7fd fca6 bl 8011eb4 for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 8014568: 687b ldr r3, [r7, #4] 801456a: 3301 adds r3, #1 801456c: 607b str r3, [r7, #4] 801456e: 687b ldr r3, [r7, #4] 8014570: 2b37 cmp r3, #55 @ 0x37 8014572: d9ef bls.n 8014554 } vListInitialise( &xDelayedTaskList1 ); 8014574: 480d ldr r0, [pc, #52] @ (80145ac ) 8014576: f7fd fc9d bl 8011eb4 vListInitialise( &xDelayedTaskList2 ); 801457a: 480d ldr r0, [pc, #52] @ (80145b0 ) 801457c: f7fd fc9a bl 8011eb4 vListInitialise( &xPendingReadyList ); 8014580: 480c ldr r0, [pc, #48] @ (80145b4 ) 8014582: f7fd fc97 bl 8011eb4 #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 8014586: 480c ldr r0, [pc, #48] @ (80145b8 ) 8014588: f7fd fc94 bl 8011eb4 } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 801458c: 480b ldr r0, [pc, #44] @ (80145bc ) 801458e: f7fd fc91 bl 8011eb4 } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 8014592: 4b0b ldr r3, [pc, #44] @ (80145c0 ) 8014594: 4a05 ldr r2, [pc, #20] @ (80145ac ) 8014596: 601a str r2, [r3, #0] pxOverflowDelayedTaskList = &xDelayedTaskList2; 8014598: 4b0a ldr r3, [pc, #40] @ (80145c4 ) 801459a: 4a05 ldr r2, [pc, #20] @ (80145b0 ) 801459c: 601a str r2, [r3, #0] } 801459e: bf00 nop 80145a0: 3708 adds r7, #8 80145a2: 46bd mov sp, r7 80145a4: bd80 pop {r7, pc} 80145a6: bf00 nop 80145a8: 24003d84 .word 0x24003d84 80145ac: 240041e4 .word 0x240041e4 80145b0: 240041f8 .word 0x240041f8 80145b4: 24004214 .word 0x24004214 80145b8: 24004228 .word 0x24004228 80145bc: 24004240 .word 0x24004240 80145c0: 2400420c .word 0x2400420c 80145c4: 24004210 .word 0x24004210 080145c8 : /*-----------------------------------------------------------*/ static void prvCheckTasksWaitingTermination( void ) { 80145c8: b580 push {r7, lr} 80145ca: b082 sub sp, #8 80145cc: 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 ) 80145ce: e019 b.n 8014604 { taskENTER_CRITICAL(); 80145d0: f001 fa12 bl 80159f8 { 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. */ 80145d4: 4b10 ldr r3, [pc, #64] @ (8014618 ) 80145d6: 68db ldr r3, [r3, #12] 80145d8: 68db ldr r3, [r3, #12] 80145da: 607b str r3, [r7, #4] ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 80145dc: 687b ldr r3, [r7, #4] 80145de: 3304 adds r3, #4 80145e0: 4618 mov r0, r3 80145e2: f7fd fcf1 bl 8011fc8 --uxCurrentNumberOfTasks; 80145e6: 4b0d ldr r3, [pc, #52] @ (801461c ) 80145e8: 681b ldr r3, [r3, #0] 80145ea: 3b01 subs r3, #1 80145ec: 4a0b ldr r2, [pc, #44] @ (801461c ) 80145ee: 6013 str r3, [r2, #0] --uxDeletedTasksWaitingCleanUp; 80145f0: 4b0b ldr r3, [pc, #44] @ (8014620 ) 80145f2: 681b ldr r3, [r3, #0] 80145f4: 3b01 subs r3, #1 80145f6: 4a0a ldr r2, [pc, #40] @ (8014620 ) 80145f8: 6013 str r3, [r2, #0] } taskEXIT_CRITICAL(); 80145fa: f001 fa2f bl 8015a5c prvDeleteTCB( pxTCB ); 80145fe: 6878 ldr r0, [r7, #4] 8014600: f000 f810 bl 8014624 while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) 8014604: 4b06 ldr r3, [pc, #24] @ (8014620 ) 8014606: 681b ldr r3, [r3, #0] 8014608: 2b00 cmp r3, #0 801460a: d1e1 bne.n 80145d0 } } #endif /* INCLUDE_vTaskDelete */ } 801460c: bf00 nop 801460e: bf00 nop 8014610: 3708 adds r7, #8 8014612: 46bd mov sp, r7 8014614: bd80 pop {r7, pc} 8014616: bf00 nop 8014618: 24004228 .word 0x24004228 801461c: 24004254 .word 0x24004254 8014620: 2400423c .word 0x2400423c 08014624 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) static void prvDeleteTCB( TCB_t *pxTCB ) { 8014624: b580 push {r7, lr} 8014626: b084 sub sp, #16 8014628: af00 add r7, sp, #0 801462a: 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 ) ); 801462c: 687b ldr r3, [r7, #4] 801462e: 3354 adds r3, #84 @ 0x54 8014630: 4618 mov r0, r3 8014632: f016 faf3 bl 802ac1c <_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 ) 8014636: 687b ldr r3, [r7, #4] 8014638: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 801463c: 2b00 cmp r3, #0 801463e: d108 bne.n 8014652 { /* Both the stack and TCB were allocated dynamically, so both must be freed. */ vPortFree( pxTCB->pxStack ); 8014640: 687b ldr r3, [r7, #4] 8014642: 6b1b ldr r3, [r3, #48] @ 0x30 8014644: 4618 mov r0, r3 8014646: f001 fbc7 bl 8015dd8 vPortFree( pxTCB ); 801464a: 6878 ldr r0, [r7, #4] 801464c: f001 fbc4 bl 8015dd8 configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); mtCOVERAGE_TEST_MARKER(); } } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ } 8014650: e019 b.n 8014686 else if( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_ONLY ) 8014652: 687b ldr r3, [r7, #4] 8014654: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 8014658: 2b01 cmp r3, #1 801465a: d103 bne.n 8014664 vPortFree( pxTCB ); 801465c: 6878 ldr r0, [r7, #4] 801465e: f001 fbbb bl 8015dd8 } 8014662: e010 b.n 8014686 configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); 8014664: 687b ldr r3, [r7, #4] 8014666: f893 30a5 ldrb.w r3, [r3, #165] @ 0xa5 801466a: 2b02 cmp r3, #2 801466c: d00b beq.n 8014686 __asm volatile 801466e: f04f 0350 mov.w r3, #80 @ 0x50 8014672: f383 8811 msr BASEPRI, r3 8014676: f3bf 8f6f isb sy 801467a: f3bf 8f4f dsb sy 801467e: 60fb str r3, [r7, #12] } 8014680: bf00 nop 8014682: bf00 nop 8014684: e7fd b.n 8014682 } 8014686: bf00 nop 8014688: 3710 adds r7, #16 801468a: 46bd mov sp, r7 801468c: bd80 pop {r7, pc} ... 08014690 : #endif /* INCLUDE_vTaskDelete */ /*-----------------------------------------------------------*/ static void prvResetNextTaskUnblockTime( void ) { 8014690: b480 push {r7} 8014692: b083 sub sp, #12 8014694: af00 add r7, sp, #0 TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 8014696: 4b0c ldr r3, [pc, #48] @ (80146c8 ) 8014698: 681b ldr r3, [r3, #0] 801469a: 681b ldr r3, [r3, #0] 801469c: 2b00 cmp r3, #0 801469e: d104 bne.n 80146aa { /* 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; 80146a0: 4b0a ldr r3, [pc, #40] @ (80146cc ) 80146a2: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 80146a6: 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 ) ); } } 80146a8: e008 b.n 80146bc ( 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. */ 80146aa: 4b07 ldr r3, [pc, #28] @ (80146c8 ) 80146ac: 681b ldr r3, [r3, #0] 80146ae: 68db ldr r3, [r3, #12] 80146b0: 68db ldr r3, [r3, #12] 80146b2: 607b str r3, [r7, #4] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) ); 80146b4: 687b ldr r3, [r7, #4] 80146b6: 685b ldr r3, [r3, #4] 80146b8: 4a04 ldr r2, [pc, #16] @ (80146cc ) 80146ba: 6013 str r3, [r2, #0] } 80146bc: bf00 nop 80146be: 370c adds r7, #12 80146c0: 46bd mov sp, r7 80146c2: f85d 7b04 ldr.w r7, [sp], #4 80146c6: 4770 bx lr 80146c8: 2400420c .word 0x2400420c 80146cc: 24004274 .word 0x24004274 080146d0 : /*-----------------------------------------------------------*/ #if ( ( INCLUDE_xTaskGetCurrentTaskHandle == 1 ) || ( configUSE_MUTEXES == 1 ) ) TaskHandle_t xTaskGetCurrentTaskHandle( void ) { 80146d0: b480 push {r7} 80146d2: b083 sub sp, #12 80146d4: 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; 80146d6: 4b05 ldr r3, [pc, #20] @ (80146ec ) 80146d8: 681b ldr r3, [r3, #0] 80146da: 607b str r3, [r7, #4] return xReturn; 80146dc: 687b ldr r3, [r7, #4] } 80146de: 4618 mov r0, r3 80146e0: 370c adds r7, #12 80146e2: 46bd mov sp, r7 80146e4: f85d 7b04 ldr.w r7, [sp], #4 80146e8: 4770 bx lr 80146ea: bf00 nop 80146ec: 24003d80 .word 0x24003d80 080146f0 : /*-----------------------------------------------------------*/ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) BaseType_t xTaskGetSchedulerState( void ) { 80146f0: b480 push {r7} 80146f2: b083 sub sp, #12 80146f4: af00 add r7, sp, #0 BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) 80146f6: 4b0b ldr r3, [pc, #44] @ (8014724 ) 80146f8: 681b ldr r3, [r3, #0] 80146fa: 2b00 cmp r3, #0 80146fc: d102 bne.n 8014704 { xReturn = taskSCHEDULER_NOT_STARTED; 80146fe: 2301 movs r3, #1 8014700: 607b str r3, [r7, #4] 8014702: e008 b.n 8014716 } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8014704: 4b08 ldr r3, [pc, #32] @ (8014728 ) 8014706: 681b ldr r3, [r3, #0] 8014708: 2b00 cmp r3, #0 801470a: d102 bne.n 8014712 { xReturn = taskSCHEDULER_RUNNING; 801470c: 2302 movs r3, #2 801470e: 607b str r3, [r7, #4] 8014710: e001 b.n 8014716 } else { xReturn = taskSCHEDULER_SUSPENDED; 8014712: 2300 movs r3, #0 8014714: 607b str r3, [r7, #4] } } return xReturn; 8014716: 687b ldr r3, [r7, #4] } 8014718: 4618 mov r0, r3 801471a: 370c adds r7, #12 801471c: 46bd mov sp, r7 801471e: f85d 7b04 ldr.w r7, [sp], #4 8014722: 4770 bx lr 8014724: 24004260 .word 0x24004260 8014728: 2400427c .word 0x2400427c 0801472c : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 801472c: b580 push {r7, lr} 801472e: b084 sub sp, #16 8014730: af00 add r7, sp, #0 8014732: 6078 str r0, [r7, #4] TCB_t * const pxMutexHolderTCB = pxMutexHolder; 8014734: 687b ldr r3, [r7, #4] 8014736: 60bb str r3, [r7, #8] BaseType_t xReturn = pdFALSE; 8014738: 2300 movs r3, #0 801473a: 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 ) 801473c: 687b ldr r3, [r7, #4] 801473e: 2b00 cmp r3, #0 8014740: d051 beq.n 80147e6 { /* 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 ) 8014742: 68bb ldr r3, [r7, #8] 8014744: 6ada ldr r2, [r3, #44] @ 0x2c 8014746: 4b2a ldr r3, [pc, #168] @ (80147f0 ) 8014748: 681b ldr r3, [r3, #0] 801474a: 6adb ldr r3, [r3, #44] @ 0x2c 801474c: 429a cmp r2, r3 801474e: d241 bcs.n 80147d4 { /* 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 ) 8014750: 68bb ldr r3, [r7, #8] 8014752: 699b ldr r3, [r3, #24] 8014754: 2b00 cmp r3, #0 8014756: db06 blt.n 8014766 { 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. */ 8014758: 4b25 ldr r3, [pc, #148] @ (80147f0 ) 801475a: 681b ldr r3, [r3, #0] 801475c: 6adb ldr r3, [r3, #44] @ 0x2c 801475e: f1c3 0238 rsb r2, r3, #56 @ 0x38 8014762: 68bb ldr r3, [r7, #8] 8014764: 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 ) 8014766: 68bb ldr r3, [r7, #8] 8014768: 6959 ldr r1, [r3, #20] 801476a: 68bb ldr r3, [r7, #8] 801476c: 6ada ldr r2, [r3, #44] @ 0x2c 801476e: 4613 mov r3, r2 8014770: 009b lsls r3, r3, #2 8014772: 4413 add r3, r2 8014774: 009b lsls r3, r3, #2 8014776: 4a1f ldr r2, [pc, #124] @ (80147f4 ) 8014778: 4413 add r3, r2 801477a: 4299 cmp r1, r3 801477c: d122 bne.n 80147c4 { if( uxListRemove( &( pxMutexHolderTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 801477e: 68bb ldr r3, [r7, #8] 8014780: 3304 adds r3, #4 8014782: 4618 mov r0, r3 8014784: f7fd fc20 bl 8011fc8 { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 8014788: 4b19 ldr r3, [pc, #100] @ (80147f0 ) 801478a: 681b ldr r3, [r3, #0] 801478c: 6ada ldr r2, [r3, #44] @ 0x2c 801478e: 68bb ldr r3, [r7, #8] 8014790: 62da str r2, [r3, #44] @ 0x2c prvAddTaskToReadyList( pxMutexHolderTCB ); 8014792: 68bb ldr r3, [r7, #8] 8014794: 6ada ldr r2, [r3, #44] @ 0x2c 8014796: 4b18 ldr r3, [pc, #96] @ (80147f8 ) 8014798: 681b ldr r3, [r3, #0] 801479a: 429a cmp r2, r3 801479c: d903 bls.n 80147a6 801479e: 68bb ldr r3, [r7, #8] 80147a0: 6adb ldr r3, [r3, #44] @ 0x2c 80147a2: 4a15 ldr r2, [pc, #84] @ (80147f8 ) 80147a4: 6013 str r3, [r2, #0] 80147a6: 68bb ldr r3, [r7, #8] 80147a8: 6ada ldr r2, [r3, #44] @ 0x2c 80147aa: 4613 mov r3, r2 80147ac: 009b lsls r3, r3, #2 80147ae: 4413 add r3, r2 80147b0: 009b lsls r3, r3, #2 80147b2: 4a10 ldr r2, [pc, #64] @ (80147f4 ) 80147b4: 441a add r2, r3 80147b6: 68bb ldr r3, [r7, #8] 80147b8: 3304 adds r3, #4 80147ba: 4619 mov r1, r3 80147bc: 4610 mov r0, r2 80147be: f7fd fba6 bl 8011f0e 80147c2: e004 b.n 80147ce } else { /* Just inherit the priority. */ pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; 80147c4: 4b0a ldr r3, [pc, #40] @ (80147f0 ) 80147c6: 681b ldr r3, [r3, #0] 80147c8: 6ada ldr r2, [r3, #44] @ 0x2c 80147ca: 68bb ldr r3, [r7, #8] 80147cc: 62da str r2, [r3, #44] @ 0x2c } traceTASK_PRIORITY_INHERIT( pxMutexHolderTCB, pxCurrentTCB->uxPriority ); /* Inheritance occurred. */ xReturn = pdTRUE; 80147ce: 2301 movs r3, #1 80147d0: 60fb str r3, [r7, #12] 80147d2: e008 b.n 80147e6 } else { if( pxMutexHolderTCB->uxBasePriority < pxCurrentTCB->uxPriority ) 80147d4: 68bb ldr r3, [r7, #8] 80147d6: 6cda ldr r2, [r3, #76] @ 0x4c 80147d8: 4b05 ldr r3, [pc, #20] @ (80147f0 ) 80147da: 681b ldr r3, [r3, #0] 80147dc: 6adb ldr r3, [r3, #44] @ 0x2c 80147de: 429a cmp r2, r3 80147e0: d201 bcs.n 80147e6 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; 80147e2: 2301 movs r3, #1 80147e4: 60fb str r3, [r7, #12] else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 80147e6: 68fb ldr r3, [r7, #12] } 80147e8: 4618 mov r0, r3 80147ea: 3710 adds r7, #16 80147ec: 46bd mov sp, r7 80147ee: bd80 pop {r7, pc} 80147f0: 24003d80 .word 0x24003d80 80147f4: 24003d84 .word 0x24003d84 80147f8: 2400425c .word 0x2400425c 080147fc : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 80147fc: b580 push {r7, lr} 80147fe: b086 sub sp, #24 8014800: af00 add r7, sp, #0 8014802: 6078 str r0, [r7, #4] TCB_t * const pxTCB = pxMutexHolder; 8014804: 687b ldr r3, [r7, #4] 8014806: 613b str r3, [r7, #16] BaseType_t xReturn = pdFALSE; 8014808: 2300 movs r3, #0 801480a: 617b str r3, [r7, #20] if( pxMutexHolder != NULL ) 801480c: 687b ldr r3, [r7, #4] 801480e: 2b00 cmp r3, #0 8014810: d058 beq.n 80148c4 { /* 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 ); 8014812: 4b2f ldr r3, [pc, #188] @ (80148d0 ) 8014814: 681b ldr r3, [r3, #0] 8014816: 693a ldr r2, [r7, #16] 8014818: 429a cmp r2, r3 801481a: d00b beq.n 8014834 __asm volatile 801481c: f04f 0350 mov.w r3, #80 @ 0x50 8014820: f383 8811 msr BASEPRI, r3 8014824: f3bf 8f6f isb sy 8014828: f3bf 8f4f dsb sy 801482c: 60fb str r3, [r7, #12] } 801482e: bf00 nop 8014830: bf00 nop 8014832: e7fd b.n 8014830 configASSERT( pxTCB->uxMutexesHeld ); 8014834: 693b ldr r3, [r7, #16] 8014836: 6d1b ldr r3, [r3, #80] @ 0x50 8014838: 2b00 cmp r3, #0 801483a: d10b bne.n 8014854 __asm volatile 801483c: f04f 0350 mov.w r3, #80 @ 0x50 8014840: f383 8811 msr BASEPRI, r3 8014844: f3bf 8f6f isb sy 8014848: f3bf 8f4f dsb sy 801484c: 60bb str r3, [r7, #8] } 801484e: bf00 nop 8014850: bf00 nop 8014852: e7fd b.n 8014850 ( pxTCB->uxMutexesHeld )--; 8014854: 693b ldr r3, [r7, #16] 8014856: 6d1b ldr r3, [r3, #80] @ 0x50 8014858: 1e5a subs r2, r3, #1 801485a: 693b ldr r3, [r7, #16] 801485c: 651a str r2, [r3, #80] @ 0x50 /* Has the holder of the mutex inherited the priority of another task? */ if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 801485e: 693b ldr r3, [r7, #16] 8014860: 6ada ldr r2, [r3, #44] @ 0x2c 8014862: 693b ldr r3, [r7, #16] 8014864: 6cdb ldr r3, [r3, #76] @ 0x4c 8014866: 429a cmp r2, r3 8014868: d02c beq.n 80148c4 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 801486a: 693b ldr r3, [r7, #16] 801486c: 6d1b ldr r3, [r3, #80] @ 0x50 801486e: 2b00 cmp r3, #0 8014870: d128 bne.n 80148c4 /* 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 ) 8014872: 693b ldr r3, [r7, #16] 8014874: 3304 adds r3, #4 8014876: 4618 mov r0, r3 8014878: f7fd fba6 bl 8011fc8 } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 801487c: 693b ldr r3, [r7, #16] 801487e: 6cda ldr r2, [r3, #76] @ 0x4c 8014880: 693b ldr r3, [r7, #16] 8014882: 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. */ 8014884: 693b ldr r3, [r7, #16] 8014886: 6adb ldr r3, [r3, #44] @ 0x2c 8014888: f1c3 0238 rsb r2, r3, #56 @ 0x38 801488c: 693b ldr r3, [r7, #16] 801488e: 619a str r2, [r3, #24] prvAddTaskToReadyList( pxTCB ); 8014890: 693b ldr r3, [r7, #16] 8014892: 6ada ldr r2, [r3, #44] @ 0x2c 8014894: 4b0f ldr r3, [pc, #60] @ (80148d4 ) 8014896: 681b ldr r3, [r3, #0] 8014898: 429a cmp r2, r3 801489a: d903 bls.n 80148a4 801489c: 693b ldr r3, [r7, #16] 801489e: 6adb ldr r3, [r3, #44] @ 0x2c 80148a0: 4a0c ldr r2, [pc, #48] @ (80148d4 ) 80148a2: 6013 str r3, [r2, #0] 80148a4: 693b ldr r3, [r7, #16] 80148a6: 6ada ldr r2, [r3, #44] @ 0x2c 80148a8: 4613 mov r3, r2 80148aa: 009b lsls r3, r3, #2 80148ac: 4413 add r3, r2 80148ae: 009b lsls r3, r3, #2 80148b0: 4a09 ldr r2, [pc, #36] @ (80148d8 ) 80148b2: 441a add r2, r3 80148b4: 693b ldr r3, [r7, #16] 80148b6: 3304 adds r3, #4 80148b8: 4619 mov r1, r3 80148ba: 4610 mov r0, r2 80148bc: f7fd fb27 bl 8011f0e 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; 80148c0: 2301 movs r3, #1 80148c2: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 80148c4: 697b ldr r3, [r7, #20] } 80148c6: 4618 mov r0, r3 80148c8: 3718 adds r7, #24 80148ca: 46bd mov sp, r7 80148cc: bd80 pop {r7, pc} 80148ce: bf00 nop 80148d0: 24003d80 .word 0x24003d80 80148d4: 2400425c .word 0x2400425c 80148d8: 24003d84 .word 0x24003d84 080148dc : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityDisinheritAfterTimeout( TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask ) { 80148dc: b580 push {r7, lr} 80148de: b088 sub sp, #32 80148e0: af00 add r7, sp, #0 80148e2: 6078 str r0, [r7, #4] 80148e4: 6039 str r1, [r7, #0] TCB_t * const pxTCB = pxMutexHolder; 80148e6: 687b ldr r3, [r7, #4] 80148e8: 61bb str r3, [r7, #24] UBaseType_t uxPriorityUsedOnEntry, uxPriorityToUse; const UBaseType_t uxOnlyOneMutexHeld = ( UBaseType_t ) 1; 80148ea: 2301 movs r3, #1 80148ec: 617b str r3, [r7, #20] if( pxMutexHolder != NULL ) 80148ee: 687b ldr r3, [r7, #4] 80148f0: 2b00 cmp r3, #0 80148f2: d06c beq.n 80149ce { /* If pxMutexHolder is not NULL then the holder must hold at least one mutex. */ configASSERT( pxTCB->uxMutexesHeld ); 80148f4: 69bb ldr r3, [r7, #24] 80148f6: 6d1b ldr r3, [r3, #80] @ 0x50 80148f8: 2b00 cmp r3, #0 80148fa: d10b bne.n 8014914 __asm volatile 80148fc: f04f 0350 mov.w r3, #80 @ 0x50 8014900: f383 8811 msr BASEPRI, r3 8014904: f3bf 8f6f isb sy 8014908: f3bf 8f4f dsb sy 801490c: 60fb str r3, [r7, #12] } 801490e: bf00 nop 8014910: bf00 nop 8014912: e7fd b.n 8014910 /* 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 ) 8014914: 69bb ldr r3, [r7, #24] 8014916: 6cdb ldr r3, [r3, #76] @ 0x4c 8014918: 683a ldr r2, [r7, #0] 801491a: 429a cmp r2, r3 801491c: d902 bls.n 8014924 { uxPriorityToUse = uxHighestPriorityWaitingTask; 801491e: 683b ldr r3, [r7, #0] 8014920: 61fb str r3, [r7, #28] 8014922: e002 b.n 801492a } else { uxPriorityToUse = pxTCB->uxBasePriority; 8014924: 69bb ldr r3, [r7, #24] 8014926: 6cdb ldr r3, [r3, #76] @ 0x4c 8014928: 61fb str r3, [r7, #28] } /* Does the priority need to change? */ if( pxTCB->uxPriority != uxPriorityToUse ) 801492a: 69bb ldr r3, [r7, #24] 801492c: 6adb ldr r3, [r3, #44] @ 0x2c 801492e: 69fa ldr r2, [r7, #28] 8014930: 429a cmp r2, r3 8014932: d04c beq.n 80149ce { /* 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 ) 8014934: 69bb ldr r3, [r7, #24] 8014936: 6d1b ldr r3, [r3, #80] @ 0x50 8014938: 697a ldr r2, [r7, #20] 801493a: 429a cmp r2, r3 801493c: d147 bne.n 80149ce { /* 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 ); 801493e: 4b26 ldr r3, [pc, #152] @ (80149d8 ) 8014940: 681b ldr r3, [r3, #0] 8014942: 69ba ldr r2, [r7, #24] 8014944: 429a cmp r2, r3 8014946: d10b bne.n 8014960 __asm volatile 8014948: f04f 0350 mov.w r3, #80 @ 0x50 801494c: f383 8811 msr BASEPRI, r3 8014950: f3bf 8f6f isb sy 8014954: f3bf 8f4f dsb sy 8014958: 60bb str r3, [r7, #8] } 801495a: bf00 nop 801495c: bf00 nop 801495e: e7fd b.n 801495c /* Disinherit the priority, remembering the previous priority to facilitate determining the subject task's state. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); uxPriorityUsedOnEntry = pxTCB->uxPriority; 8014960: 69bb ldr r3, [r7, #24] 8014962: 6adb ldr r3, [r3, #44] @ 0x2c 8014964: 613b str r3, [r7, #16] pxTCB->uxPriority = uxPriorityToUse; 8014966: 69bb ldr r3, [r7, #24] 8014968: 69fa ldr r2, [r7, #28] 801496a: 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 ) 801496c: 69bb ldr r3, [r7, #24] 801496e: 699b ldr r3, [r3, #24] 8014970: 2b00 cmp r3, #0 8014972: db04 blt.n 801497e { 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. */ 8014974: 69fb ldr r3, [r7, #28] 8014976: f1c3 0238 rsb r2, r3, #56 @ 0x38 801497a: 69bb ldr r3, [r7, #24] 801497c: 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 ) 801497e: 69bb ldr r3, [r7, #24] 8014980: 6959 ldr r1, [r3, #20] 8014982: 693a ldr r2, [r7, #16] 8014984: 4613 mov r3, r2 8014986: 009b lsls r3, r3, #2 8014988: 4413 add r3, r2 801498a: 009b lsls r3, r3, #2 801498c: 4a13 ldr r2, [pc, #76] @ (80149dc ) 801498e: 4413 add r3, r2 8014990: 4299 cmp r1, r3 8014992: d11c bne.n 80149ce { if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) 8014994: 69bb ldr r3, [r7, #24] 8014996: 3304 adds r3, #4 8014998: 4618 mov r0, r3 801499a: f7fd fb15 bl 8011fc8 else { mtCOVERAGE_TEST_MARKER(); } prvAddTaskToReadyList( pxTCB ); 801499e: 69bb ldr r3, [r7, #24] 80149a0: 6ada ldr r2, [r3, #44] @ 0x2c 80149a2: 4b0f ldr r3, [pc, #60] @ (80149e0 ) 80149a4: 681b ldr r3, [r3, #0] 80149a6: 429a cmp r2, r3 80149a8: d903 bls.n 80149b2 80149aa: 69bb ldr r3, [r7, #24] 80149ac: 6adb ldr r3, [r3, #44] @ 0x2c 80149ae: 4a0c ldr r2, [pc, #48] @ (80149e0 ) 80149b0: 6013 str r3, [r2, #0] 80149b2: 69bb ldr r3, [r7, #24] 80149b4: 6ada ldr r2, [r3, #44] @ 0x2c 80149b6: 4613 mov r3, r2 80149b8: 009b lsls r3, r3, #2 80149ba: 4413 add r3, r2 80149bc: 009b lsls r3, r3, #2 80149be: 4a07 ldr r2, [pc, #28] @ (80149dc ) 80149c0: 441a add r2, r3 80149c2: 69bb ldr r3, [r7, #24] 80149c4: 3304 adds r3, #4 80149c6: 4619 mov r1, r3 80149c8: 4610 mov r0, r2 80149ca: f7fd faa0 bl 8011f0e } else { mtCOVERAGE_TEST_MARKER(); } } 80149ce: bf00 nop 80149d0: 3720 adds r7, #32 80149d2: 46bd mov sp, r7 80149d4: bd80 pop {r7, pc} 80149d6: bf00 nop 80149d8: 24003d80 .word 0x24003d80 80149dc: 24003d84 .word 0x24003d84 80149e0: 2400425c .word 0x2400425c 080149e4 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) TaskHandle_t pvTaskIncrementMutexHeldCount( void ) { 80149e4: b480 push {r7} 80149e6: af00 add r7, sp, #0 /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 80149e8: 4b07 ldr r3, [pc, #28] @ (8014a08 ) 80149ea: 681b ldr r3, [r3, #0] 80149ec: 2b00 cmp r3, #0 80149ee: d004 beq.n 80149fa { ( pxCurrentTCB->uxMutexesHeld )++; 80149f0: 4b05 ldr r3, [pc, #20] @ (8014a08 ) 80149f2: 681b ldr r3, [r3, #0] 80149f4: 6d1a ldr r2, [r3, #80] @ 0x50 80149f6: 3201 adds r2, #1 80149f8: 651a str r2, [r3, #80] @ 0x50 } return pxCurrentTCB; 80149fa: 4b03 ldr r3, [pc, #12] @ (8014a08 ) 80149fc: 681b ldr r3, [r3, #0] } 80149fe: 4618 mov r0, r3 8014a00: 46bd mov sp, r7 8014a02: f85d 7b04 ldr.w r7, [sp], #4 8014a06: 4770 bx lr 8014a08: 24003d80 .word 0x24003d80 08014a0c : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskNotifyWait( uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait ) { 8014a0c: b580 push {r7, lr} 8014a0e: b086 sub sp, #24 8014a10: af00 add r7, sp, #0 8014a12: 60f8 str r0, [r7, #12] 8014a14: 60b9 str r1, [r7, #8] 8014a16: 607a str r2, [r7, #4] 8014a18: 603b str r3, [r7, #0] BaseType_t xReturn; taskENTER_CRITICAL(); 8014a1a: f000 ffed bl 80159f8 { /* Only block if a notification is not already pending. */ if( pxCurrentTCB->ucNotifyState != taskNOTIFICATION_RECEIVED ) 8014a1e: 4b29 ldr r3, [pc, #164] @ (8014ac4 ) 8014a20: 681b ldr r3, [r3, #0] 8014a22: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014a26: b2db uxtb r3, r3 8014a28: 2b02 cmp r3, #2 8014a2a: d01c beq.n 8014a66 { /* 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; 8014a2c: 4b25 ldr r3, [pc, #148] @ (8014ac4 ) 8014a2e: 681b ldr r3, [r3, #0] 8014a30: f8d3 10a0 ldr.w r1, [r3, #160] @ 0xa0 8014a34: 68fa ldr r2, [r7, #12] 8014a36: 43d2 mvns r2, r2 8014a38: 400a ands r2, r1 8014a3a: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 /* Mark this task as waiting for a notification. */ pxCurrentTCB->ucNotifyState = taskWAITING_NOTIFICATION; 8014a3e: 4b21 ldr r3, [pc, #132] @ (8014ac4 ) 8014a40: 681b ldr r3, [r3, #0] 8014a42: 2201 movs r2, #1 8014a44: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 if( xTicksToWait > ( TickType_t ) 0 ) 8014a48: 683b ldr r3, [r7, #0] 8014a4a: 2b00 cmp r3, #0 8014a4c: d00b beq.n 8014a66 { prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); 8014a4e: 2101 movs r1, #1 8014a50: 6838 ldr r0, [r7, #0] 8014a52: f000 fa09 bl 8014e68 /* 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(); 8014a56: 4b1c ldr r3, [pc, #112] @ (8014ac8 ) 8014a58: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014a5c: 601a str r2, [r3, #0] 8014a5e: f3bf 8f4f dsb sy 8014a62: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8014a66: f000 fff9 bl 8015a5c taskENTER_CRITICAL(); 8014a6a: f000 ffc5 bl 80159f8 { traceTASK_NOTIFY_WAIT(); if( pulNotificationValue != NULL ) 8014a6e: 687b ldr r3, [r7, #4] 8014a70: 2b00 cmp r3, #0 8014a72: d005 beq.n 8014a80 { /* Output the current notification value, which may or may not have changed. */ *pulNotificationValue = pxCurrentTCB->ulNotifiedValue; 8014a74: 4b13 ldr r3, [pc, #76] @ (8014ac4 ) 8014a76: 681b ldr r3, [r3, #0] 8014a78: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014a7c: 687b ldr r3, [r7, #4] 8014a7e: 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 ) 8014a80: 4b10 ldr r3, [pc, #64] @ (8014ac4 ) 8014a82: 681b ldr r3, [r3, #0] 8014a84: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014a88: b2db uxtb r3, r3 8014a8a: 2b02 cmp r3, #2 8014a8c: d002 beq.n 8014a94 { /* A notification was not received. */ xReturn = pdFALSE; 8014a8e: 2300 movs r3, #0 8014a90: 617b str r3, [r7, #20] 8014a92: e00a b.n 8014aaa } else { /* A notification was already pending or a notification was received while the task was waiting. */ pxCurrentTCB->ulNotifiedValue &= ~ulBitsToClearOnExit; 8014a94: 4b0b ldr r3, [pc, #44] @ (8014ac4 ) 8014a96: 681b ldr r3, [r3, #0] 8014a98: f8d3 10a0 ldr.w r1, [r3, #160] @ 0xa0 8014a9c: 68ba ldr r2, [r7, #8] 8014a9e: 43d2 mvns r2, r2 8014aa0: 400a ands r2, r1 8014aa2: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 xReturn = pdTRUE; 8014aa6: 2301 movs r3, #1 8014aa8: 617b str r3, [r7, #20] } pxCurrentTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8014aaa: 4b06 ldr r3, [pc, #24] @ (8014ac4 ) 8014aac: 681b ldr r3, [r3, #0] 8014aae: 2200 movs r2, #0 8014ab0: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 } taskEXIT_CRITICAL(); 8014ab4: f000 ffd2 bl 8015a5c return xReturn; 8014ab8: 697b ldr r3, [r7, #20] } 8014aba: 4618 mov r0, r3 8014abc: 3718 adds r7, #24 8014abe: 46bd mov sp, r7 8014ac0: bd80 pop {r7, pc} 8014ac2: bf00 nop 8014ac4: 24003d80 .word 0x24003d80 8014ac8: e000ed04 .word 0xe000ed04 08014acc : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue ) { 8014acc: b580 push {r7, lr} 8014ace: b08a sub sp, #40 @ 0x28 8014ad0: af00 add r7, sp, #0 8014ad2: 60f8 str r0, [r7, #12] 8014ad4: 60b9 str r1, [r7, #8] 8014ad6: 603b str r3, [r7, #0] 8014ad8: 4613 mov r3, r2 8014ada: 71fb strb r3, [r7, #7] TCB_t * pxTCB; BaseType_t xReturn = pdPASS; 8014adc: 2301 movs r3, #1 8014ade: 627b str r3, [r7, #36] @ 0x24 uint8_t ucOriginalNotifyState; configASSERT( xTaskToNotify ); 8014ae0: 68fb ldr r3, [r7, #12] 8014ae2: 2b00 cmp r3, #0 8014ae4: d10b bne.n 8014afe __asm volatile 8014ae6: f04f 0350 mov.w r3, #80 @ 0x50 8014aea: f383 8811 msr BASEPRI, r3 8014aee: f3bf 8f6f isb sy 8014af2: f3bf 8f4f dsb sy 8014af6: 61bb str r3, [r7, #24] } 8014af8: bf00 nop 8014afa: bf00 nop 8014afc: e7fd b.n 8014afa pxTCB = xTaskToNotify; 8014afe: 68fb ldr r3, [r7, #12] 8014b00: 623b str r3, [r7, #32] taskENTER_CRITICAL(); 8014b02: f000 ff79 bl 80159f8 { if( pulPreviousNotificationValue != NULL ) 8014b06: 683b ldr r3, [r7, #0] 8014b08: 2b00 cmp r3, #0 8014b0a: d004 beq.n 8014b16 { *pulPreviousNotificationValue = pxTCB->ulNotifiedValue; 8014b0c: 6a3b ldr r3, [r7, #32] 8014b0e: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014b12: 683b ldr r3, [r7, #0] 8014b14: 601a str r2, [r3, #0] } ucOriginalNotifyState = pxTCB->ucNotifyState; 8014b16: 6a3b ldr r3, [r7, #32] 8014b18: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014b1c: 77fb strb r3, [r7, #31] pxTCB->ucNotifyState = taskNOTIFICATION_RECEIVED; 8014b1e: 6a3b ldr r3, [r7, #32] 8014b20: 2202 movs r2, #2 8014b22: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 switch( eAction ) 8014b26: 79fb ldrb r3, [r7, #7] 8014b28: 2b04 cmp r3, #4 8014b2a: d82e bhi.n 8014b8a 8014b2c: a201 add r2, pc, #4 @ (adr r2, 8014b34 ) 8014b2e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8014b32: bf00 nop 8014b34: 08014baf .word 0x08014baf 8014b38: 08014b49 .word 0x08014b49 8014b3c: 08014b5b .word 0x08014b5b 8014b40: 08014b6b .word 0x08014b6b 8014b44: 08014b75 .word 0x08014b75 { case eSetBits : pxTCB->ulNotifiedValue |= ulValue; 8014b48: 6a3b ldr r3, [r7, #32] 8014b4a: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014b4e: 68bb ldr r3, [r7, #8] 8014b50: 431a orrs r2, r3 8014b52: 6a3b ldr r3, [r7, #32] 8014b54: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014b58: e02c b.n 8014bb4 case eIncrement : ( pxTCB->ulNotifiedValue )++; 8014b5a: 6a3b ldr r3, [r7, #32] 8014b5c: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014b60: 1c5a adds r2, r3, #1 8014b62: 6a3b ldr r3, [r7, #32] 8014b64: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014b68: e024 b.n 8014bb4 case eSetValueWithOverwrite : pxTCB->ulNotifiedValue = ulValue; 8014b6a: 6a3b ldr r3, [r7, #32] 8014b6c: 68ba ldr r2, [r7, #8] 8014b6e: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014b72: e01f b.n 8014bb4 case eSetValueWithoutOverwrite : if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) 8014b74: 7ffb ldrb r3, [r7, #31] 8014b76: 2b02 cmp r3, #2 8014b78: d004 beq.n 8014b84 { pxTCB->ulNotifiedValue = ulValue; 8014b7a: 6a3b ldr r3, [r7, #32] 8014b7c: 68ba ldr r2, [r7, #8] 8014b7e: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 else { /* The value could not be written to the task. */ xReturn = pdFAIL; } break; 8014b82: e017 b.n 8014bb4 xReturn = pdFAIL; 8014b84: 2300 movs r3, #0 8014b86: 627b str r3, [r7, #36] @ 0x24 break; 8014b88: e014 b.n 8014bb4 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 ); 8014b8a: 6a3b ldr r3, [r7, #32] 8014b8c: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014b90: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014b94: d00d beq.n 8014bb2 __asm volatile 8014b96: f04f 0350 mov.w r3, #80 @ 0x50 8014b9a: f383 8811 msr BASEPRI, r3 8014b9e: f3bf 8f6f isb sy 8014ba2: f3bf 8f4f dsb sy 8014ba6: 617b str r3, [r7, #20] } 8014ba8: bf00 nop 8014baa: bf00 nop 8014bac: e7fd b.n 8014baa break; 8014bae: bf00 nop 8014bb0: e000 b.n 8014bb4 break; 8014bb2: 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 ) 8014bb4: 7ffb ldrb r3, [r7, #31] 8014bb6: 2b01 cmp r3, #1 8014bb8: d13b bne.n 8014c32 { ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8014bba: 6a3b ldr r3, [r7, #32] 8014bbc: 3304 adds r3, #4 8014bbe: 4618 mov r0, r3 8014bc0: f7fd fa02 bl 8011fc8 prvAddTaskToReadyList( pxTCB ); 8014bc4: 6a3b ldr r3, [r7, #32] 8014bc6: 6ada ldr r2, [r3, #44] @ 0x2c 8014bc8: 4b1d ldr r3, [pc, #116] @ (8014c40 ) 8014bca: 681b ldr r3, [r3, #0] 8014bcc: 429a cmp r2, r3 8014bce: d903 bls.n 8014bd8 8014bd0: 6a3b ldr r3, [r7, #32] 8014bd2: 6adb ldr r3, [r3, #44] @ 0x2c 8014bd4: 4a1a ldr r2, [pc, #104] @ (8014c40 ) 8014bd6: 6013 str r3, [r2, #0] 8014bd8: 6a3b ldr r3, [r7, #32] 8014bda: 6ada ldr r2, [r3, #44] @ 0x2c 8014bdc: 4613 mov r3, r2 8014bde: 009b lsls r3, r3, #2 8014be0: 4413 add r3, r2 8014be2: 009b lsls r3, r3, #2 8014be4: 4a17 ldr r2, [pc, #92] @ (8014c44 ) 8014be6: 441a add r2, r3 8014be8: 6a3b ldr r3, [r7, #32] 8014bea: 3304 adds r3, #4 8014bec: 4619 mov r1, r3 8014bee: 4610 mov r0, r2 8014bf0: f7fd f98d bl 8011f0e /* The task should not have been on an event list. */ configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); 8014bf4: 6a3b ldr r3, [r7, #32] 8014bf6: 6a9b ldr r3, [r3, #40] @ 0x28 8014bf8: 2b00 cmp r3, #0 8014bfa: d00b beq.n 8014c14 __asm volatile 8014bfc: f04f 0350 mov.w r3, #80 @ 0x50 8014c00: f383 8811 msr BASEPRI, r3 8014c04: f3bf 8f6f isb sy 8014c08: f3bf 8f4f dsb sy 8014c0c: 613b str r3, [r7, #16] } 8014c0e: bf00 nop 8014c10: bf00 nop 8014c12: e7fd b.n 8014c10 earliest possible time. */ prvResetNextTaskUnblockTime(); } #endif if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) 8014c14: 6a3b ldr r3, [r7, #32] 8014c16: 6ada ldr r2, [r3, #44] @ 0x2c 8014c18: 4b0b ldr r3, [pc, #44] @ (8014c48 ) 8014c1a: 681b ldr r3, [r3, #0] 8014c1c: 6adb ldr r3, [r3, #44] @ 0x2c 8014c1e: 429a cmp r2, r3 8014c20: d907 bls.n 8014c32 { /* The notified task has a priority above the currently executing task so a yield is required. */ taskYIELD_IF_USING_PREEMPTION(); 8014c22: 4b0a ldr r3, [pc, #40] @ (8014c4c ) 8014c24: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8014c28: 601a str r2, [r3, #0] 8014c2a: f3bf 8f4f dsb sy 8014c2e: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8014c32: f000 ff13 bl 8015a5c return xReturn; 8014c36: 6a7b ldr r3, [r7, #36] @ 0x24 } 8014c38: 4618 mov r0, r3 8014c3a: 3728 adds r7, #40 @ 0x28 8014c3c: 46bd mov sp, r7 8014c3e: bd80 pop {r7, pc} 8014c40: 2400425c .word 0x2400425c 8014c44: 24003d84 .word 0x24003d84 8014c48: 24003d80 .word 0x24003d80 8014c4c: e000ed04 .word 0xe000ed04 08014c50 : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken ) { 8014c50: b580 push {r7, lr} 8014c52: b08e sub sp, #56 @ 0x38 8014c54: af00 add r7, sp, #0 8014c56: 60f8 str r0, [r7, #12] 8014c58: 60b9 str r1, [r7, #8] 8014c5a: 603b str r3, [r7, #0] 8014c5c: 4613 mov r3, r2 8014c5e: 71fb strb r3, [r7, #7] TCB_t * pxTCB; uint8_t ucOriginalNotifyState; BaseType_t xReturn = pdPASS; 8014c60: 2301 movs r3, #1 8014c62: 637b str r3, [r7, #52] @ 0x34 UBaseType_t uxSavedInterruptStatus; configASSERT( xTaskToNotify ); 8014c64: 68fb ldr r3, [r7, #12] 8014c66: 2b00 cmp r3, #0 8014c68: d10b bne.n 8014c82 __asm volatile 8014c6a: f04f 0350 mov.w r3, #80 @ 0x50 8014c6e: f383 8811 msr BASEPRI, r3 8014c72: f3bf 8f6f isb sy 8014c76: f3bf 8f4f dsb sy 8014c7a: 627b str r3, [r7, #36] @ 0x24 } 8014c7c: bf00 nop 8014c7e: bf00 nop 8014c80: e7fd b.n 8014c7e 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(); 8014c82: f000 ff99 bl 8015bb8 pxTCB = xTaskToNotify; 8014c86: 68fb ldr r3, [r7, #12] 8014c88: 633b str r3, [r7, #48] @ 0x30 __asm volatile 8014c8a: f3ef 8211 mrs r2, BASEPRI 8014c8e: f04f 0350 mov.w r3, #80 @ 0x50 8014c92: f383 8811 msr BASEPRI, r3 8014c96: f3bf 8f6f isb sy 8014c9a: f3bf 8f4f dsb sy 8014c9e: 623a str r2, [r7, #32] 8014ca0: 61fb str r3, [r7, #28] return ulOriginalBASEPRI; 8014ca2: 6a3b ldr r3, [r7, #32] uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 8014ca4: 62fb str r3, [r7, #44] @ 0x2c { if( pulPreviousNotificationValue != NULL ) 8014ca6: 683b ldr r3, [r7, #0] 8014ca8: 2b00 cmp r3, #0 8014caa: d004 beq.n 8014cb6 { *pulPreviousNotificationValue = pxTCB->ulNotifiedValue; 8014cac: 6b3b ldr r3, [r7, #48] @ 0x30 8014cae: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014cb2: 683b ldr r3, [r7, #0] 8014cb4: 601a str r2, [r3, #0] } ucOriginalNotifyState = pxTCB->ucNotifyState; 8014cb6: 6b3b ldr r3, [r7, #48] @ 0x30 8014cb8: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014cbc: f887 302b strb.w r3, [r7, #43] @ 0x2b pxTCB->ucNotifyState = taskNOTIFICATION_RECEIVED; 8014cc0: 6b3b ldr r3, [r7, #48] @ 0x30 8014cc2: 2202 movs r2, #2 8014cc4: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 switch( eAction ) 8014cc8: 79fb ldrb r3, [r7, #7] 8014cca: 2b04 cmp r3, #4 8014ccc: d82e bhi.n 8014d2c 8014cce: a201 add r2, pc, #4 @ (adr r2, 8014cd4 ) 8014cd0: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8014cd4: 08014d51 .word 0x08014d51 8014cd8: 08014ce9 .word 0x08014ce9 8014cdc: 08014cfb .word 0x08014cfb 8014ce0: 08014d0b .word 0x08014d0b 8014ce4: 08014d15 .word 0x08014d15 { case eSetBits : pxTCB->ulNotifiedValue |= ulValue; 8014ce8: 6b3b ldr r3, [r7, #48] @ 0x30 8014cea: f8d3 20a0 ldr.w r2, [r3, #160] @ 0xa0 8014cee: 68bb ldr r3, [r7, #8] 8014cf0: 431a orrs r2, r3 8014cf2: 6b3b ldr r3, [r7, #48] @ 0x30 8014cf4: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014cf8: e02d b.n 8014d56 case eIncrement : ( pxTCB->ulNotifiedValue )++; 8014cfa: 6b3b ldr r3, [r7, #48] @ 0x30 8014cfc: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014d00: 1c5a adds r2, r3, #1 8014d02: 6b3b ldr r3, [r7, #48] @ 0x30 8014d04: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014d08: e025 b.n 8014d56 case eSetValueWithOverwrite : pxTCB->ulNotifiedValue = ulValue; 8014d0a: 6b3b ldr r3, [r7, #48] @ 0x30 8014d0c: 68ba ldr r2, [r7, #8] 8014d0e: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 break; 8014d12: e020 b.n 8014d56 case eSetValueWithoutOverwrite : if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) 8014d14: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8014d18: 2b02 cmp r3, #2 8014d1a: d004 beq.n 8014d26 { pxTCB->ulNotifiedValue = ulValue; 8014d1c: 6b3b ldr r3, [r7, #48] @ 0x30 8014d1e: 68ba ldr r2, [r7, #8] 8014d20: f8c3 20a0 str.w r2, [r3, #160] @ 0xa0 else { /* The value could not be written to the task. */ xReturn = pdFAIL; } break; 8014d24: e017 b.n 8014d56 xReturn = pdFAIL; 8014d26: 2300 movs r3, #0 8014d28: 637b str r3, [r7, #52] @ 0x34 break; 8014d2a: e014 b.n 8014d56 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 ); 8014d2c: 6b3b ldr r3, [r7, #48] @ 0x30 8014d2e: f8d3 30a0 ldr.w r3, [r3, #160] @ 0xa0 8014d32: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014d36: d00d beq.n 8014d54 __asm volatile 8014d38: f04f 0350 mov.w r3, #80 @ 0x50 8014d3c: f383 8811 msr BASEPRI, r3 8014d40: f3bf 8f6f isb sy 8014d44: f3bf 8f4f dsb sy 8014d48: 61bb str r3, [r7, #24] } 8014d4a: bf00 nop 8014d4c: bf00 nop 8014d4e: e7fd b.n 8014d4c break; 8014d50: bf00 nop 8014d52: e000 b.n 8014d56 break; 8014d54: 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 ) 8014d56: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8014d5a: 2b01 cmp r3, #1 8014d5c: d147 bne.n 8014dee { /* The task should not have been on an event list. */ configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); 8014d5e: 6b3b ldr r3, [r7, #48] @ 0x30 8014d60: 6a9b ldr r3, [r3, #40] @ 0x28 8014d62: 2b00 cmp r3, #0 8014d64: d00b beq.n 8014d7e __asm volatile 8014d66: f04f 0350 mov.w r3, #80 @ 0x50 8014d6a: f383 8811 msr BASEPRI, r3 8014d6e: f3bf 8f6f isb sy 8014d72: f3bf 8f4f dsb sy 8014d76: 617b str r3, [r7, #20] } 8014d78: bf00 nop 8014d7a: bf00 nop 8014d7c: e7fd b.n 8014d7a if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8014d7e: 4b21 ldr r3, [pc, #132] @ (8014e04 ) 8014d80: 681b ldr r3, [r3, #0] 8014d82: 2b00 cmp r3, #0 8014d84: d11d bne.n 8014dc2 { ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); 8014d86: 6b3b ldr r3, [r7, #48] @ 0x30 8014d88: 3304 adds r3, #4 8014d8a: 4618 mov r0, r3 8014d8c: f7fd f91c bl 8011fc8 prvAddTaskToReadyList( pxTCB ); 8014d90: 6b3b ldr r3, [r7, #48] @ 0x30 8014d92: 6ada ldr r2, [r3, #44] @ 0x2c 8014d94: 4b1c ldr r3, [pc, #112] @ (8014e08 ) 8014d96: 681b ldr r3, [r3, #0] 8014d98: 429a cmp r2, r3 8014d9a: d903 bls.n 8014da4 8014d9c: 6b3b ldr r3, [r7, #48] @ 0x30 8014d9e: 6adb ldr r3, [r3, #44] @ 0x2c 8014da0: 4a19 ldr r2, [pc, #100] @ (8014e08 ) 8014da2: 6013 str r3, [r2, #0] 8014da4: 6b3b ldr r3, [r7, #48] @ 0x30 8014da6: 6ada ldr r2, [r3, #44] @ 0x2c 8014da8: 4613 mov r3, r2 8014daa: 009b lsls r3, r3, #2 8014dac: 4413 add r3, r2 8014dae: 009b lsls r3, r3, #2 8014db0: 4a16 ldr r2, [pc, #88] @ (8014e0c ) 8014db2: 441a add r2, r3 8014db4: 6b3b ldr r3, [r7, #48] @ 0x30 8014db6: 3304 adds r3, #4 8014db8: 4619 mov r1, r3 8014dba: 4610 mov r0, r2 8014dbc: f7fd f8a7 bl 8011f0e 8014dc0: e005 b.n 8014dce } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxTCB->xEventListItem ) ); 8014dc2: 6b3b ldr r3, [r7, #48] @ 0x30 8014dc4: 3318 adds r3, #24 8014dc6: 4619 mov r1, r3 8014dc8: 4811 ldr r0, [pc, #68] @ (8014e10 ) 8014dca: f7fd f8a0 bl 8011f0e } if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) 8014dce: 6b3b ldr r3, [r7, #48] @ 0x30 8014dd0: 6ada ldr r2, [r3, #44] @ 0x2c 8014dd2: 4b10 ldr r3, [pc, #64] @ (8014e14 ) 8014dd4: 681b ldr r3, [r3, #0] 8014dd6: 6adb ldr r3, [r3, #44] @ 0x2c 8014dd8: 429a cmp r2, r3 8014dda: d908 bls.n 8014dee { /* The notified task has a priority above the currently executing task so a yield is required. */ if( pxHigherPriorityTaskWoken != NULL ) 8014ddc: 6c3b ldr r3, [r7, #64] @ 0x40 8014dde: 2b00 cmp r3, #0 8014de0: d002 beq.n 8014de8 { *pxHigherPriorityTaskWoken = pdTRUE; 8014de2: 6c3b ldr r3, [r7, #64] @ 0x40 8014de4: 2201 movs r2, #1 8014de6: 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; 8014de8: 4b0b ldr r3, [pc, #44] @ (8014e18 ) 8014dea: 2201 movs r2, #1 8014dec: 601a str r2, [r3, #0] 8014dee: 6afb ldr r3, [r7, #44] @ 0x2c 8014df0: 613b str r3, [r7, #16] __asm volatile 8014df2: 693b ldr r3, [r7, #16] 8014df4: f383 8811 msr BASEPRI, r3 } 8014df8: bf00 nop } } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; 8014dfa: 6b7b ldr r3, [r7, #52] @ 0x34 } 8014dfc: 4618 mov r0, r3 8014dfe: 3738 adds r7, #56 @ 0x38 8014e00: 46bd mov sp, r7 8014e02: bd80 pop {r7, pc} 8014e04: 2400427c .word 0x2400427c 8014e08: 2400425c .word 0x2400425c 8014e0c: 24003d84 .word 0x24003d84 8014e10: 24004214 .word 0x24004214 8014e14: 24003d80 .word 0x24003d80 8014e18: 24004268 .word 0x24004268 08014e1c : /*-----------------------------------------------------------*/ #if( configUSE_TASK_NOTIFICATIONS == 1 ) BaseType_t xTaskNotifyStateClear( TaskHandle_t xTask ) { 8014e1c: b580 push {r7, lr} 8014e1e: b084 sub sp, #16 8014e20: af00 add r7, sp, #0 8014e22: 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 ); 8014e24: 687b ldr r3, [r7, #4] 8014e26: 2b00 cmp r3, #0 8014e28: d102 bne.n 8014e30 8014e2a: 4b0e ldr r3, [pc, #56] @ (8014e64 ) 8014e2c: 681b ldr r3, [r3, #0] 8014e2e: e000 b.n 8014e32 8014e30: 687b ldr r3, [r7, #4] 8014e32: 60bb str r3, [r7, #8] taskENTER_CRITICAL(); 8014e34: f000 fde0 bl 80159f8 { if( pxTCB->ucNotifyState == taskNOTIFICATION_RECEIVED ) 8014e38: 68bb ldr r3, [r7, #8] 8014e3a: f893 30a4 ldrb.w r3, [r3, #164] @ 0xa4 8014e3e: b2db uxtb r3, r3 8014e40: 2b02 cmp r3, #2 8014e42: d106 bne.n 8014e52 { pxTCB->ucNotifyState = taskNOT_WAITING_NOTIFICATION; 8014e44: 68bb ldr r3, [r7, #8] 8014e46: 2200 movs r2, #0 8014e48: f883 20a4 strb.w r2, [r3, #164] @ 0xa4 xReturn = pdPASS; 8014e4c: 2301 movs r3, #1 8014e4e: 60fb str r3, [r7, #12] 8014e50: e001 b.n 8014e56 } else { xReturn = pdFAIL; 8014e52: 2300 movs r3, #0 8014e54: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); 8014e56: f000 fe01 bl 8015a5c return xReturn; 8014e5a: 68fb ldr r3, [r7, #12] } 8014e5c: 4618 mov r0, r3 8014e5e: 3710 adds r7, #16 8014e60: 46bd mov sp, r7 8014e62: bd80 pop {r7, pc} 8014e64: 24003d80 .word 0x24003d80 08014e68 : #endif /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely ) { 8014e68: b580 push {r7, lr} 8014e6a: b084 sub sp, #16 8014e6c: af00 add r7, sp, #0 8014e6e: 6078 str r0, [r7, #4] 8014e70: 6039 str r1, [r7, #0] TickType_t xTimeToWake; const TickType_t xConstTickCount = xTickCount; 8014e72: 4b21 ldr r3, [pc, #132] @ (8014ef8 ) 8014e74: 681b ldr r3, [r3, #0] 8014e76: 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 ) 8014e78: 4b20 ldr r3, [pc, #128] @ (8014efc ) 8014e7a: 681b ldr r3, [r3, #0] 8014e7c: 3304 adds r3, #4 8014e7e: 4618 mov r0, r3 8014e80: f7fd f8a2 bl 8011fc8 mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) ) 8014e84: 687b ldr r3, [r7, #4] 8014e86: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8014e8a: d10a bne.n 8014ea2 8014e8c: 683b ldr r3, [r7, #0] 8014e8e: 2b00 cmp r3, #0 8014e90: d007 beq.n 8014ea2 { /* 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 ) ); 8014e92: 4b1a ldr r3, [pc, #104] @ (8014efc ) 8014e94: 681b ldr r3, [r3, #0] 8014e96: 3304 adds r3, #4 8014e98: 4619 mov r1, r3 8014e9a: 4819 ldr r0, [pc, #100] @ (8014f00 ) 8014e9c: f7fd f837 bl 8011f0e /* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */ ( void ) xCanBlockIndefinitely; } #endif /* INCLUDE_vTaskSuspend */ } 8014ea0: e026 b.n 8014ef0 xTimeToWake = xConstTickCount + xTicksToWait; 8014ea2: 68fa ldr r2, [r7, #12] 8014ea4: 687b ldr r3, [r7, #4] 8014ea6: 4413 add r3, r2 8014ea8: 60bb str r3, [r7, #8] listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake ); 8014eaa: 4b14 ldr r3, [pc, #80] @ (8014efc ) 8014eac: 681b ldr r3, [r3, #0] 8014eae: 68ba ldr r2, [r7, #8] 8014eb0: 605a str r2, [r3, #4] if( xTimeToWake < xConstTickCount ) 8014eb2: 68ba ldr r2, [r7, #8] 8014eb4: 68fb ldr r3, [r7, #12] 8014eb6: 429a cmp r2, r3 8014eb8: d209 bcs.n 8014ece vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 8014eba: 4b12 ldr r3, [pc, #72] @ (8014f04 ) 8014ebc: 681a ldr r2, [r3, #0] 8014ebe: 4b0f ldr r3, [pc, #60] @ (8014efc ) 8014ec0: 681b ldr r3, [r3, #0] 8014ec2: 3304 adds r3, #4 8014ec4: 4619 mov r1, r3 8014ec6: 4610 mov r0, r2 8014ec8: f7fd f845 bl 8011f56 } 8014ecc: e010 b.n 8014ef0 vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); 8014ece: 4b0e ldr r3, [pc, #56] @ (8014f08 ) 8014ed0: 681a ldr r2, [r3, #0] 8014ed2: 4b0a ldr r3, [pc, #40] @ (8014efc ) 8014ed4: 681b ldr r3, [r3, #0] 8014ed6: 3304 adds r3, #4 8014ed8: 4619 mov r1, r3 8014eda: 4610 mov r0, r2 8014edc: f7fd f83b bl 8011f56 if( xTimeToWake < xNextTaskUnblockTime ) 8014ee0: 4b0a ldr r3, [pc, #40] @ (8014f0c ) 8014ee2: 681b ldr r3, [r3, #0] 8014ee4: 68ba ldr r2, [r7, #8] 8014ee6: 429a cmp r2, r3 8014ee8: d202 bcs.n 8014ef0 xNextTaskUnblockTime = xTimeToWake; 8014eea: 4a08 ldr r2, [pc, #32] @ (8014f0c ) 8014eec: 68bb ldr r3, [r7, #8] 8014eee: 6013 str r3, [r2, #0] } 8014ef0: bf00 nop 8014ef2: 3710 adds r7, #16 8014ef4: 46bd mov sp, r7 8014ef6: bd80 pop {r7, pc} 8014ef8: 24004258 .word 0x24004258 8014efc: 24003d80 .word 0x24003d80 8014f00: 24004240 .word 0x24004240 8014f04: 24004210 .word 0x24004210 8014f08: 2400420c .word 0x2400420c 8014f0c: 24004274 .word 0x24004274 08014f10 : TimerCallbackFunction_t pxCallbackFunction, Timer_t *pxNewTimer ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { 8014f10: b580 push {r7, lr} 8014f12: b08a sub sp, #40 @ 0x28 8014f14: af04 add r7, sp, #16 BaseType_t xReturn = pdFAIL; 8014f16: 2300 movs r3, #0 8014f18: 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(); 8014f1a: f000 fbb1 bl 8015680 if( xTimerQueue != NULL ) 8014f1e: 4b1d ldr r3, [pc, #116] @ (8014f94 ) 8014f20: 681b ldr r3, [r3, #0] 8014f22: 2b00 cmp r3, #0 8014f24: d021 beq.n 8014f6a { #if( configSUPPORT_STATIC_ALLOCATION == 1 ) { StaticTask_t *pxTimerTaskTCBBuffer = NULL; 8014f26: 2300 movs r3, #0 8014f28: 60fb str r3, [r7, #12] StackType_t *pxTimerTaskStackBuffer = NULL; 8014f2a: 2300 movs r3, #0 8014f2c: 60bb str r3, [r7, #8] uint32_t ulTimerTaskStackSize; vApplicationGetTimerTaskMemory( &pxTimerTaskTCBBuffer, &pxTimerTaskStackBuffer, &ulTimerTaskStackSize ); 8014f2e: 1d3a adds r2, r7, #4 8014f30: f107 0108 add.w r1, r7, #8 8014f34: f107 030c add.w r3, r7, #12 8014f38: 4618 mov r0, r3 8014f3a: f7fc ffa1 bl 8011e80 xTimerTaskHandle = xTaskCreateStatic( prvTimerTask, 8014f3e: 6879 ldr r1, [r7, #4] 8014f40: 68bb ldr r3, [r7, #8] 8014f42: 68fa ldr r2, [r7, #12] 8014f44: 9202 str r2, [sp, #8] 8014f46: 9301 str r3, [sp, #4] 8014f48: 2302 movs r3, #2 8014f4a: 9300 str r3, [sp, #0] 8014f4c: 2300 movs r3, #0 8014f4e: 460a mov r2, r1 8014f50: 4911 ldr r1, [pc, #68] @ (8014f98 ) 8014f52: 4812 ldr r0, [pc, #72] @ (8014f9c ) 8014f54: f7fe fd1c bl 8013990 8014f58: 4603 mov r3, r0 8014f5a: 4a11 ldr r2, [pc, #68] @ (8014fa0 ) 8014f5c: 6013 str r3, [r2, #0] NULL, ( ( UBaseType_t ) configTIMER_TASK_PRIORITY ) | portPRIVILEGE_BIT, pxTimerTaskStackBuffer, pxTimerTaskTCBBuffer ); if( xTimerTaskHandle != NULL ) 8014f5e: 4b10 ldr r3, [pc, #64] @ (8014fa0 ) 8014f60: 681b ldr r3, [r3, #0] 8014f62: 2b00 cmp r3, #0 8014f64: d001 beq.n 8014f6a { xReturn = pdPASS; 8014f66: 2301 movs r3, #1 8014f68: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 8014f6a: 697b ldr r3, [r7, #20] 8014f6c: 2b00 cmp r3, #0 8014f6e: d10b bne.n 8014f88 __asm volatile 8014f70: f04f 0350 mov.w r3, #80 @ 0x50 8014f74: f383 8811 msr BASEPRI, r3 8014f78: f3bf 8f6f isb sy 8014f7c: f3bf 8f4f dsb sy 8014f80: 613b str r3, [r7, #16] } 8014f82: bf00 nop 8014f84: bf00 nop 8014f86: e7fd b.n 8014f84 return xReturn; 8014f88: 697b ldr r3, [r7, #20] } 8014f8a: 4618 mov r0, r3 8014f8c: 3718 adds r7, #24 8014f8e: 46bd mov sp, r7 8014f90: bd80 pop {r7, pc} 8014f92: bf00 nop 8014f94: 240042b0 .word 0x240042b0 8014f98: 0802dba4 .word 0x0802dba4 8014f9c: 08015219 .word 0x08015219 8014fa0: 240042b4 .word 0x240042b4 08014fa4 : 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 ) { 8014fa4: b580 push {r7, lr} 8014fa6: b088 sub sp, #32 8014fa8: af02 add r7, sp, #8 8014faa: 60f8 str r0, [r7, #12] 8014fac: 60b9 str r1, [r7, #8] 8014fae: 607a str r2, [r7, #4] 8014fb0: 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. */ 8014fb2: 202c movs r0, #44 @ 0x2c 8014fb4: f000 fe42 bl 8015c3c 8014fb8: 6178 str r0, [r7, #20] if( pxNewTimer != NULL ) 8014fba: 697b ldr r3, [r7, #20] 8014fbc: 2b00 cmp r3, #0 8014fbe: d00d beq.n 8014fdc { /* 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; 8014fc0: 697b ldr r3, [r7, #20] 8014fc2: 2200 movs r2, #0 8014fc4: f883 2028 strb.w r2, [r3, #40] @ 0x28 prvInitialiseNewTimer( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxNewTimer ); 8014fc8: 697b ldr r3, [r7, #20] 8014fca: 9301 str r3, [sp, #4] 8014fcc: 6a3b ldr r3, [r7, #32] 8014fce: 9300 str r3, [sp, #0] 8014fd0: 683b ldr r3, [r7, #0] 8014fd2: 687a ldr r2, [r7, #4] 8014fd4: 68b9 ldr r1, [r7, #8] 8014fd6: 68f8 ldr r0, [r7, #12] 8014fd8: f000 f845 bl 8015066 } return pxNewTimer; 8014fdc: 697b ldr r3, [r7, #20] } 8014fde: 4618 mov r0, r3 8014fe0: 3718 adds r7, #24 8014fe2: 46bd mov sp, r7 8014fe4: bd80 pop {r7, pc} 08014fe6 : const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer ) { 8014fe6: b580 push {r7, lr} 8014fe8: b08a sub sp, #40 @ 0x28 8014fea: af02 add r7, sp, #8 8014fec: 60f8 str r0, [r7, #12] 8014fee: 60b9 str r1, [r7, #8] 8014ff0: 607a str r2, [r7, #4] 8014ff2: 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 ); 8014ff4: 232c movs r3, #44 @ 0x2c 8014ff6: 613b str r3, [r7, #16] configASSERT( xSize == sizeof( Timer_t ) ); 8014ff8: 693b ldr r3, [r7, #16] 8014ffa: 2b2c cmp r3, #44 @ 0x2c 8014ffc: d00b beq.n 8015016 __asm volatile 8014ffe: f04f 0350 mov.w r3, #80 @ 0x50 8015002: f383 8811 msr BASEPRI, r3 8015006: f3bf 8f6f isb sy 801500a: f3bf 8f4f dsb sy 801500e: 61bb str r3, [r7, #24] } 8015010: bf00 nop 8015012: bf00 nop 8015014: e7fd b.n 8015012 ( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ 8015016: 693b ldr r3, [r7, #16] } #endif /* configASSERT_DEFINED */ /* A pointer to a StaticTimer_t structure MUST be provided, use it. */ configASSERT( pxTimerBuffer ); 8015018: 6afb ldr r3, [r7, #44] @ 0x2c 801501a: 2b00 cmp r3, #0 801501c: d10b bne.n 8015036 __asm volatile 801501e: f04f 0350 mov.w r3, #80 @ 0x50 8015022: f383 8811 msr BASEPRI, r3 8015026: f3bf 8f6f isb sy 801502a: f3bf 8f4f dsb sy 801502e: 617b str r3, [r7, #20] } 8015030: bf00 nop 8015032: bf00 nop 8015034: e7fd b.n 8015032 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. */ 8015036: 6afb ldr r3, [r7, #44] @ 0x2c 8015038: 61fb str r3, [r7, #28] if( pxNewTimer != NULL ) 801503a: 69fb ldr r3, [r7, #28] 801503c: 2b00 cmp r3, #0 801503e: d00d beq.n 801505c { /* 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; 8015040: 69fb ldr r3, [r7, #28] 8015042: 2202 movs r2, #2 8015044: f883 2028 strb.w r2, [r3, #40] @ 0x28 prvInitialiseNewTimer( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxNewTimer ); 8015048: 69fb ldr r3, [r7, #28] 801504a: 9301 str r3, [sp, #4] 801504c: 6abb ldr r3, [r7, #40] @ 0x28 801504e: 9300 str r3, [sp, #0] 8015050: 683b ldr r3, [r7, #0] 8015052: 687a ldr r2, [r7, #4] 8015054: 68b9 ldr r1, [r7, #8] 8015056: 68f8 ldr r0, [r7, #12] 8015058: f000 f805 bl 8015066 } return pxNewTimer; 801505c: 69fb ldr r3, [r7, #28] } 801505e: 4618 mov r0, r3 8015060: 3720 adds r7, #32 8015062: 46bd mov sp, r7 8015064: bd80 pop {r7, pc} 08015066 : const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, Timer_t *pxNewTimer ) { 8015066: b580 push {r7, lr} 8015068: b086 sub sp, #24 801506a: af00 add r7, sp, #0 801506c: 60f8 str r0, [r7, #12] 801506e: 60b9 str r1, [r7, #8] 8015070: 607a str r2, [r7, #4] 8015072: 603b str r3, [r7, #0] /* 0 is not a valid value for xTimerPeriodInTicks. */ configASSERT( ( xTimerPeriodInTicks > 0 ) ); 8015074: 68bb ldr r3, [r7, #8] 8015076: 2b00 cmp r3, #0 8015078: d10b bne.n 8015092 __asm volatile 801507a: f04f 0350 mov.w r3, #80 @ 0x50 801507e: f383 8811 msr BASEPRI, r3 8015082: f3bf 8f6f isb sy 8015086: f3bf 8f4f dsb sy 801508a: 617b str r3, [r7, #20] } 801508c: bf00 nop 801508e: bf00 nop 8015090: e7fd b.n 801508e if( pxNewTimer != NULL ) 8015092: 6a7b ldr r3, [r7, #36] @ 0x24 8015094: 2b00 cmp r3, #0 8015096: d01e beq.n 80150d6 { /* Ensure the infrastructure used by the timer service task has been created/initialised. */ prvCheckForValidListAndQueue(); 8015098: f000 faf2 bl 8015680 /* Initialise the timer structure members using the function parameters. */ pxNewTimer->pcTimerName = pcTimerName; 801509c: 6a7b ldr r3, [r7, #36] @ 0x24 801509e: 68fa ldr r2, [r7, #12] 80150a0: 601a str r2, [r3, #0] pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; 80150a2: 6a7b ldr r3, [r7, #36] @ 0x24 80150a4: 68ba ldr r2, [r7, #8] 80150a6: 619a str r2, [r3, #24] pxNewTimer->pvTimerID = pvTimerID; 80150a8: 6a7b ldr r3, [r7, #36] @ 0x24 80150aa: 683a ldr r2, [r7, #0] 80150ac: 61da str r2, [r3, #28] pxNewTimer->pxCallbackFunction = pxCallbackFunction; 80150ae: 6a7b ldr r3, [r7, #36] @ 0x24 80150b0: 6a3a ldr r2, [r7, #32] 80150b2: 621a str r2, [r3, #32] vListInitialiseItem( &( pxNewTimer->xTimerListItem ) ); 80150b4: 6a7b ldr r3, [r7, #36] @ 0x24 80150b6: 3304 adds r3, #4 80150b8: 4618 mov r0, r3 80150ba: f7fc ff1b bl 8011ef4 if( uxAutoReload != pdFALSE ) 80150be: 687b ldr r3, [r7, #4] 80150c0: 2b00 cmp r3, #0 80150c2: d008 beq.n 80150d6 { pxNewTimer->ucStatus |= tmrSTATUS_IS_AUTORELOAD; 80150c4: 6a7b ldr r3, [r7, #36] @ 0x24 80150c6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80150ca: f043 0304 orr.w r3, r3, #4 80150ce: b2da uxtb r2, r3 80150d0: 6a7b ldr r3, [r7, #36] @ 0x24 80150d2: f883 2028 strb.w r2, [r3, #40] @ 0x28 } traceTIMER_CREATE( pxNewTimer ); } } 80150d6: bf00 nop 80150d8: 3718 adds r7, #24 80150da: 46bd mov sp, r7 80150dc: bd80 pop {r7, pc} ... 080150e0 : /*-----------------------------------------------------------*/ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { 80150e0: b580 push {r7, lr} 80150e2: b08a sub sp, #40 @ 0x28 80150e4: af00 add r7, sp, #0 80150e6: 60f8 str r0, [r7, #12] 80150e8: 60b9 str r1, [r7, #8] 80150ea: 607a str r2, [r7, #4] 80150ec: 603b str r3, [r7, #0] BaseType_t xReturn = pdFAIL; 80150ee: 2300 movs r3, #0 80150f0: 627b str r3, [r7, #36] @ 0x24 DaemonTaskMessage_t xMessage; configASSERT( xTimer ); 80150f2: 68fb ldr r3, [r7, #12] 80150f4: 2b00 cmp r3, #0 80150f6: d10b bne.n 8015110 __asm volatile 80150f8: f04f 0350 mov.w r3, #80 @ 0x50 80150fc: f383 8811 msr BASEPRI, r3 8015100: f3bf 8f6f isb sy 8015104: f3bf 8f4f dsb sy 8015108: 623b str r3, [r7, #32] } 801510a: bf00 nop 801510c: bf00 nop 801510e: e7fd b.n 801510c /* Send a message to the timer service task to perform a particular action on a particular timer definition. */ if( xTimerQueue != NULL ) 8015110: 4b19 ldr r3, [pc, #100] @ (8015178 ) 8015112: 681b ldr r3, [r3, #0] 8015114: 2b00 cmp r3, #0 8015116: d02a beq.n 801516e { /* Send a command to the timer service task to start the xTimer timer. */ xMessage.xMessageID = xCommandID; 8015118: 68bb ldr r3, [r7, #8] 801511a: 613b str r3, [r7, #16] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; 801511c: 687b ldr r3, [r7, #4] 801511e: 617b str r3, [r7, #20] xMessage.u.xTimerParameters.pxTimer = xTimer; 8015120: 68fb ldr r3, [r7, #12] 8015122: 61bb str r3, [r7, #24] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) 8015124: 68bb ldr r3, [r7, #8] 8015126: 2b05 cmp r3, #5 8015128: dc18 bgt.n 801515c { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) 801512a: f7ff fae1 bl 80146f0 801512e: 4603 mov r3, r0 8015130: 2b02 cmp r3, #2 8015132: d109 bne.n 8015148 { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); 8015134: 4b10 ldr r3, [pc, #64] @ (8015178 ) 8015136: 6818 ldr r0, [r3, #0] 8015138: f107 0110 add.w r1, r7, #16 801513c: 2300 movs r3, #0 801513e: 6b3a ldr r2, [r7, #48] @ 0x30 8015140: f7fd f9d8 bl 80124f4 8015144: 6278 str r0, [r7, #36] @ 0x24 8015146: e012 b.n 801516e } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); 8015148: 4b0b ldr r3, [pc, #44] @ (8015178 ) 801514a: 6818 ldr r0, [r3, #0] 801514c: f107 0110 add.w r1, r7, #16 8015150: 2300 movs r3, #0 8015152: 2200 movs r2, #0 8015154: f7fd f9ce bl 80124f4 8015158: 6278 str r0, [r7, #36] @ 0x24 801515a: e008 b.n 801516e } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); 801515c: 4b06 ldr r3, [pc, #24] @ (8015178 ) 801515e: 6818 ldr r0, [r3, #0] 8015160: f107 0110 add.w r1, r7, #16 8015164: 2300 movs r3, #0 8015166: 683a ldr r2, [r7, #0] 8015168: f7fd fac6 bl 80126f8 801516c: 6278 str r0, [r7, #36] @ 0x24 else { mtCOVERAGE_TEST_MARKER(); } return xReturn; 801516e: 6a7b ldr r3, [r7, #36] @ 0x24 } 8015170: 4618 mov r0, r3 8015172: 3728 adds r7, #40 @ 0x28 8015174: 46bd mov sp, r7 8015176: bd80 pop {r7, pc} 8015178: 240042b0 .word 0x240042b0 0801517c : return pxTimer->pcTimerName; } /*-----------------------------------------------------------*/ static void prvProcessExpiredTimer( const TickType_t xNextExpireTime, const TickType_t xTimeNow ) { 801517c: b580 push {r7, lr} 801517e: b088 sub sp, #32 8015180: af02 add r7, sp, #8 8015182: 6078 str r0, [r7, #4] 8015184: 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. */ 8015186: 4b23 ldr r3, [pc, #140] @ (8015214 ) 8015188: 681b ldr r3, [r3, #0] 801518a: 68db ldr r3, [r3, #12] 801518c: 68db ldr r3, [r3, #12] 801518e: 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 ) ); 8015190: 697b ldr r3, [r7, #20] 8015192: 3304 adds r3, #4 8015194: 4618 mov r0, r3 8015196: f7fc ff17 bl 8011fc8 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 ) 801519a: 697b ldr r3, [r7, #20] 801519c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80151a0: f003 0304 and.w r3, r3, #4 80151a4: 2b00 cmp r3, #0 80151a6: d023 beq.n 80151f0 { /* 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 ) 80151a8: 697b ldr r3, [r7, #20] 80151aa: 699a ldr r2, [r3, #24] 80151ac: 687b ldr r3, [r7, #4] 80151ae: 18d1 adds r1, r2, r3 80151b0: 687b ldr r3, [r7, #4] 80151b2: 683a ldr r2, [r7, #0] 80151b4: 6978 ldr r0, [r7, #20] 80151b6: f000 f8d5 bl 8015364 80151ba: 4603 mov r3, r0 80151bc: 2b00 cmp r3, #0 80151be: d020 beq.n 8015202 { /* 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 ); 80151c0: 2300 movs r3, #0 80151c2: 9300 str r3, [sp, #0] 80151c4: 2300 movs r3, #0 80151c6: 687a ldr r2, [r7, #4] 80151c8: 2100 movs r1, #0 80151ca: 6978 ldr r0, [r7, #20] 80151cc: f7ff ff88 bl 80150e0 80151d0: 6138 str r0, [r7, #16] configASSERT( xResult ); 80151d2: 693b ldr r3, [r7, #16] 80151d4: 2b00 cmp r3, #0 80151d6: d114 bne.n 8015202 __asm volatile 80151d8: f04f 0350 mov.w r3, #80 @ 0x50 80151dc: f383 8811 msr BASEPRI, r3 80151e0: f3bf 8f6f isb sy 80151e4: f3bf 8f4f dsb sy 80151e8: 60fb str r3, [r7, #12] } 80151ea: bf00 nop 80151ec: bf00 nop 80151ee: e7fd b.n 80151ec mtCOVERAGE_TEST_MARKER(); } } else { pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 80151f0: 697b ldr r3, [r7, #20] 80151f2: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80151f6: f023 0301 bic.w r3, r3, #1 80151fa: b2da uxtb r2, r3 80151fc: 697b ldr r3, [r7, #20] 80151fe: f883 2028 strb.w r2, [r3, #40] @ 0x28 mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 8015202: 697b ldr r3, [r7, #20] 8015204: 6a1b ldr r3, [r3, #32] 8015206: 6978 ldr r0, [r7, #20] 8015208: 4798 blx r3 } 801520a: bf00 nop 801520c: 3718 adds r7, #24 801520e: 46bd mov sp, r7 8015210: bd80 pop {r7, pc} 8015212: bf00 nop 8015214: 240042a8 .word 0x240042a8 08015218 : /*-----------------------------------------------------------*/ static portTASK_FUNCTION( prvTimerTask, pvParameters ) { 8015218: b580 push {r7, lr} 801521a: b084 sub sp, #16 801521c: af00 add r7, sp, #0 801521e: 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 ); 8015220: f107 0308 add.w r3, r7, #8 8015224: 4618 mov r0, r3 8015226: f000 f859 bl 80152dc 801522a: 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 ); 801522c: 68bb ldr r3, [r7, #8] 801522e: 4619 mov r1, r3 8015230: 68f8 ldr r0, [r7, #12] 8015232: f000 f805 bl 8015240 /* Empty the command queue. */ prvProcessReceivedCommands(); 8015236: f000 f8d7 bl 80153e8 xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty ); 801523a: bf00 nop 801523c: e7f0 b.n 8015220 ... 08015240 : } } /*-----------------------------------------------------------*/ static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, BaseType_t xListWasEmpty ) { 8015240: b580 push {r7, lr} 8015242: b084 sub sp, #16 8015244: af00 add r7, sp, #0 8015246: 6078 str r0, [r7, #4] 8015248: 6039 str r1, [r7, #0] TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); 801524a: f7fe fe05 bl 8013e58 /* 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 ); 801524e: f107 0308 add.w r3, r7, #8 8015252: 4618 mov r0, r3 8015254: f000 f866 bl 8015324 8015258: 60f8 str r0, [r7, #12] if( xTimerListsWereSwitched == pdFALSE ) 801525a: 68bb ldr r3, [r7, #8] 801525c: 2b00 cmp r3, #0 801525e: d130 bne.n 80152c2 { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) 8015260: 683b ldr r3, [r7, #0] 8015262: 2b00 cmp r3, #0 8015264: d10a bne.n 801527c 8015266: 687a ldr r2, [r7, #4] 8015268: 68fb ldr r3, [r7, #12] 801526a: 429a cmp r2, r3 801526c: d806 bhi.n 801527c { ( void ) xTaskResumeAll(); 801526e: f7fe fe01 bl 8013e74 prvProcessExpiredTimer( xNextExpireTime, xTimeNow ); 8015272: 68f9 ldr r1, [r7, #12] 8015274: 6878 ldr r0, [r7, #4] 8015276: f7ff ff81 bl 801517c else { ( void ) xTaskResumeAll(); } } } 801527a: e024 b.n 80152c6 if( xListWasEmpty != pdFALSE ) 801527c: 683b ldr r3, [r7, #0] 801527e: 2b00 cmp r3, #0 8015280: d008 beq.n 8015294 xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList ); 8015282: 4b13 ldr r3, [pc, #76] @ (80152d0 ) 8015284: 681b ldr r3, [r3, #0] 8015286: 681b ldr r3, [r3, #0] 8015288: 2b00 cmp r3, #0 801528a: d101 bne.n 8015290 801528c: 2301 movs r3, #1 801528e: e000 b.n 8015292 8015290: 2300 movs r3, #0 8015292: 603b str r3, [r7, #0] vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty ); 8015294: 4b0f ldr r3, [pc, #60] @ (80152d4 ) 8015296: 6818 ldr r0, [r3, #0] 8015298: 687a ldr r2, [r7, #4] 801529a: 68fb ldr r3, [r7, #12] 801529c: 1ad3 subs r3, r2, r3 801529e: 683a ldr r2, [r7, #0] 80152a0: 4619 mov r1, r3 80152a2: f7fd ffa9 bl 80131f8 if( xTaskResumeAll() == pdFALSE ) 80152a6: f7fe fde5 bl 8013e74 80152aa: 4603 mov r3, r0 80152ac: 2b00 cmp r3, #0 80152ae: d10a bne.n 80152c6 portYIELD_WITHIN_API(); 80152b0: 4b09 ldr r3, [pc, #36] @ (80152d8 ) 80152b2: f04f 5280 mov.w r2, #268435456 @ 0x10000000 80152b6: 601a str r2, [r3, #0] 80152b8: f3bf 8f4f dsb sy 80152bc: f3bf 8f6f isb sy } 80152c0: e001 b.n 80152c6 ( void ) xTaskResumeAll(); 80152c2: f7fe fdd7 bl 8013e74 } 80152c6: bf00 nop 80152c8: 3710 adds r7, #16 80152ca: 46bd mov sp, r7 80152cc: bd80 pop {r7, pc} 80152ce: bf00 nop 80152d0: 240042ac .word 0x240042ac 80152d4: 240042b0 .word 0x240042b0 80152d8: e000ed04 .word 0xe000ed04 080152dc : /*-----------------------------------------------------------*/ static TickType_t prvGetNextExpireTime( BaseType_t * const pxListWasEmpty ) { 80152dc: b480 push {r7} 80152de: b085 sub sp, #20 80152e0: af00 add r7, sp, #0 80152e2: 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 ); 80152e4: 4b0e ldr r3, [pc, #56] @ (8015320 ) 80152e6: 681b ldr r3, [r3, #0] 80152e8: 681b ldr r3, [r3, #0] 80152ea: 2b00 cmp r3, #0 80152ec: d101 bne.n 80152f2 80152ee: 2201 movs r2, #1 80152f0: e000 b.n 80152f4 80152f2: 2200 movs r2, #0 80152f4: 687b ldr r3, [r7, #4] 80152f6: 601a str r2, [r3, #0] if( *pxListWasEmpty == pdFALSE ) 80152f8: 687b ldr r3, [r7, #4] 80152fa: 681b ldr r3, [r3, #0] 80152fc: 2b00 cmp r3, #0 80152fe: d105 bne.n 801530c { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 8015300: 4b07 ldr r3, [pc, #28] @ (8015320 ) 8015302: 681b ldr r3, [r3, #0] 8015304: 68db ldr r3, [r3, #12] 8015306: 681b ldr r3, [r3, #0] 8015308: 60fb str r3, [r7, #12] 801530a: e001 b.n 8015310 } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; 801530c: 2300 movs r3, #0 801530e: 60fb str r3, [r7, #12] } return xNextExpireTime; 8015310: 68fb ldr r3, [r7, #12] } 8015312: 4618 mov r0, r3 8015314: 3714 adds r7, #20 8015316: 46bd mov sp, r7 8015318: f85d 7b04 ldr.w r7, [sp], #4 801531c: 4770 bx lr 801531e: bf00 nop 8015320: 240042a8 .word 0x240042a8 08015324 : /*-----------------------------------------------------------*/ static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { 8015324: b580 push {r7, lr} 8015326: b084 sub sp, #16 8015328: af00 add r7, sp, #0 801532a: 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(); 801532c: f7fe fe40 bl 8013fb0 8015330: 60f8 str r0, [r7, #12] if( xTimeNow < xLastTime ) 8015332: 4b0b ldr r3, [pc, #44] @ (8015360 ) 8015334: 681b ldr r3, [r3, #0] 8015336: 68fa ldr r2, [r7, #12] 8015338: 429a cmp r2, r3 801533a: d205 bcs.n 8015348 { prvSwitchTimerLists(); 801533c: f000 f93a bl 80155b4 *pxTimerListsWereSwitched = pdTRUE; 8015340: 687b ldr r3, [r7, #4] 8015342: 2201 movs r2, #1 8015344: 601a str r2, [r3, #0] 8015346: e002 b.n 801534e } else { *pxTimerListsWereSwitched = pdFALSE; 8015348: 687b ldr r3, [r7, #4] 801534a: 2200 movs r2, #0 801534c: 601a str r2, [r3, #0] } xLastTime = xTimeNow; 801534e: 4a04 ldr r2, [pc, #16] @ (8015360 ) 8015350: 68fb ldr r3, [r7, #12] 8015352: 6013 str r3, [r2, #0] return xTimeNow; 8015354: 68fb ldr r3, [r7, #12] } 8015356: 4618 mov r0, r3 8015358: 3710 adds r7, #16 801535a: 46bd mov sp, r7 801535c: bd80 pop {r7, pc} 801535e: bf00 nop 8015360: 240042b8 .word 0x240042b8 08015364 : /*-----------------------------------------------------------*/ static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { 8015364: b580 push {r7, lr} 8015366: b086 sub sp, #24 8015368: af00 add r7, sp, #0 801536a: 60f8 str r0, [r7, #12] 801536c: 60b9 str r1, [r7, #8] 801536e: 607a str r2, [r7, #4] 8015370: 603b str r3, [r7, #0] BaseType_t xProcessTimerNow = pdFALSE; 8015372: 2300 movs r3, #0 8015374: 617b str r3, [r7, #20] listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime ); 8015376: 68fb ldr r3, [r7, #12] 8015378: 68ba ldr r2, [r7, #8] 801537a: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 801537c: 68fb ldr r3, [r7, #12] 801537e: 68fa ldr r2, [r7, #12] 8015380: 611a str r2, [r3, #16] if( xNextExpiryTime <= xTimeNow ) 8015382: 68ba ldr r2, [r7, #8] 8015384: 687b ldr r3, [r7, #4] 8015386: 429a cmp r2, r3 8015388: d812 bhi.n 80153b0 { /* 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. */ 801538a: 687a ldr r2, [r7, #4] 801538c: 683b ldr r3, [r7, #0] 801538e: 1ad2 subs r2, r2, r3 8015390: 68fb ldr r3, [r7, #12] 8015392: 699b ldr r3, [r3, #24] 8015394: 429a cmp r2, r3 8015396: d302 bcc.n 801539e { /* The time between a command being issued and the command being processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; 8015398: 2301 movs r3, #1 801539a: 617b str r3, [r7, #20] 801539c: e01b b.n 80153d6 } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); 801539e: 4b10 ldr r3, [pc, #64] @ (80153e0 ) 80153a0: 681a ldr r2, [r3, #0] 80153a2: 68fb ldr r3, [r7, #12] 80153a4: 3304 adds r3, #4 80153a6: 4619 mov r1, r3 80153a8: 4610 mov r0, r2 80153aa: f7fc fdd4 bl 8011f56 80153ae: e012 b.n 80153d6 } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) 80153b0: 687a ldr r2, [r7, #4] 80153b2: 683b ldr r3, [r7, #0] 80153b4: 429a cmp r2, r3 80153b6: d206 bcs.n 80153c6 80153b8: 68ba ldr r2, [r7, #8] 80153ba: 683b ldr r3, [r7, #0] 80153bc: 429a cmp r2, r3 80153be: d302 bcc.n 80153c6 { /* 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; 80153c0: 2301 movs r3, #1 80153c2: 617b str r3, [r7, #20] 80153c4: e007 b.n 80153d6 } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 80153c6: 4b07 ldr r3, [pc, #28] @ (80153e4 ) 80153c8: 681a ldr r2, [r3, #0] 80153ca: 68fb ldr r3, [r7, #12] 80153cc: 3304 adds r3, #4 80153ce: 4619 mov r1, r3 80153d0: 4610 mov r0, r2 80153d2: f7fc fdc0 bl 8011f56 } } return xProcessTimerNow; 80153d6: 697b ldr r3, [r7, #20] } 80153d8: 4618 mov r0, r3 80153da: 3718 adds r7, #24 80153dc: 46bd mov sp, r7 80153de: bd80 pop {r7, pc} 80153e0: 240042ac .word 0x240042ac 80153e4: 240042a8 .word 0x240042a8 080153e8 : /*-----------------------------------------------------------*/ static void prvProcessReceivedCommands( void ) { 80153e8: b580 push {r7, lr} 80153ea: b08e sub sp, #56 @ 0x38 80153ec: 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. */ 80153ee: e0ce b.n 801558e { #if ( INCLUDE_xTimerPendFunctionCall == 1 ) { /* Negative commands are pended function calls rather than timer commands. */ if( xMessage.xMessageID < ( BaseType_t ) 0 ) 80153f0: 687b ldr r3, [r7, #4] 80153f2: 2b00 cmp r3, #0 80153f4: da19 bge.n 801542a { const CallbackParameters_t * const pxCallback = &( xMessage.u.xCallbackParameters ); 80153f6: 1d3b adds r3, r7, #4 80153f8: 3304 adds r3, #4 80153fa: 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 ); 80153fc: 6afb ldr r3, [r7, #44] @ 0x2c 80153fe: 2b00 cmp r3, #0 8015400: d10b bne.n 801541a __asm volatile 8015402: f04f 0350 mov.w r3, #80 @ 0x50 8015406: f383 8811 msr BASEPRI, r3 801540a: f3bf 8f6f isb sy 801540e: f3bf 8f4f dsb sy 8015412: 61fb str r3, [r7, #28] } 8015414: bf00 nop 8015416: bf00 nop 8015418: e7fd b.n 8015416 /* Call the function. */ pxCallback->pxCallbackFunction( pxCallback->pvParameter1, pxCallback->ulParameter2 ); 801541a: 6afb ldr r3, [r7, #44] @ 0x2c 801541c: 681b ldr r3, [r3, #0] 801541e: 6afa ldr r2, [r7, #44] @ 0x2c 8015420: 6850 ldr r0, [r2, #4] 8015422: 6afa ldr r2, [r7, #44] @ 0x2c 8015424: 6892 ldr r2, [r2, #8] 8015426: 4611 mov r1, r2 8015428: 4798 blx r3 } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) 801542a: 687b ldr r3, [r7, #4] 801542c: 2b00 cmp r3, #0 801542e: f2c0 80ae blt.w 801558e { /* The messages uses the xTimerParameters member to work on a software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; 8015432: 68fb ldr r3, [r7, #12] 8015434: 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. */ 8015436: 6abb ldr r3, [r7, #40] @ 0x28 8015438: 695b ldr r3, [r3, #20] 801543a: 2b00 cmp r3, #0 801543c: d004 beq.n 8015448 { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 801543e: 6abb ldr r3, [r7, #40] @ 0x28 8015440: 3304 adds r3, #4 8015442: 4618 mov r0, r3 8015444: f7fc fdc0 bl 8011fc8 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 ); 8015448: 463b mov r3, r7 801544a: 4618 mov r0, r3 801544c: f7ff ff6a bl 8015324 8015450: 6278 str r0, [r7, #36] @ 0x24 switch( xMessage.xMessageID ) 8015452: 687b ldr r3, [r7, #4] 8015454: 2b09 cmp r3, #9 8015456: f200 8097 bhi.w 8015588 801545a: a201 add r2, pc, #4 @ (adr r2, 8015460 ) 801545c: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8015460: 08015489 .word 0x08015489 8015464: 08015489 .word 0x08015489 8015468: 08015489 .word 0x08015489 801546c: 080154ff .word 0x080154ff 8015470: 08015513 .word 0x08015513 8015474: 0801555f .word 0x0801555f 8015478: 08015489 .word 0x08015489 801547c: 08015489 .word 0x08015489 8015480: 080154ff .word 0x080154ff 8015484: 08015513 .word 0x08015513 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; 8015488: 6abb ldr r3, [r7, #40] @ 0x28 801548a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801548e: f043 0301 orr.w r3, r3, #1 8015492: b2da uxtb r2, r3 8015494: 6abb ldr r3, [r7, #40] @ 0x28 8015496: f883 2028 strb.w r2, [r3, #40] @ 0x28 if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE ) 801549a: 68ba ldr r2, [r7, #8] 801549c: 6abb ldr r3, [r7, #40] @ 0x28 801549e: 699b ldr r3, [r3, #24] 80154a0: 18d1 adds r1, r2, r3 80154a2: 68bb ldr r3, [r7, #8] 80154a4: 6a7a ldr r2, [r7, #36] @ 0x24 80154a6: 6ab8 ldr r0, [r7, #40] @ 0x28 80154a8: f7ff ff5c bl 8015364 80154ac: 4603 mov r3, r0 80154ae: 2b00 cmp r3, #0 80154b0: d06c beq.n 801558c { /* The timer expired before it was added to the active timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); 80154b2: 6abb ldr r3, [r7, #40] @ 0x28 80154b4: 6a1b ldr r3, [r3, #32] 80154b6: 6ab8 ldr r0, [r7, #40] @ 0x28 80154b8: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 80154ba: 6abb ldr r3, [r7, #40] @ 0x28 80154bc: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80154c0: f003 0304 and.w r3, r3, #4 80154c4: 2b00 cmp r3, #0 80154c6: d061 beq.n 801558c { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); 80154c8: 68ba ldr r2, [r7, #8] 80154ca: 6abb ldr r3, [r7, #40] @ 0x28 80154cc: 699b ldr r3, [r3, #24] 80154ce: 441a add r2, r3 80154d0: 2300 movs r3, #0 80154d2: 9300 str r3, [sp, #0] 80154d4: 2300 movs r3, #0 80154d6: 2100 movs r1, #0 80154d8: 6ab8 ldr r0, [r7, #40] @ 0x28 80154da: f7ff fe01 bl 80150e0 80154de: 6238 str r0, [r7, #32] configASSERT( xResult ); 80154e0: 6a3b ldr r3, [r7, #32] 80154e2: 2b00 cmp r3, #0 80154e4: d152 bne.n 801558c __asm volatile 80154e6: f04f 0350 mov.w r3, #80 @ 0x50 80154ea: f383 8811 msr BASEPRI, r3 80154ee: f3bf 8f6f isb sy 80154f2: f3bf 8f4f dsb sy 80154f6: 61bb str r3, [r7, #24] } 80154f8: bf00 nop 80154fa: bf00 nop 80154fc: e7fd b.n 80154fa break; case tmrCOMMAND_STOP : case tmrCOMMAND_STOP_FROM_ISR : /* The timer has already been removed from the active list. */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 80154fe: 6abb ldr r3, [r7, #40] @ 0x28 8015500: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015504: f023 0301 bic.w r3, r3, #1 8015508: b2da uxtb r2, r3 801550a: 6abb ldr r3, [r7, #40] @ 0x28 801550c: f883 2028 strb.w r2, [r3, #40] @ 0x28 break; 8015510: e03d b.n 801558e case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR : pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; 8015512: 6abb ldr r3, [r7, #40] @ 0x28 8015514: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015518: f043 0301 orr.w r3, r3, #1 801551c: b2da uxtb r2, r3 801551e: 6abb ldr r3, [r7, #40] @ 0x28 8015520: f883 2028 strb.w r2, [r3, #40] @ 0x28 pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; 8015524: 68ba ldr r2, [r7, #8] 8015526: 6abb ldr r3, [r7, #40] @ 0x28 8015528: 619a str r2, [r3, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); 801552a: 6abb ldr r3, [r7, #40] @ 0x28 801552c: 699b ldr r3, [r3, #24] 801552e: 2b00 cmp r3, #0 8015530: d10b bne.n 801554a __asm volatile 8015532: f04f 0350 mov.w r3, #80 @ 0x50 8015536: f383 8811 msr BASEPRI, r3 801553a: f3bf 8f6f isb sy 801553e: f3bf 8f4f dsb sy 8015542: 617b str r3, [r7, #20] } 8015544: bf00 nop 8015546: bf00 nop 8015548: e7fd b.n 8015546 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 ); 801554a: 6abb ldr r3, [r7, #40] @ 0x28 801554c: 699a ldr r2, [r3, #24] 801554e: 6a7b ldr r3, [r7, #36] @ 0x24 8015550: 18d1 adds r1, r2, r3 8015552: 6a7b ldr r3, [r7, #36] @ 0x24 8015554: 6a7a ldr r2, [r7, #36] @ 0x24 8015556: 6ab8 ldr r0, [r7, #40] @ 0x28 8015558: f7ff ff04 bl 8015364 break; 801555c: e017 b.n 801558e #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 ) 801555e: 6abb ldr r3, [r7, #40] @ 0x28 8015560: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015564: f003 0302 and.w r3, r3, #2 8015568: 2b00 cmp r3, #0 801556a: d103 bne.n 8015574 { vPortFree( pxTimer ); 801556c: 6ab8 ldr r0, [r7, #40] @ 0x28 801556e: f000 fc33 bl 8015dd8 no need to free the memory - just mark the timer as "not active". */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ break; 8015572: e00c b.n 801558e pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; 8015574: 6abb ldr r3, [r7, #40] @ 0x28 8015576: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801557a: f023 0301 bic.w r3, r3, #1 801557e: b2da uxtb r2, r3 8015580: 6abb ldr r3, [r7, #40] @ 0x28 8015582: f883 2028 strb.w r2, [r3, #40] @ 0x28 break; 8015586: e002 b.n 801558e default : /* Don't expect to get here. */ break; 8015588: bf00 nop 801558a: e000 b.n 801558e break; 801558c: 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. */ 801558e: 4b08 ldr r3, [pc, #32] @ (80155b0 ) 8015590: 681b ldr r3, [r3, #0] 8015592: 1d39 adds r1, r7, #4 8015594: 2200 movs r2, #0 8015596: 4618 mov r0, r3 8015598: f7fd f9dc bl 8012954 801559c: 4603 mov r3, r0 801559e: 2b00 cmp r3, #0 80155a0: f47f af26 bne.w 80153f0 } } } } 80155a4: bf00 nop 80155a6: bf00 nop 80155a8: 3730 adds r7, #48 @ 0x30 80155aa: 46bd mov sp, r7 80155ac: bd80 pop {r7, pc} 80155ae: bf00 nop 80155b0: 240042b0 .word 0x240042b0 080155b4 : /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { 80155b4: b580 push {r7, lr} 80155b6: b088 sub sp, #32 80155b8: 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 ) 80155ba: e049 b.n 8015650 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); 80155bc: 4b2e ldr r3, [pc, #184] @ (8015678 ) 80155be: 681b ldr r3, [r3, #0] 80155c0: 68db ldr r3, [r3, #12] 80155c2: 681b ldr r3, [r3, #0] 80155c4: 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. */ 80155c6: 4b2c ldr r3, [pc, #176] @ (8015678 ) 80155c8: 681b ldr r3, [r3, #0] 80155ca: 68db ldr r3, [r3, #12] 80155cc: 68db ldr r3, [r3, #12] 80155ce: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); 80155d0: 68fb ldr r3, [r7, #12] 80155d2: 3304 adds r3, #4 80155d4: 4618 mov r0, r3 80155d6: f7fc fcf7 bl 8011fc8 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 ); 80155da: 68fb ldr r3, [r7, #12] 80155dc: 6a1b ldr r3, [r3, #32] 80155de: 68f8 ldr r0, [r7, #12] 80155e0: 4798 blx r3 if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) 80155e2: 68fb ldr r3, [r7, #12] 80155e4: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80155e8: f003 0304 and.w r3, r3, #4 80155ec: 2b00 cmp r3, #0 80155ee: d02f beq.n 8015650 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 ); 80155f0: 68fb ldr r3, [r7, #12] 80155f2: 699b ldr r3, [r3, #24] 80155f4: 693a ldr r2, [r7, #16] 80155f6: 4413 add r3, r2 80155f8: 60bb str r3, [r7, #8] if( xReloadTime > xNextExpireTime ) 80155fa: 68ba ldr r2, [r7, #8] 80155fc: 693b ldr r3, [r7, #16] 80155fe: 429a cmp r2, r3 8015600: d90e bls.n 8015620 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); 8015602: 68fb ldr r3, [r7, #12] 8015604: 68ba ldr r2, [r7, #8] 8015606: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); 8015608: 68fb ldr r3, [r7, #12] 801560a: 68fa ldr r2, [r7, #12] 801560c: 611a str r2, [r3, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); 801560e: 4b1a ldr r3, [pc, #104] @ (8015678 ) 8015610: 681a ldr r2, [r3, #0] 8015612: 68fb ldr r3, [r7, #12] 8015614: 3304 adds r3, #4 8015616: 4619 mov r1, r3 8015618: 4610 mov r0, r2 801561a: f7fc fc9c bl 8011f56 801561e: e017 b.n 8015650 } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); 8015620: 2300 movs r3, #0 8015622: 9300 str r3, [sp, #0] 8015624: 2300 movs r3, #0 8015626: 693a ldr r2, [r7, #16] 8015628: 2100 movs r1, #0 801562a: 68f8 ldr r0, [r7, #12] 801562c: f7ff fd58 bl 80150e0 8015630: 6078 str r0, [r7, #4] configASSERT( xResult ); 8015632: 687b ldr r3, [r7, #4] 8015634: 2b00 cmp r3, #0 8015636: d10b bne.n 8015650 __asm volatile 8015638: f04f 0350 mov.w r3, #80 @ 0x50 801563c: f383 8811 msr BASEPRI, r3 8015640: f3bf 8f6f isb sy 8015644: f3bf 8f4f dsb sy 8015648: 603b str r3, [r7, #0] } 801564a: bf00 nop 801564c: bf00 nop 801564e: e7fd b.n 801564c while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) 8015650: 4b09 ldr r3, [pc, #36] @ (8015678 ) 8015652: 681b ldr r3, [r3, #0] 8015654: 681b ldr r3, [r3, #0] 8015656: 2b00 cmp r3, #0 8015658: d1b0 bne.n 80155bc { mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; 801565a: 4b07 ldr r3, [pc, #28] @ (8015678 ) 801565c: 681b ldr r3, [r3, #0] 801565e: 617b str r3, [r7, #20] pxCurrentTimerList = pxOverflowTimerList; 8015660: 4b06 ldr r3, [pc, #24] @ (801567c ) 8015662: 681b ldr r3, [r3, #0] 8015664: 4a04 ldr r2, [pc, #16] @ (8015678 ) 8015666: 6013 str r3, [r2, #0] pxOverflowTimerList = pxTemp; 8015668: 4a04 ldr r2, [pc, #16] @ (801567c ) 801566a: 697b ldr r3, [r7, #20] 801566c: 6013 str r3, [r2, #0] } 801566e: bf00 nop 8015670: 3718 adds r7, #24 8015672: 46bd mov sp, r7 8015674: bd80 pop {r7, pc} 8015676: bf00 nop 8015678: 240042a8 .word 0x240042a8 801567c: 240042ac .word 0x240042ac 08015680 : /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { 8015680: b580 push {r7, lr} 8015682: b082 sub sp, #8 8015684: 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(); 8015686: f000 f9b7 bl 80159f8 { if( xTimerQueue == NULL ) 801568a: 4b15 ldr r3, [pc, #84] @ (80156e0 ) 801568c: 681b ldr r3, [r3, #0] 801568e: 2b00 cmp r3, #0 8015690: d120 bne.n 80156d4 { vListInitialise( &xActiveTimerList1 ); 8015692: 4814 ldr r0, [pc, #80] @ (80156e4 ) 8015694: f7fc fc0e bl 8011eb4 vListInitialise( &xActiveTimerList2 ); 8015698: 4813 ldr r0, [pc, #76] @ (80156e8 ) 801569a: f7fc fc0b bl 8011eb4 pxCurrentTimerList = &xActiveTimerList1; 801569e: 4b13 ldr r3, [pc, #76] @ (80156ec ) 80156a0: 4a10 ldr r2, [pc, #64] @ (80156e4 ) 80156a2: 601a str r2, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; 80156a4: 4b12 ldr r3, [pc, #72] @ (80156f0 ) 80156a6: 4a10 ldr r2, [pc, #64] @ (80156e8 ) 80156a8: 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 ); 80156aa: 2300 movs r3, #0 80156ac: 9300 str r3, [sp, #0] 80156ae: 4b11 ldr r3, [pc, #68] @ (80156f4 ) 80156b0: 4a11 ldr r2, [pc, #68] @ (80156f8 ) 80156b2: 2110 movs r1, #16 80156b4: 200a movs r0, #10 80156b6: f7fc fd1b bl 80120f0 80156ba: 4603 mov r3, r0 80156bc: 4a08 ldr r2, [pc, #32] @ (80156e0 ) 80156be: 6013 str r3, [r2, #0] } #endif #if ( configQUEUE_REGISTRY_SIZE > 0 ) { if( xTimerQueue != NULL ) 80156c0: 4b07 ldr r3, [pc, #28] @ (80156e0 ) 80156c2: 681b ldr r3, [r3, #0] 80156c4: 2b00 cmp r3, #0 80156c6: d005 beq.n 80156d4 { vQueueAddToRegistry( xTimerQueue, "TmrQ" ); 80156c8: 4b05 ldr r3, [pc, #20] @ (80156e0 ) 80156ca: 681b ldr r3, [r3, #0] 80156cc: 490b ldr r1, [pc, #44] @ (80156fc ) 80156ce: 4618 mov r0, r3 80156d0: f7fd fd3e bl 8013150 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 80156d4: f000 f9c2 bl 8015a5c } 80156d8: bf00 nop 80156da: 46bd mov sp, r7 80156dc: bd80 pop {r7, pc} 80156de: bf00 nop 80156e0: 240042b0 .word 0x240042b0 80156e4: 24004280 .word 0x24004280 80156e8: 24004294 .word 0x24004294 80156ec: 240042a8 .word 0x240042a8 80156f0: 240042ac .word 0x240042ac 80156f4: 2400435c .word 0x2400435c 80156f8: 240042bc .word 0x240042bc 80156fc: 0802dbac .word 0x0802dbac 08015700 : /*-----------------------------------------------------------*/ BaseType_t xTimerIsTimerActive( TimerHandle_t xTimer ) { 8015700: b580 push {r7, lr} 8015702: b086 sub sp, #24 8015704: af00 add r7, sp, #0 8015706: 6078 str r0, [r7, #4] BaseType_t xReturn; Timer_t *pxTimer = xTimer; 8015708: 687b ldr r3, [r7, #4] 801570a: 613b str r3, [r7, #16] configASSERT( xTimer ); 801570c: 687b ldr r3, [r7, #4] 801570e: 2b00 cmp r3, #0 8015710: d10b bne.n 801572a __asm volatile 8015712: f04f 0350 mov.w r3, #80 @ 0x50 8015716: f383 8811 msr BASEPRI, r3 801571a: f3bf 8f6f isb sy 801571e: f3bf 8f4f dsb sy 8015722: 60fb str r3, [r7, #12] } 8015724: bf00 nop 8015726: bf00 nop 8015728: e7fd b.n 8015726 /* Is the timer in the list of active timers? */ taskENTER_CRITICAL(); 801572a: f000 f965 bl 80159f8 { if( ( pxTimer->ucStatus & tmrSTATUS_IS_ACTIVE ) == 0 ) 801572e: 693b ldr r3, [r7, #16] 8015730: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8015734: f003 0301 and.w r3, r3, #1 8015738: 2b00 cmp r3, #0 801573a: d102 bne.n 8015742 { xReturn = pdFALSE; 801573c: 2300 movs r3, #0 801573e: 617b str r3, [r7, #20] 8015740: e001 b.n 8015746 } else { xReturn = pdTRUE; 8015742: 2301 movs r3, #1 8015744: 617b str r3, [r7, #20] } } taskEXIT_CRITICAL(); 8015746: f000 f989 bl 8015a5c return xReturn; 801574a: 697b ldr r3, [r7, #20] } /*lint !e818 Can't be pointer to const due to the typedef. */ 801574c: 4618 mov r0, r3 801574e: 3718 adds r7, #24 8015750: 46bd mov sp, r7 8015752: bd80 pop {r7, pc} 08015754 : /*-----------------------------------------------------------*/ void *pvTimerGetTimerID( const TimerHandle_t xTimer ) { 8015754: b580 push {r7, lr} 8015756: b086 sub sp, #24 8015758: af00 add r7, sp, #0 801575a: 6078 str r0, [r7, #4] Timer_t * const pxTimer = xTimer; 801575c: 687b ldr r3, [r7, #4] 801575e: 617b str r3, [r7, #20] void *pvReturn; configASSERT( xTimer ); 8015760: 687b ldr r3, [r7, #4] 8015762: 2b00 cmp r3, #0 8015764: d10b bne.n 801577e __asm volatile 8015766: f04f 0350 mov.w r3, #80 @ 0x50 801576a: f383 8811 msr BASEPRI, r3 801576e: f3bf 8f6f isb sy 8015772: f3bf 8f4f dsb sy 8015776: 60fb str r3, [r7, #12] } 8015778: bf00 nop 801577a: bf00 nop 801577c: e7fd b.n 801577a taskENTER_CRITICAL(); 801577e: f000 f93b bl 80159f8 { pvReturn = pxTimer->pvTimerID; 8015782: 697b ldr r3, [r7, #20] 8015784: 69db ldr r3, [r3, #28] 8015786: 613b str r3, [r7, #16] } taskEXIT_CRITICAL(); 8015788: f000 f968 bl 8015a5c return pvReturn; 801578c: 693b ldr r3, [r7, #16] } 801578e: 4618 mov r0, r3 8015790: 3718 adds r7, #24 8015792: 46bd mov sp, r7 8015794: bd80 pop {r7, pc} ... 08015798 : /* * See header file for description. */ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) { 8015798: b480 push {r7} 801579a: b085 sub sp, #20 801579c: af00 add r7, sp, #0 801579e: 60f8 str r0, [r7, #12] 80157a0: 60b9 str r1, [r7, #8] 80157a2: 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--; 80157a4: 68fb ldr r3, [r7, #12] 80157a6: 3b04 subs r3, #4 80157a8: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ 80157aa: 68fb ldr r3, [r7, #12] 80157ac: f04f 7280 mov.w r2, #16777216 @ 0x1000000 80157b0: 601a str r2, [r3, #0] pxTopOfStack--; 80157b2: 68fb ldr r3, [r7, #12] 80157b4: 3b04 subs r3, #4 80157b6: 60fb str r3, [r7, #12] *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */ 80157b8: 68bb ldr r3, [r7, #8] 80157ba: f023 0201 bic.w r2, r3, #1 80157be: 68fb ldr r3, [r7, #12] 80157c0: 601a str r2, [r3, #0] pxTopOfStack--; 80157c2: 68fb ldr r3, [r7, #12] 80157c4: 3b04 subs r3, #4 80157c6: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 80157c8: 4a0c ldr r2, [pc, #48] @ (80157fc ) 80157ca: 68fb ldr r3, [r7, #12] 80157cc: 601a str r2, [r3, #0] /* Save code space by skipping register initialisation. */ pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ 80157ce: 68fb ldr r3, [r7, #12] 80157d0: 3b14 subs r3, #20 80157d2: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 80157d4: 687a ldr r2, [r7, #4] 80157d6: 68fb ldr r3, [r7, #12] 80157d8: 601a str r2, [r3, #0] /* A save method is being used that requires each task to maintain its own exec return value. */ pxTopOfStack--; 80157da: 68fb ldr r3, [r7, #12] 80157dc: 3b04 subs r3, #4 80157de: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_EXC_RETURN; 80157e0: 68fb ldr r3, [r7, #12] 80157e2: f06f 0202 mvn.w r2, #2 80157e6: 601a str r2, [r3, #0] pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */ 80157e8: 68fb ldr r3, [r7, #12] 80157ea: 3b20 subs r3, #32 80157ec: 60fb str r3, [r7, #12] return pxTopOfStack; 80157ee: 68fb ldr r3, [r7, #12] } 80157f0: 4618 mov r0, r3 80157f2: 3714 adds r7, #20 80157f4: 46bd mov sp, r7 80157f6: f85d 7b04 ldr.w r7, [sp], #4 80157fa: 4770 bx lr 80157fc: 08015801 .word 0x08015801 08015800 : /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 8015800: b480 push {r7} 8015802: b085 sub sp, #20 8015804: af00 add r7, sp, #0 volatile uint32_t ulDummy = 0; 8015806: 2300 movs r3, #0 8015808: 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 ); 801580a: 4b13 ldr r3, [pc, #76] @ (8015858 ) 801580c: 681b ldr r3, [r3, #0] 801580e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8015812: d00b beq.n 801582c __asm volatile 8015814: f04f 0350 mov.w r3, #80 @ 0x50 8015818: f383 8811 msr BASEPRI, r3 801581c: f3bf 8f6f isb sy 8015820: f3bf 8f4f dsb sy 8015824: 60fb str r3, [r7, #12] } 8015826: bf00 nop 8015828: bf00 nop 801582a: e7fd b.n 8015828 __asm volatile 801582c: f04f 0350 mov.w r3, #80 @ 0x50 8015830: f383 8811 msr BASEPRI, r3 8015834: f3bf 8f6f isb sy 8015838: f3bf 8f4f dsb sy 801583c: 60bb str r3, [r7, #8] } 801583e: bf00 nop portDISABLE_INTERRUPTS(); while( ulDummy == 0 ) 8015840: bf00 nop 8015842: 687b ldr r3, [r7, #4] 8015844: 2b00 cmp r3, #0 8015846: d0fc beq.n 8015842 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. */ } } 8015848: bf00 nop 801584a: bf00 nop 801584c: 3714 adds r7, #20 801584e: 46bd mov sp, r7 8015850: f85d 7b04 ldr.w r7, [sp], #4 8015854: 4770 bx lr 8015856: bf00 nop 8015858: 24000048 .word 0x24000048 801585c: 00000000 .word 0x00000000 08015860 : /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 8015860: 4b07 ldr r3, [pc, #28] @ (8015880 ) 8015862: 6819 ldr r1, [r3, #0] 8015864: 6808 ldr r0, [r1, #0] 8015866: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 801586a: f380 8809 msr PSP, r0 801586e: f3bf 8f6f isb sy 8015872: f04f 0000 mov.w r0, #0 8015876: f380 8811 msr BASEPRI, r0 801587a: 4770 bx lr 801587c: f3af 8000 nop.w 08015880 : 8015880: 24003d80 .word 0x24003d80 " bx r14 \n" " \n" " .align 4 \n" "pxCurrentTCBConst2: .word pxCurrentTCB \n" ); } 8015884: bf00 nop 8015886: bf00 nop 08015888 : { /* 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( 8015888: 4808 ldr r0, [pc, #32] @ (80158ac ) 801588a: 6800 ldr r0, [r0, #0] 801588c: 6800 ldr r0, [r0, #0] 801588e: f380 8808 msr MSP, r0 8015892: f04f 0000 mov.w r0, #0 8015896: f380 8814 msr CONTROL, r0 801589a: b662 cpsie i 801589c: b661 cpsie f 801589e: f3bf 8f4f dsb sy 80158a2: f3bf 8f6f isb sy 80158a6: df00 svc 0 80158a8: bf00 nop " dsb \n" " isb \n" " svc 0 \n" /* System call to start first task. */ " nop \n" ); } 80158aa: bf00 nop 80158ac: e000ed08 .word 0xe000ed08 080158b0 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 80158b0: b580 push {r7, lr} 80158b2: b086 sub sp, #24 80158b4: 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 ); 80158b6: 4b47 ldr r3, [pc, #284] @ (80159d4 ) 80158b8: 681b ldr r3, [r3, #0] 80158ba: 4a47 ldr r2, [pc, #284] @ (80159d8 ) 80158bc: 4293 cmp r3, r2 80158be: d10b bne.n 80158d8 __asm volatile 80158c0: f04f 0350 mov.w r3, #80 @ 0x50 80158c4: f383 8811 msr BASEPRI, r3 80158c8: f3bf 8f6f isb sy 80158cc: f3bf 8f4f dsb sy 80158d0: 613b str r3, [r7, #16] } 80158d2: bf00 nop 80158d4: bf00 nop 80158d6: e7fd b.n 80158d4 configASSERT( portCPUID != portCORTEX_M7_r0p0_ID ); 80158d8: 4b3e ldr r3, [pc, #248] @ (80159d4 ) 80158da: 681b ldr r3, [r3, #0] 80158dc: 4a3f ldr r2, [pc, #252] @ (80159dc ) 80158de: 4293 cmp r3, r2 80158e0: d10b bne.n 80158fa __asm volatile 80158e2: f04f 0350 mov.w r3, #80 @ 0x50 80158e6: f383 8811 msr BASEPRI, r3 80158ea: f3bf 8f6f isb sy 80158ee: f3bf 8f4f dsb sy 80158f2: 60fb str r3, [r7, #12] } 80158f4: bf00 nop 80158f6: bf00 nop 80158f8: e7fd b.n 80158f6 #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 ); 80158fa: 4b39 ldr r3, [pc, #228] @ (80159e0 ) 80158fc: 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; 80158fe: 697b ldr r3, [r7, #20] 8015900: 781b ldrb r3, [r3, #0] 8015902: b2db uxtb r3, r3 8015904: 607b str r3, [r7, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 8015906: 697b ldr r3, [r7, #20] 8015908: 22ff movs r2, #255 @ 0xff 801590a: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 801590c: 697b ldr r3, [r7, #20] 801590e: 781b ldrb r3, [r3, #0] 8015910: b2db uxtb r3, r3 8015912: 70fb strb r3, [r7, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 8015914: 78fb ldrb r3, [r7, #3] 8015916: b2db uxtb r3, r3 8015918: f003 0350 and.w r3, r3, #80 @ 0x50 801591c: b2da uxtb r2, r3 801591e: 4b31 ldr r3, [pc, #196] @ (80159e4 ) 8015920: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 8015922: 4b31 ldr r3, [pc, #196] @ (80159e8 ) 8015924: 2207 movs r2, #7 8015926: 601a str r2, [r3, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 8015928: e009 b.n 801593e { ulMaxPRIGROUPValue--; 801592a: 4b2f ldr r3, [pc, #188] @ (80159e8 ) 801592c: 681b ldr r3, [r3, #0] 801592e: 3b01 subs r3, #1 8015930: 4a2d ldr r2, [pc, #180] @ (80159e8 ) 8015932: 6013 str r3, [r2, #0] ucMaxPriorityValue <<= ( uint8_t ) 0x01; 8015934: 78fb ldrb r3, [r7, #3] 8015936: b2db uxtb r3, r3 8015938: 005b lsls r3, r3, #1 801593a: b2db uxtb r3, r3 801593c: 70fb strb r3, [r7, #3] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 801593e: 78fb ldrb r3, [r7, #3] 8015940: b2db uxtb r3, r3 8015942: f003 0380 and.w r3, r3, #128 @ 0x80 8015946: 2b80 cmp r3, #128 @ 0x80 8015948: d0ef beq.n 801592a #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 ); 801594a: 4b27 ldr r3, [pc, #156] @ (80159e8 ) 801594c: 681b ldr r3, [r3, #0] 801594e: f1c3 0307 rsb r3, r3, #7 8015952: 2b04 cmp r3, #4 8015954: d00b beq.n 801596e __asm volatile 8015956: f04f 0350 mov.w r3, #80 @ 0x50 801595a: f383 8811 msr BASEPRI, r3 801595e: f3bf 8f6f isb sy 8015962: f3bf 8f4f dsb sy 8015966: 60bb str r3, [r7, #8] } 8015968: bf00 nop 801596a: bf00 nop 801596c: e7fd b.n 801596a } #endif /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 801596e: 4b1e ldr r3, [pc, #120] @ (80159e8 ) 8015970: 681b ldr r3, [r3, #0] 8015972: 021b lsls r3, r3, #8 8015974: 4a1c ldr r2, [pc, #112] @ (80159e8 ) 8015976: 6013 str r3, [r2, #0] ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 8015978: 4b1b ldr r3, [pc, #108] @ (80159e8 ) 801597a: 681b ldr r3, [r3, #0] 801597c: f403 63e0 and.w r3, r3, #1792 @ 0x700 8015980: 4a19 ldr r2, [pc, #100] @ (80159e8 ) 8015982: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 8015984: 687b ldr r3, [r7, #4] 8015986: b2da uxtb r2, r3 8015988: 697b ldr r3, [r7, #20] 801598a: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 801598c: 4b17 ldr r3, [pc, #92] @ (80159ec ) 801598e: 681b ldr r3, [r3, #0] 8015990: 4a16 ldr r2, [pc, #88] @ (80159ec ) 8015992: f443 0370 orr.w r3, r3, #15728640 @ 0xf00000 8015996: 6013 str r3, [r2, #0] portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 8015998: 4b14 ldr r3, [pc, #80] @ (80159ec ) 801599a: 681b ldr r3, [r3, #0] 801599c: 4a13 ldr r2, [pc, #76] @ (80159ec ) 801599e: f043 4370 orr.w r3, r3, #4026531840 @ 0xf0000000 80159a2: 6013 str r3, [r2, #0] /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 80159a4: f000 f8da bl 8015b5c /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 80159a8: 4b11 ldr r3, [pc, #68] @ (80159f0 ) 80159aa: 2200 movs r2, #0 80159ac: 601a str r2, [r3, #0] /* Ensure the VFP is enabled - it should be anyway. */ vPortEnableVFP(); 80159ae: f000 f8f9 bl 8015ba4 /* Lazy save always. */ *( portFPCCR ) |= portASPEN_AND_LSPEN_BITS; 80159b2: 4b10 ldr r3, [pc, #64] @ (80159f4 ) 80159b4: 681b ldr r3, [r3, #0] 80159b6: 4a0f ldr r2, [pc, #60] @ (80159f4 ) 80159b8: f043 4340 orr.w r3, r3, #3221225472 @ 0xc0000000 80159bc: 6013 str r3, [r2, #0] /* Start the first task. */ prvPortStartFirstTask(); 80159be: f7ff ff63 bl 8015888 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(); 80159c2: f7fe fbd1 bl 8014168 prvTaskExitError(); 80159c6: f7ff ff1b bl 8015800 /* Should not get here! */ return 0; 80159ca: 2300 movs r3, #0 } 80159cc: 4618 mov r0, r3 80159ce: 3718 adds r7, #24 80159d0: 46bd mov sp, r7 80159d2: bd80 pop {r7, pc} 80159d4: e000ed00 .word 0xe000ed00 80159d8: 410fc271 .word 0x410fc271 80159dc: 410fc270 .word 0x410fc270 80159e0: e000e400 .word 0xe000e400 80159e4: 240043ac .word 0x240043ac 80159e8: 240043b0 .word 0x240043b0 80159ec: e000ed20 .word 0xe000ed20 80159f0: 24000048 .word 0x24000048 80159f4: e000ef34 .word 0xe000ef34 080159f8 : configASSERT( uxCriticalNesting == 1000UL ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 80159f8: b480 push {r7} 80159fa: b083 sub sp, #12 80159fc: af00 add r7, sp, #0 __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: 607b str r3, [r7, #4] } 8015a10: bf00 nop portDISABLE_INTERRUPTS(); uxCriticalNesting++; 8015a12: 4b10 ldr r3, [pc, #64] @ (8015a54 ) 8015a14: 681b ldr r3, [r3, #0] 8015a16: 3301 adds r3, #1 8015a18: 4a0e ldr r2, [pc, #56] @ (8015a54 ) 8015a1a: 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 ) 8015a1c: 4b0d ldr r3, [pc, #52] @ (8015a54 ) 8015a1e: 681b ldr r3, [r3, #0] 8015a20: 2b01 cmp r3, #1 8015a22: d110 bne.n 8015a46 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 8015a24: 4b0c ldr r3, [pc, #48] @ (8015a58 ) 8015a26: 681b ldr r3, [r3, #0] 8015a28: b2db uxtb r3, r3 8015a2a: 2b00 cmp r3, #0 8015a2c: d00b beq.n 8015a46 __asm volatile 8015a2e: f04f 0350 mov.w r3, #80 @ 0x50 8015a32: f383 8811 msr BASEPRI, r3 8015a36: f3bf 8f6f isb sy 8015a3a: f3bf 8f4f dsb sy 8015a3e: 603b str r3, [r7, #0] } 8015a40: bf00 nop 8015a42: bf00 nop 8015a44: e7fd b.n 8015a42 } } 8015a46: bf00 nop 8015a48: 370c adds r7, #12 8015a4a: 46bd mov sp, r7 8015a4c: f85d 7b04 ldr.w r7, [sp], #4 8015a50: 4770 bx lr 8015a52: bf00 nop 8015a54: 24000048 .word 0x24000048 8015a58: e000ed04 .word 0xe000ed04 08015a5c : /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 8015a5c: b480 push {r7} 8015a5e: b083 sub sp, #12 8015a60: af00 add r7, sp, #0 configASSERT( uxCriticalNesting ); 8015a62: 4b12 ldr r3, [pc, #72] @ (8015aac ) 8015a64: 681b ldr r3, [r3, #0] 8015a66: 2b00 cmp r3, #0 8015a68: d10b bne.n 8015a82 __asm volatile 8015a6a: f04f 0350 mov.w r3, #80 @ 0x50 8015a6e: f383 8811 msr BASEPRI, r3 8015a72: f3bf 8f6f isb sy 8015a76: f3bf 8f4f dsb sy 8015a7a: 607b str r3, [r7, #4] } 8015a7c: bf00 nop 8015a7e: bf00 nop 8015a80: e7fd b.n 8015a7e uxCriticalNesting--; 8015a82: 4b0a ldr r3, [pc, #40] @ (8015aac ) 8015a84: 681b ldr r3, [r3, #0] 8015a86: 3b01 subs r3, #1 8015a88: 4a08 ldr r2, [pc, #32] @ (8015aac ) 8015a8a: 6013 str r3, [r2, #0] if( uxCriticalNesting == 0 ) 8015a8c: 4b07 ldr r3, [pc, #28] @ (8015aac ) 8015a8e: 681b ldr r3, [r3, #0] 8015a90: 2b00 cmp r3, #0 8015a92: d105 bne.n 8015aa0 8015a94: 2300 movs r3, #0 8015a96: 603b str r3, [r7, #0] __asm volatile 8015a98: 683b ldr r3, [r7, #0] 8015a9a: f383 8811 msr BASEPRI, r3 } 8015a9e: bf00 nop { portENABLE_INTERRUPTS(); } } 8015aa0: bf00 nop 8015aa2: 370c adds r7, #12 8015aa4: 46bd mov sp, r7 8015aa6: f85d 7b04 ldr.w r7, [sp], #4 8015aaa: 4770 bx lr 8015aac: 24000048 .word 0x24000048 08015ab0 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 8015ab0: f3ef 8009 mrs r0, PSP 8015ab4: f3bf 8f6f isb sy 8015ab8: 4b15 ldr r3, [pc, #84] @ (8015b10 ) 8015aba: 681a ldr r2, [r3, #0] 8015abc: f01e 0f10 tst.w lr, #16 8015ac0: bf08 it eq 8015ac2: ed20 8a10 vstmdbeq r0!, {s16-s31} 8015ac6: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8015aca: 6010 str r0, [r2, #0] 8015acc: e92d 0009 stmdb sp!, {r0, r3} 8015ad0: f04f 0050 mov.w r0, #80 @ 0x50 8015ad4: f380 8811 msr BASEPRI, r0 8015ad8: f3bf 8f4f dsb sy 8015adc: f3bf 8f6f isb sy 8015ae0: f7fe fb42 bl 8014168 8015ae4: f04f 0000 mov.w r0, #0 8015ae8: f380 8811 msr BASEPRI, r0 8015aec: bc09 pop {r0, r3} 8015aee: 6819 ldr r1, [r3, #0] 8015af0: 6808 ldr r0, [r1, #0] 8015af2: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8015af6: f01e 0f10 tst.w lr, #16 8015afa: bf08 it eq 8015afc: ecb0 8a10 vldmiaeq r0!, {s16-s31} 8015b00: f380 8809 msr PSP, r0 8015b04: f3bf 8f6f isb sy 8015b08: 4770 bx lr 8015b0a: bf00 nop 8015b0c: f3af 8000 nop.w 08015b10 : 8015b10: 24003d80 .word 0x24003d80 " \n" " .align 4 \n" "pxCurrentTCBConst: .word pxCurrentTCB \n" ::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY) ); } 8015b14: bf00 nop 8015b16: bf00 nop 08015b18 : /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 8015b18: b580 push {r7, lr} 8015b1a: b082 sub sp, #8 8015b1c: af00 add r7, sp, #0 __asm volatile 8015b1e: f04f 0350 mov.w r3, #80 @ 0x50 8015b22: f383 8811 msr BASEPRI, r3 8015b26: f3bf 8f6f isb sy 8015b2a: f3bf 8f4f dsb sy 8015b2e: 607b str r3, [r7, #4] } 8015b30: 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 ) 8015b32: f7fe fa5f bl 8013ff4 8015b36: 4603 mov r3, r0 8015b38: 2b00 cmp r3, #0 8015b3a: d003 beq.n 8015b44 { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 8015b3c: 4b06 ldr r3, [pc, #24] @ (8015b58 ) 8015b3e: f04f 5280 mov.w r2, #268435456 @ 0x10000000 8015b42: 601a str r2, [r3, #0] 8015b44: 2300 movs r3, #0 8015b46: 603b str r3, [r7, #0] __asm volatile 8015b48: 683b ldr r3, [r7, #0] 8015b4a: f383 8811 msr BASEPRI, r3 } 8015b4e: bf00 nop } } portENABLE_INTERRUPTS(); } 8015b50: bf00 nop 8015b52: 3708 adds r7, #8 8015b54: 46bd mov sp, r7 8015b56: bd80 pop {r7, pc} 8015b58: e000ed04 .word 0xe000ed04 08015b5c : /* * Setup the systick timer to generate the tick interrupts at the required * frequency. */ __attribute__(( weak )) void vPortSetupTimerInterrupt( void ) { 8015b5c: b480 push {r7} 8015b5e: 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; 8015b60: 4b0b ldr r3, [pc, #44] @ (8015b90 ) 8015b62: 2200 movs r2, #0 8015b64: 601a str r2, [r3, #0] portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL; 8015b66: 4b0b ldr r3, [pc, #44] @ (8015b94 ) 8015b68: 2200 movs r2, #0 8015b6a: 601a str r2, [r3, #0] /* Configure SysTick to interrupt at the requested rate. */ portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; 8015b6c: 4b0a ldr r3, [pc, #40] @ (8015b98 ) 8015b6e: 681b ldr r3, [r3, #0] 8015b70: 4a0a ldr r2, [pc, #40] @ (8015b9c ) 8015b72: fba2 2303 umull r2, r3, r2, r3 8015b76: 099b lsrs r3, r3, #6 8015b78: 4a09 ldr r2, [pc, #36] @ (8015ba0 ) 8015b7a: 3b01 subs r3, #1 8015b7c: 6013 str r3, [r2, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 8015b7e: 4b04 ldr r3, [pc, #16] @ (8015b90 ) 8015b80: 2207 movs r2, #7 8015b82: 601a str r2, [r3, #0] } 8015b84: bf00 nop 8015b86: 46bd mov sp, r7 8015b88: f85d 7b04 ldr.w r7, [sp], #4 8015b8c: 4770 bx lr 8015b8e: bf00 nop 8015b90: e000e010 .word 0xe000e010 8015b94: e000e018 .word 0xe000e018 8015b98: 2400000c .word 0x2400000c 8015b9c: 10624dd3 .word 0x10624dd3 8015ba0: e000e014 .word 0xe000e014 08015ba4 : /*-----------------------------------------------------------*/ /* This is a naked function. */ static void vPortEnableVFP( void ) { __asm volatile 8015ba4: f8df 000c ldr.w r0, [pc, #12] @ 8015bb4 8015ba8: 6801 ldr r1, [r0, #0] 8015baa: f441 0170 orr.w r1, r1, #15728640 @ 0xf00000 8015bae: 6001 str r1, [r0, #0] 8015bb0: 4770 bx lr " \n" " orr r1, r1, #( 0xf << 20 ) \n" /* Enable CP10 and CP11 coprocessors, then save back. */ " str r1, [r0] \n" " bx r14 " ); } 8015bb2: bf00 nop 8015bb4: e000ed88 .word 0xe000ed88 08015bb8 : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 8015bb8: b480 push {r7} 8015bba: b085 sub sp, #20 8015bbc: 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" ); 8015bbe: f3ef 8305 mrs r3, IPSR 8015bc2: 60fb str r3, [r7, #12] /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 8015bc4: 68fb ldr r3, [r7, #12] 8015bc6: 2b0f cmp r3, #15 8015bc8: d915 bls.n 8015bf6 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 8015bca: 4a18 ldr r2, [pc, #96] @ (8015c2c ) 8015bcc: 68fb ldr r3, [r7, #12] 8015bce: 4413 add r3, r2 8015bd0: 781b ldrb r3, [r3, #0] 8015bd2: 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 ); 8015bd4: 4b16 ldr r3, [pc, #88] @ (8015c30 ) 8015bd6: 781b ldrb r3, [r3, #0] 8015bd8: 7afa ldrb r2, [r7, #11] 8015bda: 429a cmp r2, r3 8015bdc: d20b bcs.n 8015bf6 __asm volatile 8015bde: f04f 0350 mov.w r3, #80 @ 0x50 8015be2: f383 8811 msr BASEPRI, r3 8015be6: f3bf 8f6f isb sy 8015bea: f3bf 8f4f dsb sy 8015bee: 607b str r3, [r7, #4] } 8015bf0: bf00 nop 8015bf2: bf00 nop 8015bf4: e7fd b.n 8015bf2 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 ); 8015bf6: 4b0f ldr r3, [pc, #60] @ (8015c34 ) 8015bf8: 681b ldr r3, [r3, #0] 8015bfa: f403 62e0 and.w r2, r3, #1792 @ 0x700 8015bfe: 4b0e ldr r3, [pc, #56] @ (8015c38 ) 8015c00: 681b ldr r3, [r3, #0] 8015c02: 429a cmp r2, r3 8015c04: d90b bls.n 8015c1e __asm volatile 8015c06: f04f 0350 mov.w r3, #80 @ 0x50 8015c0a: f383 8811 msr BASEPRI, r3 8015c0e: f3bf 8f6f isb sy 8015c12: f3bf 8f4f dsb sy 8015c16: 603b str r3, [r7, #0] } 8015c18: bf00 nop 8015c1a: bf00 nop 8015c1c: e7fd b.n 8015c1a } 8015c1e: bf00 nop 8015c20: 3714 adds r7, #20 8015c22: 46bd mov sp, r7 8015c24: f85d 7b04 ldr.w r7, [sp], #4 8015c28: 4770 bx lr 8015c2a: bf00 nop 8015c2c: e000e3f0 .word 0xe000e3f0 8015c30: 240043ac .word 0x240043ac 8015c34: e000ed0c .word 0xe000ed0c 8015c38: 240043b0 .word 0x240043b0 08015c3c : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 8015c3c: b580 push {r7, lr} 8015c3e: b08a sub sp, #40 @ 0x28 8015c40: af00 add r7, sp, #0 8015c42: 6078 str r0, [r7, #4] BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 8015c44: 2300 movs r3, #0 8015c46: 61fb str r3, [r7, #28] vTaskSuspendAll(); 8015c48: f7fe f906 bl 8013e58 { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 8015c4c: 4b5c ldr r3, [pc, #368] @ (8015dc0 ) 8015c4e: 681b ldr r3, [r3, #0] 8015c50: 2b00 cmp r3, #0 8015c52: d101 bne.n 8015c58 { prvHeapInit(); 8015c54: f000 f924 bl 8015ea0 /* 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 ) 8015c58: 4b5a ldr r3, [pc, #360] @ (8015dc4 ) 8015c5a: 681a ldr r2, [r3, #0] 8015c5c: 687b ldr r3, [r7, #4] 8015c5e: 4013 ands r3, r2 8015c60: 2b00 cmp r3, #0 8015c62: f040 8095 bne.w 8015d90 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 8015c66: 687b ldr r3, [r7, #4] 8015c68: 2b00 cmp r3, #0 8015c6a: d01e beq.n 8015caa { xWantedSize += xHeapStructSize; 8015c6c: 2208 movs r2, #8 8015c6e: 687b ldr r3, [r7, #4] 8015c70: 4413 add r3, r2 8015c72: 607b str r3, [r7, #4] /* Ensure that blocks are always aligned to the required number of bytes. */ if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) 8015c74: 687b ldr r3, [r7, #4] 8015c76: f003 0307 and.w r3, r3, #7 8015c7a: 2b00 cmp r3, #0 8015c7c: d015 beq.n 8015caa { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 8015c7e: 687b ldr r3, [r7, #4] 8015c80: f023 0307 bic.w r3, r3, #7 8015c84: 3308 adds r3, #8 8015c86: 607b str r3, [r7, #4] configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 ); 8015c88: 687b ldr r3, [r7, #4] 8015c8a: f003 0307 and.w r3, r3, #7 8015c8e: 2b00 cmp r3, #0 8015c90: d00b beq.n 8015caa __asm volatile 8015c92: f04f 0350 mov.w r3, #80 @ 0x50 8015c96: f383 8811 msr BASEPRI, r3 8015c9a: f3bf 8f6f isb sy 8015c9e: f3bf 8f4f dsb sy 8015ca2: 617b str r3, [r7, #20] } 8015ca4: bf00 nop 8015ca6: bf00 nop 8015ca8: e7fd b.n 8015ca6 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 8015caa: 687b ldr r3, [r7, #4] 8015cac: 2b00 cmp r3, #0 8015cae: d06f beq.n 8015d90 8015cb0: 4b45 ldr r3, [pc, #276] @ (8015dc8 ) 8015cb2: 681b ldr r3, [r3, #0] 8015cb4: 687a ldr r2, [r7, #4] 8015cb6: 429a cmp r2, r3 8015cb8: d86a bhi.n 8015d90 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; 8015cba: 4b44 ldr r3, [pc, #272] @ (8015dcc ) 8015cbc: 623b str r3, [r7, #32] pxBlock = xStart.pxNextFreeBlock; 8015cbe: 4b43 ldr r3, [pc, #268] @ (8015dcc ) 8015cc0: 681b ldr r3, [r3, #0] 8015cc2: 627b str r3, [r7, #36] @ 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 8015cc4: e004 b.n 8015cd0 { pxPreviousBlock = pxBlock; 8015cc6: 6a7b ldr r3, [r7, #36] @ 0x24 8015cc8: 623b str r3, [r7, #32] pxBlock = pxBlock->pxNextFreeBlock; 8015cca: 6a7b ldr r3, [r7, #36] @ 0x24 8015ccc: 681b ldr r3, [r3, #0] 8015cce: 627b str r3, [r7, #36] @ 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 8015cd0: 6a7b ldr r3, [r7, #36] @ 0x24 8015cd2: 685b ldr r3, [r3, #4] 8015cd4: 687a ldr r2, [r7, #4] 8015cd6: 429a cmp r2, r3 8015cd8: d903 bls.n 8015ce2 8015cda: 6a7b ldr r3, [r7, #36] @ 0x24 8015cdc: 681b ldr r3, [r3, #0] 8015cde: 2b00 cmp r3, #0 8015ce0: d1f1 bne.n 8015cc6 } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 8015ce2: 4b37 ldr r3, [pc, #220] @ (8015dc0 ) 8015ce4: 681b ldr r3, [r3, #0] 8015ce6: 6a7a ldr r2, [r7, #36] @ 0x24 8015ce8: 429a cmp r2, r3 8015cea: d051 beq.n 8015d90 { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 8015cec: 6a3b ldr r3, [r7, #32] 8015cee: 681b ldr r3, [r3, #0] 8015cf0: 2208 movs r2, #8 8015cf2: 4413 add r3, r2 8015cf4: 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; 8015cf6: 6a7b ldr r3, [r7, #36] @ 0x24 8015cf8: 681a ldr r2, [r3, #0] 8015cfa: 6a3b ldr r3, [r7, #32] 8015cfc: 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 ) 8015cfe: 6a7b ldr r3, [r7, #36] @ 0x24 8015d00: 685a ldr r2, [r3, #4] 8015d02: 687b ldr r3, [r7, #4] 8015d04: 1ad2 subs r2, r2, r3 8015d06: 2308 movs r3, #8 8015d08: 005b lsls r3, r3, #1 8015d0a: 429a cmp r2, r3 8015d0c: d920 bls.n 8015d50 { /* 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 ); 8015d0e: 6a7a ldr r2, [r7, #36] @ 0x24 8015d10: 687b ldr r3, [r7, #4] 8015d12: 4413 add r3, r2 8015d14: 61bb str r3, [r7, #24] configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 8015d16: 69bb ldr r3, [r7, #24] 8015d18: f003 0307 and.w r3, r3, #7 8015d1c: 2b00 cmp r3, #0 8015d1e: d00b beq.n 8015d38 __asm volatile 8015d20: f04f 0350 mov.w r3, #80 @ 0x50 8015d24: f383 8811 msr BASEPRI, r3 8015d28: f3bf 8f6f isb sy 8015d2c: f3bf 8f4f dsb sy 8015d30: 613b str r3, [r7, #16] } 8015d32: bf00 nop 8015d34: bf00 nop 8015d36: e7fd b.n 8015d34 /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 8015d38: 6a7b ldr r3, [r7, #36] @ 0x24 8015d3a: 685a ldr r2, [r3, #4] 8015d3c: 687b ldr r3, [r7, #4] 8015d3e: 1ad2 subs r2, r2, r3 8015d40: 69bb ldr r3, [r7, #24] 8015d42: 605a str r2, [r3, #4] pxBlock->xBlockSize = xWantedSize; 8015d44: 6a7b ldr r3, [r7, #36] @ 0x24 8015d46: 687a ldr r2, [r7, #4] 8015d48: 605a str r2, [r3, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( pxNewBlockLink ); 8015d4a: 69b8 ldr r0, [r7, #24] 8015d4c: f000 f90a bl 8015f64 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 8015d50: 4b1d ldr r3, [pc, #116] @ (8015dc8 ) 8015d52: 681a ldr r2, [r3, #0] 8015d54: 6a7b ldr r3, [r7, #36] @ 0x24 8015d56: 685b ldr r3, [r3, #4] 8015d58: 1ad3 subs r3, r2, r3 8015d5a: 4a1b ldr r2, [pc, #108] @ (8015dc8 ) 8015d5c: 6013 str r3, [r2, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 8015d5e: 4b1a ldr r3, [pc, #104] @ (8015dc8 ) 8015d60: 681a ldr r2, [r3, #0] 8015d62: 4b1b ldr r3, [pc, #108] @ (8015dd0 ) 8015d64: 681b ldr r3, [r3, #0] 8015d66: 429a cmp r2, r3 8015d68: d203 bcs.n 8015d72 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 8015d6a: 4b17 ldr r3, [pc, #92] @ (8015dc8 ) 8015d6c: 681b ldr r3, [r3, #0] 8015d6e: 4a18 ldr r2, [pc, #96] @ (8015dd0 ) 8015d70: 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; 8015d72: 6a7b ldr r3, [r7, #36] @ 0x24 8015d74: 685a ldr r2, [r3, #4] 8015d76: 4b13 ldr r3, [pc, #76] @ (8015dc4 ) 8015d78: 681b ldr r3, [r3, #0] 8015d7a: 431a orrs r2, r3 8015d7c: 6a7b ldr r3, [r7, #36] @ 0x24 8015d7e: 605a str r2, [r3, #4] pxBlock->pxNextFreeBlock = NULL; 8015d80: 6a7b ldr r3, [r7, #36] @ 0x24 8015d82: 2200 movs r2, #0 8015d84: 601a str r2, [r3, #0] xNumberOfSuccessfulAllocations++; 8015d86: 4b13 ldr r3, [pc, #76] @ (8015dd4 ) 8015d88: 681b ldr r3, [r3, #0] 8015d8a: 3301 adds r3, #1 8015d8c: 4a11 ldr r2, [pc, #68] @ (8015dd4 ) 8015d8e: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 8015d90: f7fe f870 bl 8013e74 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 ); 8015d94: 69fb ldr r3, [r7, #28] 8015d96: f003 0307 and.w r3, r3, #7 8015d9a: 2b00 cmp r3, #0 8015d9c: d00b beq.n 8015db6 __asm volatile 8015d9e: f04f 0350 mov.w r3, #80 @ 0x50 8015da2: f383 8811 msr BASEPRI, r3 8015da6: f3bf 8f6f isb sy 8015daa: f3bf 8f4f dsb sy 8015dae: 60fb str r3, [r7, #12] } 8015db0: bf00 nop 8015db2: bf00 nop 8015db4: e7fd b.n 8015db2 return pvReturn; 8015db6: 69fb ldr r3, [r7, #28] } 8015db8: 4618 mov r0, r3 8015dba: 3728 adds r7, #40 @ 0x28 8015dbc: 46bd mov sp, r7 8015dbe: bd80 pop {r7, pc} 8015dc0: 240243bc .word 0x240243bc 8015dc4: 240243d0 .word 0x240243d0 8015dc8: 240243c0 .word 0x240243c0 8015dcc: 240243b4 .word 0x240243b4 8015dd0: 240243c4 .word 0x240243c4 8015dd4: 240243c8 .word 0x240243c8 08015dd8 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 8015dd8: b580 push {r7, lr} 8015dda: b086 sub sp, #24 8015ddc: af00 add r7, sp, #0 8015dde: 6078 str r0, [r7, #4] uint8_t *puc = ( uint8_t * ) pv; 8015de0: 687b ldr r3, [r7, #4] 8015de2: 617b str r3, [r7, #20] BlockLink_t *pxLink; if( pv != NULL ) 8015de4: 687b ldr r3, [r7, #4] 8015de6: 2b00 cmp r3, #0 8015de8: d04f beq.n 8015e8a { /* The memory being freed will have an BlockLink_t structure immediately before it. */ puc -= xHeapStructSize; 8015dea: 2308 movs r3, #8 8015dec: 425b negs r3, r3 8015dee: 697a ldr r2, [r7, #20] 8015df0: 4413 add r3, r2 8015df2: 617b str r3, [r7, #20] /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; 8015df4: 697b ldr r3, [r7, #20] 8015df6: 613b str r3, [r7, #16] /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 8015df8: 693b ldr r3, [r7, #16] 8015dfa: 685a ldr r2, [r3, #4] 8015dfc: 4b25 ldr r3, [pc, #148] @ (8015e94 ) 8015dfe: 681b ldr r3, [r3, #0] 8015e00: 4013 ands r3, r2 8015e02: 2b00 cmp r3, #0 8015e04: d10b bne.n 8015e1e __asm volatile 8015e06: f04f 0350 mov.w r3, #80 @ 0x50 8015e0a: f383 8811 msr BASEPRI, r3 8015e0e: f3bf 8f6f isb sy 8015e12: f3bf 8f4f dsb sy 8015e16: 60fb str r3, [r7, #12] } 8015e18: bf00 nop 8015e1a: bf00 nop 8015e1c: e7fd b.n 8015e1a configASSERT( pxLink->pxNextFreeBlock == NULL ); 8015e1e: 693b ldr r3, [r7, #16] 8015e20: 681b ldr r3, [r3, #0] 8015e22: 2b00 cmp r3, #0 8015e24: d00b beq.n 8015e3e __asm volatile 8015e26: f04f 0350 mov.w r3, #80 @ 0x50 8015e2a: f383 8811 msr BASEPRI, r3 8015e2e: f3bf 8f6f isb sy 8015e32: f3bf 8f4f dsb sy 8015e36: 60bb str r3, [r7, #8] } 8015e38: bf00 nop 8015e3a: bf00 nop 8015e3c: e7fd b.n 8015e3a if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ) 8015e3e: 693b ldr r3, [r7, #16] 8015e40: 685a ldr r2, [r3, #4] 8015e42: 4b14 ldr r3, [pc, #80] @ (8015e94 ) 8015e44: 681b ldr r3, [r3, #0] 8015e46: 4013 ands r3, r2 8015e48: 2b00 cmp r3, #0 8015e4a: d01e beq.n 8015e8a { if( pxLink->pxNextFreeBlock == NULL ) 8015e4c: 693b ldr r3, [r7, #16] 8015e4e: 681b ldr r3, [r3, #0] 8015e50: 2b00 cmp r3, #0 8015e52: d11a bne.n 8015e8a { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 8015e54: 693b ldr r3, [r7, #16] 8015e56: 685a ldr r2, [r3, #4] 8015e58: 4b0e ldr r3, [pc, #56] @ (8015e94 ) 8015e5a: 681b ldr r3, [r3, #0] 8015e5c: 43db mvns r3, r3 8015e5e: 401a ands r2, r3 8015e60: 693b ldr r3, [r7, #16] 8015e62: 605a str r2, [r3, #4] vTaskSuspendAll(); 8015e64: f7fd fff8 bl 8013e58 { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 8015e68: 693b ldr r3, [r7, #16] 8015e6a: 685a ldr r2, [r3, #4] 8015e6c: 4b0a ldr r3, [pc, #40] @ (8015e98 ) 8015e6e: 681b ldr r3, [r3, #0] 8015e70: 4413 add r3, r2 8015e72: 4a09 ldr r2, [pc, #36] @ (8015e98 ) 8015e74: 6013 str r3, [r2, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 8015e76: 6938 ldr r0, [r7, #16] 8015e78: f000 f874 bl 8015f64 xNumberOfSuccessfulFrees++; 8015e7c: 4b07 ldr r3, [pc, #28] @ (8015e9c ) 8015e7e: 681b ldr r3, [r3, #0] 8015e80: 3301 adds r3, #1 8015e82: 4a06 ldr r2, [pc, #24] @ (8015e9c ) 8015e84: 6013 str r3, [r2, #0] } ( void ) xTaskResumeAll(); 8015e86: f7fd fff5 bl 8013e74 else { mtCOVERAGE_TEST_MARKER(); } } } 8015e8a: bf00 nop 8015e8c: 3718 adds r7, #24 8015e8e: 46bd mov sp, r7 8015e90: bd80 pop {r7, pc} 8015e92: bf00 nop 8015e94: 240243d0 .word 0x240243d0 8015e98: 240243c0 .word 0x240243c0 8015e9c: 240243cc .word 0x240243cc 08015ea0 : /* This just exists to keep the linker quiet. */ } /*-----------------------------------------------------------*/ static void prvHeapInit( void ) { 8015ea0: b480 push {r7} 8015ea2: b085 sub sp, #20 8015ea4: af00 add r7, sp, #0 BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; size_t uxAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 8015ea6: f44f 3300 mov.w r3, #131072 @ 0x20000 8015eaa: 60bb str r3, [r7, #8] /* Ensure the heap starts on a correctly aligned boundary. */ uxAddress = ( size_t ) ucHeap; 8015eac: 4b27 ldr r3, [pc, #156] @ (8015f4c ) 8015eae: 60fb str r3, [r7, #12] if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 8015eb0: 68fb ldr r3, [r7, #12] 8015eb2: f003 0307 and.w r3, r3, #7 8015eb6: 2b00 cmp r3, #0 8015eb8: d00c beq.n 8015ed4 { uxAddress += ( portBYTE_ALIGNMENT - 1 ); 8015eba: 68fb ldr r3, [r7, #12] 8015ebc: 3307 adds r3, #7 8015ebe: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 8015ec0: 68fb ldr r3, [r7, #12] 8015ec2: f023 0307 bic.w r3, r3, #7 8015ec6: 60fb str r3, [r7, #12] xTotalHeapSize -= uxAddress - ( size_t ) ucHeap; 8015ec8: 68ba ldr r2, [r7, #8] 8015eca: 68fb ldr r3, [r7, #12] 8015ecc: 1ad3 subs r3, r2, r3 8015ece: 4a1f ldr r2, [pc, #124] @ (8015f4c ) 8015ed0: 4413 add r3, r2 8015ed2: 60bb str r3, [r7, #8] } pucAlignedHeap = ( uint8_t * ) uxAddress; 8015ed4: 68fb ldr r3, [r7, #12] 8015ed6: 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; 8015ed8: 4a1d ldr r2, [pc, #116] @ (8015f50 ) 8015eda: 687b ldr r3, [r7, #4] 8015edc: 6013 str r3, [r2, #0] xStart.xBlockSize = ( size_t ) 0; 8015ede: 4b1c ldr r3, [pc, #112] @ (8015f50 ) 8015ee0: 2200 movs r2, #0 8015ee2: 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; 8015ee4: 687b ldr r3, [r7, #4] 8015ee6: 68ba ldr r2, [r7, #8] 8015ee8: 4413 add r3, r2 8015eea: 60fb str r3, [r7, #12] uxAddress -= xHeapStructSize; 8015eec: 2208 movs r2, #8 8015eee: 68fb ldr r3, [r7, #12] 8015ef0: 1a9b subs r3, r3, r2 8015ef2: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); 8015ef4: 68fb ldr r3, [r7, #12] 8015ef6: f023 0307 bic.w r3, r3, #7 8015efa: 60fb str r3, [r7, #12] pxEnd = ( void * ) uxAddress; 8015efc: 68fb ldr r3, [r7, #12] 8015efe: 4a15 ldr r2, [pc, #84] @ (8015f54 ) 8015f00: 6013 str r3, [r2, #0] pxEnd->xBlockSize = 0; 8015f02: 4b14 ldr r3, [pc, #80] @ (8015f54 ) 8015f04: 681b ldr r3, [r3, #0] 8015f06: 2200 movs r2, #0 8015f08: 605a str r2, [r3, #4] pxEnd->pxNextFreeBlock = NULL; 8015f0a: 4b12 ldr r3, [pc, #72] @ (8015f54 ) 8015f0c: 681b ldr r3, [r3, #0] 8015f0e: 2200 movs r2, #0 8015f10: 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; 8015f12: 687b ldr r3, [r7, #4] 8015f14: 603b str r3, [r7, #0] pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock; 8015f16: 683b ldr r3, [r7, #0] 8015f18: 68fa ldr r2, [r7, #12] 8015f1a: 1ad2 subs r2, r2, r3 8015f1c: 683b ldr r3, [r7, #0] 8015f1e: 605a str r2, [r3, #4] pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 8015f20: 4b0c ldr r3, [pc, #48] @ (8015f54 ) 8015f22: 681a ldr r2, [r3, #0] 8015f24: 683b ldr r3, [r7, #0] 8015f26: 601a str r2, [r3, #0] /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8015f28: 683b ldr r3, [r7, #0] 8015f2a: 685b ldr r3, [r3, #4] 8015f2c: 4a0a ldr r2, [pc, #40] @ (8015f58 ) 8015f2e: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8015f30: 683b ldr r3, [r7, #0] 8015f32: 685b ldr r3, [r3, #4] 8015f34: 4a09 ldr r2, [pc, #36] @ (8015f5c ) 8015f36: 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 ); 8015f38: 4b09 ldr r3, [pc, #36] @ (8015f60 ) 8015f3a: f04f 4200 mov.w r2, #2147483648 @ 0x80000000 8015f3e: 601a str r2, [r3, #0] } 8015f40: bf00 nop 8015f42: 3714 adds r7, #20 8015f44: 46bd mov sp, r7 8015f46: f85d 7b04 ldr.w r7, [sp], #4 8015f4a: 4770 bx lr 8015f4c: 240043b4 .word 0x240043b4 8015f50: 240243b4 .word 0x240243b4 8015f54: 240243bc .word 0x240243bc 8015f58: 240243c4 .word 0x240243c4 8015f5c: 240243c0 .word 0x240243c0 8015f60: 240243d0 .word 0x240243d0 08015f64 : /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 8015f64: b480 push {r7} 8015f66: b085 sub sp, #20 8015f68: af00 add r7, sp, #0 8015f6a: 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 ) 8015f6c: 4b28 ldr r3, [pc, #160] @ (8016010 ) 8015f6e: 60fb str r3, [r7, #12] 8015f70: e002 b.n 8015f78 8015f72: 68fb ldr r3, [r7, #12] 8015f74: 681b ldr r3, [r3, #0] 8015f76: 60fb str r3, [r7, #12] 8015f78: 68fb ldr r3, [r7, #12] 8015f7a: 681b ldr r3, [r3, #0] 8015f7c: 687a ldr r2, [r7, #4] 8015f7e: 429a cmp r2, r3 8015f80: d8f7 bhi.n 8015f72 /* 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; 8015f82: 68fb ldr r3, [r7, #12] 8015f84: 60bb str r3, [r7, #8] if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) 8015f86: 68fb ldr r3, [r7, #12] 8015f88: 685b ldr r3, [r3, #4] 8015f8a: 68ba ldr r2, [r7, #8] 8015f8c: 4413 add r3, r2 8015f8e: 687a ldr r2, [r7, #4] 8015f90: 429a cmp r2, r3 8015f92: d108 bne.n 8015fa6 { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 8015f94: 68fb ldr r3, [r7, #12] 8015f96: 685a ldr r2, [r3, #4] 8015f98: 687b ldr r3, [r7, #4] 8015f9a: 685b ldr r3, [r3, #4] 8015f9c: 441a add r2, r3 8015f9e: 68fb ldr r3, [r7, #12] 8015fa0: 605a str r2, [r3, #4] pxBlockToInsert = pxIterator; 8015fa2: 68fb ldr r3, [r7, #12] 8015fa4: 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; 8015fa6: 687b ldr r3, [r7, #4] 8015fa8: 60bb str r3, [r7, #8] if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) 8015faa: 687b ldr r3, [r7, #4] 8015fac: 685b ldr r3, [r3, #4] 8015fae: 68ba ldr r2, [r7, #8] 8015fb0: 441a add r2, r3 8015fb2: 68fb ldr r3, [r7, #12] 8015fb4: 681b ldr r3, [r3, #0] 8015fb6: 429a cmp r2, r3 8015fb8: d118 bne.n 8015fec { if( pxIterator->pxNextFreeBlock != pxEnd ) 8015fba: 68fb ldr r3, [r7, #12] 8015fbc: 681a ldr r2, [r3, #0] 8015fbe: 4b15 ldr r3, [pc, #84] @ (8016014 ) 8015fc0: 681b ldr r3, [r3, #0] 8015fc2: 429a cmp r2, r3 8015fc4: d00d beq.n 8015fe2 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; 8015fc6: 687b ldr r3, [r7, #4] 8015fc8: 685a ldr r2, [r3, #4] 8015fca: 68fb ldr r3, [r7, #12] 8015fcc: 681b ldr r3, [r3, #0] 8015fce: 685b ldr r3, [r3, #4] 8015fd0: 441a add r2, r3 8015fd2: 687b ldr r3, [r7, #4] 8015fd4: 605a str r2, [r3, #4] pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 8015fd6: 68fb ldr r3, [r7, #12] 8015fd8: 681b ldr r3, [r3, #0] 8015fda: 681a ldr r2, [r3, #0] 8015fdc: 687b ldr r3, [r7, #4] 8015fde: 601a str r2, [r3, #0] 8015fe0: e008 b.n 8015ff4 } else { pxBlockToInsert->pxNextFreeBlock = pxEnd; 8015fe2: 4b0c ldr r3, [pc, #48] @ (8016014 ) 8015fe4: 681a ldr r2, [r3, #0] 8015fe6: 687b ldr r3, [r7, #4] 8015fe8: 601a str r2, [r3, #0] 8015fea: e003 b.n 8015ff4 } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 8015fec: 68fb ldr r3, [r7, #12] 8015fee: 681a ldr r2, [r3, #0] 8015ff0: 687b ldr r3, [r7, #4] 8015ff2: 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 ) 8015ff4: 68fa ldr r2, [r7, #12] 8015ff6: 687b ldr r3, [r7, #4] 8015ff8: 429a cmp r2, r3 8015ffa: d002 beq.n 8016002 { pxIterator->pxNextFreeBlock = pxBlockToInsert; 8015ffc: 68fb ldr r3, [r7, #12] 8015ffe: 687a ldr r2, [r7, #4] 8016000: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } 8016002: bf00 nop 8016004: 3714 adds r7, #20 8016006: 46bd mov sp, r7 8016008: f85d 7b04 ldr.w r7, [sp], #4 801600c: 4770 bx lr 801600e: bf00 nop 8016010: 240243b4 .word 0x240243b4 8016014: 240243bc .word 0x240243bc 08016018 : * @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) { 8016018: b580 push {r7, lr} 801601a: b084 sub sp, #16 801601c: af00 add r7, sp, #0 801601e: 6078 str r0, [r7, #4] 8016020: 6039 str r1, [r7, #0] err_t err; #ifdef LWIP_DEBUG /* catch functions that don't set err */ apimsg->err = ERR_VAL; 8016022: 683b ldr r3, [r7, #0] 8016024: 22fa movs r2, #250 @ 0xfa 8016026: 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)); 8016028: 683b ldr r3, [r7, #0] 801602a: 681b ldr r3, [r3, #0] 801602c: 330c adds r3, #12 801602e: 461a mov r2, r3 8016030: 6839 ldr r1, [r7, #0] 8016032: 6878 ldr r0, [r7, #4] 8016034: f003 fc7c bl 8019930 8016038: 4603 mov r3, r0 801603a: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801603c: f997 300f ldrsb.w r3, [r7, #15] 8016040: 2b00 cmp r3, #0 8016042: d103 bne.n 801604c return apimsg->err; 8016044: 683b ldr r3, [r7, #0] 8016046: f993 3004 ldrsb.w r3, [r3, #4] 801604a: e001 b.n 8016050 } return err; 801604c: f997 300f ldrsb.w r3, [r7, #15] } 8016050: 4618 mov r0, r3 8016052: 3710 adds r7, #16 8016054: 46bd mov sp, r7 8016056: bd80 pop {r7, pc} 08016058 : * @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) { 8016058: b580 push {r7, lr} 801605a: b08c sub sp, #48 @ 0x30 801605c: af00 add r7, sp, #0 801605e: 4603 mov r3, r0 8016060: 603a str r2, [r7, #0] 8016062: 71fb strb r3, [r7, #7] 8016064: 460b mov r3, r1 8016066: 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); 8016068: 79fb ldrb r3, [r7, #7] 801606a: 6839 ldr r1, [r7, #0] 801606c: 4618 mov r0, r3 801606e: f001 f8ad bl 80171cc 8016072: 62f8 str r0, [r7, #44] @ 0x2c if (conn != NULL) { 8016074: 6afb ldr r3, [r7, #44] @ 0x2c 8016076: 2b00 cmp r3, #0 8016078: d054 beq.n 8016124 err_t err; API_MSG_VAR_REF(msg).msg.n.proto = proto; 801607a: 79bb ldrb r3, [r7, #6] 801607c: 743b strb r3, [r7, #16] API_MSG_VAR_REF(msg).conn = conn; 801607e: 6afb ldr r3, [r7, #44] @ 0x2c 8016080: 60bb str r3, [r7, #8] err = netconn_apimsg(lwip_netconn_do_newconn, &API_MSG_VAR_REF(msg)); 8016082: f107 0308 add.w r3, r7, #8 8016086: 4619 mov r1, r3 8016088: 4829 ldr r0, [pc, #164] @ (8016130 ) 801608a: f7ff ffc5 bl 8016018 801608e: 4603 mov r3, r0 8016090: f887 302b strb.w r3, [r7, #43] @ 0x2b if (err != ERR_OK) { 8016094: f997 302b ldrsb.w r3, [r7, #43] @ 0x2b 8016098: 2b00 cmp r3, #0 801609a: d043 beq.n 8016124 LWIP_ASSERT("freeing conn without freeing pcb", conn->pcb.tcp == NULL); 801609c: 6afb ldr r3, [r7, #44] @ 0x2c 801609e: 685b ldr r3, [r3, #4] 80160a0: 2b00 cmp r3, #0 80160a2: d005 beq.n 80160b0 80160a4: 4b23 ldr r3, [pc, #140] @ (8016134 ) 80160a6: 22a3 movs r2, #163 @ 0xa3 80160a8: 4923 ldr r1, [pc, #140] @ (8016138 ) 80160aa: 4824 ldr r0, [pc, #144] @ (801613c ) 80160ac: f014 fbf6 bl 802a89c LWIP_ASSERT("conn has no recvmbox", sys_mbox_valid(&conn->recvmbox)); 80160b0: 6afb ldr r3, [r7, #44] @ 0x2c 80160b2: 3310 adds r3, #16 80160b4: 4618 mov r0, r3 80160b6: f011 f851 bl 802715c 80160ba: 4603 mov r3, r0 80160bc: 2b00 cmp r3, #0 80160be: d105 bne.n 80160cc 80160c0: 4b1c ldr r3, [pc, #112] @ (8016134 ) 80160c2: 22a4 movs r2, #164 @ 0xa4 80160c4: 491e ldr r1, [pc, #120] @ (8016140 ) 80160c6: 481d ldr r0, [pc, #116] @ (801613c ) 80160c8: f014 fbe8 bl 802a89c #if LWIP_TCP LWIP_ASSERT("conn->acceptmbox shouldn't exist", !sys_mbox_valid(&conn->acceptmbox)); 80160cc: 6afb ldr r3, [r7, #44] @ 0x2c 80160ce: 3314 adds r3, #20 80160d0: 4618 mov r0, r3 80160d2: f011 f843 bl 802715c 80160d6: 4603 mov r3, r0 80160d8: 2b00 cmp r3, #0 80160da: d005 beq.n 80160e8 80160dc: 4b15 ldr r3, [pc, #84] @ (8016134 ) 80160de: 22a6 movs r2, #166 @ 0xa6 80160e0: 4918 ldr r1, [pc, #96] @ (8016144 ) 80160e2: 4816 ldr r0, [pc, #88] @ (801613c ) 80160e4: f014 fbda bl 802a89c #endif /* LWIP_TCP */ #if !LWIP_NETCONN_SEM_PER_THREAD LWIP_ASSERT("conn has no op_completed", sys_sem_valid(&conn->op_completed)); 80160e8: 6afb ldr r3, [r7, #44] @ 0x2c 80160ea: 330c adds r3, #12 80160ec: 4618 mov r0, r3 80160ee: f011 f8c3 bl 8027278 80160f2: 4603 mov r3, r0 80160f4: 2b00 cmp r3, #0 80160f6: d105 bne.n 8016104 80160f8: 4b0e ldr r3, [pc, #56] @ (8016134 ) 80160fa: 22a9 movs r2, #169 @ 0xa9 80160fc: 4912 ldr r1, [pc, #72] @ (8016148 ) 80160fe: 480f ldr r0, [pc, #60] @ (801613c ) 8016100: f014 fbcc bl 802a89c sys_sem_free(&conn->op_completed); 8016104: 6afb ldr r3, [r7, #44] @ 0x2c 8016106: 330c adds r3, #12 8016108: 4618 mov r0, r3 801610a: f011 f8a8 bl 802725e #endif /* !LWIP_NETCONN_SEM_PER_THREAD */ sys_mbox_free(&conn->recvmbox); 801610e: 6afb ldr r3, [r7, #44] @ 0x2c 8016110: 3310 adds r3, #16 8016112: 4618 mov r0, r3 8016114: f010 ffae bl 8027074 memp_free(MEMP_NETCONN, conn); 8016118: 6af9 ldr r1, [r7, #44] @ 0x2c 801611a: 2007 movs r0, #7 801611c: f004 fa58 bl 801a5d0 API_MSG_VAR_FREE(msg); return NULL; 8016120: 2300 movs r3, #0 8016122: e000 b.n 8016126 } } API_MSG_VAR_FREE(msg); return conn; 8016124: 6afb ldr r3, [r7, #44] @ 0x2c } 8016126: 4618 mov r0, r3 8016128: 3730 adds r7, #48 @ 0x30 801612a: 46bd mov sp, r7 801612c: bd80 pop {r7, pc} 801612e: bf00 nop 8016130: 080171a1 .word 0x080171a1 8016134: 0802dbb4 .word 0x0802dbb4 8016138: 0802dbe8 .word 0x0802dbe8 801613c: 0802dc0c .word 0x0802dc0c 8016140: 0802dc34 .word 0x0802dc34 8016144: 0802dc4c .word 0x0802dc4c 8016148: 0802dc70 .word 0x0802dc70 0801614c : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_prepare_delete(struct netconn *conn) { 801614c: b580 push {r7, lr} 801614e: b08c sub sp, #48 @ 0x30 8016150: af00 add r7, sp, #0 8016152: 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) { 8016154: 687b ldr r3, [r7, #4] 8016156: 2b00 cmp r3, #0 8016158: d101 bne.n 801615e return ERR_OK; 801615a: 2300 movs r3, #0 801615c: e014 b.n 8016188 } API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 801615e: 687b ldr r3, [r7, #4] 8016160: 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 = 8016162: 2329 movs r3, #41 @ 0x29 8016164: 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)); 8016166: f107 030c add.w r3, r7, #12 801616a: 4619 mov r1, r3 801616c: 4808 ldr r0, [pc, #32] @ (8016190 ) 801616e: f7ff ff53 bl 8016018 8016172: 4603 mov r3, r0 8016174: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); if (err != ERR_OK) { 8016178: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f 801617c: 2b00 cmp r3, #0 801617e: d002 beq.n 8016186 return err; 8016180: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f 8016184: e000 b.n 8016188 } return ERR_OK; 8016186: 2300 movs r3, #0 } 8016188: 4618 mov r0, r3 801618a: 3730 adds r7, #48 @ 0x30 801618c: 46bd mov sp, r7 801618e: bd80 pop {r7, pc} 8016190: 08017725 .word 0x08017725 08016194 : * @param conn the netconn to delete * @return ERR_OK if the connection was deleted */ err_t netconn_delete(struct netconn *conn) { 8016194: b580 push {r7, lr} 8016196: b084 sub sp, #16 8016198: af00 add r7, sp, #0 801619a: 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) { 801619c: 687b ldr r3, [r7, #4] 801619e: 2b00 cmp r3, #0 80161a0: d101 bne.n 80161a6 return ERR_OK; 80161a2: 2300 movs r3, #0 80161a4: e00d b.n 80161c2 /* Already called netconn_prepare_delete() before */ err = ERR_OK; } else #endif /* LWIP_NETCONN_FULLDUPLEX */ { err = netconn_prepare_delete(conn); 80161a6: 6878 ldr r0, [r7, #4] 80161a8: f7ff ffd0 bl 801614c 80161ac: 4603 mov r3, r0 80161ae: 73fb strb r3, [r7, #15] } if (err == ERR_OK) { 80161b0: f997 300f ldrsb.w r3, [r7, #15] 80161b4: 2b00 cmp r3, #0 80161b6: d102 bne.n 80161be netconn_free(conn); 80161b8: 6878 ldr r0, [r7, #4] 80161ba: f001 f881 bl 80172c0 } return err; 80161be: f997 300f ldrsb.w r3, [r7, #15] } 80161c2: 4618 mov r0, r3 80161c4: 3710 adds r7, #16 80161c6: 46bd mov sp, r7 80161c8: bd80 pop {r7, pc} ... 080161cc : * @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) { 80161cc: b580 push {r7, lr} 80161ce: b08e sub sp, #56 @ 0x38 80161d0: af00 add r7, sp, #0 80161d2: 60f8 str r0, [r7, #12] 80161d4: 60b9 str r1, [r7, #8] 80161d6: 607a str r2, [r7, #4] 80161d8: 70fb strb r3, [r7, #3] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_getaddr: invalid conn", (conn != NULL), return ERR_ARG;); 80161da: 68fb ldr r3, [r7, #12] 80161dc: 2b00 cmp r3, #0 80161de: d109 bne.n 80161f4 80161e0: 4b1d ldr r3, [pc, #116] @ (8016258 ) 80161e2: f44f 7289 mov.w r2, #274 @ 0x112 80161e6: 491d ldr r1, [pc, #116] @ (801625c ) 80161e8: 481d ldr r0, [pc, #116] @ (8016260 ) 80161ea: f014 fb57 bl 802a89c 80161ee: f06f 030f mvn.w r3, #15 80161f2: e02d b.n 8016250 LWIP_ERROR("netconn_getaddr: invalid addr", (addr != NULL), return ERR_ARG;); 80161f4: 68bb ldr r3, [r7, #8] 80161f6: 2b00 cmp r3, #0 80161f8: d109 bne.n 801620e 80161fa: 4b17 ldr r3, [pc, #92] @ (8016258 ) 80161fc: f240 1213 movw r2, #275 @ 0x113 8016200: 4918 ldr r1, [pc, #96] @ (8016264 ) 8016202: 4817 ldr r0, [pc, #92] @ (8016260 ) 8016204: f014 fb4a bl 802a89c 8016208: f06f 030f mvn.w r3, #15 801620c: e020 b.n 8016250 LWIP_ERROR("netconn_getaddr: invalid port", (port != NULL), return ERR_ARG;); 801620e: 687b ldr r3, [r7, #4] 8016210: 2b00 cmp r3, #0 8016212: d109 bne.n 8016228 8016214: 4b10 ldr r3, [pc, #64] @ (8016258 ) 8016216: f44f 728a mov.w r2, #276 @ 0x114 801621a: 4913 ldr r1, [pc, #76] @ (8016268 ) 801621c: 4810 ldr r0, [pc, #64] @ (8016260 ) 801621e: f014 fb3d bl 802a89c 8016222: f06f 030f mvn.w r3, #15 8016226: e013 b.n 8016250 API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8016228: 68fb ldr r3, [r7, #12] 801622a: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.ad.local = local; 801622c: 78fb ldrb r3, [r7, #3] 801622e: 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; 8016232: 68bb ldr r3, [r7, #8] 8016234: 61fb str r3, [r7, #28] msg.msg.ad.port = port; 8016236: 687b ldr r3, [r7, #4] 8016238: 623b str r3, [r7, #32] err = netconn_apimsg(lwip_netconn_do_getaddr, &msg); 801623a: f107 0314 add.w r3, r7, #20 801623e: 4619 mov r1, r3 8016240: 480a ldr r0, [pc, #40] @ (801626c ) 8016242: f7ff fee9 bl 8016018 8016246: 4603 mov r3, r0 8016248: f887 3037 strb.w r3, [r7, #55] @ 0x37 #endif /* LWIP_MPU_COMPATIBLE */ API_MSG_VAR_FREE(msg); return err; 801624c: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 8016250: 4618 mov r0, r3 8016252: 3738 adds r7, #56 @ 0x38 8016254: 46bd mov sp, r7 8016256: bd80 pop {r7, pc} 8016258: 0802dbb4 .word 0x0802dbb4 801625c: 0802dc8c .word 0x0802dc8c 8016260: 0802dc0c .word 0x0802dc0c 8016264: 0802dcac .word 0x0802dcac 8016268: 0802dccc .word 0x0802dccc 801626c: 08018181 .word 0x08018181 08016270 : * @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) { 8016270: b580 push {r7, lr} 8016272: b08e sub sp, #56 @ 0x38 8016274: af00 add r7, sp, #0 8016276: 60f8 str r0, [r7, #12] 8016278: 60b9 str r1, [r7, #8] 801627a: 4613 mov r3, r2 801627c: 80fb strh r3, [r7, #6] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_connect: invalid conn", (conn != NULL), return ERR_ARG;); 801627e: 68fb ldr r3, [r7, #12] 8016280: 2b00 cmp r3, #0 8016282: d109 bne.n 8016298 8016284: 4b11 ldr r3, [pc, #68] @ (80162cc ) 8016286: f44f 72bf mov.w r2, #382 @ 0x17e 801628a: 4911 ldr r1, [pc, #68] @ (80162d0 ) 801628c: 4811 ldr r0, [pc, #68] @ (80162d4 ) 801628e: f014 fb05 bl 802a89c 8016292: f06f 030f mvn.w r3, #15 8016296: e015 b.n 80162c4 #if LWIP_IPV4 /* Don't propagate NULL pointer (IP_ADDR_ANY alias) to subsequent functions */ if (addr == NULL) { 8016298: 68bb ldr r3, [r7, #8] 801629a: 2b00 cmp r3, #0 801629c: d101 bne.n 80162a2 addr = IP4_ADDR_ANY; 801629e: 4b0e ldr r3, [pc, #56] @ (80162d8 ) 80162a0: 60bb str r3, [r7, #8] } #endif /* LWIP_IPV4 */ API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 80162a2: 68fb ldr r3, [r7, #12] 80162a4: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.bc.ipaddr = API_MSG_VAR_REF(addr); 80162a6: 68bb ldr r3, [r7, #8] 80162a8: 61fb str r3, [r7, #28] API_MSG_VAR_REF(msg).msg.bc.port = port; 80162aa: 88fb ldrh r3, [r7, #6] 80162ac: 843b strh r3, [r7, #32] err = netconn_apimsg(lwip_netconn_do_connect, &API_MSG_VAR_REF(msg)); 80162ae: f107 0314 add.w r3, r7, #20 80162b2: 4619 mov r1, r3 80162b4: 4809 ldr r0, [pc, #36] @ (80162dc ) 80162b6: f7ff feaf bl 8016018 80162ba: 4603 mov r3, r0 80162bc: f887 3037 strb.w r3, [r7, #55] @ 0x37 API_MSG_VAR_FREE(msg); return err; 80162c0: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 80162c4: 4618 mov r0, r3 80162c6: 3738 adds r7, #56 @ 0x38 80162c8: 46bd mov sp, r7 80162ca: bd80 pop {r7, pc} 80162cc: 0802dbb4 .word 0x0802dbb4 80162d0: 0802dd28 .word 0x0802dd28 80162d4: 0802dc0c .word 0x0802dc0c 80162d8: 08031ca8 .word 0x08031ca8 80162dc: 08017a11 .word 0x08017a11 080162e0 : * @param conn the netconn to disconnect * @return See @ref err_t */ err_t netconn_disconnect(struct netconn *conn) { 80162e0: b580 push {r7, lr} 80162e2: b08c sub sp, #48 @ 0x30 80162e4: af00 add r7, sp, #0 80162e6: 6078 str r0, [r7, #4] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_disconnect: invalid conn", (conn != NULL), return ERR_ARG;); 80162e8: 687b ldr r3, [r7, #4] 80162ea: 2b00 cmp r3, #0 80162ec: d109 bne.n 8016302 80162ee: 4b0d ldr r3, [pc, #52] @ (8016324 ) 80162f0: f44f 72cf mov.w r2, #414 @ 0x19e 80162f4: 490c ldr r1, [pc, #48] @ (8016328 ) 80162f6: 480d ldr r0, [pc, #52] @ (801632c ) 80162f8: f014 fad0 bl 802a89c 80162fc: f06f 030f mvn.w r3, #15 8016300: e00c b.n 801631c API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 8016302: 687b ldr r3, [r7, #4] 8016304: 60fb str r3, [r7, #12] err = netconn_apimsg(lwip_netconn_do_disconnect, &API_MSG_VAR_REF(msg)); 8016306: f107 030c add.w r3, r7, #12 801630a: 4619 mov r1, r3 801630c: 4808 ldr r0, [pc, #32] @ (8016330 ) 801630e: f7ff fe83 bl 8016018 8016312: 4603 mov r3, r0 8016314: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 8016318: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 801631c: 4618 mov r0, r3 801631e: 3730 adds r7, #48 @ 0x30 8016320: 46bd mov sp, r7 8016322: bd80 pop {r7, pc} 8016324: 0802dbb4 .word 0x0802dbb4 8016328: 0802dd48 .word 0x0802dd48 801632c: 0802dc0c .word 0x0802dc0c 8016330: 08017b91 .word 0x08017b91 08016334 : * 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) { 8016334: b580 push {r7, lr} 8016336: b08a sub sp, #40 @ 0x28 8016338: af00 add r7, sp, #0 801633a: 60f8 str r0, [r7, #12] 801633c: 60b9 str r1, [r7, #8] 801633e: 4613 mov r3, r2 8016340: 71fb strb r3, [r7, #7] void *buf = NULL; 8016342: 2300 movs r3, #0 8016344: 61bb str r3, [r7, #24] u16_t len; LWIP_ERROR("netconn_recv: invalid pointer", (new_buf != NULL), return ERR_ARG;); 8016346: 68bb ldr r3, [r7, #8] 8016348: 2b00 cmp r3, #0 801634a: d109 bne.n 8016360 801634c: 4b64 ldr r3, [pc, #400] @ (80164e0 ) 801634e: f44f 7212 mov.w r2, #584 @ 0x248 8016352: 4964 ldr r1, [pc, #400] @ (80164e4 ) 8016354: 4864 ldr r0, [pc, #400] @ (80164e8 ) 8016356: f014 faa1 bl 802a89c 801635a: f06f 030f mvn.w r3, #15 801635e: e0bb b.n 80164d8 *new_buf = NULL; 8016360: 68bb ldr r3, [r7, #8] 8016362: 2200 movs r2, #0 8016364: 601a str r2, [r3, #0] LWIP_ERROR("netconn_recv: invalid conn", (conn != NULL), return ERR_ARG;); 8016366: 68fb ldr r3, [r7, #12] 8016368: 2b00 cmp r3, #0 801636a: d109 bne.n 8016380 801636c: 4b5c ldr r3, [pc, #368] @ (80164e0 ) 801636e: f240 224a movw r2, #586 @ 0x24a 8016372: 495e ldr r1, [pc, #376] @ (80164ec ) 8016374: 485c ldr r0, [pc, #368] @ (80164e8 ) 8016376: f014 fa91 bl 802a89c 801637a: f06f 030f mvn.w r3, #15 801637e: e0ab b.n 80164d8 if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 8016380: 68fb ldr r3, [r7, #12] 8016382: 3310 adds r3, #16 8016384: 4618 mov r0, r3 8016386: f010 fee9 bl 802715c 801638a: 4603 mov r3, r0 801638c: 2b00 cmp r3, #0 801638e: d10e bne.n 80163ae err_t err = netconn_err(conn); 8016390: 68f8 ldr r0, [r7, #12] 8016392: f000 fb1f bl 80169d4 8016396: 4603 mov r3, r0 8016398: 77fb strb r3, [r7, #31] if (err != ERR_OK) { 801639a: f997 301f ldrsb.w r3, [r7, #31] 801639e: 2b00 cmp r3, #0 80163a0: d002 beq.n 80163a8 /* return pending error */ return err; 80163a2: f997 301f ldrsb.w r3, [r7, #31] 80163a6: e097 b.n 80164d8 } return ERR_CONN; 80163a8: f06f 030a mvn.w r3, #10 80163ac: e094 b.n 80164d8 } NETCONN_MBOX_WAITING_INC(conn); if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || 80163ae: 68fb ldr r3, [r7, #12] 80163b0: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80163b4: f003 0302 and.w r3, r3, #2 80163b8: 2b00 cmp r3, #0 80163ba: d110 bne.n 80163de 80163bc: 79fb ldrb r3, [r7, #7] 80163be: f003 0304 and.w r3, r3, #4 80163c2: 2b00 cmp r3, #0 80163c4: d10b bne.n 80163de (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { 80163c6: 68fb ldr r3, [r7, #12] 80163c8: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80163cc: f003 0301 and.w r3, r3, #1 if (netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK) || 80163d0: 2b00 cmp r3, #0 80163d2: d104 bne.n 80163de (conn->flags & NETCONN_FLAG_MBOXCLOSED) || (conn->pending_err != ERR_OK)) { 80163d4: 68fb ldr r3, [r7, #12] 80163d6: f993 3008 ldrsb.w r3, [r3, #8] 80163da: 2b00 cmp r3, #0 80163dc: d025 beq.n 801642a if (sys_arch_mbox_tryfetch(&conn->recvmbox, &buf) == SYS_ARCH_TIMEOUT) { 80163de: 68fb ldr r3, [r7, #12] 80163e0: 3310 adds r3, #16 80163e2: f107 0218 add.w r2, r7, #24 80163e6: 4611 mov r1, r2 80163e8: 4618 mov r0, r3 80163ea: f010 fea0 bl 802712e 80163ee: 4603 mov r3, r0 80163f0: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80163f4: d12a bne.n 801644c err_t err; NETCONN_MBOX_WAITING_DEC(conn); err = netconn_err(conn); 80163f6: 68f8 ldr r0, [r7, #12] 80163f8: f000 faec bl 80169d4 80163fc: 4603 mov r3, r0 80163fe: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (err != ERR_OK) { 8016402: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 8016406: 2b00 cmp r3, #0 8016408: d002 beq.n 8016410 /* return pending error */ return err; 801640a: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801640e: e063 b.n 80164d8 } if (conn->flags & NETCONN_FLAG_MBOXCLOSED) { 8016410: 68fb ldr r3, [r7, #12] 8016412: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016416: f003 0301 and.w r3, r3, #1 801641a: 2b00 cmp r3, #0 801641c: d002 beq.n 8016424 return ERR_CONN; 801641e: f06f 030a mvn.w r3, #10 8016422: e059 b.n 80164d8 } return ERR_WOULDBLOCK; 8016424: f06f 0306 mvn.w r3, #6 8016428: e056 b.n 80164d8 } } else { #if LWIP_SO_RCVTIMEO if (sys_arch_mbox_fetch(&conn->recvmbox, &buf, conn->recv_timeout) == SYS_ARCH_TIMEOUT) { 801642a: 68fb ldr r3, [r7, #12] 801642c: f103 0010 add.w r0, r3, #16 8016430: 68fb ldr r3, [r7, #12] 8016432: 69da ldr r2, [r3, #28] 8016434: f107 0318 add.w r3, r7, #24 8016438: 4619 mov r1, r3 801643a: f010 fe47 bl 80270cc 801643e: 4603 mov r3, r0 8016440: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8016444: d102 bne.n 801644c NETCONN_MBOX_WAITING_DEC(conn); return ERR_TIMEOUT; 8016446: f06f 0302 mvn.w r3, #2 801644a: e045 b.n 80164d8 } #endif #if LWIP_TCP #if (LWIP_UDP || LWIP_RAW) if (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) 801644c: 68fb ldr r3, [r7, #12] 801644e: 781b ldrb r3, [r3, #0] 8016450: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016454: 2b10 cmp r3, #16 8016456: d117 bne.n 8016488 #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)) { 8016458: 69bb ldr r3, [r7, #24] 801645a: f107 0217 add.w r2, r7, #23 801645e: 4611 mov r1, r2 8016460: 4618 mov r0, r3 8016462: f000 fb09 bl 8016a78 8016466: 4603 mov r3, r0 8016468: 2b00 cmp r3, #0 801646a: d009 beq.n 8016480 /* new_buf has been zeroed above already */ if (err == ERR_CLSD) { 801646c: f997 3017 ldrsb.w r3, [r7, #23] 8016470: f113 0f0f cmn.w r3, #15 8016474: d101 bne.n 801647a /* connection closed translates to ERR_OK with *new_buf == NULL */ return ERR_OK; 8016476: 2300 movs r3, #0 8016478: e02e b.n 80164d8 } return err; 801647a: f997 3017 ldrsb.w r3, [r7, #23] 801647e: e02b b.n 80164d8 } len = ((struct pbuf *)buf)->tot_len; 8016480: 69bb ldr r3, [r7, #24] 8016482: 891b ldrh r3, [r3, #8] 8016484: 84fb strh r3, [r7, #38] @ 0x26 8016486: e00d b.n 80164a4 #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); 8016488: 69bb ldr r3, [r7, #24] 801648a: 2b00 cmp r3, #0 801648c: d106 bne.n 801649c 801648e: 4b14 ldr r3, [pc, #80] @ (80164e0 ) 8016490: f240 2291 movw r2, #657 @ 0x291 8016494: 4916 ldr r1, [pc, #88] @ (80164f0 ) 8016496: 4814 ldr r0, [pc, #80] @ (80164e8 ) 8016498: f014 fa00 bl 802a89c len = netbuf_len((struct netbuf *)buf); 801649c: 69bb ldr r3, [r7, #24] 801649e: 681b ldr r3, [r3, #0] 80164a0: 891b ldrh r3, [r3, #8] 80164a2: 84fb strh r3, [r7, #38] @ 0x26 } #endif /* (LWIP_UDP || LWIP_RAW) */ #if LWIP_SO_RCVBUF SYS_ARCH_DEC(conn->recv_avail, len); 80164a4: f010 ff64 bl 8027370 80164a8: 6238 str r0, [r7, #32] 80164aa: 68fb ldr r3, [r7, #12] 80164ac: 6a5a ldr r2, [r3, #36] @ 0x24 80164ae: 8cfb ldrh r3, [r7, #38] @ 0x26 80164b0: 1ad2 subs r2, r2, r3 80164b2: 68fb ldr r3, [r7, #12] 80164b4: 625a str r2, [r3, #36] @ 0x24 80164b6: 6a38 ldr r0, [r7, #32] 80164b8: f010 ff68 bl 802738c #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVMINUS, len); 80164bc: 68fb ldr r3, [r7, #12] 80164be: 6b1b ldr r3, [r3, #48] @ 0x30 80164c0: 2b00 cmp r3, #0 80164c2: d005 beq.n 80164d0 80164c4: 68fb ldr r3, [r7, #12] 80164c6: 6b1b ldr r3, [r3, #48] @ 0x30 80164c8: 8cfa ldrh r2, [r7, #38] @ 0x26 80164ca: 2101 movs r1, #1 80164cc: 68f8 ldr r0, [r7, #12] 80164ce: 4798 blx r3 LWIP_DEBUGF(API_LIB_DEBUG, ("netconn_recv_data: received %p, len=%"U16_F"\n", buf, len)); *new_buf = buf; 80164d0: 69ba ldr r2, [r7, #24] 80164d2: 68bb ldr r3, [r7, #8] 80164d4: 601a str r2, [r3, #0] /* don't set conn->last_err: it's only ERR_OK, anyway */ return ERR_OK; 80164d6: 2300 movs r3, #0 } 80164d8: 4618 mov r0, r3 80164da: 3728 adds r7, #40 @ 0x28 80164dc: 46bd mov sp, r7 80164de: bd80 pop {r7, pc} 80164e0: 0802dbb4 .word 0x0802dbb4 80164e4: 0802ddcc .word 0x0802ddcc 80164e8: 0802dc0c .word 0x0802dc0c 80164ec: 0802ddec .word 0x0802ddec 80164f0: 0802de08 .word 0x0802de08 080164f4 : #if LWIP_TCP static err_t netconn_tcp_recvd_msg(struct netconn *conn, size_t len, struct api_msg *msg) { 80164f4: b580 push {r7, lr} 80164f6: b084 sub sp, #16 80164f8: af00 add r7, sp, #0 80164fa: 60f8 str r0, [r7, #12] 80164fc: 60b9 str r1, [r7, #8] 80164fe: 607a str r2, [r7, #4] LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 8016500: 68fb ldr r3, [r7, #12] 8016502: 2b00 cmp r3, #0 8016504: d005 beq.n 8016512 8016506: 68fb ldr r3, [r7, #12] 8016508: 781b ldrb r3, [r3, #0] 801650a: f003 03f0 and.w r3, r3, #240 @ 0xf0 801650e: 2b10 cmp r3, #16 8016510: d009 beq.n 8016526 8016512: 4b0c ldr r3, [pc, #48] @ (8016544 ) 8016514: f240 22a7 movw r2, #679 @ 0x2a7 8016518: 490b ldr r1, [pc, #44] @ (8016548 ) 801651a: 480c ldr r0, [pc, #48] @ (801654c ) 801651c: f014 f9be bl 802a89c 8016520: f06f 030f mvn.w r3, #15 8016524: e00a b.n 801653c NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); msg->conn = conn; 8016526: 687b ldr r3, [r7, #4] 8016528: 68fa ldr r2, [r7, #12] 801652a: 601a str r2, [r3, #0] msg->msg.r.len = len; 801652c: 687b ldr r3, [r7, #4] 801652e: 68ba ldr r2, [r7, #8] 8016530: 609a str r2, [r3, #8] return netconn_apimsg(lwip_netconn_do_recv, msg); 8016532: 6879 ldr r1, [r7, #4] 8016534: 4806 ldr r0, [pc, #24] @ (8016550 ) 8016536: f7ff fd6f bl 8016018 801653a: 4603 mov r3, r0 } 801653c: 4618 mov r0, r3 801653e: 3710 adds r7, #16 8016540: 46bd mov sp, r7 8016542: bd80 pop {r7, pc} 8016544: 0802dbb4 .word 0x0802dbb4 8016548: 0802de14 .word 0x0802de14 801654c: 0802dc0c .word 0x0802dc0c 8016550: 08017c67 .word 0x08017c67 08016554 : err_t netconn_tcp_recvd(struct netconn *conn, size_t len) { 8016554: b580 push {r7, lr} 8016556: b08c sub sp, #48 @ 0x30 8016558: af00 add r7, sp, #0 801655a: 6078 str r0, [r7, #4] 801655c: 6039 str r1, [r7, #0] err_t err; API_MSG_VAR_DECLARE(msg); LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 801655e: 687b ldr r3, [r7, #4] 8016560: 2b00 cmp r3, #0 8016562: d005 beq.n 8016570 8016564: 687b ldr r3, [r7, #4] 8016566: 781b ldrb r3, [r3, #0] 8016568: f003 03f0 and.w r3, r3, #240 @ 0xf0 801656c: 2b10 cmp r3, #16 801656e: d009 beq.n 8016584 8016570: 4b0c ldr r3, [pc, #48] @ (80165a4 ) 8016572: f240 22b5 movw r2, #693 @ 0x2b5 8016576: 490c ldr r1, [pc, #48] @ (80165a8 ) 8016578: 480c ldr r0, [pc, #48] @ (80165ac ) 801657a: f014 f98f bl 802a89c 801657e: f06f 030f mvn.w r3, #15 8016582: e00b b.n 801659c 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)); 8016584: f107 030c add.w r3, r7, #12 8016588: 461a mov r2, r3 801658a: 6839 ldr r1, [r7, #0] 801658c: 6878 ldr r0, [r7, #4] 801658e: f7ff ffb1 bl 80164f4 8016592: 4603 mov r3, r0 8016594: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 8016598: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 801659c: 4618 mov r0, r3 801659e: 3730 adds r7, #48 @ 0x30 80165a0: 46bd mov sp, r7 80165a2: bd80 pop {r7, pc} 80165a4: 0802dbb4 .word 0x0802dbb4 80165a8: 0802de14 .word 0x0802de14 80165ac: 0802dc0c .word 0x0802dc0c 080165b0 : static err_t netconn_recv_data_tcp(struct netconn *conn, struct pbuf **new_buf, u8_t apiflags) { 80165b0: b580 push {r7, lr} 80165b2: b090 sub sp, #64 @ 0x40 80165b4: af00 add r7, sp, #0 80165b6: 60f8 str r0, [r7, #12] 80165b8: 60b9 str r1, [r7, #8] 80165ba: 4613 mov r3, r2 80165bc: 71fb strb r3, [r7, #7] API_MSG_VAR_DECLARE(msg); #if LWIP_MPU_COMPATIBLE msg = NULL; #endif if (!NETCONN_RECVMBOX_WAITABLE(conn)) { 80165be: 68fb ldr r3, [r7, #12] 80165c0: 3310 adds r3, #16 80165c2: 4618 mov r0, r3 80165c4: f010 fdca bl 802715c 80165c8: 4603 mov r3, r0 80165ca: 2b00 cmp r3, #0 80165cc: d102 bne.n 80165d4 /* This only happens when calling this function more than once *after* receiving FIN */ return ERR_CONN; 80165ce: f06f 030a mvn.w r3, #10 80165d2: e072 b.n 80166ba } if (netconn_is_flag_set(conn, NETCONN_FIN_RX_PENDING)) { 80165d4: 68fb ldr r3, [r7, #12] 80165d6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80165da: b25b sxtb r3, r3 80165dc: 2b00 cmp r3, #0 80165de: da09 bge.n 80165f4 netconn_clear_flags(conn, NETCONN_FIN_RX_PENDING); 80165e0: 68fb ldr r3, [r7, #12] 80165e2: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 80165e6: f003 037f and.w r3, r3, #127 @ 0x7f 80165ea: b2da uxtb r2, r3 80165ec: 68fb ldr r3, [r7, #12] 80165ee: f883 2028 strb.w r2, [r3, #40] @ 0x28 goto handle_fin; 80165f2: e03b b.n 801666c /* 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); 80165f4: 79fb ldrb r3, [r7, #7] 80165f6: 461a mov r2, r3 80165f8: 68b9 ldr r1, [r7, #8] 80165fa: 68f8 ldr r0, [r7, #12] 80165fc: f7ff fe9a bl 8016334 8016600: 4603 mov r3, r0 8016602: f887 303f strb.w r3, [r7, #63] @ 0x3f if (err != ERR_OK) { 8016606: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 801660a: 2b00 cmp r3, #0 801660c: d002 beq.n 8016614 if (!(apiflags & NETCONN_NOAUTORCVD)) { API_MSG_VAR_FREE(msg); } return err; 801660e: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 8016612: e052 b.n 80166ba } buf = *new_buf; 8016614: 68bb ldr r3, [r7, #8] 8016616: 681b ldr r3, [r3, #0] 8016618: 63bb str r3, [r7, #56] @ 0x38 if (!(apiflags & NETCONN_NOAUTORCVD)) { 801661a: 79fb ldrb r3, [r7, #7] 801661c: f003 0308 and.w r3, r3, #8 8016620: 2b00 cmp r3, #0 8016622: d10e bne.n 8016642 /* Let the stack know that we have taken the data. */ u16_t len = buf ? buf->tot_len : 1; 8016624: 6bbb ldr r3, [r7, #56] @ 0x38 8016626: 2b00 cmp r3, #0 8016628: d002 beq.n 8016630 801662a: 6bbb ldr r3, [r7, #56] @ 0x38 801662c: 891b ldrh r3, [r3, #8] 801662e: e000 b.n 8016632 8016630: 2301 movs r3, #1 8016632: 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)); 8016634: 8efb ldrh r3, [r7, #54] @ 0x36 8016636: f107 0214 add.w r2, r7, #20 801663a: 4619 mov r1, r3 801663c: 68f8 ldr r0, [r7, #12] 801663e: f7ff ff59 bl 80164f4 API_MSG_VAR_FREE(msg); } /* If we are closed, we indicate that we no longer wish to use the socket */ if (buf == NULL) { 8016642: 6bbb ldr r3, [r7, #56] @ 0x38 8016644: 2b00 cmp r3, #0 8016646: d136 bne.n 80166b6 if (apiflags & NETCONN_NOFIN) { 8016648: 79fb ldrb r3, [r7, #7] 801664a: f003 0310 and.w r3, r3, #16 801664e: 2b00 cmp r3, #0 8016650: d00b beq.n 801666a /* 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); 8016652: 68fb ldr r3, [r7, #12] 8016654: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016658: f063 037f orn r3, r3, #127 @ 0x7f 801665c: b2da uxtb r2, r3 801665e: 68fb ldr r3, [r7, #12] 8016660: f883 2028 strb.w r2, [r3, #40] @ 0x28 return ERR_WOULDBLOCK; 8016664: f06f 0306 mvn.w r3, #6 8016668: e027 b.n 80166ba } else { handle_fin: 801666a: bf00 nop API_EVENT(conn, NETCONN_EVT_RCVMINUS, 0); 801666c: 68fb ldr r3, [r7, #12] 801666e: 6b1b ldr r3, [r3, #48] @ 0x30 8016670: 2b00 cmp r3, #0 8016672: d005 beq.n 8016680 8016674: 68fb ldr r3, [r7, #12] 8016676: 6b1b ldr r3, [r3, #48] @ 0x30 8016678: 2200 movs r2, #0 801667a: 2101 movs r1, #1 801667c: 68f8 ldr r0, [r7, #12] 801667e: 4798 blx r3 if (conn->pcb.ip == NULL) { 8016680: 68fb ldr r3, [r7, #12] 8016682: 685b ldr r3, [r3, #4] 8016684: 2b00 cmp r3, #0 8016686: d10f bne.n 80166a8 /* race condition: RST during recv */ err = netconn_err(conn); 8016688: 68f8 ldr r0, [r7, #12] 801668a: f000 f9a3 bl 80169d4 801668e: 4603 mov r3, r0 8016690: f887 303f strb.w r3, [r7, #63] @ 0x3f if (err != ERR_OK) { 8016694: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 8016698: 2b00 cmp r3, #0 801669a: d002 beq.n 80166a2 return err; 801669c: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f 80166a0: e00b b.n 80166ba } return ERR_RST; 80166a2: f06f 030d mvn.w r3, #13 80166a6: e008 b.n 80166ba } /* RX side is closed, so deallocate the recvmbox */ netconn_close_shutdown(conn, NETCONN_SHUT_RD); 80166a8: 2101 movs r1, #1 80166aa: 68f8 ldr r0, [r7, #12] 80166ac: f000 f962 bl 8016974 /* Don' store ERR_CLSD as conn->err since we are only half-closed */ return ERR_CLSD; 80166b0: f06f 030e mvn.w r3, #14 80166b4: e001 b.n 80166ba } } return err; 80166b6: f997 303f ldrsb.w r3, [r7, #63] @ 0x3f } 80166ba: 4618 mov r0, r3 80166bc: 3740 adds r7, #64 @ 0x40 80166be: 46bd mov sp, r7 80166c0: bd80 pop {r7, pc} ... 080166c4 : * 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) { 80166c4: b580 push {r7, lr} 80166c6: b084 sub sp, #16 80166c8: af00 add r7, sp, #0 80166ca: 60f8 str r0, [r7, #12] 80166cc: 60b9 str r1, [r7, #8] 80166ce: 4613 mov r3, r2 80166d0: 71fb strb r3, [r7, #7] LWIP_ERROR("netconn_recv_tcp_pbuf: invalid conn", (conn != NULL) && 80166d2: 68fb ldr r3, [r7, #12] 80166d4: 2b00 cmp r3, #0 80166d6: d005 beq.n 80166e4 80166d8: 68fb ldr r3, [r7, #12] 80166da: 781b ldrb r3, [r3, #0] 80166dc: f003 03f0 and.w r3, r3, #240 @ 0xf0 80166e0: 2b10 cmp r3, #16 80166e2: d009 beq.n 80166f8 80166e4: 4b0a ldr r3, [pc, #40] @ (8016710 ) 80166e6: f240 3225 movw r2, #805 @ 0x325 80166ea: 490a ldr r1, [pc, #40] @ (8016714 ) 80166ec: 480a ldr r0, [pc, #40] @ (8016718 ) 80166ee: f014 f8d5 bl 802a89c 80166f2: f06f 030f mvn.w r3, #15 80166f6: e006 b.n 8016706 NETCONNTYPE_GROUP(netconn_type(conn)) == NETCONN_TCP, return ERR_ARG;); return netconn_recv_data_tcp(conn, new_buf, apiflags); 80166f8: 79fb ldrb r3, [r7, #7] 80166fa: 461a mov r2, r3 80166fc: 68b9 ldr r1, [r7, #8] 80166fe: 68f8 ldr r0, [r7, #12] 8016700: f7ff ff56 bl 80165b0 8016704: 4603 mov r3, r0 } 8016706: 4618 mov r0, r3 8016708: 3710 adds r7, #16 801670a: 46bd mov sp, r7 801670c: bd80 pop {r7, pc} 801670e: bf00 nop 8016710: 0802dbb4 .word 0x0802dbb4 8016714: 0802de14 .word 0x0802de14 8016718: 0802dc0c .word 0x0802dc0c 0801671c : * 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) { 801671c: b580 push {r7, lr} 801671e: b084 sub sp, #16 8016720: af00 add r7, sp, #0 8016722: 60f8 str r0, [r7, #12] 8016724: 60b9 str r1, [r7, #8] 8016726: 4613 mov r3, r2 8016728: 71fb strb r3, [r7, #7] LWIP_ERROR("netconn_recv_udp_raw_netbuf: invalid conn", (conn != NULL) && 801672a: 68fb ldr r3, [r7, #12] 801672c: 2b00 cmp r3, #0 801672e: d005 beq.n 801673c 8016730: 68fb ldr r3, [r7, #12] 8016732: 781b ldrb r3, [r3, #0] 8016734: f003 03f0 and.w r3, r3, #240 @ 0xf0 8016738: 2b10 cmp r3, #16 801673a: d109 bne.n 8016750 801673c: 4b0a ldr r3, [pc, #40] @ (8016768 ) 801673e: f44f 7253 mov.w r2, #844 @ 0x34c 8016742: 490a ldr r1, [pc, #40] @ (801676c ) 8016744: 480a ldr r0, [pc, #40] @ (8016770 ) 8016746: f014 f8a9 bl 802a89c 801674a: f06f 030f mvn.w r3, #15 801674e: e006 b.n 801675e NETCONNTYPE_GROUP(netconn_type(conn)) != NETCONN_TCP, return ERR_ARG;); return netconn_recv_data(conn, (void **)new_buf, apiflags); 8016750: 79fb ldrb r3, [r7, #7] 8016752: 461a mov r2, r3 8016754: 68b9 ldr r1, [r7, #8] 8016756: 68f8 ldr r0, [r7, #12] 8016758: f7ff fdec bl 8016334 801675c: 4603 mov r3, r0 } 801675e: 4618 mov r0, r3 8016760: 3710 adds r7, #16 8016762: 46bd mov sp, r7 8016764: bd80 pop {r7, pc} 8016766: bf00 nop 8016768: 0802dbb4 .word 0x0802dbb4 801676c: 0802de38 .word 0x0802de38 8016770: 0802dc0c .word 0x0802dc0c 08016774 : * @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) { 8016774: b580 push {r7, lr} 8016776: b08c sub sp, #48 @ 0x30 8016778: af00 add r7, sp, #0 801677a: 6078 str r0, [r7, #4] 801677c: 6039 str r1, [r7, #0] API_MSG_VAR_DECLARE(msg); err_t err; LWIP_ERROR("netconn_send: invalid conn", (conn != NULL), return ERR_ARG;); 801677e: 687b ldr r3, [r7, #4] 8016780: 2b00 cmp r3, #0 8016782: d109 bne.n 8016798 8016784: 4b0e ldr r3, [pc, #56] @ (80167c0 ) 8016786: f240 32b2 movw r2, #946 @ 0x3b2 801678a: 490e ldr r1, [pc, #56] @ (80167c4 ) 801678c: 480e ldr r0, [pc, #56] @ (80167c8 ) 801678e: f014 f885 bl 802a89c 8016792: f06f 030f mvn.w r3, #15 8016796: e00e b.n 80167b6 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; 8016798: 687b ldr r3, [r7, #4] 801679a: 60fb str r3, [r7, #12] API_MSG_VAR_REF(msg).msg.b = buf; 801679c: 683b ldr r3, [r7, #0] 801679e: 617b str r3, [r7, #20] err = netconn_apimsg(lwip_netconn_do_send, &API_MSG_VAR_REF(msg)); 80167a0: f107 030c add.w r3, r7, #12 80167a4: 4619 mov r1, r3 80167a6: 4809 ldr r0, [pc, #36] @ (80167cc ) 80167a8: f7ff fc36 bl 8016018 80167ac: 4603 mov r3, r0 80167ae: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 80167b2: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 80167b6: 4618 mov r0, r3 80167b8: 3730 adds r7, #48 @ 0x30 80167ba: 46bd mov sp, r7 80167bc: bd80 pop {r7, pc} 80167be: bf00 nop 80167c0: 0802dbb4 .word 0x0802dbb4 80167c4: 0802de70 .word 0x0802de70 80167c8: 0802dc0c .word 0x0802dc0c 80167cc: 08017bcd .word 0x08017bcd 080167d0 : * @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) { 80167d0: b580 push {r7, lr} 80167d2: b088 sub sp, #32 80167d4: af02 add r7, sp, #8 80167d6: 60f8 str r0, [r7, #12] 80167d8: 60b9 str r1, [r7, #8] 80167da: 607a str r2, [r7, #4] 80167dc: 70fb strb r3, [r7, #3] struct netvector vector; vector.ptr = dataptr; 80167de: 68bb ldr r3, [r7, #8] 80167e0: 613b str r3, [r7, #16] vector.len = size; 80167e2: 687b ldr r3, [r7, #4] 80167e4: 617b str r3, [r7, #20] return netconn_write_vectors_partly(conn, &vector, 1, apiflags, bytes_written); 80167e6: 78fa ldrb r2, [r7, #3] 80167e8: f107 0110 add.w r1, r7, #16 80167ec: 6a3b ldr r3, [r7, #32] 80167ee: 9300 str r3, [sp, #0] 80167f0: 4613 mov r3, r2 80167f2: 2201 movs r2, #1 80167f4: 68f8 ldr r0, [r7, #12] 80167f6: f000 f805 bl 8016804 80167fa: 4603 mov r3, r0 } 80167fc: 4618 mov r0, r3 80167fe: 3718 adds r7, #24 8016800: 46bd mov sp, r7 8016802: bd80 pop {r7, pc} 08016804 : * @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) { 8016804: b580 push {r7, lr} 8016806: b092 sub sp, #72 @ 0x48 8016808: af00 add r7, sp, #0 801680a: 60f8 str r0, [r7, #12] 801680c: 60b9 str r1, [r7, #8] 801680e: 4611 mov r1, r2 8016810: 461a mov r2, r3 8016812: 460b mov r3, r1 8016814: 80fb strh r3, [r7, #6] 8016816: 4613 mov r3, r2 8016818: 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;); 801681a: 68fb ldr r3, [r7, #12] 801681c: 2b00 cmp r3, #0 801681e: d109 bne.n 8016834 8016820: 4b4e ldr r3, [pc, #312] @ (801695c ) 8016822: f240 32ee movw r2, #1006 @ 0x3ee 8016826: 494e ldr r1, [pc, #312] @ (8016960 ) 8016828: 484e ldr r0, [pc, #312] @ (8016964 ) 801682a: f014 f837 bl 802a89c 801682e: f06f 030f mvn.w r3, #15 8016832: e08f b.n 8016954 LWIP_ERROR("netconn_write: invalid conn->type", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP), return ERR_VAL;); 8016834: 68fb ldr r3, [r7, #12] 8016836: 781b ldrb r3, [r3, #0] 8016838: f003 03f0 and.w r3, r3, #240 @ 0xf0 801683c: 2b10 cmp r3, #16 801683e: d009 beq.n 8016854 8016840: 4b46 ldr r3, [pc, #280] @ (801695c ) 8016842: f240 32ef movw r2, #1007 @ 0x3ef 8016846: 4948 ldr r1, [pc, #288] @ (8016968 ) 8016848: 4846 ldr r0, [pc, #280] @ (8016964 ) 801684a: f014 f827 bl 802a89c 801684e: f06f 0305 mvn.w r3, #5 8016852: e07f b.n 8016954 dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8016854: 68fb ldr r3, [r7, #12] 8016856: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801685a: f003 0302 and.w r3, r3, #2 801685e: 2b00 cmp r3, #0 8016860: d104 bne.n 801686c 8016862: 797b ldrb r3, [r7, #5] 8016864: f003 0304 and.w r3, r3, #4 8016868: 2b00 cmp r3, #0 801686a: d001 beq.n 8016870 801686c: 2301 movs r3, #1 801686e: e000 b.n 8016872 8016870: 2300 movs r3, #0 8016872: 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) { 8016876: f897 303f ldrb.w r3, [r7, #63] @ 0x3f 801687a: 2b00 cmp r3, #0 801687c: d005 beq.n 801688a 801687e: 6d3b ldr r3, [r7, #80] @ 0x50 8016880: 2b00 cmp r3, #0 8016882: d102 bne.n 801688a /* 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; 8016884: f06f 0305 mvn.w r3, #5 8016888: e064 b.n 8016954 } /* sum up the total size */ size = 0; 801688a: 2300 movs r3, #0 801688c: 647b str r3, [r7, #68] @ 0x44 for (i = 0; i < vectorcnt; i++) { 801688e: 2300 movs r3, #0 8016890: 643b str r3, [r7, #64] @ 0x40 8016892: e015 b.n 80168c0 size += vectors[i].len; 8016894: 6c3b ldr r3, [r7, #64] @ 0x40 8016896: 00db lsls r3, r3, #3 8016898: 68ba ldr r2, [r7, #8] 801689a: 4413 add r3, r2 801689c: 685b ldr r3, [r3, #4] 801689e: 6c7a ldr r2, [r7, #68] @ 0x44 80168a0: 4413 add r3, r2 80168a2: 647b str r3, [r7, #68] @ 0x44 if (size < vectors[i].len) { 80168a4: 6c3b ldr r3, [r7, #64] @ 0x40 80168a6: 00db lsls r3, r3, #3 80168a8: 68ba ldr r2, [r7, #8] 80168aa: 4413 add r3, r2 80168ac: 685b ldr r3, [r3, #4] 80168ae: 6c7a ldr r2, [r7, #68] @ 0x44 80168b0: 429a cmp r2, r3 80168b2: d202 bcs.n 80168ba /* overflow */ return ERR_VAL; 80168b4: f06f 0305 mvn.w r3, #5 80168b8: e04c b.n 8016954 for (i = 0; i < vectorcnt; i++) { 80168ba: 6c3b ldr r3, [r7, #64] @ 0x40 80168bc: 3301 adds r3, #1 80168be: 643b str r3, [r7, #64] @ 0x40 80168c0: 88fb ldrh r3, [r7, #6] 80168c2: 6c3a ldr r2, [r7, #64] @ 0x40 80168c4: 429a cmp r2, r3 80168c6: dbe5 blt.n 8016894 } } if (size == 0) { 80168c8: 6c7b ldr r3, [r7, #68] @ 0x44 80168ca: 2b00 cmp r3, #0 80168cc: d101 bne.n 80168d2 return ERR_OK; 80168ce: 2300 movs r3, #0 80168d0: e040 b.n 8016954 } else if (size > SSIZE_MAX) { 80168d2: 6c7b ldr r3, [r7, #68] @ 0x44 80168d4: 2b00 cmp r3, #0 80168d6: da0a bge.n 80168ee ssize_t limited; /* this is required by the socket layer (cannot send full size_t range) */ if (!bytes_written) { 80168d8: 6d3b ldr r3, [r7, #80] @ 0x50 80168da: 2b00 cmp r3, #0 80168dc: d102 bne.n 80168e4 return ERR_VAL; 80168de: f06f 0305 mvn.w r3, #5 80168e2: e037 b.n 8016954 } /* limit the amount of data to send */ limited = SSIZE_MAX; 80168e4: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 80168e8: 63bb str r3, [r7, #56] @ 0x38 size = (size_t)limited; 80168ea: 6bbb ldr r3, [r7, #56] @ 0x38 80168ec: 647b str r3, [r7, #68] @ 0x44 } API_MSG_VAR_ALLOC(msg); /* non-blocking write sends as much */ API_MSG_VAR_REF(msg).conn = conn; 80168ee: 68fb ldr r3, [r7, #12] 80168f0: 617b str r3, [r7, #20] API_MSG_VAR_REF(msg).msg.w.vector = vectors; 80168f2: 68bb ldr r3, [r7, #8] 80168f4: 61fb str r3, [r7, #28] API_MSG_VAR_REF(msg).msg.w.vector_cnt = vectorcnt; 80168f6: 88fb ldrh r3, [r7, #6] 80168f8: 843b strh r3, [r7, #32] API_MSG_VAR_REF(msg).msg.w.vector_off = 0; 80168fa: 2300 movs r3, #0 80168fc: 627b str r3, [r7, #36] @ 0x24 API_MSG_VAR_REF(msg).msg.w.apiflags = apiflags; 80168fe: 797b ldrb r3, [r7, #5] 8016900: f887 3030 strb.w r3, [r7, #48] @ 0x30 API_MSG_VAR_REF(msg).msg.w.len = size; 8016904: 6c7b ldr r3, [r7, #68] @ 0x44 8016906: 62bb str r3, [r7, #40] @ 0x28 API_MSG_VAR_REF(msg).msg.w.offset = 0; 8016908: 2300 movs r3, #0 801690a: 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)); 801690c: f107 0314 add.w r3, r7, #20 8016910: 4619 mov r1, r3 8016912: 4816 ldr r0, [pc, #88] @ (801696c ) 8016914: f7ff fb80 bl 8016018 8016918: 4603 mov r3, r0 801691a: f887 3037 strb.w r3, [r7, #55] @ 0x37 if (err == ERR_OK) { 801691e: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 8016922: 2b00 cmp r3, #0 8016924: d114 bne.n 8016950 if (bytes_written != NULL) { 8016926: 6d3b ldr r3, [r7, #80] @ 0x50 8016928: 2b00 cmp r3, #0 801692a: d002 beq.n 8016932 *bytes_written = API_MSG_VAR_REF(msg).msg.w.offset; 801692c: 6afa ldr r2, [r7, #44] @ 0x2c 801692e: 6d3b ldr r3, [r7, #80] @ 0x50 8016930: 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) { 8016932: f897 303f ldrb.w r3, [r7, #63] @ 0x3f 8016936: 2b00 cmp r3, #0 8016938: d10a bne.n 8016950 LWIP_ASSERT("do_write failed to write all bytes", API_MSG_VAR_REF(msg).msg.w.offset == size); 801693a: 6afb ldr r3, [r7, #44] @ 0x2c 801693c: 6c7a ldr r2, [r7, #68] @ 0x44 801693e: 429a cmp r2, r3 8016940: d006 beq.n 8016950 8016942: 4b06 ldr r3, [pc, #24] @ (801695c ) 8016944: f44f 6286 mov.w r2, #1072 @ 0x430 8016948: 4909 ldr r1, [pc, #36] @ (8016970 ) 801694a: 4806 ldr r0, [pc, #24] @ (8016964 ) 801694c: f013 ffa6 bl 802a89c } } API_MSG_VAR_FREE(msg); return err; 8016950: f997 3037 ldrsb.w r3, [r7, #55] @ 0x37 } 8016954: 4618 mov r0, r3 8016956: 3748 adds r7, #72 @ 0x48 8016958: 46bd mov sp, r7 801695a: bd80 pop {r7, pc} 801695c: 0802dbb4 .word 0x0802dbb4 8016960: 0802de8c .word 0x0802de8c 8016964: 0802dc0c .word 0x0802dc0c 8016968: 0802dea8 .word 0x0802dea8 801696c: 08018071 .word 0x08018071 8016970: 0802decc .word 0x0802decc 08016974 : * @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) { 8016974: b580 push {r7, lr} 8016976: b08c sub sp, #48 @ 0x30 8016978: af00 add r7, sp, #0 801697a: 6078 str r0, [r7, #4] 801697c: 460b mov r3, r1 801697e: 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;); 8016980: 687b ldr r3, [r7, #4] 8016982: 2b00 cmp r3, #0 8016984: d109 bne.n 801699a 8016986: 4b0f ldr r3, [pc, #60] @ (80169c4 ) 8016988: f240 4247 movw r2, #1095 @ 0x447 801698c: 490e ldr r1, [pc, #56] @ (80169c8 ) 801698e: 480f ldr r0, [pc, #60] @ (80169cc ) 8016990: f013 ff84 bl 802a89c 8016994: f06f 030f mvn.w r3, #15 8016998: e010 b.n 80169bc API_MSG_VAR_ALLOC(msg); API_MSG_VAR_REF(msg).conn = conn; 801699a: 687b ldr r3, [r7, #4] 801699c: 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; 801699e: 78fb ldrb r3, [r7, #3] 80169a0: 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 = 80169a2: 2329 movs r3, #41 @ 0x29 80169a4: 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)); 80169a6: f107 030c add.w r3, r7, #12 80169aa: 4619 mov r1, r3 80169ac: 4808 ldr r0, [pc, #32] @ (80169d0 ) 80169ae: f7ff fb33 bl 8016018 80169b2: 4603 mov r3, r0 80169b4: f887 302f strb.w r3, [r7, #47] @ 0x2f API_MSG_VAR_FREE(msg); return err; 80169b8: f997 302f ldrsb.w r3, [r7, #47] @ 0x2f } 80169bc: 4618 mov r0, r3 80169be: 3730 adds r7, #48 @ 0x30 80169c0: 46bd mov sp, r7 80169c2: bd80 pop {r7, pc} 80169c4: 0802dbb4 .word 0x0802dbb4 80169c8: 0802def0 .word 0x0802def0 80169cc: 0802dc0c .word 0x0802dc0c 80169d0: 0801828d .word 0x0801828d 080169d4 : * @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) { 80169d4: b580 push {r7, lr} 80169d6: b084 sub sp, #16 80169d8: af00 add r7, sp, #0 80169da: 6078 str r0, [r7, #4] err_t err; SYS_ARCH_DECL_PROTECT(lev); if (conn == NULL) { 80169dc: 687b ldr r3, [r7, #4] 80169de: 2b00 cmp r3, #0 80169e0: d101 bne.n 80169e6 return ERR_OK; 80169e2: 2300 movs r3, #0 80169e4: e00d b.n 8016a02 } SYS_ARCH_PROTECT(lev); 80169e6: f010 fcc3 bl 8027370 80169ea: 60f8 str r0, [r7, #12] err = conn->pending_err; 80169ec: 687b ldr r3, [r7, #4] 80169ee: 7a1b ldrb r3, [r3, #8] 80169f0: 72fb strb r3, [r7, #11] conn->pending_err = ERR_OK; 80169f2: 687b ldr r3, [r7, #4] 80169f4: 2200 movs r2, #0 80169f6: 721a strb r2, [r3, #8] SYS_ARCH_UNPROTECT(lev); 80169f8: 68f8 ldr r0, [r7, #12] 80169fa: f010 fcc7 bl 802738c return err; 80169fe: f997 300b ldrsb.w r3, [r7, #11] } 8016a02: 4618 mov r0, r3 8016a04: 3710 adds r7, #16 8016a06: 46bd mov sp, r7 8016a08: bd80 pop {r7, pc} ... 08016a0c : 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) { 8016a0c: b580 push {r7, lr} 8016a0e: b082 sub sp, #8 8016a10: af00 add r7, sp, #0 8016a12: 4603 mov r3, r0 8016a14: 71fb strb r3, [r7, #7] switch (err) { 8016a16: f997 3007 ldrsb.w r3, [r7, #7] 8016a1a: f113 0f0d cmn.w r3, #13 8016a1e: d009 beq.n 8016a34 8016a20: f113 0f0d cmn.w r3, #13 8016a24: dc0c bgt.n 8016a40 8016a26: f113 0f0f cmn.w r3, #15 8016a2a: d007 beq.n 8016a3c 8016a2c: f113 0f0e cmn.w r3, #14 8016a30: d002 beq.n 8016a38 8016a32: e005 b.n 8016a40 case ERR_ABRT: return LWIP_CONST_CAST(void *, &netconn_aborted); 8016a34: 4b0a ldr r3, [pc, #40] @ (8016a60 ) 8016a36: e00e b.n 8016a56 case ERR_RST: return LWIP_CONST_CAST(void *, &netconn_reset); 8016a38: 4b0a ldr r3, [pc, #40] @ (8016a64 ) 8016a3a: e00c b.n 8016a56 case ERR_CLSD: return LWIP_CONST_CAST(void *, &netconn_closed); 8016a3c: 4b0a ldr r3, [pc, #40] @ (8016a68 ) 8016a3e: e00a b.n 8016a56 default: LWIP_ASSERT("unhandled error", err == ERR_OK); 8016a40: f997 3007 ldrsb.w r3, [r7, #7] 8016a44: 2b00 cmp r3, #0 8016a46: d005 beq.n 8016a54 8016a48: 4b08 ldr r3, [pc, #32] @ (8016a6c ) 8016a4a: 227d movs r2, #125 @ 0x7d 8016a4c: 4908 ldr r1, [pc, #32] @ (8016a70 ) 8016a4e: 4809 ldr r0, [pc, #36] @ (8016a74 ) 8016a50: f013 ff24 bl 802a89c return NULL; 8016a54: 2300 movs r3, #0 } } 8016a56: 4618 mov r0, r3 8016a58: 3708 adds r7, #8 8016a5a: 46bd mov sp, r7 8016a5c: bd80 pop {r7, pc} 8016a5e: bf00 nop 8016a60: 08031b0c .word 0x08031b0c 8016a64: 08031b0d .word 0x08031b0d 8016a68: 08031b0e .word 0x08031b0e 8016a6c: 0802df0c .word 0x0802df0c 8016a70: 0802df40 .word 0x0802df40 8016a74: 0802df50 .word 0x0802df50 08016a78 : int lwip_netconn_is_err_msg(void *msg, err_t *err) { 8016a78: b580 push {r7, lr} 8016a7a: b082 sub sp, #8 8016a7c: af00 add r7, sp, #0 8016a7e: 6078 str r0, [r7, #4] 8016a80: 6039 str r1, [r7, #0] LWIP_ASSERT("err != NULL", err != NULL); 8016a82: 683b ldr r3, [r7, #0] 8016a84: 2b00 cmp r3, #0 8016a86: d105 bne.n 8016a94 8016a88: 4b12 ldr r3, [pc, #72] @ (8016ad4 ) 8016a8a: 2285 movs r2, #133 @ 0x85 8016a8c: 4912 ldr r1, [pc, #72] @ (8016ad8 ) 8016a8e: 4813 ldr r0, [pc, #76] @ (8016adc ) 8016a90: f013 ff04 bl 802a89c if (msg == &netconn_aborted) { 8016a94: 687b ldr r3, [r7, #4] 8016a96: 4a12 ldr r2, [pc, #72] @ (8016ae0 ) 8016a98: 4293 cmp r3, r2 8016a9a: d104 bne.n 8016aa6 *err = ERR_ABRT; 8016a9c: 683b ldr r3, [r7, #0] 8016a9e: 22f3 movs r2, #243 @ 0xf3 8016aa0: 701a strb r2, [r3, #0] return 1; 8016aa2: 2301 movs r3, #1 8016aa4: e012 b.n 8016acc } else if (msg == &netconn_reset) { 8016aa6: 687b ldr r3, [r7, #4] 8016aa8: 4a0e ldr r2, [pc, #56] @ (8016ae4 ) 8016aaa: 4293 cmp r3, r2 8016aac: d104 bne.n 8016ab8 *err = ERR_RST; 8016aae: 683b ldr r3, [r7, #0] 8016ab0: 22f2 movs r2, #242 @ 0xf2 8016ab2: 701a strb r2, [r3, #0] return 1; 8016ab4: 2301 movs r3, #1 8016ab6: e009 b.n 8016acc } else if (msg == &netconn_closed) { 8016ab8: 687b ldr r3, [r7, #4] 8016aba: 4a0b ldr r2, [pc, #44] @ (8016ae8 ) 8016abc: 4293 cmp r3, r2 8016abe: d104 bne.n 8016aca *err = ERR_CLSD; 8016ac0: 683b ldr r3, [r7, #0] 8016ac2: 22f1 movs r2, #241 @ 0xf1 8016ac4: 701a strb r2, [r3, #0] return 1; 8016ac6: 2301 movs r3, #1 8016ac8: e000 b.n 8016acc } return 0; 8016aca: 2300 movs r3, #0 } 8016acc: 4618 mov r0, r3 8016ace: 3708 adds r7, #8 8016ad0: 46bd mov sp, r7 8016ad2: bd80 pop {r7, pc} 8016ad4: 0802df0c .word 0x0802df0c 8016ad8: 0802df78 .word 0x0802df78 8016adc: 0802df50 .word 0x0802df50 8016ae0: 08031b0c .word 0x08031b0c 8016ae4: 08031b0d .word 0x08031b0d 8016ae8: 08031b0e .word 0x08031b0e 08016aec : * @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) { 8016aec: b580 push {r7, lr} 8016aee: b08a sub sp, #40 @ 0x28 8016af0: af00 add r7, sp, #0 8016af2: 60f8 str r0, [r7, #12] 8016af4: 60b9 str r1, [r7, #8] 8016af6: 607a str r2, [r7, #4] 8016af8: 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); 8016afa: 68bb ldr r3, [r7, #8] 8016afc: 2b00 cmp r3, #0 8016afe: d105 bne.n 8016b0c 8016b00: 4b43 ldr r3, [pc, #268] @ (8016c10 ) 8016b02: 22e5 movs r2, #229 @ 0xe5 8016b04: 4943 ldr r1, [pc, #268] @ (8016c14 ) 8016b06: 4844 ldr r0, [pc, #272] @ (8016c18 ) 8016b08: f013 fec8 bl 802a89c LWIP_ASSERT("recv_udp must have an argument", arg != NULL); 8016b0c: 68fb ldr r3, [r7, #12] 8016b0e: 2b00 cmp r3, #0 8016b10: d105 bne.n 8016b1e 8016b12: 4b3f ldr r3, [pc, #252] @ (8016c10 ) 8016b14: 22e6 movs r2, #230 @ 0xe6 8016b16: 4941 ldr r1, [pc, #260] @ (8016c1c ) 8016b18: 483f ldr r0, [pc, #252] @ (8016c18 ) 8016b1a: f013 febf bl 802a89c conn = (struct netconn *)arg; 8016b1e: 68fb ldr r3, [r7, #12] 8016b20: 627b str r3, [r7, #36] @ 0x24 if (conn == NULL) { 8016b22: 6a7b ldr r3, [r7, #36] @ 0x24 8016b24: 2b00 cmp r3, #0 8016b26: d103 bne.n 8016b30 pbuf_free(p); 8016b28: 6878 ldr r0, [r7, #4] 8016b2a: f004 fc3f bl 801b3ac return; 8016b2e: e06b b.n 8016c08 } LWIP_ASSERT("recv_udp: recv for wrong pcb!", conn->pcb.udp == pcb); 8016b30: 6a7b ldr r3, [r7, #36] @ 0x24 8016b32: 685b ldr r3, [r3, #4] 8016b34: 68ba ldr r2, [r7, #8] 8016b36: 429a cmp r2, r3 8016b38: d005 beq.n 8016b46 8016b3a: 4b35 ldr r3, [pc, #212] @ (8016c10 ) 8016b3c: 22ee movs r2, #238 @ 0xee 8016b3e: 4938 ldr r1, [pc, #224] @ (8016c20 ) 8016b40: 4835 ldr r0, [pc, #212] @ (8016c18 ) 8016b42: f013 feab bl 802a89c #if LWIP_SO_RCVBUF SYS_ARCH_GET(conn->recv_avail, recv_avail); 8016b46: f010 fc13 bl 8027370 8016b4a: 6238 str r0, [r7, #32] 8016b4c: 6a7b ldr r3, [r7, #36] @ 0x24 8016b4e: 6a5b ldr r3, [r3, #36] @ 0x24 8016b50: 61fb str r3, [r7, #28] 8016b52: 6a38 ldr r0, [r7, #32] 8016b54: f010 fc1a bl 802738c if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8016b58: 6a7b ldr r3, [r7, #36] @ 0x24 8016b5a: 3310 adds r3, #16 8016b5c: 4618 mov r0, r3 8016b5e: f010 fafd bl 802715c 8016b62: 4603 mov r3, r0 8016b64: 2b00 cmp r3, #0 8016b66: d008 beq.n 8016b7a ((recv_avail + (int)(p->tot_len)) > conn->recv_bufsize)) { 8016b68: 687b ldr r3, [r7, #4] 8016b6a: 891b ldrh r3, [r3, #8] 8016b6c: 461a mov r2, r3 8016b6e: 69fb ldr r3, [r7, #28] 8016b70: 441a add r2, r3 8016b72: 6a7b ldr r3, [r7, #36] @ 0x24 8016b74: 6a1b ldr r3, [r3, #32] if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox) || 8016b76: 429a cmp r2, r3 8016b78: dd03 ble.n 8016b82 #else /* LWIP_SO_RCVBUF */ if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { #endif /* LWIP_SO_RCVBUF */ pbuf_free(p); 8016b7a: 6878 ldr r0, [r7, #4] 8016b7c: f004 fc16 bl 801b3ac return; 8016b80: e042 b.n 8016c08 } buf = (struct netbuf *)memp_malloc(MEMP_NETBUF); 8016b82: 2006 movs r0, #6 8016b84: f003 fcae bl 801a4e4 8016b88: 61b8 str r0, [r7, #24] if (buf == NULL) { 8016b8a: 69bb ldr r3, [r7, #24] 8016b8c: 2b00 cmp r3, #0 8016b8e: d103 bne.n 8016b98 pbuf_free(p); 8016b90: 6878 ldr r0, [r7, #4] 8016b92: f004 fc0b bl 801b3ac return; 8016b96: e037 b.n 8016c08 } else { buf->p = p; 8016b98: 69bb ldr r3, [r7, #24] 8016b9a: 687a ldr r2, [r7, #4] 8016b9c: 601a str r2, [r3, #0] buf->ptr = p; 8016b9e: 69bb ldr r3, [r7, #24] 8016ba0: 687a ldr r2, [r7, #4] 8016ba2: 605a str r2, [r3, #4] ip_addr_set(&buf->addr, addr); 8016ba4: 683b ldr r3, [r7, #0] 8016ba6: 2b00 cmp r3, #0 8016ba8: d002 beq.n 8016bb0 8016baa: 683b ldr r3, [r7, #0] 8016bac: 681b ldr r3, [r3, #0] 8016bae: e000 b.n 8016bb2 8016bb0: 2300 movs r3, #0 8016bb2: 69ba ldr r2, [r7, #24] 8016bb4: 6093 str r3, [r2, #8] buf->port = port; 8016bb6: 69bb ldr r3, [r7, #24] 8016bb8: 8e3a ldrh r2, [r7, #48] @ 0x30 8016bba: 819a strh r2, [r3, #12] buf->toport_chksum = udphdr->dest; } #endif /* LWIP_NETBUF_RECVINFO */ } len = p->tot_len; 8016bbc: 687b ldr r3, [r7, #4] 8016bbe: 891b ldrh r3, [r3, #8] 8016bc0: 82fb strh r3, [r7, #22] if (sys_mbox_trypost(&conn->recvmbox, buf) != ERR_OK) { 8016bc2: 6a7b ldr r3, [r7, #36] @ 0x24 8016bc4: 3310 adds r3, #16 8016bc6: 69b9 ldr r1, [r7, #24] 8016bc8: 4618 mov r0, r3 8016bca: f010 fa65 bl 8027098 8016bce: 4603 mov r3, r0 8016bd0: 2b00 cmp r3, #0 8016bd2: d003 beq.n 8016bdc netbuf_delete(buf); 8016bd4: 69b8 ldr r0, [r7, #24] 8016bd6: f001 fbff bl 80183d8 return; 8016bda: e015 b.n 8016c08 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); 8016bdc: f010 fbc8 bl 8027370 8016be0: 6138 str r0, [r7, #16] 8016be2: 6a7b ldr r3, [r7, #36] @ 0x24 8016be4: 6a5a ldr r2, [r3, #36] @ 0x24 8016be6: 8afb ldrh r3, [r7, #22] 8016be8: 441a add r2, r3 8016bea: 6a7b ldr r3, [r7, #36] @ 0x24 8016bec: 625a str r2, [r3, #36] @ 0x24 8016bee: 6938 ldr r0, [r7, #16] 8016bf0: f010 fbcc bl 802738c #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 8016bf4: 6a7b ldr r3, [r7, #36] @ 0x24 8016bf6: 6b1b ldr r3, [r3, #48] @ 0x30 8016bf8: 2b00 cmp r3, #0 8016bfa: d005 beq.n 8016c08 8016bfc: 6a7b ldr r3, [r7, #36] @ 0x24 8016bfe: 6b1b ldr r3, [r3, #48] @ 0x30 8016c00: 8afa ldrh r2, [r7, #22] 8016c02: 2100 movs r1, #0 8016c04: 6a78 ldr r0, [r7, #36] @ 0x24 8016c06: 4798 blx r3 } } 8016c08: 3728 adds r7, #40 @ 0x28 8016c0a: 46bd mov sp, r7 8016c0c: bd80 pop {r7, pc} 8016c0e: bf00 nop 8016c10: 0802df0c .word 0x0802df0c 8016c14: 0802df84 .word 0x0802df84 8016c18: 0802df50 .word 0x0802df50 8016c1c: 0802dfa8 .word 0x0802dfa8 8016c20: 0802dfc8 .word 0x0802dfc8 08016c24 : * * @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) { 8016c24: b580 push {r7, lr} 8016c26: b088 sub sp, #32 8016c28: af00 add r7, sp, #0 8016c2a: 60f8 str r0, [r7, #12] 8016c2c: 60b9 str r1, [r7, #8] 8016c2e: 607a str r2, [r7, #4] 8016c30: 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); 8016c32: 68bb ldr r3, [r7, #8] 8016c34: 2b00 cmp r3, #0 8016c36: d106 bne.n 8016c46 8016c38: 4b3c ldr r3, [pc, #240] @ (8016d2c ) 8016c3a: f44f 7296 mov.w r2, #300 @ 0x12c 8016c3e: 493c ldr r1, [pc, #240] @ (8016d30 ) 8016c40: 483c ldr r0, [pc, #240] @ (8016d34 ) 8016c42: f013 fe2b bl 802a89c LWIP_ASSERT("recv_tcp must have an argument", arg != NULL); 8016c46: 68fb ldr r3, [r7, #12] 8016c48: 2b00 cmp r3, #0 8016c4a: d106 bne.n 8016c5a 8016c4c: 4b37 ldr r3, [pc, #220] @ (8016d2c ) 8016c4e: f240 122d movw r2, #301 @ 0x12d 8016c52: 4939 ldr r1, [pc, #228] @ (8016d38 ) 8016c54: 4837 ldr r0, [pc, #220] @ (8016d34 ) 8016c56: f013 fe21 bl 802a89c LWIP_ASSERT("err != ERR_OK unhandled", err == ERR_OK); 8016c5a: f997 3003 ldrsb.w r3, [r7, #3] 8016c5e: 2b00 cmp r3, #0 8016c60: d006 beq.n 8016c70 8016c62: 4b32 ldr r3, [pc, #200] @ (8016d2c ) 8016c64: f44f 7297 mov.w r2, #302 @ 0x12e 8016c68: 4934 ldr r1, [pc, #208] @ (8016d3c ) 8016c6a: 4832 ldr r0, [pc, #200] @ (8016d34 ) 8016c6c: f013 fe16 bl 802a89c LWIP_UNUSED_ARG(err); /* for LWIP_NOASSERT */ conn = (struct netconn *)arg; 8016c70: 68fb ldr r3, [r7, #12] 8016c72: 617b str r3, [r7, #20] if (conn == NULL) { 8016c74: 697b ldr r3, [r7, #20] 8016c76: 2b00 cmp r3, #0 8016c78: d102 bne.n 8016c80 return ERR_VAL; 8016c7a: f06f 0305 mvn.w r3, #5 8016c7e: e051 b.n 8016d24 } LWIP_ASSERT("recv_tcp: recv for wrong pcb!", conn->pcb.tcp == pcb); 8016c80: 697b ldr r3, [r7, #20] 8016c82: 685b ldr r3, [r3, #4] 8016c84: 68ba ldr r2, [r7, #8] 8016c86: 429a cmp r2, r3 8016c88: d006 beq.n 8016c98 8016c8a: 4b28 ldr r3, [pc, #160] @ (8016d2c ) 8016c8c: f240 1235 movw r2, #309 @ 0x135 8016c90: 492b ldr r1, [pc, #172] @ (8016d40 ) 8016c92: 4828 ldr r0, [pc, #160] @ (8016d34 ) 8016c94: f013 fe02 bl 802a89c if (!NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 8016c98: 697b ldr r3, [r7, #20] 8016c9a: 3310 adds r3, #16 8016c9c: 4618 mov r0, r3 8016c9e: f010 fa5d bl 802715c 8016ca2: 4603 mov r3, r0 8016ca4: 2b00 cmp r3, #0 8016ca6: d10d bne.n 8016cc4 /* recvmbox already deleted */ if (p != NULL) { 8016ca8: 687b ldr r3, [r7, #4] 8016caa: 2b00 cmp r3, #0 8016cac: d008 beq.n 8016cc0 tcp_recved(pcb, p->tot_len); 8016cae: 687b ldr r3, [r7, #4] 8016cb0: 891b ldrh r3, [r3, #8] 8016cb2: 4619 mov r1, r3 8016cb4: 68b8 ldr r0, [r7, #8] 8016cb6: f005 f9e5 bl 801c084 pbuf_free(p); 8016cba: 6878 ldr r0, [r7, #4] 8016cbc: f004 fb76 bl 801b3ac } return ERR_OK; 8016cc0: 2300 movs r3, #0 8016cc2: e02f b.n 8016d24 } /* 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) { 8016cc4: 687b ldr r3, [r7, #4] 8016cc6: 2b00 cmp r3, #0 8016cc8: d005 beq.n 8016cd6 msg = p; 8016cca: 687b ldr r3, [r7, #4] 8016ccc: 61bb str r3, [r7, #24] len = p->tot_len; 8016cce: 687b ldr r3, [r7, #4] 8016cd0: 891b ldrh r3, [r3, #8] 8016cd2: 83fb strh r3, [r7, #30] 8016cd4: e003 b.n 8016cde } else { msg = LWIP_CONST_CAST(void *, &netconn_closed); 8016cd6: 4b1b ldr r3, [pc, #108] @ (8016d44 ) 8016cd8: 61bb str r3, [r7, #24] len = 0; 8016cda: 2300 movs r3, #0 8016cdc: 83fb strh r3, [r7, #30] } if (sys_mbox_trypost(&conn->recvmbox, msg) != ERR_OK) { 8016cde: 697b ldr r3, [r7, #20] 8016ce0: 3310 adds r3, #16 8016ce2: 69b9 ldr r1, [r7, #24] 8016ce4: 4618 mov r0, r3 8016ce6: f010 f9d7 bl 8027098 8016cea: 4603 mov r3, r0 8016cec: 2b00 cmp r3, #0 8016cee: d002 beq.n 8016cf6 /* don't deallocate p: it is presented to us later again from tcp_fasttmr! */ return ERR_MEM; 8016cf0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8016cf4: e016 b.n 8016d24 } else { #if LWIP_SO_RCVBUF SYS_ARCH_INC(conn->recv_avail, len); 8016cf6: f010 fb3b bl 8027370 8016cfa: 6138 str r0, [r7, #16] 8016cfc: 697b ldr r3, [r7, #20] 8016cfe: 6a5a ldr r2, [r3, #36] @ 0x24 8016d00: 8bfb ldrh r3, [r7, #30] 8016d02: 441a add r2, r3 8016d04: 697b ldr r3, [r7, #20] 8016d06: 625a str r2, [r3, #36] @ 0x24 8016d08: 6938 ldr r0, [r7, #16] 8016d0a: f010 fb3f bl 802738c #endif /* LWIP_SO_RCVBUF */ /* Register event with callback */ API_EVENT(conn, NETCONN_EVT_RCVPLUS, len); 8016d0e: 697b ldr r3, [r7, #20] 8016d10: 6b1b ldr r3, [r3, #48] @ 0x30 8016d12: 2b00 cmp r3, #0 8016d14: d005 beq.n 8016d22 8016d16: 697b ldr r3, [r7, #20] 8016d18: 6b1b ldr r3, [r3, #48] @ 0x30 8016d1a: 8bfa ldrh r2, [r7, #30] 8016d1c: 2100 movs r1, #0 8016d1e: 6978 ldr r0, [r7, #20] 8016d20: 4798 blx r3 } return ERR_OK; 8016d22: 2300 movs r3, #0 } 8016d24: 4618 mov r0, r3 8016d26: 3720 adds r7, #32 8016d28: 46bd mov sp, r7 8016d2a: bd80 pop {r7, pc} 8016d2c: 0802df0c .word 0x0802df0c 8016d30: 0802dfe8 .word 0x0802dfe8 8016d34: 0802df50 .word 0x0802df50 8016d38: 0802e00c .word 0x0802e00c 8016d3c: 0802e02c .word 0x0802e02c 8016d40: 0802e044 .word 0x0802e044 8016d44: 08031b0e .word 0x08031b0e 08016d48 : * * @see tcp.h (struct tcp_pcb.poll) for parameters and return value */ static err_t poll_tcp(void *arg, struct tcp_pcb *pcb) { 8016d48: b580 push {r7, lr} 8016d4a: b084 sub sp, #16 8016d4c: af00 add r7, sp, #0 8016d4e: 6078 str r0, [r7, #4] 8016d50: 6039 str r1, [r7, #0] struct netconn *conn = (struct netconn *)arg; 8016d52: 687b ldr r3, [r7, #4] 8016d54: 60fb str r3, [r7, #12] LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); 8016d56: 68fb ldr r3, [r7, #12] 8016d58: 2b00 cmp r3, #0 8016d5a: d106 bne.n 8016d6a 8016d5c: 4b2b ldr r3, [pc, #172] @ (8016e0c ) 8016d5e: f44f 72b5 mov.w r2, #362 @ 0x16a 8016d62: 492b ldr r1, [pc, #172] @ (8016e10 ) 8016d64: 482b ldr r0, [pc, #172] @ (8016e14 ) 8016d66: f013 fd99 bl 802a89c if (conn->state == NETCONN_WRITE) { 8016d6a: 68fb ldr r3, [r7, #12] 8016d6c: 785b ldrb r3, [r3, #1] 8016d6e: 2b01 cmp r3, #1 8016d70: d104 bne.n 8016d7c lwip_netconn_do_writemore(conn WRITE_DELAYED); 8016d72: 2101 movs r1, #1 8016d74: 68f8 ldr r0, [r7, #12] 8016d76: f000 ffab bl 8017cd0 8016d7a: e016 b.n 8016daa } else if (conn->state == NETCONN_CLOSE) { 8016d7c: 68fb ldr r3, [r7, #12] 8016d7e: 785b ldrb r3, [r3, #1] 8016d80: 2b04 cmp r3, #4 8016d82: d112 bne.n 8016daa #if !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER if (conn->current_msg && conn->current_msg->msg.sd.polls_left) { 8016d84: 68fb ldr r3, [r7, #12] 8016d86: 6adb ldr r3, [r3, #44] @ 0x2c 8016d88: 2b00 cmp r3, #0 8016d8a: d00a beq.n 8016da2 8016d8c: 68fb ldr r3, [r7, #12] 8016d8e: 6adb ldr r3, [r3, #44] @ 0x2c 8016d90: 7a5b ldrb r3, [r3, #9] 8016d92: 2b00 cmp r3, #0 8016d94: d005 beq.n 8016da2 conn->current_msg->msg.sd.polls_left--; 8016d96: 68fb ldr r3, [r7, #12] 8016d98: 6adb ldr r3, [r3, #44] @ 0x2c 8016d9a: 7a5a ldrb r2, [r3, #9] 8016d9c: 3a01 subs r2, #1 8016d9e: b2d2 uxtb r2, r2 8016da0: 725a strb r2, [r3, #9] } #endif /* !LWIP_SO_SNDTIMEO && !LWIP_SO_LINGER */ lwip_netconn_do_close_internal(conn WRITE_DELAYED); 8016da2: 2101 movs r1, #1 8016da4: 68f8 ldr r0, [r7, #12] 8016da6: f000 fb53 bl 8017450 } /* @todo: implement connect timeout here? */ /* Did a nonblocking write fail before? Then check available write-space. */ if (conn->flags & NETCONN_FLAG_CHECK_WRITESPACE) { 8016daa: 68fb ldr r3, [r7, #12] 8016dac: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016db0: f003 0310 and.w r3, r3, #16 8016db4: 2b00 cmp r3, #0 8016db6: d024 beq.n 8016e02 /* 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) && 8016db8: 68fb ldr r3, [r7, #12] 8016dba: 685b ldr r3, [r3, #4] 8016dbc: 2b00 cmp r3, #0 8016dbe: d020 beq.n 8016e02 8016dc0: 68fb ldr r3, [r7, #12] 8016dc2: 685b ldr r3, [r3, #4] 8016dc4: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8016dc8: f640 3269 movw r2, #2921 @ 0xb69 8016dcc: 4293 cmp r3, r2 8016dce: d918 bls.n 8016e02 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 8016dd0: 68fb ldr r3, [r7, #12] 8016dd2: 685b ldr r3, [r3, #4] 8016dd4: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8016dd8: 2b07 cmp r3, #7 8016dda: d812 bhi.n 8016e02 netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8016ddc: 68fb ldr r3, [r7, #12] 8016dde: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016de2: f023 0310 bic.w r3, r3, #16 8016de6: b2da uxtb r2, r3 8016de8: 68fb ldr r3, [r7, #12] 8016dea: f883 2028 strb.w r2, [r3, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8016dee: 68fb ldr r3, [r7, #12] 8016df0: 6b1b ldr r3, [r3, #48] @ 0x30 8016df2: 2b00 cmp r3, #0 8016df4: d005 beq.n 8016e02 8016df6: 68fb ldr r3, [r7, #12] 8016df8: 6b1b ldr r3, [r3, #48] @ 0x30 8016dfa: 2200 movs r2, #0 8016dfc: 2102 movs r1, #2 8016dfe: 68f8 ldr r0, [r7, #12] 8016e00: 4798 blx r3 } } return ERR_OK; 8016e02: 2300 movs r3, #0 } 8016e04: 4618 mov r0, r3 8016e06: 3710 adds r7, #16 8016e08: 46bd mov sp, r7 8016e0a: bd80 pop {r7, pc} 8016e0c: 0802df0c .word 0x0802df0c 8016e10: 0802e064 .word 0x0802e064 8016e14: 0802df50 .word 0x0802df50 08016e18 : * * @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) { 8016e18: b580 push {r7, lr} 8016e1a: b086 sub sp, #24 8016e1c: af00 add r7, sp, #0 8016e1e: 60f8 str r0, [r7, #12] 8016e20: 60b9 str r1, [r7, #8] 8016e22: 4613 mov r3, r2 8016e24: 80fb strh r3, [r7, #6] struct netconn *conn = (struct netconn *)arg; 8016e26: 68fb ldr r3, [r7, #12] 8016e28: 617b str r3, [r7, #20] LWIP_UNUSED_ARG(pcb); LWIP_ASSERT("conn != NULL", (conn != NULL)); 8016e2a: 697b ldr r3, [r7, #20] 8016e2c: 2b00 cmp r3, #0 8016e2e: d106 bne.n 8016e3e 8016e30: 4b22 ldr r3, [pc, #136] @ (8016ebc ) 8016e32: f240 1293 movw r2, #403 @ 0x193 8016e36: 4922 ldr r1, [pc, #136] @ (8016ec0 ) 8016e38: 4822 ldr r0, [pc, #136] @ (8016ec4 ) 8016e3a: f013 fd2f bl 802a89c if (conn) { 8016e3e: 697b ldr r3, [r7, #20] 8016e40: 2b00 cmp r3, #0 8016e42: d035 beq.n 8016eb0 if (conn->state == NETCONN_WRITE) { 8016e44: 697b ldr r3, [r7, #20] 8016e46: 785b ldrb r3, [r3, #1] 8016e48: 2b01 cmp r3, #1 8016e4a: d104 bne.n 8016e56 lwip_netconn_do_writemore(conn WRITE_DELAYED); 8016e4c: 2101 movs r1, #1 8016e4e: 6978 ldr r0, [r7, #20] 8016e50: f000 ff3e bl 8017cd0 8016e54: e007 b.n 8016e66 } else if (conn->state == NETCONN_CLOSE) { 8016e56: 697b ldr r3, [r7, #20] 8016e58: 785b ldrb r3, [r3, #1] 8016e5a: 2b04 cmp r3, #4 8016e5c: d103 bne.n 8016e66 lwip_netconn_do_close_internal(conn WRITE_DELAYED); 8016e5e: 2101 movs r1, #1 8016e60: 6978 ldr r0, [r7, #20] 8016e62: f000 faf5 bl 8017450 } /* 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) && 8016e66: 697b ldr r3, [r7, #20] 8016e68: 685b ldr r3, [r3, #4] 8016e6a: 2b00 cmp r3, #0 8016e6c: d020 beq.n 8016eb0 8016e6e: 697b ldr r3, [r7, #20] 8016e70: 685b ldr r3, [r3, #4] 8016e72: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8016e76: f640 3269 movw r2, #2921 @ 0xb69 8016e7a: 4293 cmp r3, r2 8016e7c: d918 bls.n 8016eb0 (tcp_sndqueuelen(conn->pcb.tcp) < TCP_SNDQUEUELOWAT)) { 8016e7e: 697b ldr r3, [r7, #20] 8016e80: 685b ldr r3, [r3, #4] 8016e82: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 if ((conn->pcb.tcp != NULL) && (tcp_sndbuf(conn->pcb.tcp) > TCP_SNDLOWAT) && 8016e86: 2b07 cmp r3, #7 8016e88: d812 bhi.n 8016eb0 netconn_clear_flags(conn, NETCONN_FLAG_CHECK_WRITESPACE); 8016e8a: 697b ldr r3, [r7, #20] 8016e8c: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016e90: f023 0310 bic.w r3, r3, #16 8016e94: b2da uxtb r2, r3 8016e96: 697b ldr r3, [r7, #20] 8016e98: f883 2028 strb.w r2, [r3, #40] @ 0x28 API_EVENT(conn, NETCONN_EVT_SENDPLUS, len); 8016e9c: 697b ldr r3, [r7, #20] 8016e9e: 6b1b ldr r3, [r3, #48] @ 0x30 8016ea0: 2b00 cmp r3, #0 8016ea2: d005 beq.n 8016eb0 8016ea4: 697b ldr r3, [r7, #20] 8016ea6: 6b1b ldr r3, [r3, #48] @ 0x30 8016ea8: 88fa ldrh r2, [r7, #6] 8016eaa: 2102 movs r1, #2 8016eac: 6978 ldr r0, [r7, #20] 8016eae: 4798 blx r3 } } return ERR_OK; 8016eb0: 2300 movs r3, #0 } 8016eb2: 4618 mov r0, r3 8016eb4: 3718 adds r7, #24 8016eb6: 46bd mov sp, r7 8016eb8: bd80 pop {r7, pc} 8016eba: bf00 nop 8016ebc: 0802df0c .word 0x0802df0c 8016ec0: 0802e064 .word 0x0802e064 8016ec4: 0802df50 .word 0x0802df50 08016ec8 : * * @see tcp.h (struct tcp_pcb.err) for parameters */ static void err_tcp(void *arg, err_t err) { 8016ec8: b580 push {r7, lr} 8016eca: b088 sub sp, #32 8016ecc: af00 add r7, sp, #0 8016ece: 6078 str r0, [r7, #4] 8016ed0: 460b mov r3, r1 8016ed2: 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; 8016ed4: 687b ldr r3, [r7, #4] 8016ed6: 61fb str r3, [r7, #28] LWIP_ASSERT("conn != NULL", (conn != NULL)); 8016ed8: 69fb ldr r3, [r7, #28] 8016eda: 2b00 cmp r3, #0 8016edc: d106 bne.n 8016eec 8016ede: 4b61 ldr r3, [pc, #388] @ (8017064 ) 8016ee0: f44f 72dc mov.w r2, #440 @ 0x1b8 8016ee4: 4960 ldr r1, [pc, #384] @ (8017068 ) 8016ee6: 4861 ldr r0, [pc, #388] @ (801706c ) 8016ee8: f013 fcd8 bl 802a89c SYS_ARCH_PROTECT(lev); 8016eec: f010 fa40 bl 8027370 8016ef0: 61b8 str r0, [r7, #24] /* when err is called, the pcb is deallocated, so delete the reference */ conn->pcb.tcp = NULL; 8016ef2: 69fb ldr r3, [r7, #28] 8016ef4: 2200 movs r2, #0 8016ef6: 605a str r2, [r3, #4] /* store pending error */ conn->pending_err = err; 8016ef8: 69fb ldr r3, [r7, #28] 8016efa: 78fa ldrb r2, [r7, #3] 8016efc: 721a strb r2, [r3, #8] /* prevent application threads from blocking on 'recvmbox'/'acceptmbox' */ conn->flags |= NETCONN_FLAG_MBOXCLOSED; 8016efe: 69fb ldr r3, [r7, #28] 8016f00: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016f04: f043 0301 orr.w r3, r3, #1 8016f08: b2da uxtb r2, r3 8016f0a: 69fb ldr r3, [r7, #28] 8016f0c: f883 2028 strb.w r2, [r3, #40] @ 0x28 /* reset conn->state now before waking up other threads */ old_state = conn->state; 8016f10: 69fb ldr r3, [r7, #28] 8016f12: 785b ldrb r3, [r3, #1] 8016f14: 75fb strb r3, [r7, #23] conn->state = NETCONN_NONE; 8016f16: 69fb ldr r3, [r7, #28] 8016f18: 2200 movs r2, #0 8016f1a: 705a strb r2, [r3, #1] SYS_ARCH_UNPROTECT(lev); 8016f1c: 69b8 ldr r0, [r7, #24] 8016f1e: f010 fa35 bl 802738c /* Notify the user layer about a connection error. Used to signal select. */ API_EVENT(conn, NETCONN_EVT_ERROR, 0); 8016f22: 69fb ldr r3, [r7, #28] 8016f24: 6b1b ldr r3, [r3, #48] @ 0x30 8016f26: 2b00 cmp r3, #0 8016f28: d005 beq.n 8016f36 8016f2a: 69fb ldr r3, [r7, #28] 8016f2c: 6b1b ldr r3, [r3, #48] @ 0x30 8016f2e: 2200 movs r2, #0 8016f30: 2104 movs r1, #4 8016f32: 69f8 ldr r0, [r7, #28] 8016f34: 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); 8016f36: 69fb ldr r3, [r7, #28] 8016f38: 6b1b ldr r3, [r3, #48] @ 0x30 8016f3a: 2b00 cmp r3, #0 8016f3c: d005 beq.n 8016f4a 8016f3e: 69fb ldr r3, [r7, #28] 8016f40: 6b1b ldr r3, [r3, #48] @ 0x30 8016f42: 2200 movs r2, #0 8016f44: 2100 movs r1, #0 8016f46: 69f8 ldr r0, [r7, #28] 8016f48: 4798 blx r3 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8016f4a: 69fb ldr r3, [r7, #28] 8016f4c: 6b1b ldr r3, [r3, #48] @ 0x30 8016f4e: 2b00 cmp r3, #0 8016f50: d005 beq.n 8016f5e 8016f52: 69fb ldr r3, [r7, #28] 8016f54: 6b1b ldr r3, [r3, #48] @ 0x30 8016f56: 2200 movs r2, #0 8016f58: 2102 movs r1, #2 8016f5a: 69f8 ldr r0, [r7, #28] 8016f5c: 4798 blx r3 mbox_msg = lwip_netconn_err_to_msg(err); 8016f5e: f997 3003 ldrsb.w r3, [r7, #3] 8016f62: 4618 mov r0, r3 8016f64: f7ff fd52 bl 8016a0c 8016f68: 6138 str r0, [r7, #16] /* pass error message to recvmbox to wake up pending recv */ if (NETCONN_MBOX_VALID(conn, &conn->recvmbox)) { 8016f6a: 69fb ldr r3, [r7, #28] 8016f6c: 3310 adds r3, #16 8016f6e: 4618 mov r0, r3 8016f70: f010 f8f4 bl 802715c 8016f74: 4603 mov r3, r0 8016f76: 2b00 cmp r3, #0 8016f78: d005 beq.n 8016f86 /* use trypost to prevent deadlock */ sys_mbox_trypost(&conn->recvmbox, mbox_msg); 8016f7a: 69fb ldr r3, [r7, #28] 8016f7c: 3310 adds r3, #16 8016f7e: 6939 ldr r1, [r7, #16] 8016f80: 4618 mov r0, r3 8016f82: f010 f889 bl 8027098 } /* pass error message to acceptmbox to wake up pending accept */ if (NETCONN_MBOX_VALID(conn, &conn->acceptmbox)) { 8016f86: 69fb ldr r3, [r7, #28] 8016f88: 3314 adds r3, #20 8016f8a: 4618 mov r0, r3 8016f8c: f010 f8e6 bl 802715c 8016f90: 4603 mov r3, r0 8016f92: 2b00 cmp r3, #0 8016f94: d005 beq.n 8016fa2 /* use trypost to preven deadlock */ sys_mbox_trypost(&conn->acceptmbox, mbox_msg); 8016f96: 69fb ldr r3, [r7, #28] 8016f98: 3314 adds r3, #20 8016f9a: 6939 ldr r1, [r7, #16] 8016f9c: 4618 mov r0, r3 8016f9e: f010 f87b bl 8027098 } if ((old_state == NETCONN_WRITE) || (old_state == NETCONN_CLOSE) || 8016fa2: 7dfb ldrb r3, [r7, #23] 8016fa4: 2b01 cmp r3, #1 8016fa6: d005 beq.n 8016fb4 8016fa8: 7dfb ldrb r3, [r7, #23] 8016faa: 2b04 cmp r3, #4 8016fac: d002 beq.n 8016fb4 8016fae: 7dfb ldrb r3, [r7, #23] 8016fb0: 2b03 cmp r3, #3 8016fb2: d146 bne.n 8017042 (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); 8016fb4: 69fb ldr r3, [r7, #28] 8016fb6: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016fba: f003 0304 and.w r3, r3, #4 8016fbe: 2b00 cmp r3, #0 8016fc0: bf14 ite ne 8016fc2: 2301 movne r3, #1 8016fc4: 2300 moveq r3, #0 8016fc6: b2db uxtb r3, r3 8016fc8: 60fb str r3, [r7, #12] SET_NONBLOCKING_CONNECT(conn, 0); 8016fca: 69fb ldr r3, [r7, #28] 8016fcc: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8016fd0: f023 0304 bic.w r3, r3, #4 8016fd4: b2da uxtb r2, r3 8016fd6: 69fb ldr r3, [r7, #28] 8016fd8: f883 2028 strb.w r2, [r3, #40] @ 0x28 if (!was_nonblocking_connect) { 8016fdc: 68fb ldr r3, [r7, #12] 8016fde: 2b00 cmp r3, #0 8016fe0: d13b bne.n 801705a sys_sem_t *op_completed_sem; /* set error return code */ LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8016fe2: 69fb ldr r3, [r7, #28] 8016fe4: 6adb ldr r3, [r3, #44] @ 0x2c 8016fe6: 2b00 cmp r3, #0 8016fe8: d106 bne.n 8016ff8 8016fea: 4b1e ldr r3, [pc, #120] @ (8017064 ) 8016fec: f44f 72f3 mov.w r2, #486 @ 0x1e6 8016ff0: 491f ldr r1, [pc, #124] @ (8017070 ) 8016ff2: 481e ldr r0, [pc, #120] @ (801706c ) 8016ff4: f013 fc52 bl 802a89c if (old_state == NETCONN_CLOSE) { 8016ff8: 7dfb ldrb r3, [r7, #23] 8016ffa: 2b04 cmp r3, #4 8016ffc: d104 bne.n 8017008 /* let close succeed: the connection is closed after all... */ conn->current_msg->err = ERR_OK; 8016ffe: 69fb ldr r3, [r7, #28] 8017000: 6adb ldr r3, [r3, #44] @ 0x2c 8017002: 2200 movs r2, #0 8017004: 711a strb r2, [r3, #4] 8017006: e003 b.n 8017010 } else { /* Write and connect fail */ conn->current_msg->err = err; 8017008: 69fb ldr r3, [r7, #28] 801700a: 6adb ldr r3, [r3, #44] @ 0x2c 801700c: 78fa ldrb r2, [r7, #3] 801700e: 711a strb r2, [r3, #4] } op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8017010: 69fb ldr r3, [r7, #28] 8017012: 6adb ldr r3, [r3, #44] @ 0x2c 8017014: 681b ldr r3, [r3, #0] 8017016: 330c adds r3, #12 8017018: 60bb str r3, [r7, #8] LWIP_ASSERT("inavlid op_completed_sem", sys_sem_valid(op_completed_sem)); 801701a: 68b8 ldr r0, [r7, #8] 801701c: f010 f92c bl 8027278 8017020: 4603 mov r3, r0 8017022: 2b00 cmp r3, #0 8017024: d106 bne.n 8017034 8017026: 4b0f ldr r3, [pc, #60] @ (8017064 ) 8017028: f240 12ef movw r2, #495 @ 0x1ef 801702c: 4911 ldr r1, [pc, #68] @ (8017074 ) 801702e: 480f ldr r0, [pc, #60] @ (801706c ) 8017030: f013 fc34 bl 802a89c conn->current_msg = NULL; 8017034: 69fb ldr r3, [r7, #28] 8017036: 2200 movs r2, #0 8017038: 62da str r2, [r3, #44] @ 0x2c /* wake up the waiting task */ sys_sem_signal(op_completed_sem); 801703a: 68b8 ldr r0, [r7, #8] 801703c: f010 f902 bl 8027244 (old_state == NETCONN_CONNECT)) { 8017040: e00b b.n 801705a } else { /* @todo: test what happens for error on nonblocking connect */ } } else { LWIP_ASSERT("conn->current_msg == NULL", conn->current_msg == NULL); 8017042: 69fb ldr r3, [r7, #28] 8017044: 6adb ldr r3, [r3, #44] @ 0x2c 8017046: 2b00 cmp r3, #0 8017048: d008 beq.n 801705c 801704a: 4b06 ldr r3, [pc, #24] @ (8017064 ) 801704c: f240 12f7 movw r2, #503 @ 0x1f7 8017050: 4909 ldr r1, [pc, #36] @ (8017078 ) 8017052: 4806 ldr r0, [pc, #24] @ (801706c ) 8017054: f013 fc22 bl 802a89c } } 8017058: e000 b.n 801705c (old_state == NETCONN_CONNECT)) { 801705a: bf00 nop } 801705c: bf00 nop 801705e: 3720 adds r7, #32 8017060: 46bd mov sp, r7 8017062: bd80 pop {r7, pc} 8017064: 0802df0c .word 0x0802df0c 8017068: 0802e064 .word 0x0802e064 801706c: 0802df50 .word 0x0802df50 8017070: 0802e074 .word 0x0802e074 8017074: 0802e090 .word 0x0802e090 8017078: 0802e0ac .word 0x0802e0ac 0801707c : * * @param conn the TCP netconn to setup */ static void setup_tcp(struct netconn *conn) { 801707c: b580 push {r7, lr} 801707e: b084 sub sp, #16 8017080: af00 add r7, sp, #0 8017082: 6078 str r0, [r7, #4] struct tcp_pcb *pcb; pcb = conn->pcb.tcp; 8017084: 687b ldr r3, [r7, #4] 8017086: 685b ldr r3, [r3, #4] 8017088: 60fb str r3, [r7, #12] tcp_arg(pcb, conn); 801708a: 6879 ldr r1, [r7, #4] 801708c: 68f8 ldr r0, [r7, #12] 801708e: f005 ffe3 bl 801d058 tcp_recv(pcb, recv_tcp); 8017092: 490a ldr r1, [pc, #40] @ (80170bc ) 8017094: 68f8 ldr r0, [r7, #12] 8017096: f005 fff1 bl 801d07c tcp_sent(pcb, sent_tcp); 801709a: 4909 ldr r1, [pc, #36] @ (80170c0 ) 801709c: 68f8 ldr r0, [r7, #12] 801709e: f006 f811 bl 801d0c4 tcp_poll(pcb, poll_tcp, NETCONN_TCP_POLL_INTERVAL); 80170a2: 2202 movs r2, #2 80170a4: 4907 ldr r1, [pc, #28] @ (80170c4 ) 80170a6: 68f8 ldr r0, [r7, #12] 80170a8: f006 f86c bl 801d184 tcp_err(pcb, err_tcp); 80170ac: 4906 ldr r1, [pc, #24] @ (80170c8 ) 80170ae: 68f8 ldr r0, [r7, #12] 80170b0: f006 f82c bl 801d10c } 80170b4: bf00 nop 80170b6: 3710 adds r7, #16 80170b8: 46bd mov sp, r7 80170ba: bd80 pop {r7, pc} 80170bc: 08016c25 .word 0x08016c25 80170c0: 08016e19 .word 0x08016e19 80170c4: 08016d49 .word 0x08016d49 80170c8: 08016ec9 .word 0x08016ec9 080170cc : * * @param msg the api_msg describing the connection type */ static void pcb_new(struct api_msg *msg) { 80170cc: b590 push {r4, r7, lr} 80170ce: b085 sub sp, #20 80170d0: af00 add r7, sp, #0 80170d2: 6078 str r0, [r7, #4] enum lwip_ip_addr_type iptype = IPADDR_TYPE_V4; 80170d4: 2300 movs r3, #0 80170d6: 73fb strb r3, [r7, #15] LWIP_ASSERT("pcb_new: pcb already allocated", msg->conn->pcb.tcp == NULL); 80170d8: 687b ldr r3, [r7, #4] 80170da: 681b ldr r3, [r3, #0] 80170dc: 685b ldr r3, [r3, #4] 80170de: 2b00 cmp r3, #0 80170e0: d006 beq.n 80170f0 80170e2: 4b2b ldr r3, [pc, #172] @ (8017190 ) 80170e4: f240 2265 movw r2, #613 @ 0x265 80170e8: 492a ldr r1, [pc, #168] @ (8017194 ) 80170ea: 482b ldr r0, [pc, #172] @ (8017198 ) 80170ec: f013 fbd6 bl 802a89c iptype = IPADDR_TYPE_ANY; } #endif /* Allocate a PCB for this connection */ switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80170f0: 687b ldr r3, [r7, #4] 80170f2: 681b ldr r3, [r3, #0] 80170f4: 781b ldrb r3, [r3, #0] 80170f6: f003 03f0 and.w r3, r3, #240 @ 0xf0 80170fa: 2b10 cmp r3, #16 80170fc: d022 beq.n 8017144 80170fe: 2b20 cmp r3, #32 8017100: d133 bne.n 801716a } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp = udp_new_ip_type(iptype); 8017102: 687b ldr r3, [r7, #4] 8017104: 681c ldr r4, [r3, #0] 8017106: 7bfb ldrb r3, [r7, #15] 8017108: 4618 mov r0, r3 801710a: f00b fb94 bl 8022836 801710e: 4603 mov r3, r0 8017110: 6063 str r3, [r4, #4] if (msg->conn->pcb.udp != NULL) { 8017112: 687b ldr r3, [r7, #4] 8017114: 681b ldr r3, [r3, #0] 8017116: 685b ldr r3, [r3, #4] 8017118: 2b00 cmp r3, #0 801711a: d02a beq.n 8017172 #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)) { 801711c: 687b ldr r3, [r7, #4] 801711e: 681b ldr r3, [r3, #0] 8017120: 781b ldrb r3, [r3, #0] 8017122: 2b22 cmp r3, #34 @ 0x22 8017124: d104 bne.n 8017130 udp_setflags(msg->conn->pcb.udp, UDP_FLAGS_NOCHKSUM); 8017126: 687b ldr r3, [r7, #4] 8017128: 681b ldr r3, [r3, #0] 801712a: 685b ldr r3, [r3, #4] 801712c: 2201 movs r2, #1 801712e: 741a strb r2, [r3, #16] } udp_recv(msg->conn->pcb.udp, recv_udp, msg->conn); 8017130: 687b ldr r3, [r7, #4] 8017132: 681b ldr r3, [r3, #0] 8017134: 6858 ldr r0, [r3, #4] 8017136: 687b ldr r3, [r7, #4] 8017138: 681b ldr r3, [r3, #0] 801713a: 461a mov r2, r3 801713c: 4917 ldr r1, [pc, #92] @ (801719c ) 801713e: f00b fafb bl 8022738 } break; 8017142: e016 b.n 8017172 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: msg->conn->pcb.tcp = tcp_new_ip_type(iptype); 8017144: 687b ldr r3, [r7, #4] 8017146: 681c ldr r4, [r3, #0] 8017148: 7bfb ldrb r3, [r7, #15] 801714a: 4618 mov r0, r3 801714c: f005 ff76 bl 801d03c 8017150: 4603 mov r3, r0 8017152: 6063 str r3, [r4, #4] if (msg->conn->pcb.tcp != NULL) { 8017154: 687b ldr r3, [r7, #4] 8017156: 681b ldr r3, [r3, #0] 8017158: 685b ldr r3, [r3, #4] 801715a: 2b00 cmp r3, #0 801715c: d00b beq.n 8017176 setup_tcp(msg->conn); 801715e: 687b ldr r3, [r7, #4] 8017160: 681b ldr r3, [r3, #0] 8017162: 4618 mov r0, r3 8017164: f7ff ff8a bl 801707c } break; 8017168: e005 b.n 8017176 #endif /* LWIP_TCP */ default: /* Unsupported netconn type, e.g. protocol disabled */ msg->err = ERR_VAL; 801716a: 687b ldr r3, [r7, #4] 801716c: 22fa movs r2, #250 @ 0xfa 801716e: 711a strb r2, [r3, #4] return; 8017170: e00a b.n 8017188 break; 8017172: bf00 nop 8017174: e000 b.n 8017178 break; 8017176: bf00 nop } if (msg->conn->pcb.ip == NULL) { 8017178: 687b ldr r3, [r7, #4] 801717a: 681b ldr r3, [r3, #0] 801717c: 685b ldr r3, [r3, #4] 801717e: 2b00 cmp r3, #0 8017180: d102 bne.n 8017188 msg->err = ERR_MEM; 8017182: 687b ldr r3, [r7, #4] 8017184: 22ff movs r2, #255 @ 0xff 8017186: 711a strb r2, [r3, #4] } } 8017188: 3714 adds r7, #20 801718a: 46bd mov sp, r7 801718c: bd90 pop {r4, r7, pc} 801718e: bf00 nop 8017190: 0802df0c .word 0x0802df0c 8017194: 0802e0f0 .word 0x0802e0f0 8017198: 0802df50 .word 0x0802df50 801719c: 08016aed .word 0x08016aed 080171a0 : * * @param m the api_msg describing the connection type */ void lwip_netconn_do_newconn(void *m) { 80171a0: b580 push {r7, lr} 80171a2: b084 sub sp, #16 80171a4: af00 add r7, sp, #0 80171a6: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 80171a8: 687b ldr r3, [r7, #4] 80171aa: 60fb str r3, [r7, #12] msg->err = ERR_OK; 80171ac: 68fb ldr r3, [r7, #12] 80171ae: 2200 movs r2, #0 80171b0: 711a strb r2, [r3, #4] if (msg->conn->pcb.tcp == NULL) { 80171b2: 68fb ldr r3, [r7, #12] 80171b4: 681b ldr r3, [r3, #0] 80171b6: 685b ldr r3, [r3, #4] 80171b8: 2b00 cmp r3, #0 80171ba: d102 bne.n 80171c2 pcb_new(msg); 80171bc: 68f8 ldr r0, [r7, #12] 80171be: f7ff ff85 bl 80170cc /* 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); } 80171c2: bf00 nop 80171c4: 3710 adds r7, #16 80171c6: 46bd mov sp, r7 80171c8: bd80 pop {r7, pc} ... 080171cc : * @return a newly allocated struct netconn or * NULL on memory error */ struct netconn * netconn_alloc(enum netconn_type t, netconn_callback callback) { 80171cc: b580 push {r7, lr} 80171ce: b086 sub sp, #24 80171d0: af00 add r7, sp, #0 80171d2: 4603 mov r3, r0 80171d4: 6039 str r1, [r7, #0] 80171d6: 71fb strb r3, [r7, #7] struct netconn *conn; int size; u8_t init_flags = 0; 80171d8: 2300 movs r3, #0 80171da: 74fb strb r3, [r7, #19] conn = (struct netconn *)memp_malloc(MEMP_NETCONN); 80171dc: 2007 movs r0, #7 80171de: f003 f981 bl 801a4e4 80171e2: 60f8 str r0, [r7, #12] if (conn == NULL) { 80171e4: 68fb ldr r3, [r7, #12] 80171e6: 2b00 cmp r3, #0 80171e8: d101 bne.n 80171ee return NULL; 80171ea: 2300 movs r3, #0 80171ec: e05c b.n 80172a8 } conn->pending_err = ERR_OK; 80171ee: 68fb ldr r3, [r7, #12] 80171f0: 2200 movs r2, #0 80171f2: 721a strb r2, [r3, #8] conn->type = t; 80171f4: 68fb ldr r3, [r7, #12] 80171f6: 79fa ldrb r2, [r7, #7] 80171f8: 701a strb r2, [r3, #0] conn->pcb.tcp = NULL; 80171fa: 68fb ldr r3, [r7, #12] 80171fc: 2200 movs r2, #0 80171fe: 605a str r2, [r3, #4] /* If all sizes are the same, every compiler should optimize this switch to nothing */ switch (NETCONNTYPE_GROUP(t)) { 8017200: 79fb ldrb r3, [r7, #7] 8017202: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017206: 2b10 cmp r3, #16 8017208: d004 beq.n 8017214 801720a: 2b20 cmp r3, #32 801720c: d105 bne.n 801721a size = DEFAULT_RAW_RECVMBOX_SIZE; break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: size = DEFAULT_UDP_RECVMBOX_SIZE; 801720e: 2306 movs r3, #6 8017210: 617b str r3, [r7, #20] #if LWIP_NETBUF_RECVINFO init_flags |= NETCONN_FLAG_PKTINFO; #endif /* LWIP_NETBUF_RECVINFO */ break; 8017212: e00a b.n 801722a #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: size = DEFAULT_TCP_RECVMBOX_SIZE; 8017214: 2306 movs r3, #6 8017216: 617b str r3, [r7, #20] break; 8017218: e007 b.n 801722a #endif /* LWIP_TCP */ default: LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0); 801721a: 4b25 ldr r3, [pc, #148] @ (80172b0 ) 801721c: f240 22e5 movw r2, #741 @ 0x2e5 8017220: 4924 ldr r1, [pc, #144] @ (80172b4 ) 8017222: 4825 ldr r0, [pc, #148] @ (80172b8 ) 8017224: f013 fb3a bl 802a89c goto free_and_return; 8017228: e039 b.n 801729e } if (sys_mbox_new(&conn->recvmbox, size) != ERR_OK) { 801722a: 68fb ldr r3, [r7, #12] 801722c: 3310 adds r3, #16 801722e: 6979 ldr r1, [r7, #20] 8017230: 4618 mov r0, r3 8017232: f00f ff05 bl 8027040 8017236: 4603 mov r3, r0 8017238: 2b00 cmp r3, #0 801723a: d12f bne.n 801729c goto free_and_return; } #if !LWIP_NETCONN_SEM_PER_THREAD if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) { 801723c: 68fb ldr r3, [r7, #12] 801723e: 330c adds r3, #12 8017240: 2100 movs r1, #0 8017242: 4618 mov r0, r3 8017244: f00f ffa8 bl 8027198 8017248: 4603 mov r3, r0 801724a: 2b00 cmp r3, #0 801724c: d005 beq.n 801725a sys_mbox_free(&conn->recvmbox); 801724e: 68fb ldr r3, [r7, #12] 8017250: 3310 adds r3, #16 8017252: 4618 mov r0, r3 8017254: f00f ff0e bl 8027074 goto free_and_return; 8017258: e021 b.n 801729e } #endif #if LWIP_TCP sys_mbox_set_invalid(&conn->acceptmbox); 801725a: 68fb ldr r3, [r7, #12] 801725c: 3314 adds r3, #20 801725e: 4618 mov r0, r3 8017260: f00f ff8d bl 802717e #endif conn->state = NETCONN_NONE; 8017264: 68fb ldr r3, [r7, #12] 8017266: 2200 movs r2, #0 8017268: 705a strb r2, [r3, #1] #if LWIP_SOCKET /* initialize socket to -1 since 0 is a valid socket */ conn->socket = -1; 801726a: 68fb ldr r3, [r7, #12] 801726c: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 8017270: 619a str r2, [r3, #24] #endif /* LWIP_SOCKET */ conn->callback = callback; 8017272: 68fb ldr r3, [r7, #12] 8017274: 683a ldr r2, [r7, #0] 8017276: 631a str r2, [r3, #48] @ 0x30 #if LWIP_TCP conn->current_msg = NULL; 8017278: 68fb ldr r3, [r7, #12] 801727a: 2200 movs r2, #0 801727c: 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; 801727e: 68fb ldr r3, [r7, #12] 8017280: 2200 movs r2, #0 8017282: 61da str r2, [r3, #28] #endif /* LWIP_SO_RCVTIMEO */ #if LWIP_SO_RCVBUF conn->recv_bufsize = RECV_BUFSIZE_DEFAULT; 8017284: 68fb ldr r3, [r7, #12] 8017286: 4a0d ldr r2, [pc, #52] @ (80172bc ) 8017288: 621a str r2, [r3, #32] conn->recv_avail = 0; 801728a: 68fb ldr r3, [r7, #12] 801728c: 2200 movs r2, #0 801728e: 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; 8017290: 68fb ldr r3, [r7, #12] 8017292: 7cfa ldrb r2, [r7, #19] 8017294: f883 2028 strb.w r2, [r3, #40] @ 0x28 return conn; 8017298: 68fb ldr r3, [r7, #12] 801729a: e005 b.n 80172a8 goto free_and_return; 801729c: bf00 nop free_and_return: memp_free(MEMP_NETCONN, conn); 801729e: 68f9 ldr r1, [r7, #12] 80172a0: 2007 movs r0, #7 80172a2: f003 f995 bl 801a5d0 return NULL; 80172a6: 2300 movs r3, #0 } 80172a8: 4618 mov r0, r3 80172aa: 3718 adds r7, #24 80172ac: 46bd mov sp, r7 80172ae: bd80 pop {r7, pc} 80172b0: 0802df0c .word 0x0802df0c 80172b4: 0802e110 .word 0x0802e110 80172b8: 0802df50 .word 0x0802df50 80172bc: 77359400 .word 0x77359400 080172c0 : * * @param conn the netconn to free */ void netconn_free(struct netconn *conn) { 80172c0: b580 push {r7, lr} 80172c2: b082 sub sp, #8 80172c4: af00 add r7, sp, #0 80172c6: 6078 str r0, [r7, #4] LWIP_ASSERT("PCB must be deallocated outside this function", conn->pcb.tcp == NULL); 80172c8: 687b ldr r3, [r7, #4] 80172ca: 685b ldr r3, [r3, #4] 80172cc: 2b00 cmp r3, #0 80172ce: d006 beq.n 80172de 80172d0: 4b1b ldr r3, [pc, #108] @ (8017340 ) 80172d2: f44f 7247 mov.w r2, #796 @ 0x31c 80172d6: 491b ldr r1, [pc, #108] @ (8017344 ) 80172d8: 481b ldr r0, [pc, #108] @ (8017348 ) 80172da: f013 fadf bl 802a89c #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", 80172de: 687b ldr r3, [r7, #4] 80172e0: 3310 adds r3, #16 80172e2: 4618 mov r0, r3 80172e4: f00f ff3a bl 802715c 80172e8: 4603 mov r3, r0 80172ea: 2b00 cmp r3, #0 80172ec: d006 beq.n 80172fc 80172ee: 4b14 ldr r3, [pc, #80] @ (8017340 ) 80172f0: f240 3223 movw r2, #803 @ 0x323 80172f4: 4915 ldr r1, [pc, #84] @ (801734c ) 80172f6: 4814 ldr r0, [pc, #80] @ (8017348 ) 80172f8: f013 fad0 bl 802a89c !sys_mbox_valid(&conn->recvmbox)); #if LWIP_TCP LWIP_ASSERT("acceptmbox must be deallocated before calling this function", 80172fc: 687b ldr r3, [r7, #4] 80172fe: 3314 adds r3, #20 8017300: 4618 mov r0, r3 8017302: f00f ff2b bl 802715c 8017306: 4603 mov r3, r0 8017308: 2b00 cmp r3, #0 801730a: d006 beq.n 801731a 801730c: 4b0c ldr r3, [pc, #48] @ (8017340 ) 801730e: f240 3226 movw r2, #806 @ 0x326 8017312: 490f ldr r1, [pc, #60] @ (8017350 ) 8017314: 480c ldr r0, [pc, #48] @ (8017348 ) 8017316: f013 fac1 bl 802a89c !sys_mbox_valid(&conn->acceptmbox)); #endif /* LWIP_TCP */ #if !LWIP_NETCONN_SEM_PER_THREAD sys_sem_free(&conn->op_completed); 801731a: 687b ldr r3, [r7, #4] 801731c: 330c adds r3, #12 801731e: 4618 mov r0, r3 8017320: f00f ff9d bl 802725e sys_sem_set_invalid(&conn->op_completed); 8017324: 687b ldr r3, [r7, #4] 8017326: 330c adds r3, #12 8017328: 4618 mov r0, r3 801732a: f00f ffb6 bl 802729a #endif memp_free(MEMP_NETCONN, conn); 801732e: 6879 ldr r1, [r7, #4] 8017330: 2007 movs r0, #7 8017332: f003 f94d bl 801a5d0 } 8017336: bf00 nop 8017338: 3708 adds r7, #8 801733a: 46bd mov sp, r7 801733c: bd80 pop {r7, pc} 801733e: bf00 nop 8017340: 0802df0c .word 0x0802df0c 8017344: 0802e138 .word 0x0802e138 8017348: 0802df50 .word 0x0802df50 801734c: 0802e168 .word 0x0802e168 8017350: 0802e1a4 .word 0x0802e1a4 08017354 : * @bytes_drained bytes drained from recvmbox * @accepts_drained pending connections drained from acceptmbox */ static void netconn_drain(struct netconn *conn) { 8017354: b580 push {r7, lr} 8017356: b086 sub sp, #24 8017358: af00 add r7, sp, #0 801735a: 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)) { 801735c: 687b ldr r3, [r7, #4] 801735e: 3310 adds r3, #16 8017360: 4618 mov r0, r3 8017362: f00f fefb bl 802715c 8017366: 4603 mov r3, r0 8017368: 2b00 cmp r3, #0 801736a: d02f beq.n 80173cc while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 801736c: e018 b.n 80173a0 #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) { 801736e: 687b ldr r3, [r7, #4] 8017370: 781b ldrb r3, [r3, #0] 8017372: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017376: 2b10 cmp r3, #16 8017378: d10e bne.n 8017398 err_t err; if (!lwip_netconn_is_err_msg(mem, &err)) { 801737a: 693b ldr r3, [r7, #16] 801737c: f107 020f add.w r2, r7, #15 8017380: 4611 mov r1, r2 8017382: 4618 mov r0, r3 8017384: f7ff fb78 bl 8016a78 8017388: 4603 mov r3, r0 801738a: 2b00 cmp r3, #0 801738c: d108 bne.n 80173a0 pbuf_free((struct pbuf *)mem); 801738e: 693b ldr r3, [r7, #16] 8017390: 4618 mov r0, r3 8017392: f004 f80b bl 801b3ac 8017396: e003 b.n 80173a0 } } else #endif /* LWIP_TCP */ { netbuf_delete((struct netbuf *)mem); 8017398: 693b ldr r3, [r7, #16] 801739a: 4618 mov r0, r3 801739c: f001 f81c bl 80183d8 while (sys_mbox_tryfetch(&conn->recvmbox, &mem) != SYS_MBOX_EMPTY) { 80173a0: 687b ldr r3, [r7, #4] 80173a2: 3310 adds r3, #16 80173a4: f107 0210 add.w r2, r7, #16 80173a8: 4611 mov r1, r2 80173aa: 4618 mov r0, r3 80173ac: f00f febf bl 802712e 80173b0: 4603 mov r3, r0 80173b2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80173b6: d1da bne.n 801736e } } } sys_mbox_free(&conn->recvmbox); 80173b8: 687b ldr r3, [r7, #4] 80173ba: 3310 adds r3, #16 80173bc: 4618 mov r0, r3 80173be: f00f fe59 bl 8027074 sys_mbox_set_invalid(&conn->recvmbox); 80173c2: 687b ldr r3, [r7, #4] 80173c4: 3310 adds r3, #16 80173c6: 4618 mov r0, r3 80173c8: f00f fed9 bl 802717e } /* Delete and drain the acceptmbox. */ #if LWIP_TCP if (sys_mbox_valid(&conn->acceptmbox)) { 80173cc: 687b ldr r3, [r7, #4] 80173ce: 3314 adds r3, #20 80173d0: 4618 mov r0, r3 80173d2: f00f fec3 bl 802715c 80173d6: 4603 mov r3, r0 80173d8: 2b00 cmp r3, #0 80173da: d034 beq.n 8017446 while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 80173dc: e01d b.n 801741a #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)) { 80173de: 693b ldr r3, [r7, #16] 80173e0: f107 020e add.w r2, r7, #14 80173e4: 4611 mov r1, r2 80173e6: 4618 mov r0, r3 80173e8: f7ff fb46 bl 8016a78 80173ec: 4603 mov r3, r0 80173ee: 2b00 cmp r3, #0 80173f0: d113 bne.n 801741a struct netconn *newconn = (struct netconn *)mem; 80173f2: 693b ldr r3, [r7, #16] 80173f4: 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); 80173f6: 6978 ldr r0, [r7, #20] 80173f8: f7ff ffac bl 8017354 if (newconn->pcb.tcp != NULL) { 80173fc: 697b ldr r3, [r7, #20] 80173fe: 685b ldr r3, [r3, #4] 8017400: 2b00 cmp r3, #0 8017402: d007 beq.n 8017414 tcp_abort(newconn->pcb.tcp); 8017404: 697b ldr r3, [r7, #20] 8017406: 685b ldr r3, [r3, #4] 8017408: 4618 mov r0, r3 801740a: f004 fdd5 bl 801bfb8 newconn->pcb.tcp = NULL; 801740e: 697b ldr r3, [r7, #20] 8017410: 2200 movs r2, #0 8017412: 605a str r2, [r3, #4] } netconn_free(newconn); 8017414: 6978 ldr r0, [r7, #20] 8017416: f7ff ff53 bl 80172c0 while (sys_mbox_tryfetch(&conn->acceptmbox, &mem) != SYS_MBOX_EMPTY) { 801741a: 687b ldr r3, [r7, #4] 801741c: 3314 adds r3, #20 801741e: f107 0210 add.w r2, r7, #16 8017422: 4611 mov r1, r2 8017424: 4618 mov r0, r3 8017426: f00f fe82 bl 802712e 801742a: 4603 mov r3, r0 801742c: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017430: d1d5 bne.n 80173de } } } sys_mbox_free(&conn->acceptmbox); 8017432: 687b ldr r3, [r7, #4] 8017434: 3314 adds r3, #20 8017436: 4618 mov r0, r3 8017438: f00f fe1c bl 8027074 sys_mbox_set_invalid(&conn->acceptmbox); 801743c: 687b ldr r3, [r7, #4] 801743e: 3314 adds r3, #20 8017440: 4618 mov r0, r3 8017442: f00f fe9c bl 802717e } #endif /* LWIP_TCP */ } 8017446: bf00 nop 8017448: 3718 adds r7, #24 801744a: 46bd mov sp, r7 801744c: bd80 pop {r7, pc} ... 08017450 : * * @param conn the TCP netconn to close */ static err_t lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM) { 8017450: b580 push {r7, lr} 8017452: b086 sub sp, #24 8017454: af00 add r7, sp, #0 8017456: 6078 str r0, [r7, #4] 8017458: 460b mov r3, r1 801745a: 70fb strb r3, [r7, #3] err_t err; u8_t shut, shut_rx, shut_tx, shut_close; u8_t close_finished = 0; 801745c: 2300 movs r3, #0 801745e: 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)); 8017460: 687b ldr r3, [r7, #4] 8017462: 2b00 cmp r3, #0 8017464: d106 bne.n 8017474 8017466: 4b87 ldr r3, [pc, #540] @ (8017684 ) 8017468: f240 32a2 movw r2, #930 @ 0x3a2 801746c: 4986 ldr r1, [pc, #536] @ (8017688 ) 801746e: 4887 ldr r0, [pc, #540] @ (801768c ) 8017470: f013 fa14 bl 802a89c LWIP_ASSERT("this is for tcp netconns only", (NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP)); 8017474: 687b ldr r3, [r7, #4] 8017476: 781b ldrb r3, [r3, #0] 8017478: f003 03f0 and.w r3, r3, #240 @ 0xf0 801747c: 2b10 cmp r3, #16 801747e: d006 beq.n 801748e 8017480: 4b80 ldr r3, [pc, #512] @ (8017684 ) 8017482: f240 32a3 movw r2, #931 @ 0x3a3 8017486: 4982 ldr r1, [pc, #520] @ (8017690 ) 8017488: 4880 ldr r0, [pc, #512] @ (801768c ) 801748a: f013 fa07 bl 802a89c LWIP_ASSERT("conn must be in state NETCONN_CLOSE", (conn->state == NETCONN_CLOSE)); 801748e: 687b ldr r3, [r7, #4] 8017490: 785b ldrb r3, [r3, #1] 8017492: 2b04 cmp r3, #4 8017494: d006 beq.n 80174a4 8017496: 4b7b ldr r3, [pc, #492] @ (8017684 ) 8017498: f44f 7269 mov.w r2, #932 @ 0x3a4 801749c: 497d ldr r1, [pc, #500] @ (8017694 ) 801749e: 487b ldr r0, [pc, #492] @ (801768c ) 80174a0: f013 f9fc bl 802a89c LWIP_ASSERT("pcb already closed", (conn->pcb.tcp != NULL)); 80174a4: 687b ldr r3, [r7, #4] 80174a6: 685b ldr r3, [r3, #4] 80174a8: 2b00 cmp r3, #0 80174aa: d106 bne.n 80174ba 80174ac: 4b75 ldr r3, [pc, #468] @ (8017684 ) 80174ae: f240 32a5 movw r2, #933 @ 0x3a5 80174b2: 4979 ldr r1, [pc, #484] @ (8017698 ) 80174b4: 4875 ldr r0, [pc, #468] @ (801768c ) 80174b6: f013 f9f1 bl 802a89c LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 80174ba: 687b ldr r3, [r7, #4] 80174bc: 6adb ldr r3, [r3, #44] @ 0x2c 80174be: 2b00 cmp r3, #0 80174c0: d106 bne.n 80174d0 80174c2: 4b70 ldr r3, [pc, #448] @ (8017684 ) 80174c4: f240 32a6 movw r2, #934 @ 0x3a6 80174c8: 4974 ldr r1, [pc, #464] @ (801769c ) 80174ca: 4870 ldr r0, [pc, #448] @ (801768c ) 80174cc: f013 f9e6 bl 802a89c tpcb = conn->pcb.tcp; 80174d0: 687b ldr r3, [r7, #4] 80174d2: 685b ldr r3, [r3, #4] 80174d4: 613b str r3, [r7, #16] shut = conn->current_msg->msg.sd.shut; 80174d6: 687b ldr r3, [r7, #4] 80174d8: 6adb ldr r3, [r3, #44] @ 0x2c 80174da: 7a1b ldrb r3, [r3, #8] 80174dc: 73fb strb r3, [r7, #15] shut_rx = shut & NETCONN_SHUT_RD; 80174de: 7bfb ldrb r3, [r7, #15] 80174e0: f003 0301 and.w r3, r3, #1 80174e4: 73bb strb r3, [r7, #14] shut_tx = shut & NETCONN_SHUT_WR; 80174e6: 7bfb ldrb r3, [r7, #15] 80174e8: f003 0302 and.w r3, r3, #2 80174ec: 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) { 80174ee: 7bfb ldrb r3, [r7, #15] 80174f0: 2b03 cmp r3, #3 80174f2: d102 bne.n 80174fa shut_close = 1; 80174f4: 2301 movs r3, #1 80174f6: 75bb strb r3, [r7, #22] 80174f8: e01f b.n 801753a } else if (shut_rx && 80174fa: 7bbb ldrb r3, [r7, #14] 80174fc: 2b00 cmp r3, #0 80174fe: d00e beq.n 801751e ((tpcb->state == FIN_WAIT_1) || 8017500: 693b ldr r3, [r7, #16] 8017502: 7d1b ldrb r3, [r3, #20] } else if (shut_rx && 8017504: 2b05 cmp r3, #5 8017506: d007 beq.n 8017518 (tpcb->state == FIN_WAIT_2) || 8017508: 693b ldr r3, [r7, #16] 801750a: 7d1b ldrb r3, [r3, #20] ((tpcb->state == FIN_WAIT_1) || 801750c: 2b06 cmp r3, #6 801750e: d003 beq.n 8017518 (tpcb->state == CLOSING))) { 8017510: 693b ldr r3, [r7, #16] 8017512: 7d1b ldrb r3, [r3, #20] (tpcb->state == FIN_WAIT_2) || 8017514: 2b08 cmp r3, #8 8017516: d102 bne.n 801751e shut_close = 1; 8017518: 2301 movs r3, #1 801751a: 75bb strb r3, [r7, #22] 801751c: e00d b.n 801753a } else if (shut_tx && ((tpcb->flags & TF_RXCLOSED) != 0)) { 801751e: 7b7b ldrb r3, [r7, #13] 8017520: 2b00 cmp r3, #0 8017522: d008 beq.n 8017536 8017524: 693b ldr r3, [r7, #16] 8017526: 8b5b ldrh r3, [r3, #26] 8017528: f003 0310 and.w r3, r3, #16 801752c: 2b00 cmp r3, #0 801752e: d002 beq.n 8017536 shut_close = 1; 8017530: 2301 movs r3, #1 8017532: 75bb strb r3, [r7, #22] 8017534: e001 b.n 801753a } else { shut_close = 0; 8017536: 2300 movs r3, #0 8017538: 75bb strb r3, [r7, #22] } /* Set back some callback pointers */ if (shut_close) { 801753a: 7dbb ldrb r3, [r7, #22] 801753c: 2b00 cmp r3, #0 801753e: d003 beq.n 8017548 tcp_arg(tpcb, NULL); 8017540: 2100 movs r1, #0 8017542: 6938 ldr r0, [r7, #16] 8017544: f005 fd88 bl 801d058 } if (tpcb->state == LISTEN) { 8017548: 693b ldr r3, [r7, #16] 801754a: 7d1b ldrb r3, [r3, #20] 801754c: 2b01 cmp r3, #1 801754e: d104 bne.n 801755a tcp_accept(tpcb, NULL); 8017550: 2100 movs r1, #0 8017552: 6938 ldr r0, [r7, #16] 8017554: f005 fdfe bl 801d154 8017558: e01d b.n 8017596 } else { /* some callbacks have to be reset if tcp_close is not successful */ if (shut_rx) { 801755a: 7bbb ldrb r3, [r7, #14] 801755c: 2b00 cmp r3, #0 801755e: d007 beq.n 8017570 tcp_recv(tpcb, NULL); 8017560: 2100 movs r1, #0 8017562: 6938 ldr r0, [r7, #16] 8017564: f005 fd8a bl 801d07c tcp_accept(tpcb, NULL); 8017568: 2100 movs r1, #0 801756a: 6938 ldr r0, [r7, #16] 801756c: f005 fdf2 bl 801d154 } if (shut_tx) { 8017570: 7b7b ldrb r3, [r7, #13] 8017572: 2b00 cmp r3, #0 8017574: d003 beq.n 801757e tcp_sent(tpcb, NULL); 8017576: 2100 movs r1, #0 8017578: 6938 ldr r0, [r7, #16] 801757a: f005 fda3 bl 801d0c4 } if (shut_close) { 801757e: 7dbb ldrb r3, [r7, #22] 8017580: 2b00 cmp r3, #0 8017582: d008 beq.n 8017596 tcp_poll(tpcb, NULL, 0); 8017584: 2200 movs r2, #0 8017586: 2100 movs r1, #0 8017588: 6938 ldr r0, [r7, #16] 801758a: f005 fdfb bl 801d184 tcp_err(tpcb, NULL); 801758e: 2100 movs r1, #0 8017590: 6938 ldr r0, [r7, #16] 8017592: f005 fdbb bl 801d10c } } /* Try to close the connection */ if (shut_close) { 8017596: 7dbb ldrb r3, [r7, #22] 8017598: 2b00 cmp r3, #0 801759a: d005 beq.n 80175a8 } } if ((err == ERR_OK) && (tpcb != NULL)) #endif /* LWIP_SO_LINGER */ { err = tcp_close(tpcb); 801759c: 6938 ldr r0, [r7, #16] 801759e: f004 fbbf bl 801bd20 80175a2: 4603 mov r3, r0 80175a4: 75fb strb r3, [r7, #23] 80175a6: e007 b.n 80175b8 } } else { err = tcp_shutdown(tpcb, shut_rx, shut_tx); 80175a8: 7bbb ldrb r3, [r7, #14] 80175aa: 7b7a ldrb r2, [r7, #13] 80175ac: 4619 mov r1, r3 80175ae: 6938 ldr r0, [r7, #16] 80175b0: f004 fbe4 bl 801bd7c 80175b4: 4603 mov r3, r0 80175b6: 75fb strb r3, [r7, #23] } if (err == ERR_OK) { 80175b8: f997 3017 ldrsb.w r3, [r7, #23] 80175bc: 2b00 cmp r3, #0 80175be: d102 bne.n 80175c6 close_finished = 1; 80175c0: 2301 movs r3, #1 80175c2: 757b strb r3, [r7, #21] 80175c4: e016 b.n 80175f4 close_finished = 0; err = ERR_INPROGRESS; } #endif /* LWIP_SO_LINGER */ } else { if (err == ERR_MEM) { 80175c6: f997 3017 ldrsb.w r3, [r7, #23] 80175ca: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80175ce: d10f bne.n 80175f0 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) { 80175d0: 687b ldr r3, [r7, #4] 80175d2: 6adb ldr r3, [r3, #44] @ 0x2c 80175d4: 7a5b ldrb r3, [r3, #9] 80175d6: 2b00 cmp r3, #0 80175d8: d10c bne.n 80175f4 #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ close_finished = 1; 80175da: 2301 movs r3, #1 80175dc: 757b strb r3, [r7, #21] if (shut_close) { 80175de: 7dbb ldrb r3, [r7, #22] 80175e0: 2b00 cmp r3, #0 80175e2: d007 beq.n 80175f4 /* in this case, we want to RST the connection */ tcp_abort(tpcb); 80175e4: 6938 ldr r0, [r7, #16] 80175e6: f004 fce7 bl 801bfb8 err = ERR_OK; 80175ea: 2300 movs r3, #0 80175ec: 75fb strb r3, [r7, #23] 80175ee: e001 b.n 80175f4 } } } else { /* Closing failed for a non-memory error: give up */ close_finished = 1; 80175f0: 2301 movs r3, #1 80175f2: 757b strb r3, [r7, #21] } } if (close_finished) { 80175f4: 7d7b ldrb r3, [r7, #21] 80175f6: 2b00 cmp r3, #0 80175f8: d052 beq.n 80176a0 /* Closing done (succeeded, non-memory error, nonblocking error or timeout) */ sys_sem_t *op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 80175fa: 687b ldr r3, [r7, #4] 80175fc: 6adb ldr r3, [r3, #44] @ 0x2c 80175fe: 681b ldr r3, [r3, #0] 8017600: 330c adds r3, #12 8017602: 60bb str r3, [r7, #8] conn->current_msg->err = err; 8017604: 687b ldr r3, [r7, #4] 8017606: 6adb ldr r3, [r3, #44] @ 0x2c 8017608: 7dfa ldrb r2, [r7, #23] 801760a: 711a strb r2, [r3, #4] conn->current_msg = NULL; 801760c: 687b ldr r3, [r7, #4] 801760e: 2200 movs r2, #0 8017610: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 8017612: 687b ldr r3, [r7, #4] 8017614: 2200 movs r2, #0 8017616: 705a strb r2, [r3, #1] if (err == ERR_OK) { 8017618: f997 3017 ldrsb.w r3, [r7, #23] 801761c: 2b00 cmp r3, #0 801761e: d129 bne.n 8017674 if (shut_close) { 8017620: 7dbb ldrb r3, [r7, #22] 8017622: 2b00 cmp r3, #0 8017624: d00c beq.n 8017640 /* Set back some callback pointers as conn is going away */ conn->pcb.tcp = NULL; 8017626: 687b ldr r3, [r7, #4] 8017628: 2200 movs r2, #0 801762a: 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); 801762c: 687b ldr r3, [r7, #4] 801762e: 6b1b ldr r3, [r3, #48] @ 0x30 8017630: 2b00 cmp r3, #0 8017632: d005 beq.n 8017640 8017634: 687b ldr r3, [r7, #4] 8017636: 6b1b ldr r3, [r3, #48] @ 0x30 8017638: 2200 movs r2, #0 801763a: 2104 movs r1, #4 801763c: 6878 ldr r0, [r7, #4] 801763e: 4798 blx r3 } if (shut_rx) { 8017640: 7bbb ldrb r3, [r7, #14] 8017642: 2b00 cmp r3, #0 8017644: d009 beq.n 801765a API_EVENT(conn, NETCONN_EVT_RCVPLUS, 0); 8017646: 687b ldr r3, [r7, #4] 8017648: 6b1b ldr r3, [r3, #48] @ 0x30 801764a: 2b00 cmp r3, #0 801764c: d005 beq.n 801765a 801764e: 687b ldr r3, [r7, #4] 8017650: 6b1b ldr r3, [r3, #48] @ 0x30 8017652: 2200 movs r2, #0 8017654: 2100 movs r1, #0 8017656: 6878 ldr r0, [r7, #4] 8017658: 4798 blx r3 } if (shut_tx) { 801765a: 7b7b ldrb r3, [r7, #13] 801765c: 2b00 cmp r3, #0 801765e: d009 beq.n 8017674 API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 8017660: 687b ldr r3, [r7, #4] 8017662: 6b1b ldr r3, [r3, #48] @ 0x30 8017664: 2b00 cmp r3, #0 8017666: d005 beq.n 8017674 8017668: 687b ldr r3, [r7, #4] 801766a: 6b1b ldr r3, [r3, #48] @ 0x30 801766c: 2200 movs r2, #0 801766e: 2102 movs r1, #2 8017670: 6878 ldr r0, [r7, #4] 8017672: 4798 blx r3 } } #if LWIP_TCPIP_CORE_LOCKING if (delayed) 8017674: 78fb ldrb r3, [r7, #3] 8017676: 2b00 cmp r3, #0 8017678: d002 beq.n 8017680 #endif { /* wake up the application task */ sys_sem_signal(op_completed_sem); 801767a: 68b8 ldr r0, [r7, #8] 801767c: f00f fde2 bl 8027244 } return ERR_OK; 8017680: 2300 movs r3, #0 8017682: e03c b.n 80176fe 8017684: 0802df0c .word 0x0802df0c 8017688: 0802e1e0 .word 0x0802e1e0 801768c: 0802df50 .word 0x0802df50 8017690: 0802e1f0 .word 0x0802e1f0 8017694: 0802e210 .word 0x0802e210 8017698: 0802e234 .word 0x0802e234 801769c: 0802e074 .word 0x0802e074 } if (!close_finished) { 80176a0: 7d7b ldrb r3, [r7, #21] 80176a2: 2b00 cmp r3, #0 80176a4: d11e bne.n 80176e4 /* 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)); 80176a6: 693b ldr r3, [r7, #16] 80176a8: 7d1b ldrb r3, [r3, #20] 80176aa: 2b01 cmp r3, #1 80176ac: d106 bne.n 80176bc 80176ae: 4b16 ldr r3, [pc, #88] @ (8017708 ) 80176b0: f240 4241 movw r2, #1089 @ 0x441 80176b4: 4915 ldr r1, [pc, #84] @ (801770c ) 80176b6: 4816 ldr r0, [pc, #88] @ (8017710 ) 80176b8: f013 f8f0 bl 802a89c if (shut_tx) { 80176bc: 7b7b ldrb r3, [r7, #13] 80176be: 2b00 cmp r3, #0 80176c0: d003 beq.n 80176ca tcp_sent(tpcb, sent_tcp); 80176c2: 4914 ldr r1, [pc, #80] @ (8017714 ) 80176c4: 6938 ldr r0, [r7, #16] 80176c6: f005 fcfd bl 801d0c4 } /* when waiting for close, set up poll interval to 500ms */ tcp_poll(tpcb, poll_tcp, 1); 80176ca: 2201 movs r2, #1 80176cc: 4912 ldr r1, [pc, #72] @ (8017718 ) 80176ce: 6938 ldr r0, [r7, #16] 80176d0: f005 fd58 bl 801d184 tcp_err(tpcb, err_tcp); 80176d4: 4911 ldr r1, [pc, #68] @ (801771c ) 80176d6: 6938 ldr r0, [r7, #16] 80176d8: f005 fd18 bl 801d10c tcp_arg(tpcb, conn); 80176dc: 6879 ldr r1, [r7, #4] 80176de: 6938 ldr r0, [r7, #16] 80176e0: f005 fcba bl 801d058 /* 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); 80176e4: f997 3017 ldrsb.w r3, [r7, #23] 80176e8: 2b00 cmp r3, #0 80176ea: d106 bne.n 80176fa 80176ec: 4b06 ldr r3, [pc, #24] @ (8017708 ) 80176ee: f240 424d movw r2, #1101 @ 0x44d 80176f2: 490b ldr r1, [pc, #44] @ (8017720 ) 80176f4: 4806 ldr r0, [pc, #24] @ (8017710 ) 80176f6: f013 f8d1 bl 802a89c return err; 80176fa: f997 3017 ldrsb.w r3, [r7, #23] } 80176fe: 4618 mov r0, r3 8017700: 3718 adds r7, #24 8017702: 46bd mov sp, r7 8017704: bd80 pop {r7, pc} 8017706: bf00 nop 8017708: 0802df0c .word 0x0802df0c 801770c: 0802e248 .word 0x0802e248 8017710: 0802df50 .word 0x0802df50 8017714: 08016e19 .word 0x08016e19 8017718: 08016d49 .word 0x08016d49 801771c: 08016ec9 .word 0x08016ec9 8017720: 0802e26c .word 0x0802e26c 08017724 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_delconn(void *m) { 8017724: b580 push {r7, lr} 8017726: b084 sub sp, #16 8017728: af00 add r7, sp, #0 801772a: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 801772c: 687b ldr r3, [r7, #4] 801772e: 60fb str r3, [r7, #12] enum netconn_state state = msg->conn->state; 8017730: 68fb ldr r3, [r7, #12] 8017732: 681b ldr r3, [r3, #0] 8017734: 785b ldrb r3, [r3, #1] 8017736: 72fb strb r3, [r7, #11] LWIP_ASSERT("netconn state error", /* this only happens for TCP netconns */ 8017738: 7afb ldrb r3, [r7, #11] 801773a: 2b00 cmp r3, #0 801773c: d00d beq.n 801775a 801773e: 68fb ldr r3, [r7, #12] 8017740: 681b ldr r3, [r3, #0] 8017742: 781b ldrb r3, [r3, #0] 8017744: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017748: 2b10 cmp r3, #16 801774a: d006 beq.n 801775a 801774c: 4b60 ldr r3, [pc, #384] @ (80178d0 ) 801774e: f240 425e movw r2, #1118 @ 0x45e 8017752: 4960 ldr r1, [pc, #384] @ (80178d4 ) 8017754: 4860 ldr r0, [pc, #384] @ (80178d8 ) 8017756: f013 f8a1 bl 802a89c msg->conn->state = NETCONN_NONE; sys_sem_signal(op_completed_sem); } } #else /* LWIP_NETCONN_FULLDUPLEX */ if (((state != NETCONN_NONE) && 801775a: 7afb ldrb r3, [r7, #11] 801775c: 2b00 cmp r3, #0 801775e: d005 beq.n 801776c 8017760: 7afb ldrb r3, [r7, #11] 8017762: 2b02 cmp r3, #2 8017764: d002 beq.n 801776c (state != NETCONN_LISTEN) && 8017766: 7afb ldrb r3, [r7, #11] 8017768: 2b03 cmp r3, #3 801776a: d10a bne.n 8017782 (state != NETCONN_CONNECT)) || 801776c: 7afb ldrb r3, [r7, #11] 801776e: 2b03 cmp r3, #3 8017770: d10b bne.n 801778a ((state == NETCONN_CONNECT) && !IN_NONBLOCKING_CONNECT(msg->conn))) { 8017772: 68fb ldr r3, [r7, #12] 8017774: 681b ldr r3, [r3, #0] 8017776: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801777a: f003 0304 and.w r3, r3, #4 801777e: 2b00 cmp r3, #0 8017780: d103 bne.n 801778a /* This means either a blocking write or blocking connect is running (nonblocking write returns and sets state to NONE) */ msg->err = ERR_INPROGRESS; 8017782: 68fb ldr r3, [r7, #12] 8017784: 22fb movs r2, #251 @ 0xfb 8017786: 711a strb r2, [r3, #4] 8017788: e096 b.n 80178b8 } else #endif /* LWIP_NETCONN_FULLDUPLEX */ { LWIP_ASSERT("blocking connect in progress", 801778a: 7afb ldrb r3, [r7, #11] 801778c: 2b03 cmp r3, #3 801778e: d10e bne.n 80177ae 8017790: 68fb ldr r3, [r7, #12] 8017792: 681b ldr r3, [r3, #0] 8017794: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017798: f003 0304 and.w r3, r3, #4 801779c: 2b00 cmp r3, #0 801779e: d106 bne.n 80177ae 80177a0: 4b4b ldr r3, [pc, #300] @ (80178d0 ) 80177a2: f240 427a movw r2, #1146 @ 0x47a 80177a6: 494d ldr r1, [pc, #308] @ (80178dc ) 80177a8: 484b ldr r0, [pc, #300] @ (80178d8 ) 80177aa: f013 f877 bl 802a89c (state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); msg->err = ERR_OK; 80177ae: 68fb ldr r3, [r7, #12] 80177b0: 2200 movs r2, #0 80177b2: 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); 80177b4: 68fb ldr r3, [r7, #12] 80177b6: 681b ldr r3, [r3, #0] 80177b8: 4618 mov r0, r3 80177ba: f7ff fdcb bl 8017354 #endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->conn->pcb.tcp != NULL) { 80177be: 68fb ldr r3, [r7, #12] 80177c0: 681b ldr r3, [r3, #0] 80177c2: 685b ldr r3, [r3, #4] 80177c4: 2b00 cmp r3, #0 80177c6: d05d beq.n 8017884 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80177c8: 68fb ldr r3, [r7, #12] 80177ca: 681b ldr r3, [r3, #0] 80177cc: 781b ldrb r3, [r3, #0] 80177ce: f003 03f0 and.w r3, r3, #240 @ 0xf0 80177d2: 2b10 cmp r3, #16 80177d4: d00d beq.n 80177f2 80177d6: 2b20 cmp r3, #32 80177d8: d14f bne.n 801787a raw_remove(msg->conn->pcb.raw); break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: msg->conn->pcb.udp->recv_arg = NULL; 80177da: 68fb ldr r3, [r7, #12] 80177dc: 681b ldr r3, [r3, #0] 80177de: 685b ldr r3, [r3, #4] 80177e0: 2200 movs r2, #0 80177e2: 61da str r2, [r3, #28] udp_remove(msg->conn->pcb.udp); 80177e4: 68fb ldr r3, [r7, #12] 80177e6: 681b ldr r3, [r3, #0] 80177e8: 685b ldr r3, [r3, #4] 80177ea: 4618 mov r0, r3 80177ec: f00a ffc6 bl 802277c break; 80177f0: e044 b.n 801787c #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 80177f2: 68fb ldr r3, [r7, #12] 80177f4: 681b ldr r3, [r3, #0] 80177f6: 6adb ldr r3, [r3, #44] @ 0x2c 80177f8: 2b00 cmp r3, #0 80177fa: d006 beq.n 801780a 80177fc: 4b34 ldr r3, [pc, #208] @ (80178d0 ) 80177fe: f240 4294 movw r2, #1172 @ 0x494 8017802: 4937 ldr r1, [pc, #220] @ (80178e0 ) 8017804: 4834 ldr r0, [pc, #208] @ (80178d8 ) 8017806: f013 f849 bl 802a89c msg->conn->state = NETCONN_CLOSE; 801780a: 68fb ldr r3, [r7, #12] 801780c: 681b ldr r3, [r3, #0] 801780e: 2204 movs r2, #4 8017810: 705a strb r2, [r3, #1] msg->msg.sd.shut = NETCONN_SHUT_RDWR; 8017812: 68fb ldr r3, [r7, #12] 8017814: 2203 movs r2, #3 8017816: 721a strb r2, [r3, #8] msg->conn->current_msg = msg; 8017818: 68fb ldr r3, [r7, #12] 801781a: 681b ldr r3, [r3, #0] 801781c: 68fa ldr r2, [r7, #12] 801781e: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 8017820: 68fb ldr r3, [r7, #12] 8017822: 681b ldr r3, [r3, #0] 8017824: 2100 movs r1, #0 8017826: 4618 mov r0, r3 8017828: f7ff fe12 bl 8017450 801782c: 4603 mov r3, r0 801782e: 2b00 cmp r3, #0 8017830: d049 beq.n 80178c6 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8017832: 68fb ldr r3, [r7, #12] 8017834: 681b ldr r3, [r3, #0] 8017836: 785b ldrb r3, [r3, #1] 8017838: 2b04 cmp r3, #4 801783a: d006 beq.n 801784a 801783c: 4b24 ldr r3, [pc, #144] @ (80178d0 ) 801783e: f240 429a movw r2, #1178 @ 0x49a 8017842: 4928 ldr r1, [pc, #160] @ (80178e4 ) 8017844: 4824 ldr r0, [pc, #144] @ (80178d8 ) 8017846: f013 f829 bl 802a89c UNLOCK_TCPIP_CORE(); 801784a: f7f9 fbef bl 801102c sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 801784e: 68fb ldr r3, [r7, #12] 8017850: 681b ldr r3, [r3, #0] 8017852: 330c adds r3, #12 8017854: 2100 movs r1, #0 8017856: 4618 mov r0, r3 8017858: f00f fcc3 bl 80271e2 LOCK_TCPIP_CORE(); 801785c: f7f9 fbd6 bl 801100c LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8017860: 68fb ldr r3, [r7, #12] 8017862: 681b ldr r3, [r3, #0] 8017864: 785b ldrb r3, [r3, #1] 8017866: 2b00 cmp r3, #0 8017868: d02d beq.n 80178c6 801786a: 4b19 ldr r3, [pc, #100] @ (80178d0 ) 801786c: f240 429e movw r2, #1182 @ 0x49e 8017870: 491c ldr r1, [pc, #112] @ (80178e4 ) 8017872: 4819 ldr r0, [pc, #100] @ (80178d8 ) 8017874: f013 f812 bl 802a89c #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; 8017878: e025 b.n 80178c6 #endif /* LWIP_TCP */ default: break; 801787a: bf00 nop } msg->conn->pcb.tcp = NULL; 801787c: 68fb ldr r3, [r7, #12] 801787e: 681b ldr r3, [r3, #0] 8017880: 2200 movs r2, #0 8017882: 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); 8017884: 68fb ldr r3, [r7, #12] 8017886: 681b ldr r3, [r3, #0] 8017888: 6b1b ldr r3, [r3, #48] @ 0x30 801788a: 2b00 cmp r3, #0 801788c: d007 beq.n 801789e 801788e: 68fb ldr r3, [r7, #12] 8017890: 681b ldr r3, [r3, #0] 8017892: 6b1b ldr r3, [r3, #48] @ 0x30 8017894: 68fa ldr r2, [r7, #12] 8017896: 6810 ldr r0, [r2, #0] 8017898: 2200 movs r2, #0 801789a: 2100 movs r1, #0 801789c: 4798 blx r3 API_EVENT(msg->conn, NETCONN_EVT_SENDPLUS, 0); 801789e: 68fb ldr r3, [r7, #12] 80178a0: 681b ldr r3, [r3, #0] 80178a2: 6b1b ldr r3, [r3, #48] @ 0x30 80178a4: 2b00 cmp r3, #0 80178a6: d007 beq.n 80178b8 80178a8: 68fb ldr r3, [r7, #12] 80178aa: 681b ldr r3, [r3, #0] 80178ac: 6b1b ldr r3, [r3, #48] @ 0x30 80178ae: 68fa ldr r2, [r7, #12] 80178b0: 6810 ldr r0, [r2, #0] 80178b2: 2200 movs r2, #0 80178b4: 2102 movs r1, #2 80178b6: 4798 blx r3 } if (sys_sem_valid(LWIP_API_MSG_SEM(msg))) { 80178b8: 68fb ldr r3, [r7, #12] 80178ba: 681b ldr r3, [r3, #0] 80178bc: 330c adds r3, #12 80178be: 4618 mov r0, r3 80178c0: f00f fcda bl 8027278 80178c4: e000 b.n 80178c8 return; 80178c6: bf00 nop TCPIP_APIMSG_ACK(msg); } } 80178c8: 3710 adds r7, #16 80178ca: 46bd mov sp, r7 80178cc: bd80 pop {r7, pc} 80178ce: bf00 nop 80178d0: 0802df0c .word 0x0802df0c 80178d4: 0802e27c .word 0x0802e27c 80178d8: 0802df50 .word 0x0802df50 80178dc: 0802e290 .word 0x0802e290 80178e0: 0802e2b0 .word 0x0802e2b0 80178e4: 0802e2cc .word 0x0802e2cc 080178e8 : * * @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) { 80178e8: b580 push {r7, lr} 80178ea: b088 sub sp, #32 80178ec: af00 add r7, sp, #0 80178ee: 60f8 str r0, [r7, #12] 80178f0: 60b9 str r1, [r7, #8] 80178f2: 4613 mov r3, r2 80178f4: 71fb strb r3, [r7, #7] struct netconn *conn; int was_blocking; sys_sem_t *op_completed_sem = NULL; 80178f6: 2300 movs r3, #0 80178f8: 61fb str r3, [r7, #28] LWIP_UNUSED_ARG(pcb); conn = (struct netconn *)arg; 80178fa: 68fb ldr r3, [r7, #12] 80178fc: 61bb str r3, [r7, #24] if (conn == NULL) { 80178fe: 69bb ldr r3, [r7, #24] 8017900: 2b00 cmp r3, #0 8017902: d102 bne.n 801790a return ERR_VAL; 8017904: f06f 0305 mvn.w r3, #5 8017908: e074 b.n 80179f4 } LWIP_ASSERT("conn->state == NETCONN_CONNECT", conn->state == NETCONN_CONNECT); 801790a: 69bb ldr r3, [r7, #24] 801790c: 785b ldrb r3, [r3, #1] 801790e: 2b03 cmp r3, #3 8017910: d006 beq.n 8017920 8017912: 4b3a ldr r3, [pc, #232] @ (80179fc ) 8017914: f240 5223 movw r2, #1315 @ 0x523 8017918: 4939 ldr r1, [pc, #228] @ (8017a00 ) 801791a: 483a ldr r0, [pc, #232] @ (8017a04 ) 801791c: f012 ffbe bl 802a89c LWIP_ASSERT("(conn->current_msg != NULL) || conn->in_non_blocking_connect", 8017920: 69bb ldr r3, [r7, #24] 8017922: 6adb ldr r3, [r3, #44] @ 0x2c 8017924: 2b00 cmp r3, #0 8017926: d10d bne.n 8017944 8017928: 69bb ldr r3, [r7, #24] 801792a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801792e: f003 0304 and.w r3, r3, #4 8017932: 2b00 cmp r3, #0 8017934: d106 bne.n 8017944 8017936: 4b31 ldr r3, [pc, #196] @ (80179fc ) 8017938: f240 5224 movw r2, #1316 @ 0x524 801793c: 4932 ldr r1, [pc, #200] @ (8017a08 ) 801793e: 4831 ldr r0, [pc, #196] @ (8017a04 ) 8017940: f012 ffac bl 802a89c (conn->current_msg != NULL) || IN_NONBLOCKING_CONNECT(conn)); if (conn->current_msg != NULL) { 8017944: 69bb ldr r3, [r7, #24] 8017946: 6adb ldr r3, [r3, #44] @ 0x2c 8017948: 2b00 cmp r3, #0 801794a: d008 beq.n 801795e conn->current_msg->err = err; 801794c: 69bb ldr r3, [r7, #24] 801794e: 6adb ldr r3, [r3, #44] @ 0x2c 8017950: 79fa ldrb r2, [r7, #7] 8017952: 711a strb r2, [r3, #4] op_completed_sem = LWIP_API_MSG_SEM(conn->current_msg); 8017954: 69bb ldr r3, [r7, #24] 8017956: 6adb ldr r3, [r3, #44] @ 0x2c 8017958: 681b ldr r3, [r3, #0] 801795a: 330c adds r3, #12 801795c: 61fb str r3, [r7, #28] } if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) { 801795e: 69bb ldr r3, [r7, #24] 8017960: 781b ldrb r3, [r3, #0] 8017962: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017966: 2b10 cmp r3, #16 8017968: d106 bne.n 8017978 801796a: f997 3007 ldrsb.w r3, [r7, #7] 801796e: 2b00 cmp r3, #0 8017970: d102 bne.n 8017978 setup_tcp(conn); 8017972: 69b8 ldr r0, [r7, #24] 8017974: f7ff fb82 bl 801707c } was_blocking = !IN_NONBLOCKING_CONNECT(conn); 8017978: 69bb ldr r3, [r7, #24] 801797a: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 801797e: f003 0304 and.w r3, r3, #4 8017982: 2b00 cmp r3, #0 8017984: bf0c ite eq 8017986: 2301 moveq r3, #1 8017988: 2300 movne r3, #0 801798a: b2db uxtb r3, r3 801798c: 617b str r3, [r7, #20] SET_NONBLOCKING_CONNECT(conn, 0); 801798e: 69bb ldr r3, [r7, #24] 8017990: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017994: f023 0304 bic.w r3, r3, #4 8017998: b2da uxtb r2, r3 801799a: 69bb ldr r3, [r7, #24] 801799c: f883 2028 strb.w r2, [r3, #40] @ 0x28 LWIP_ASSERT("blocking connect state error", 80179a0: 697b ldr r3, [r7, #20] 80179a2: 2b00 cmp r3, #0 80179a4: d002 beq.n 80179ac 80179a6: 69fb ldr r3, [r7, #28] 80179a8: 2b00 cmp r3, #0 80179aa: d10c bne.n 80179c6 80179ac: 697b ldr r3, [r7, #20] 80179ae: 2b00 cmp r3, #0 80179b0: d102 bne.n 80179b8 80179b2: 69fb ldr r3, [r7, #28] 80179b4: 2b00 cmp r3, #0 80179b6: d006 beq.n 80179c6 80179b8: 4b10 ldr r3, [pc, #64] @ (80179fc ) 80179ba: f44f 62a6 mov.w r2, #1328 @ 0x530 80179be: 4913 ldr r1, [pc, #76] @ (8017a0c ) 80179c0: 4810 ldr r0, [pc, #64] @ (8017a04 ) 80179c2: f012 ff6b bl 802a89c (was_blocking && op_completed_sem != NULL) || (!was_blocking && op_completed_sem == NULL)); conn->current_msg = NULL; 80179c6: 69bb ldr r3, [r7, #24] 80179c8: 2200 movs r2, #0 80179ca: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 80179cc: 69bb ldr r3, [r7, #24] 80179ce: 2200 movs r2, #0 80179d0: 705a strb r2, [r3, #1] API_EVENT(conn, NETCONN_EVT_SENDPLUS, 0); 80179d2: 69bb ldr r3, [r7, #24] 80179d4: 6b1b ldr r3, [r3, #48] @ 0x30 80179d6: 2b00 cmp r3, #0 80179d8: d005 beq.n 80179e6 80179da: 69bb ldr r3, [r7, #24] 80179dc: 6b1b ldr r3, [r3, #48] @ 0x30 80179de: 2200 movs r2, #0 80179e0: 2102 movs r1, #2 80179e2: 69b8 ldr r0, [r7, #24] 80179e4: 4798 blx r3 if (was_blocking) { 80179e6: 697b ldr r3, [r7, #20] 80179e8: 2b00 cmp r3, #0 80179ea: d002 beq.n 80179f2 sys_sem_signal(op_completed_sem); 80179ec: 69f8 ldr r0, [r7, #28] 80179ee: f00f fc29 bl 8027244 } return ERR_OK; 80179f2: 2300 movs r3, #0 } 80179f4: 4618 mov r0, r3 80179f6: 3720 adds r7, #32 80179f8: 46bd mov sp, r7 80179fa: bd80 pop {r7, pc} 80179fc: 0802df0c .word 0x0802df0c 8017a00: 0802e2d4 .word 0x0802e2d4 8017a04: 0802df50 .word 0x0802df50 8017a08: 0802e2f4 .word 0x0802e2f4 8017a0c: 0802e334 .word 0x0802e334 08017a10 : * @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) { 8017a10: b580 push {r7, lr} 8017a12: b086 sub sp, #24 8017a14: af00 add r7, sp, #0 8017a16: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017a18: 687b ldr r3, [r7, #4] 8017a1a: 613b str r3, [r7, #16] err_t err; if (msg->conn->pcb.tcp == NULL) { 8017a1c: 693b ldr r3, [r7, #16] 8017a1e: 681b ldr r3, [r3, #0] 8017a20: 685b ldr r3, [r3, #4] 8017a22: 2b00 cmp r3, #0 8017a24: d102 bne.n 8017a2c /* This may happen when calling netconn_connect() a second time */ err = ERR_CLSD; 8017a26: 23f1 movs r3, #241 @ 0xf1 8017a28: 75fb strb r3, [r7, #23] 8017a2a: e09e b.n 8017b6a } else { switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8017a2c: 693b ldr r3, [r7, #16] 8017a2e: 681b ldr r3, [r3, #0] 8017a30: 781b ldrb r3, [r3, #0] 8017a32: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017a36: 2b10 cmp r3, #16 8017a38: d00f beq.n 8017a5a 8017a3a: 2b20 cmp r3, #32 8017a3c: f040 808a bne.w 8017b54 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); 8017a40: 693b ldr r3, [r7, #16] 8017a42: 681b ldr r3, [r3, #0] 8017a44: 6858 ldr r0, [r3, #4] 8017a46: 693b ldr r3, [r7, #16] 8017a48: 6899 ldr r1, [r3, #8] 8017a4a: 693b ldr r3, [r7, #16] 8017a4c: 899b ldrh r3, [r3, #12] 8017a4e: 461a mov r2, r3 8017a50: f00a fdd8 bl 8022604 8017a54: 4603 mov r3, r0 8017a56: 75fb strb r3, [r7, #23] break; 8017a58: e087 b.n 8017b6a #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: /* Prevent connect while doing any other action. */ if (msg->conn->state == NETCONN_CONNECT) { 8017a5a: 693b ldr r3, [r7, #16] 8017a5c: 681b ldr r3, [r3, #0] 8017a5e: 785b ldrb r3, [r3, #1] 8017a60: 2b03 cmp r3, #3 8017a62: d102 bne.n 8017a6a err = ERR_ALREADY; 8017a64: 23f7 movs r3, #247 @ 0xf7 8017a66: 75fb strb r3, [r7, #23] #endif /* LWIP_TCPIP_CORE_LOCKING */ return; } } } break; 8017a68: e07e b.n 8017b68 } else if (msg->conn->state != NETCONN_NONE) { 8017a6a: 693b ldr r3, [r7, #16] 8017a6c: 681b ldr r3, [r3, #0] 8017a6e: 785b ldrb r3, [r3, #1] 8017a70: 2b00 cmp r3, #0 8017a72: d002 beq.n 8017a7a err = ERR_ISCONN; 8017a74: 23f6 movs r3, #246 @ 0xf6 8017a76: 75fb strb r3, [r7, #23] break; 8017a78: e076 b.n 8017b68 setup_tcp(msg->conn); 8017a7a: 693b ldr r3, [r7, #16] 8017a7c: 681b ldr r3, [r3, #0] 8017a7e: 4618 mov r0, r3 8017a80: f7ff fafc bl 801707c err = tcp_connect(msg->conn->pcb.tcp, API_EXPR_REF(msg->msg.bc.ipaddr), 8017a84: 693b ldr r3, [r7, #16] 8017a86: 681b ldr r3, [r3, #0] 8017a88: 6858 ldr r0, [r3, #4] 8017a8a: 693b ldr r3, [r7, #16] 8017a8c: 6899 ldr r1, [r3, #8] 8017a8e: 693b ldr r3, [r7, #16] 8017a90: 899a ldrh r2, [r3, #12] 8017a92: 4b3a ldr r3, [pc, #232] @ (8017b7c ) 8017a94: f004 fb90 bl 801c1b8 8017a98: 4603 mov r3, r0 8017a9a: 75fb strb r3, [r7, #23] if (err == ERR_OK) { 8017a9c: f997 3017 ldrsb.w r3, [r7, #23] 8017aa0: 2b00 cmp r3, #0 8017aa2: d161 bne.n 8017b68 u8_t non_blocking = netconn_is_nonblocking(msg->conn); 8017aa4: 693b ldr r3, [r7, #16] 8017aa6: 681b ldr r3, [r3, #0] 8017aa8: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017aac: f003 0302 and.w r3, r3, #2 8017ab0: 2b00 cmp r3, #0 8017ab2: bf14 ite ne 8017ab4: 2301 movne r3, #1 8017ab6: 2300 moveq r3, #0 8017ab8: b2db uxtb r3, r3 8017aba: 73fb strb r3, [r7, #15] msg->conn->state = NETCONN_CONNECT; 8017abc: 693b ldr r3, [r7, #16] 8017abe: 681b ldr r3, [r3, #0] 8017ac0: 2203 movs r2, #3 8017ac2: 705a strb r2, [r3, #1] SET_NONBLOCKING_CONNECT(msg->conn, non_blocking); 8017ac4: 7bfb ldrb r3, [r7, #15] 8017ac6: 2b00 cmp r3, #0 8017ac8: d00b beq.n 8017ae2 8017aca: 693b ldr r3, [r7, #16] 8017acc: 681b ldr r3, [r3, #0] 8017ace: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8017ad2: 693b ldr r3, [r7, #16] 8017ad4: 681b ldr r3, [r3, #0] 8017ad6: f042 0204 orr.w r2, r2, #4 8017ada: b2d2 uxtb r2, r2 8017adc: f883 2028 strb.w r2, [r3, #40] @ 0x28 8017ae0: e00a b.n 8017af8 8017ae2: 693b ldr r3, [r7, #16] 8017ae4: 681b ldr r3, [r3, #0] 8017ae6: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8017aea: 693b ldr r3, [r7, #16] 8017aec: 681b ldr r3, [r3, #0] 8017aee: f022 0204 bic.w r2, r2, #4 8017af2: b2d2 uxtb r2, r2 8017af4: f883 2028 strb.w r2, [r3, #40] @ 0x28 if (non_blocking) { 8017af8: 7bfb ldrb r3, [r7, #15] 8017afa: 2b00 cmp r3, #0 8017afc: d002 beq.n 8017b04 err = ERR_INPROGRESS; 8017afe: 23fb movs r3, #251 @ 0xfb 8017b00: 75fb strb r3, [r7, #23] break; 8017b02: e031 b.n 8017b68 msg->conn->current_msg = msg; 8017b04: 693b ldr r3, [r7, #16] 8017b06: 681b ldr r3, [r3, #0] 8017b08: 693a ldr r2, [r7, #16] 8017b0a: 62da str r2, [r3, #44] @ 0x2c LWIP_ASSERT("state!", msg->conn->state == NETCONN_CONNECT); 8017b0c: 693b ldr r3, [r7, #16] 8017b0e: 681b ldr r3, [r3, #0] 8017b10: 785b ldrb r3, [r3, #1] 8017b12: 2b03 cmp r3, #3 8017b14: d006 beq.n 8017b24 8017b16: 4b1a ldr r3, [pc, #104] @ (8017b80 ) 8017b18: f44f 62ae mov.w r2, #1392 @ 0x570 8017b1c: 4919 ldr r1, [pc, #100] @ (8017b84 ) 8017b1e: 481a ldr r0, [pc, #104] @ (8017b88 ) 8017b20: f012 febc bl 802a89c UNLOCK_TCPIP_CORE(); 8017b24: f7f9 fa82 bl 801102c sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8017b28: 693b ldr r3, [r7, #16] 8017b2a: 681b ldr r3, [r3, #0] 8017b2c: 330c adds r3, #12 8017b2e: 2100 movs r1, #0 8017b30: 4618 mov r0, r3 8017b32: f00f fb56 bl 80271e2 LOCK_TCPIP_CORE(); 8017b36: f7f9 fa69 bl 801100c LWIP_ASSERT("state!", msg->conn->state != NETCONN_CONNECT); 8017b3a: 693b ldr r3, [r7, #16] 8017b3c: 681b ldr r3, [r3, #0] 8017b3e: 785b ldrb r3, [r3, #1] 8017b40: 2b03 cmp r3, #3 8017b42: d116 bne.n 8017b72 8017b44: 4b0e ldr r3, [pc, #56] @ (8017b80 ) 8017b46: f240 5274 movw r2, #1396 @ 0x574 8017b4a: 490e ldr r1, [pc, #56] @ (8017b84 ) 8017b4c: 480e ldr r0, [pc, #56] @ (8017b88 ) 8017b4e: f012 fea5 bl 802a89c return; 8017b52: e00e b.n 8017b72 #endif /* LWIP_TCP */ default: LWIP_ERROR("Invalid netconn type", 0, do { 8017b54: 4b0a ldr r3, [pc, #40] @ (8017b80 ) 8017b56: f240 527d movw r2, #1405 @ 0x57d 8017b5a: 490c ldr r1, [pc, #48] @ (8017b8c ) 8017b5c: 480a ldr r0, [pc, #40] @ (8017b88 ) 8017b5e: f012 fe9d bl 802a89c 8017b62: 23fa movs r3, #250 @ 0xfa 8017b64: 75fb strb r3, [r7, #23] err = ERR_VAL; } while (0)); break; 8017b66: e000 b.n 8017b6a break; 8017b68: bf00 nop } } msg->err = err; 8017b6a: 693b ldr r3, [r7, #16] 8017b6c: 7dfa ldrb r2, [r7, #23] 8017b6e: 711a strb r2, [r3, #4] 8017b70: e000 b.n 8017b74 return; 8017b72: bf00 nop /* For all other protocols, netconn_connect() calls netconn_apimsg(), so use TCPIP_APIMSG_ACK() here. */ TCPIP_APIMSG_ACK(msg); } 8017b74: 3718 adds r7, #24 8017b76: 46bd mov sp, r7 8017b78: bd80 pop {r7, pc} 8017b7a: bf00 nop 8017b7c: 080178e9 .word 0x080178e9 8017b80: 0802df0c .word 0x0802df0c 8017b84: 0802e2cc .word 0x0802e2cc 8017b88: 0802df50 .word 0x0802df50 8017b8c: 0802e354 .word 0x0802e354 08017b90 : * * @param m the api_msg pointing to the connection to disconnect */ void lwip_netconn_do_disconnect(void *m) { 8017b90: b580 push {r7, lr} 8017b92: b084 sub sp, #16 8017b94: af00 add r7, sp, #0 8017b96: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017b98: 687b ldr r3, [r7, #4] 8017b9a: 60fb str r3, [r7, #12] #if LWIP_UDP if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_UDP) { 8017b9c: 68fb ldr r3, [r7, #12] 8017b9e: 681b ldr r3, [r3, #0] 8017ba0: 781b ldrb r3, [r3, #0] 8017ba2: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017ba6: 2b20 cmp r3, #32 8017ba8: d109 bne.n 8017bbe udp_disconnect(msg->conn->pcb.udp); 8017baa: 68fb ldr r3, [r7, #12] 8017bac: 681b ldr r3, [r3, #0] 8017bae: 685b ldr r3, [r3, #4] 8017bb0: 4618 mov r0, r3 8017bb2: f00a fd97 bl 80226e4 msg->err = ERR_OK; 8017bb6: 68fb ldr r3, [r7, #12] 8017bb8: 2200 movs r2, #0 8017bba: 711a strb r2, [r3, #4] #endif /* LWIP_UDP */ { msg->err = ERR_VAL; } TCPIP_APIMSG_ACK(msg); } 8017bbc: e002 b.n 8017bc4 msg->err = ERR_VAL; 8017bbe: 68fb ldr r3, [r7, #12] 8017bc0: 22fa movs r2, #250 @ 0xfa 8017bc2: 711a strb r2, [r3, #4] } 8017bc4: bf00 nop 8017bc6: 3710 adds r7, #16 8017bc8: 46bd mov sp, r7 8017bca: bd80 pop {r7, pc} 08017bcc : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_send(void *m) { 8017bcc: b580 push {r7, lr} 8017bce: b084 sub sp, #16 8017bd0: af00 add r7, sp, #0 8017bd2: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017bd4: 687b ldr r3, [r7, #4] 8017bd6: 60bb str r3, [r7, #8] err_t err = netconn_err(msg->conn); 8017bd8: 68bb ldr r3, [r7, #8] 8017bda: 681b ldr r3, [r3, #0] 8017bdc: 4618 mov r0, r3 8017bde: f7fe fef9 bl 80169d4 8017be2: 4603 mov r3, r0 8017be4: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 8017be6: f997 300f ldrsb.w r3, [r7, #15] 8017bea: 2b00 cmp r3, #0 8017bec: d134 bne.n 8017c58 if (msg->conn->pcb.tcp != NULL) { 8017bee: 68bb ldr r3, [r7, #8] 8017bf0: 681b ldr r3, [r3, #0] 8017bf2: 685b ldr r3, [r3, #4] 8017bf4: 2b00 cmp r3, #0 8017bf6: d02d beq.n 8017c54 switch (NETCONNTYPE_GROUP(msg->conn->type)) { 8017bf8: 68bb ldr r3, [r7, #8] 8017bfa: 681b ldr r3, [r3, #0] 8017bfc: 781b ldrb r3, [r3, #0] 8017bfe: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017c02: 2b20 cmp r3, #32 8017c04: d123 bne.n 8017c4e 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)) { 8017c06: 68bb ldr r3, [r7, #8] 8017c08: 689b ldr r3, [r3, #8] 8017c0a: 689b ldr r3, [r3, #8] 8017c0c: 2b00 cmp r3, #0 8017c0e: d10c bne.n 8017c2a err = udp_send(msg->conn->pcb.udp, msg->msg.b->p); 8017c10: 68bb ldr r3, [r7, #8] 8017c12: 681b ldr r3, [r3, #0] 8017c14: 685a ldr r2, [r3, #4] 8017c16: 68bb ldr r3, [r7, #8] 8017c18: 689b ldr r3, [r3, #8] 8017c1a: 681b ldr r3, [r3, #0] 8017c1c: 4619 mov r1, r3 8017c1e: 4610 mov r0, r2 8017c20: f00a fa7a bl 8022118 8017c24: 4603 mov r3, r0 8017c26: 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; 8017c28: e016 b.n 8017c58 err = udp_sendto(msg->conn->pcb.udp, msg->msg.b->p, &msg->msg.b->addr, msg->msg.b->port); 8017c2a: 68bb ldr r3, [r7, #8] 8017c2c: 681b ldr r3, [r3, #0] 8017c2e: 6858 ldr r0, [r3, #4] 8017c30: 68bb ldr r3, [r7, #8] 8017c32: 689b ldr r3, [r3, #8] 8017c34: 6819 ldr r1, [r3, #0] 8017c36: 68bb ldr r3, [r7, #8] 8017c38: 689b ldr r3, [r3, #8] 8017c3a: f103 0208 add.w r2, r3, #8 8017c3e: 68bb ldr r3, [r7, #8] 8017c40: 689b ldr r3, [r3, #8] 8017c42: 899b ldrh r3, [r3, #12] 8017c44: f00a fa9c bl 8022180 8017c48: 4603 mov r3, r0 8017c4a: 73fb strb r3, [r7, #15] break; 8017c4c: e004 b.n 8017c58 #endif /* LWIP_UDP */ default: err = ERR_CONN; 8017c4e: 23f5 movs r3, #245 @ 0xf5 8017c50: 73fb strb r3, [r7, #15] break; 8017c52: e001 b.n 8017c58 } } else { err = ERR_CONN; 8017c54: 23f5 movs r3, #245 @ 0xf5 8017c56: 73fb strb r3, [r7, #15] } } msg->err = err; 8017c58: 68bb ldr r3, [r7, #8] 8017c5a: 7bfa ldrb r2, [r7, #15] 8017c5c: 711a strb r2, [r3, #4] TCPIP_APIMSG_ACK(msg); } 8017c5e: bf00 nop 8017c60: 3710 adds r7, #16 8017c62: 46bd mov sp, r7 8017c64: bd80 pop {r7, pc} 08017c66 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_recv(void *m) { 8017c66: b580 push {r7, lr} 8017c68: b086 sub sp, #24 8017c6a: af00 add r7, sp, #0 8017c6c: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8017c6e: 687b ldr r3, [r7, #4] 8017c70: 613b str r3, [r7, #16] msg->err = ERR_OK; 8017c72: 693b ldr r3, [r7, #16] 8017c74: 2200 movs r2, #0 8017c76: 711a strb r2, [r3, #4] if (msg->conn->pcb.tcp != NULL) { 8017c78: 693b ldr r3, [r7, #16] 8017c7a: 681b ldr r3, [r3, #0] 8017c7c: 685b ldr r3, [r3, #4] 8017c7e: 2b00 cmp r3, #0 8017c80: d022 beq.n 8017cc8 if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 8017c82: 693b ldr r3, [r7, #16] 8017c84: 681b ldr r3, [r3, #0] 8017c86: 781b ldrb r3, [r3, #0] 8017c88: f003 03f0 and.w r3, r3, #240 @ 0xf0 8017c8c: 2b10 cmp r3, #16 8017c8e: d11b bne.n 8017cc8 size_t remaining = msg->msg.r.len; 8017c90: 693b ldr r3, [r7, #16] 8017c92: 689b ldr r3, [r3, #8] 8017c94: 617b str r3, [r7, #20] do { u16_t recved = (u16_t)((remaining > 0xffff) ? 0xffff : remaining); 8017c96: 697b ldr r3, [r7, #20] 8017c98: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8017c9c: d202 bcs.n 8017ca4 8017c9e: 697b ldr r3, [r7, #20] 8017ca0: b29b uxth r3, r3 8017ca2: e001 b.n 8017ca8 8017ca4: f64f 73ff movw r3, #65535 @ 0xffff 8017ca8: 81fb strh r3, [r7, #14] tcp_recved(msg->conn->pcb.tcp, recved); 8017caa: 693b ldr r3, [r7, #16] 8017cac: 681b ldr r3, [r3, #0] 8017cae: 685b ldr r3, [r3, #4] 8017cb0: 89fa ldrh r2, [r7, #14] 8017cb2: 4611 mov r1, r2 8017cb4: 4618 mov r0, r3 8017cb6: f004 f9e5 bl 801c084 remaining -= recved; 8017cba: 89fb ldrh r3, [r7, #14] 8017cbc: 697a ldr r2, [r7, #20] 8017cbe: 1ad3 subs r3, r2, r3 8017cc0: 617b str r3, [r7, #20] } while (remaining != 0); 8017cc2: 697b ldr r3, [r7, #20] 8017cc4: 2b00 cmp r3, #0 8017cc6: d1e6 bne.n 8017c96 } } TCPIP_APIMSG_ACK(msg); } 8017cc8: bf00 nop 8017cca: 3718 adds r7, #24 8017ccc: 46bd mov sp, r7 8017cce: bd80 pop {r7, pc} 08017cd0 : * @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) { 8017cd0: b580 push {r7, lr} 8017cd2: b088 sub sp, #32 8017cd4: af00 add r7, sp, #0 8017cd6: 6078 str r0, [r7, #4] 8017cd8: 460b mov r3, r1 8017cda: 70fb strb r3, [r7, #3] err_t err; const void *dataptr; u16_t len, available; u8_t write_finished = 0; 8017cdc: 2300 movs r3, #0 8017cde: 76fb strb r3, [r7, #27] size_t diff; u8_t dontblock; u8_t apiflags; u8_t write_more; LWIP_ASSERT("conn != NULL", conn != NULL); 8017ce0: 687b ldr r3, [r7, #4] 8017ce2: 2b00 cmp r3, #0 8017ce4: d106 bne.n 8017cf4 8017ce6: 4b61 ldr r3, [pc, #388] @ (8017e6c ) 8017ce8: f240 6273 movw r2, #1651 @ 0x673 8017cec: 4960 ldr r1, [pc, #384] @ (8017e70 ) 8017cee: 4861 ldr r0, [pc, #388] @ (8017e74 ) 8017cf0: f012 fdd4 bl 802a89c LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE)); 8017cf4: 687b ldr r3, [r7, #4] 8017cf6: 785b ldrb r3, [r3, #1] 8017cf8: 2b01 cmp r3, #1 8017cfa: d006 beq.n 8017d0a 8017cfc: 4b5b ldr r3, [pc, #364] @ (8017e6c ) 8017cfe: f240 6274 movw r2, #1652 @ 0x674 8017d02: 495d ldr r1, [pc, #372] @ (8017e78 ) 8017d04: 485b ldr r0, [pc, #364] @ (8017e74 ) 8017d06: f012 fdc9 bl 802a89c LWIP_ASSERT("conn->current_msg != NULL", conn->current_msg != NULL); 8017d0a: 687b ldr r3, [r7, #4] 8017d0c: 6adb ldr r3, [r3, #44] @ 0x2c 8017d0e: 2b00 cmp r3, #0 8017d10: d106 bne.n 8017d20 8017d12: 4b56 ldr r3, [pc, #344] @ (8017e6c ) 8017d14: f240 6275 movw r2, #1653 @ 0x675 8017d18: 4958 ldr r1, [pc, #352] @ (8017e7c ) 8017d1a: 4856 ldr r0, [pc, #344] @ (8017e74 ) 8017d1c: f012 fdbe bl 802a89c LWIP_ASSERT("conn->pcb.tcp != NULL", conn->pcb.tcp != NULL); 8017d20: 687b ldr r3, [r7, #4] 8017d22: 685b ldr r3, [r3, #4] 8017d24: 2b00 cmp r3, #0 8017d26: d106 bne.n 8017d36 8017d28: 4b50 ldr r3, [pc, #320] @ (8017e6c ) 8017d2a: f240 6276 movw r2, #1654 @ 0x676 8017d2e: 4954 ldr r1, [pc, #336] @ (8017e80 ) 8017d30: 4850 ldr r0, [pc, #320] @ (8017e74 ) 8017d32: f012 fdb3 bl 802a89c LWIP_ASSERT("conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len", 8017d36: 687b ldr r3, [r7, #4] 8017d38: 6adb ldr r3, [r3, #44] @ 0x2c 8017d3a: 699a ldr r2, [r3, #24] 8017d3c: 687b ldr r3, [r7, #4] 8017d3e: 6adb ldr r3, [r3, #44] @ 0x2c 8017d40: 695b ldr r3, [r3, #20] 8017d42: 429a cmp r2, r3 8017d44: d306 bcc.n 8017d54 8017d46: 4b49 ldr r3, [pc, #292] @ (8017e6c ) 8017d48: f240 6277 movw r2, #1655 @ 0x677 8017d4c: 494d ldr r1, [pc, #308] @ (8017e84 ) 8017d4e: 4849 ldr r0, [pc, #292] @ (8017e74 ) 8017d50: f012 fda4 bl 802a89c 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); 8017d54: 687b ldr r3, [r7, #4] 8017d56: 6adb ldr r3, [r3, #44] @ 0x2c 8017d58: 899b ldrh r3, [r3, #12] 8017d5a: 2b00 cmp r3, #0 8017d5c: d106 bne.n 8017d6c 8017d5e: 4b43 ldr r3, [pc, #268] @ (8017e6c ) 8017d60: f240 6279 movw r2, #1657 @ 0x679 8017d64: 4948 ldr r1, [pc, #288] @ (8017e88 ) 8017d66: 4843 ldr r0, [pc, #268] @ (8017e74 ) 8017d68: f012 fd98 bl 802a89c apiflags = conn->current_msg->msg.w.apiflags; 8017d6c: 687b ldr r3, [r7, #4] 8017d6e: 6adb ldr r3, [r3, #44] @ 0x2c 8017d70: 7f1b ldrb r3, [r3, #28] 8017d72: 76bb strb r3, [r7, #26] dontblock = netconn_is_nonblocking(conn) || (apiflags & NETCONN_DONTBLOCK); 8017d74: 687b ldr r3, [r7, #4] 8017d76: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017d7a: f003 0302 and.w r3, r3, #2 8017d7e: 2b00 cmp r3, #0 8017d80: d104 bne.n 8017d8c 8017d82: 7ebb ldrb r3, [r7, #26] 8017d84: f003 0304 and.w r3, r3, #4 8017d88: 2b00 cmp r3, #0 8017d8a: d001 beq.n 8017d90 8017d8c: 2301 movs r3, #1 8017d8e: e000 b.n 8017d92 8017d90: 2300 movs r3, #0 8017d92: 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; 8017d94: 687b ldr r3, [r7, #4] 8017d96: 6adb ldr r3, [r3, #44] @ 0x2c 8017d98: 689b ldr r3, [r3, #8] 8017d9a: 681a ldr r2, [r3, #0] 8017d9c: 687b ldr r3, [r7, #4] 8017d9e: 6adb ldr r3, [r3, #44] @ 0x2c 8017da0: 691b ldr r3, [r3, #16] 8017da2: 4413 add r3, r2 8017da4: 617b str r3, [r7, #20] diff = conn->current_msg->msg.w.vector->len - conn->current_msg->msg.w.vector_off; 8017da6: 687b ldr r3, [r7, #4] 8017da8: 6adb ldr r3, [r3, #44] @ 0x2c 8017daa: 689b ldr r3, [r3, #8] 8017dac: 685a ldr r2, [r3, #4] 8017dae: 687b ldr r3, [r7, #4] 8017db0: 6adb ldr r3, [r3, #44] @ 0x2c 8017db2: 691b ldr r3, [r3, #16] 8017db4: 1ad3 subs r3, r2, r3 8017db6: 613b str r3, [r7, #16] if (diff > 0xffffUL) { /* max_u16_t */ 8017db8: 693b ldr r3, [r7, #16] 8017dba: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8017dbe: d307 bcc.n 8017dd0 len = 0xffff; 8017dc0: f64f 73ff movw r3, #65535 @ 0xffff 8017dc4: 83bb strh r3, [r7, #28] apiflags |= TCP_WRITE_FLAG_MORE; 8017dc6: 7ebb ldrb r3, [r7, #26] 8017dc8: f043 0302 orr.w r3, r3, #2 8017dcc: 76bb strb r3, [r7, #26] 8017dce: e001 b.n 8017dd4 } else { len = (u16_t)diff; 8017dd0: 693b ldr r3, [r7, #16] 8017dd2: 83bb strh r3, [r7, #28] } available = tcp_sndbuf(conn->pcb.tcp); 8017dd4: 687b ldr r3, [r7, #4] 8017dd6: 685b ldr r3, [r3, #4] 8017dd8: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8017ddc: 81fb strh r3, [r7, #14] if (available < len) { 8017dde: 89fa ldrh r2, [r7, #14] 8017de0: 8bbb ldrh r3, [r7, #28] 8017de2: 429a cmp r2, r3 8017de4: d216 bcs.n 8017e14 /* don't try to write more than sendbuf */ len = available; 8017de6: 89fb ldrh r3, [r7, #14] 8017de8: 83bb strh r3, [r7, #28] if (dontblock) { 8017dea: 7e3b ldrb r3, [r7, #24] 8017dec: 2b00 cmp r3, #0 8017dee: d00d beq.n 8017e0c if (!len) { 8017df0: 8bbb ldrh r3, [r7, #28] 8017df2: 2b00 cmp r3, #0 8017df4: d10e bne.n 8017e14 /* set error according to partial write or not */ err = (conn->current_msg->msg.w.offset == 0) ? ERR_WOULDBLOCK : ERR_OK; 8017df6: 687b ldr r3, [r7, #4] 8017df8: 6adb ldr r3, [r3, #44] @ 0x2c 8017dfa: 699b ldr r3, [r3, #24] 8017dfc: 2b00 cmp r3, #0 8017dfe: d102 bne.n 8017e06 8017e00: f06f 0306 mvn.w r3, #6 8017e04: e000 b.n 8017e08 8017e06: 2300 movs r3, #0 8017e08: 77fb strb r3, [r7, #31] goto err_mem; 8017e0a: e08f b.n 8017f2c } } else { apiflags |= TCP_WRITE_FLAG_MORE; 8017e0c: 7ebb ldrb r3, [r7, #26] 8017e0e: f043 0302 orr.w r3, r3, #2 8017e12: 76bb strb r3, [r7, #26] } } LWIP_ASSERT("lwip_netconn_do_writemore: invalid length!", 8017e14: 687b ldr r3, [r7, #4] 8017e16: 6adb ldr r3, [r3, #44] @ 0x2c 8017e18: 691a ldr r2, [r3, #16] 8017e1a: 8bbb ldrh r3, [r7, #28] 8017e1c: 441a add r2, r3 8017e1e: 687b ldr r3, [r7, #4] 8017e20: 6adb ldr r3, [r3, #44] @ 0x2c 8017e22: 689b ldr r3, [r3, #8] 8017e24: 685b ldr r3, [r3, #4] 8017e26: 429a cmp r2, r3 8017e28: d906 bls.n 8017e38 8017e2a: 4b10 ldr r3, [pc, #64] @ (8017e6c ) 8017e2c: f240 62a3 movw r2, #1699 @ 0x6a3 8017e30: 4916 ldr r1, [pc, #88] @ (8017e8c ) 8017e32: 4810 ldr r0, [pc, #64] @ (8017e74 ) 8017e34: f012 fd32 bl 802a89c ((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) || 8017e38: 8bbb ldrh r3, [r7, #28] 8017e3a: f64f 72ff movw r2, #65535 @ 0xffff 8017e3e: 4293 cmp r3, r2 8017e40: d103 bne.n 8017e4a 8017e42: 693b ldr r3, [r7, #16] 8017e44: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8017e48: d209 bcs.n 8017e5e (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 8017e4a: 693b ldr r3, [r7, #16] 8017e4c: b29b uxth r3, r3 if ((len == 0xffff && diff > 0xffffUL) || 8017e4e: 8bba ldrh r2, [r7, #28] 8017e50: 429a cmp r2, r3 8017e52: d11d bne.n 8017e90 (len == (u16_t)diff && conn->current_msg->msg.w.vector_cnt > 1)) { 8017e54: 687b ldr r3, [r7, #4] 8017e56: 6adb ldr r3, [r3, #44] @ 0x2c 8017e58: 899b ldrh r3, [r3, #12] 8017e5a: 2b01 cmp r3, #1 8017e5c: d918 bls.n 8017e90 write_more = 1; 8017e5e: 2301 movs r3, #1 8017e60: 767b strb r3, [r7, #25] apiflags |= TCP_WRITE_FLAG_MORE; 8017e62: 7ebb ldrb r3, [r7, #26] 8017e64: f043 0302 orr.w r3, r3, #2 8017e68: 76bb strb r3, [r7, #26] 8017e6a: e013 b.n 8017e94 8017e6c: 0802df0c .word 0x0802df0c 8017e70: 0802e064 .word 0x0802e064 8017e74: 0802df50 .word 0x0802df50 8017e78: 0802e36c .word 0x0802e36c 8017e7c: 0802e074 .word 0x0802e074 8017e80: 0802e38c .word 0x0802e38c 8017e84: 0802e3a4 .word 0x0802e3a4 8017e88: 0802e3e4 .word 0x0802e3e4 8017e8c: 0802e40c .word 0x0802e40c } else { write_more = 0; 8017e90: 2300 movs r3, #0 8017e92: 767b strb r3, [r7, #25] } err = tcp_write(conn->pcb.tcp, dataptr, len, apiflags); 8017e94: 687b ldr r3, [r7, #4] 8017e96: 6858 ldr r0, [r3, #4] 8017e98: 7ebb ldrb r3, [r7, #26] 8017e9a: 8bba ldrh r2, [r7, #28] 8017e9c: 6979 ldr r1, [r7, #20] 8017e9e: f008 f827 bl 801fef0 8017ea2: 4603 mov r3, r0 8017ea4: 77fb strb r3, [r7, #31] if (err == ERR_OK) { 8017ea6: f997 301f ldrsb.w r3, [r7, #31] 8017eaa: 2b00 cmp r3, #0 8017eac: d12c bne.n 8017f08 conn->current_msg->msg.w.offset += len; 8017eae: 687b ldr r3, [r7, #4] 8017eb0: 6adb ldr r3, [r3, #44] @ 0x2c 8017eb2: 6999 ldr r1, [r3, #24] 8017eb4: 8bba ldrh r2, [r7, #28] 8017eb6: 687b ldr r3, [r7, #4] 8017eb8: 6adb ldr r3, [r3, #44] @ 0x2c 8017eba: 440a add r2, r1 8017ebc: 619a str r2, [r3, #24] conn->current_msg->msg.w.vector_off += len; 8017ebe: 687b ldr r3, [r7, #4] 8017ec0: 6adb ldr r3, [r3, #44] @ 0x2c 8017ec2: 6919 ldr r1, [r3, #16] 8017ec4: 8bba ldrh r2, [r7, #28] 8017ec6: 687b ldr r3, [r7, #4] 8017ec8: 6adb ldr r3, [r3, #44] @ 0x2c 8017eca: 440a add r2, r1 8017ecc: 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) { 8017ece: 687b ldr r3, [r7, #4] 8017ed0: 6adb ldr r3, [r3, #44] @ 0x2c 8017ed2: 691a ldr r2, [r3, #16] 8017ed4: 687b ldr r3, [r7, #4] 8017ed6: 6adb ldr r3, [r3, #44] @ 0x2c 8017ed8: 689b ldr r3, [r3, #8] 8017eda: 685b ldr r3, [r3, #4] 8017edc: 429a cmp r2, r3 8017ede: d113 bne.n 8017f08 conn->current_msg->msg.w.vector_cnt--; 8017ee0: 687b ldr r3, [r7, #4] 8017ee2: 6adb ldr r3, [r3, #44] @ 0x2c 8017ee4: 899a ldrh r2, [r3, #12] 8017ee6: 3a01 subs r2, #1 8017ee8: b292 uxth r2, r2 8017eea: 819a strh r2, [r3, #12] /* if we have additional vectors, move on to them */ if (conn->current_msg->msg.w.vector_cnt > 0) { 8017eec: 687b ldr r3, [r7, #4] 8017eee: 6adb ldr r3, [r3, #44] @ 0x2c 8017ef0: 899b ldrh r3, [r3, #12] 8017ef2: 2b00 cmp r3, #0 8017ef4: d008 beq.n 8017f08 conn->current_msg->msg.w.vector++; 8017ef6: 687b ldr r3, [r7, #4] 8017ef8: 6adb ldr r3, [r3, #44] @ 0x2c 8017efa: 689a ldr r2, [r3, #8] 8017efc: 3208 adds r2, #8 8017efe: 609a str r2, [r3, #8] conn->current_msg->msg.w.vector_off = 0; 8017f00: 687b ldr r3, [r7, #4] 8017f02: 6adb ldr r3, [r3, #44] @ 0x2c 8017f04: 2200 movs r2, #0 8017f06: 611a str r2, [r3, #16] } } } } while (write_more && err == ERR_OK); 8017f08: 7e7b ldrb r3, [r7, #25] 8017f0a: 2b00 cmp r3, #0 8017f0c: d004 beq.n 8017f18 8017f0e: f997 301f ldrsb.w r3, [r7, #31] 8017f12: 2b00 cmp r3, #0 8017f14: f43f af3e beq.w 8017d94 /* if OK or memory error, check available space */ if ((err == ERR_OK) || (err == ERR_MEM)) { 8017f18: f997 301f ldrsb.w r3, [r7, #31] 8017f1c: 2b00 cmp r3, #0 8017f1e: d004 beq.n 8017f2a 8017f20: f997 301f ldrsb.w r3, [r7, #31] 8017f24: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017f28: d137 bne.n 8017f9a err_mem: 8017f2a: bf00 nop if (dontblock && (conn->current_msg->msg.w.offset < conn->current_msg->msg.w.len)) { 8017f2c: 7e3b ldrb r3, [r7, #24] 8017f2e: 2b00 cmp r3, #0 8017f30: d01b beq.n 8017f6a 8017f32: 687b ldr r3, [r7, #4] 8017f34: 6adb ldr r3, [r3, #44] @ 0x2c 8017f36: 699a ldr r2, [r3, #24] 8017f38: 687b ldr r3, [r7, #4] 8017f3a: 6adb ldr r3, [r3, #44] @ 0x2c 8017f3c: 695b ldr r3, [r3, #20] 8017f3e: 429a cmp r2, r3 8017f40: d213 bcs.n 8017f6a /* 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); 8017f42: 687b ldr r3, [r7, #4] 8017f44: 6b1b ldr r3, [r3, #48] @ 0x30 8017f46: 2b00 cmp r3, #0 8017f48: d005 beq.n 8017f56 8017f4a: 687b ldr r3, [r7, #4] 8017f4c: 6b1b ldr r3, [r3, #48] @ 0x30 8017f4e: 2200 movs r2, #0 8017f50: 2103 movs r1, #3 8017f52: 6878 ldr r0, [r7, #4] 8017f54: 4798 blx r3 conn->flags |= NETCONN_FLAG_CHECK_WRITESPACE; 8017f56: 687b ldr r3, [r7, #4] 8017f58: f893 3028 ldrb.w r3, [r3, #40] @ 0x28 8017f5c: f043 0310 orr.w r3, r3, #16 8017f60: b2da uxtb r2, r3 8017f62: 687b ldr r3, [r7, #4] 8017f64: f883 2028 strb.w r2, [r3, #40] @ 0x28 8017f68: e017 b.n 8017f9a } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 8017f6a: 687b ldr r3, [r7, #4] 8017f6c: 685b ldr r3, [r3, #4] 8017f6e: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8017f72: f640 3269 movw r2, #2921 @ 0xb69 8017f76: 4293 cmp r3, r2 8017f78: d905 bls.n 8017f86 (tcp_sndqueuelen(conn->pcb.tcp) >= TCP_SNDQUEUELOWAT)) { 8017f7a: 687b ldr r3, [r7, #4] 8017f7c: 685b ldr r3, [r3, #4] 8017f7e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 } else if ((tcp_sndbuf(conn->pcb.tcp) <= TCP_SNDLOWAT) || 8017f82: 2b07 cmp r3, #7 8017f84: d909 bls.n 8017f9a /* 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); 8017f86: 687b ldr r3, [r7, #4] 8017f88: 6b1b ldr r3, [r3, #48] @ 0x30 8017f8a: 2b00 cmp r3, #0 8017f8c: d005 beq.n 8017f9a 8017f8e: 687b ldr r3, [r7, #4] 8017f90: 6b1b ldr r3, [r3, #48] @ 0x30 8017f92: 2200 movs r2, #0 8017f94: 2103 movs r1, #3 8017f96: 6878 ldr r0, [r7, #4] 8017f98: 4798 blx r3 } } if (err == ERR_OK) { 8017f9a: f997 301f ldrsb.w r3, [r7, #31] 8017f9e: 2b00 cmp r3, #0 8017fa0: d11d bne.n 8017fde err_t out_err; if ((conn->current_msg->msg.w.offset == conn->current_msg->msg.w.len) || dontblock) { 8017fa2: 687b ldr r3, [r7, #4] 8017fa4: 6adb ldr r3, [r3, #44] @ 0x2c 8017fa6: 699a ldr r2, [r3, #24] 8017fa8: 687b ldr r3, [r7, #4] 8017faa: 6adb ldr r3, [r3, #44] @ 0x2c 8017fac: 695b ldr r3, [r3, #20] 8017fae: 429a cmp r2, r3 8017fb0: d002 beq.n 8017fb8 8017fb2: 7e3b ldrb r3, [r7, #24] 8017fb4: 2b00 cmp r3, #0 8017fb6: d001 beq.n 8017fbc /* return sent length (caller reads length from msg.w.offset) */ write_finished = 1; 8017fb8: 2301 movs r3, #1 8017fba: 76fb strb r3, [r7, #27] } out_err = tcp_output(conn->pcb.tcp); 8017fbc: 687b ldr r3, [r7, #4] 8017fbe: 685b ldr r3, [r3, #4] 8017fc0: 4618 mov r0, r3 8017fc2: f008 fddf bl 8020b84 8017fc6: 4603 mov r3, r0 8017fc8: 733b strb r3, [r7, #12] if (out_err == ERR_RTE) { 8017fca: f997 300c ldrsb.w r3, [r7, #12] 8017fce: f113 0f04 cmn.w r3, #4 8017fd2: d12c bne.n 801802e /* 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; 8017fd4: 7b3b ldrb r3, [r7, #12] 8017fd6: 77fb strb r3, [r7, #31] write_finished = 1; 8017fd8: 2301 movs r3, #1 8017fda: 76fb strb r3, [r7, #27] 8017fdc: e027 b.n 801802e } } else if (err == ERR_MEM) { 8017fde: f997 301f ldrsb.w r3, [r7, #31] 8017fe2: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8017fe6: d120 bne.n 801802a 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); 8017fe8: 687b ldr r3, [r7, #4] 8017fea: 685b ldr r3, [r3, #4] 8017fec: 4618 mov r0, r3 8017fee: f008 fdc9 bl 8020b84 8017ff2: 4603 mov r3, r0 8017ff4: 737b strb r3, [r7, #13] if (out_err == ERR_RTE) { 8017ff6: f997 300d ldrsb.w r3, [r7, #13] 8017ffa: f113 0f04 cmn.w r3, #4 8017ffe: d104 bne.n 801800a /* 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; 8018000: 7b7b ldrb r3, [r7, #13] 8018002: 77fb strb r3, [r7, #31] write_finished = 1; 8018004: 2301 movs r3, #1 8018006: 76fb strb r3, [r7, #27] 8018008: e011 b.n 801802e } else if (dontblock) { 801800a: 7e3b ldrb r3, [r7, #24] 801800c: 2b00 cmp r3, #0 801800e: d00e beq.n 801802e /* 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; 8018010: 687b ldr r3, [r7, #4] 8018012: 6adb ldr r3, [r3, #44] @ 0x2c 8018014: 699b ldr r3, [r3, #24] 8018016: 2b00 cmp r3, #0 8018018: d102 bne.n 8018020 801801a: f06f 0306 mvn.w r3, #6 801801e: e000 b.n 8018022 8018020: 2300 movs r3, #0 8018022: 77fb strb r3, [r7, #31] write_finished = 1; 8018024: 2301 movs r3, #1 8018026: 76fb strb r3, [r7, #27] 8018028: e001 b.n 801802e } } else { /* On errors != ERR_MEM, we don't try writing any more but return the error to the application thread. */ write_finished = 1; 801802a: 2301 movs r3, #1 801802c: 76fb strb r3, [r7, #27] } } if (write_finished) { 801802e: 7efb ldrb r3, [r7, #27] 8018030: 2b00 cmp r3, #0 8018032: d015 beq.n 8018060 /* 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); 8018034: 687b ldr r3, [r7, #4] 8018036: 6adb ldr r3, [r3, #44] @ 0x2c 8018038: 681b ldr r3, [r3, #0] 801803a: 330c adds r3, #12 801803c: 60bb str r3, [r7, #8] conn->current_msg->err = err; 801803e: 687b ldr r3, [r7, #4] 8018040: 6adb ldr r3, [r3, #44] @ 0x2c 8018042: 7ffa ldrb r2, [r7, #31] 8018044: 711a strb r2, [r3, #4] conn->current_msg = NULL; 8018046: 687b ldr r3, [r7, #4] 8018048: 2200 movs r2, #0 801804a: 62da str r2, [r3, #44] @ 0x2c conn->state = NETCONN_NONE; 801804c: 687b ldr r3, [r7, #4] 801804e: 2200 movs r2, #0 8018050: 705a strb r2, [r3, #1] #if LWIP_TCPIP_CORE_LOCKING if (delayed) 8018052: 78fb ldrb r3, [r7, #3] 8018054: 2b00 cmp r3, #0 8018056: d006 beq.n 8018066 #endif { sys_sem_signal(op_completed_sem); 8018058: 68b8 ldr r0, [r7, #8] 801805a: f00f f8f3 bl 8027244 801805e: e002 b.n 8018066 } } #if LWIP_TCPIP_CORE_LOCKING else { return ERR_MEM; 8018060: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018064: e000 b.n 8018068 } #endif return ERR_OK; 8018066: 2300 movs r3, #0 } 8018068: 4618 mov r0, r3 801806a: 3720 adds r7, #32 801806c: 46bd mov sp, r7 801806e: bd80 pop {r7, pc} 08018070 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_write(void *m) { 8018070: b580 push {r7, lr} 8018072: b084 sub sp, #16 8018074: af00 add r7, sp, #0 8018076: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8018078: 687b ldr r3, [r7, #4] 801807a: 60bb str r3, [r7, #8] err_t err = netconn_err(msg->conn); 801807c: 68bb ldr r3, [r7, #8] 801807e: 681b ldr r3, [r3, #0] 8018080: 4618 mov r0, r3 8018082: f7fe fca7 bl 80169d4 8018086: 4603 mov r3, r0 8018088: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801808a: f997 300f ldrsb.w r3, [r7, #15] 801808e: 2b00 cmp r3, #0 8018090: d164 bne.n 801815c if (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) { 8018092: 68bb ldr r3, [r7, #8] 8018094: 681b ldr r3, [r3, #0] 8018096: 781b ldrb r3, [r3, #0] 8018098: f003 03f0 and.w r3, r3, #240 @ 0xf0 801809c: 2b10 cmp r3, #16 801809e: d15b bne.n 8018158 #if LWIP_TCP if (msg->conn->state != NETCONN_NONE) { 80180a0: 68bb ldr r3, [r7, #8] 80180a2: 681b ldr r3, [r3, #0] 80180a4: 785b ldrb r3, [r3, #1] 80180a6: 2b00 cmp r3, #0 80180a8: d002 beq.n 80180b0 /* netconn is connecting, closing or in blocking write */ err = ERR_INPROGRESS; 80180aa: 23fb movs r3, #251 @ 0xfb 80180ac: 73fb strb r3, [r7, #15] 80180ae: e055 b.n 801815c } else if (msg->conn->pcb.tcp != NULL) { 80180b0: 68bb ldr r3, [r7, #8] 80180b2: 681b ldr r3, [r3, #0] 80180b4: 685b ldr r3, [r3, #4] 80180b6: 2b00 cmp r3, #0 80180b8: d04b beq.n 8018152 msg->conn->state = NETCONN_WRITE; 80180ba: 68bb ldr r3, [r7, #8] 80180bc: 681b ldr r3, [r3, #0] 80180be: 2201 movs r2, #1 80180c0: 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); 80180c2: 68bb ldr r3, [r7, #8] 80180c4: 681b ldr r3, [r3, #0] 80180c6: 6adb ldr r3, [r3, #44] @ 0x2c 80180c8: 2b00 cmp r3, #0 80180ca: d006 beq.n 80180da 80180cc: 4b27 ldr r3, [pc, #156] @ (801816c ) 80180ce: f240 7223 movw r2, #1827 @ 0x723 80180d2: 4927 ldr r1, [pc, #156] @ (8018170 ) 80180d4: 4827 ldr r0, [pc, #156] @ (8018174 ) 80180d6: f012 fbe1 bl 802a89c LWIP_ASSERT("msg->msg.w.len != 0", msg->msg.w.len != 0); 80180da: 68bb ldr r3, [r7, #8] 80180dc: 695b ldr r3, [r3, #20] 80180de: 2b00 cmp r3, #0 80180e0: d106 bne.n 80180f0 80180e2: 4b22 ldr r3, [pc, #136] @ (801816c ) 80180e4: f240 7224 movw r2, #1828 @ 0x724 80180e8: 4923 ldr r1, [pc, #140] @ (8018178 ) 80180ea: 4822 ldr r0, [pc, #136] @ (8018174 ) 80180ec: f012 fbd6 bl 802a89c msg->conn->current_msg = msg; 80180f0: 68bb ldr r3, [r7, #8] 80180f2: 681b ldr r3, [r3, #0] 80180f4: 68ba ldr r2, [r7, #8] 80180f6: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_writemore(msg->conn, 0) != ERR_OK) { 80180f8: 68bb ldr r3, [r7, #8] 80180fa: 681b ldr r3, [r3, #0] 80180fc: 2100 movs r1, #0 80180fe: 4618 mov r0, r3 8018100: f7ff fde6 bl 8017cd0 8018104: 4603 mov r3, r0 8018106: 2b00 cmp r3, #0 8018108: d02c beq.n 8018164 LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE); 801810a: 68bb ldr r3, [r7, #8] 801810c: 681b ldr r3, [r3, #0] 801810e: 785b ldrb r3, [r3, #1] 8018110: 2b01 cmp r3, #1 8018112: d006 beq.n 8018122 8018114: 4b15 ldr r3, [pc, #84] @ (801816c ) 8018116: f44f 62e5 mov.w r2, #1832 @ 0x728 801811a: 4918 ldr r1, [pc, #96] @ (801817c ) 801811c: 4815 ldr r0, [pc, #84] @ (8018174 ) 801811e: f012 fbbd bl 802a89c UNLOCK_TCPIP_CORE(); 8018122: f7f8 ff83 bl 801102c sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 8018126: 68bb ldr r3, [r7, #8] 8018128: 681b ldr r3, [r3, #0] 801812a: 330c adds r3, #12 801812c: 2100 movs r1, #0 801812e: 4618 mov r0, r3 8018130: f00f f857 bl 80271e2 LOCK_TCPIP_CORE(); 8018134: f7f8 ff6a bl 801100c LWIP_ASSERT("state!", msg->conn->state != NETCONN_WRITE); 8018138: 68bb ldr r3, [r7, #8] 801813a: 681b ldr r3, [r3, #0] 801813c: 785b ldrb r3, [r3, #1] 801813e: 2b01 cmp r3, #1 8018140: d110 bne.n 8018164 8018142: 4b0a ldr r3, [pc, #40] @ (801816c ) 8018144: f240 722c movw r2, #1836 @ 0x72c 8018148: 490c ldr r1, [pc, #48] @ (801817c ) 801814a: 480a ldr r0, [pc, #40] @ (8018174 ) 801814c: f012 fba6 bl 802a89c #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; 8018150: e008 b.n 8018164 } else { err = ERR_CONN; 8018152: 23f5 movs r3, #245 @ 0xf5 8018154: 73fb strb r3, [r7, #15] 8018156: e001 b.n 801815c #else /* LWIP_TCP */ err = ERR_VAL; #endif /* LWIP_TCP */ #if (LWIP_UDP || LWIP_RAW) } else { err = ERR_VAL; 8018158: 23fa movs r3, #250 @ 0xfa 801815a: 73fb strb r3, [r7, #15] #endif /* (LWIP_UDP || LWIP_RAW) */ } } msg->err = err; 801815c: 68bb ldr r3, [r7, #8] 801815e: 7bfa ldrb r2, [r7, #15] 8018160: 711a strb r2, [r3, #4] 8018162: e000 b.n 8018166 return; 8018164: bf00 nop TCPIP_APIMSG_ACK(msg); } 8018166: 3710 adds r7, #16 8018168: 46bd mov sp, r7 801816a: bd80 pop {r7, pc} 801816c: 0802df0c .word 0x0802df0c 8018170: 0802e2b0 .word 0x0802e2b0 8018174: 0802df50 .word 0x0802df50 8018178: 0802e438 .word 0x0802e438 801817c: 0802e2cc .word 0x0802e2cc 08018180 : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_getaddr(void *m) { 8018180: b580 push {r7, lr} 8018182: b084 sub sp, #16 8018184: af00 add r7, sp, #0 8018186: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8018188: 687b ldr r3, [r7, #4] 801818a: 60fb str r3, [r7, #12] if (msg->conn->pcb.ip != NULL) { 801818c: 68fb ldr r3, [r7, #12] 801818e: 681b ldr r3, [r3, #0] 8018190: 685b ldr r3, [r3, #4] 8018192: 2b00 cmp r3, #0 8018194: d06b beq.n 801826e if (msg->msg.ad.local) { 8018196: 68fb ldr r3, [r7, #12] 8018198: 7c1b ldrb r3, [r3, #16] 801819a: 2b00 cmp r3, #0 801819c: d007 beq.n 80181ae ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 801819e: 68fb ldr r3, [r7, #12] 80181a0: 681b ldr r3, [r3, #0] 80181a2: 685a ldr r2, [r3, #4] 80181a4: 68fb ldr r3, [r7, #12] 80181a6: 689b ldr r3, [r3, #8] 80181a8: 6812 ldr r2, [r2, #0] 80181aa: 601a str r2, [r3, #0] 80181ac: e006 b.n 80181bc msg->conn->pcb.ip->local_ip); } else { ip_addr_copy(API_EXPR_DEREF(msg->msg.ad.ipaddr), 80181ae: 68fb ldr r3, [r7, #12] 80181b0: 681b ldr r3, [r3, #0] 80181b2: 685a ldr r2, [r3, #4] 80181b4: 68fb ldr r3, [r7, #12] 80181b6: 689b ldr r3, [r3, #8] 80181b8: 6852 ldr r2, [r2, #4] 80181ba: 601a str r2, [r3, #0] msg->conn->pcb.ip->remote_ip); } msg->err = ERR_OK; 80181bc: 68fb ldr r3, [r7, #12] 80181be: 2200 movs r2, #0 80181c0: 711a strb r2, [r3, #4] switch (NETCONNTYPE_GROUP(msg->conn->type)) { 80181c2: 68fb ldr r3, [r7, #12] 80181c4: 681b ldr r3, [r3, #0] 80181c6: 781b ldrb r3, [r3, #0] 80181c8: f003 03f0 and.w r3, r3, #240 @ 0xf0 80181cc: 2b10 cmp r3, #16 80181ce: d021 beq.n 8018214 80181d0: 2b20 cmp r3, #32 80181d2: d144 bne.n 801825e } break; #endif /* LWIP_RAW */ #if LWIP_UDP case NETCONN_UDP: if (msg->msg.ad.local) { 80181d4: 68fb ldr r3, [r7, #12] 80181d6: 7c1b ldrb r3, [r3, #16] 80181d8: 2b00 cmp r3, #0 80181da: d007 beq.n 80181ec API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->local_port; 80181dc: 68fb ldr r3, [r7, #12] 80181de: 681b ldr r3, [r3, #0] 80181e0: 685a ldr r2, [r3, #4] 80181e2: 68fb ldr r3, [r7, #12] 80181e4: 68db ldr r3, [r3, #12] 80181e6: 8a52 ldrh r2, [r2, #18] 80181e8: 801a strh r2, [r3, #0] msg->err = ERR_CONN; } else { API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; } } break; 80181ea: e044 b.n 8018276 if ((msg->conn->pcb.udp->flags & UDP_FLAGS_CONNECTED) == 0) { 80181ec: 68fb ldr r3, [r7, #12] 80181ee: 681b ldr r3, [r3, #0] 80181f0: 685b ldr r3, [r3, #4] 80181f2: 7c1b ldrb r3, [r3, #16] 80181f4: f003 0304 and.w r3, r3, #4 80181f8: 2b00 cmp r3, #0 80181fa: d103 bne.n 8018204 msg->err = ERR_CONN; 80181fc: 68fb ldr r3, [r7, #12] 80181fe: 22f5 movs r2, #245 @ 0xf5 8018200: 711a strb r2, [r3, #4] break; 8018202: e038 b.n 8018276 API_EXPR_DEREF(msg->msg.ad.port) = msg->conn->pcb.udp->remote_port; 8018204: 68fb ldr r3, [r7, #12] 8018206: 681b ldr r3, [r3, #0] 8018208: 685a ldr r2, [r3, #4] 801820a: 68fb ldr r3, [r7, #12] 801820c: 68db ldr r3, [r3, #12] 801820e: 8a92 ldrh r2, [r2, #20] 8018210: 801a strh r2, [r3, #0] break; 8018212: e030 b.n 8018276 #endif /* LWIP_UDP */ #if LWIP_TCP case NETCONN_TCP: if ((msg->msg.ad.local == 0) && 8018214: 68fb ldr r3, [r7, #12] 8018216: 7c1b ldrb r3, [r3, #16] 8018218: 2b00 cmp r3, #0 801821a: d10f bne.n 801823c ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { 801821c: 68fb ldr r3, [r7, #12] 801821e: 681b ldr r3, [r3, #0] 8018220: 685b ldr r3, [r3, #4] 8018222: 7d1b ldrb r3, [r3, #20] if ((msg->msg.ad.local == 0) && 8018224: 2b00 cmp r3, #0 8018226: d005 beq.n 8018234 ((msg->conn->pcb.tcp->state == CLOSED) || (msg->conn->pcb.tcp->state == LISTEN))) { 8018228: 68fb ldr r3, [r7, #12] 801822a: 681b ldr r3, [r3, #0] 801822c: 685b ldr r3, [r3, #4] 801822e: 7d1b ldrb r3, [r3, #20] 8018230: 2b01 cmp r3, #1 8018232: d103 bne.n 801823c /* pcb is not connected and remote name is requested */ msg->err = ERR_CONN; 8018234: 68fb ldr r3, [r7, #12] 8018236: 22f5 movs r2, #245 @ 0xf5 8018238: 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; 801823a: e01c b.n 8018276 API_EXPR_DEREF(msg->msg.ad.port) = (msg->msg.ad.local ? msg->conn->pcb.tcp->local_port : msg->conn->pcb.tcp->remote_port); 801823c: 68fb ldr r3, [r7, #12] 801823e: 7c1b ldrb r3, [r3, #16] 8018240: 2b00 cmp r3, #0 8018242: d004 beq.n 801824e 8018244: 68fb ldr r3, [r7, #12] 8018246: 681b ldr r3, [r3, #0] 8018248: 685b ldr r3, [r3, #4] 801824a: 8adb ldrh r3, [r3, #22] 801824c: e003 b.n 8018256 801824e: 68fb ldr r3, [r7, #12] 8018250: 681b ldr r3, [r3, #0] 8018252: 685b ldr r3, [r3, #4] 8018254: 8b1b ldrh r3, [r3, #24] 8018256: 68fa ldr r2, [r7, #12] 8018258: 68d2 ldr r2, [r2, #12] 801825a: 8013 strh r3, [r2, #0] break; 801825c: e00b b.n 8018276 #endif /* LWIP_TCP */ default: LWIP_ASSERT("invalid netconn_type", 0); 801825e: 4b08 ldr r3, [pc, #32] @ (8018280 ) 8018260: f240 727d movw r2, #1917 @ 0x77d 8018264: 4907 ldr r1, [pc, #28] @ (8018284 ) 8018266: 4808 ldr r0, [pc, #32] @ (8018288 ) 8018268: f012 fb18 bl 802a89c break; 801826c: e003 b.n 8018276 } } else { msg->err = ERR_CONN; 801826e: 68fb ldr r3, [r7, #12] 8018270: 22f5 movs r2, #245 @ 0xf5 8018272: 711a strb r2, [r3, #4] } TCPIP_APIMSG_ACK(msg); } 8018274: bf00 nop 8018276: bf00 nop 8018278: 3710 adds r7, #16 801827a: 46bd mov sp, r7 801827c: bd80 pop {r7, pc} 801827e: bf00 nop 8018280: 0802df0c .word 0x0802df0c 8018284: 0802e44c .word 0x0802e44c 8018288: 0802df50 .word 0x0802df50 0801828c : * * @param m the api_msg pointing to the connection */ void lwip_netconn_do_close(void *m) { 801828c: b580 push {r7, lr} 801828e: b084 sub sp, #16 8018290: af00 add r7, sp, #0 8018292: 6078 str r0, [r7, #4] struct api_msg *msg = (struct api_msg *)m; 8018294: 687b ldr r3, [r7, #4] 8018296: 60fb str r3, [r7, #12] #if LWIP_TCP enum netconn_state state = msg->conn->state; 8018298: 68fb ldr r3, [r7, #12] 801829a: 681b ldr r3, [r3, #0] 801829c: 785b ldrb r3, [r3, #1] 801829e: 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) && 80182a0: 68fb ldr r3, [r7, #12] 80182a2: 681b ldr r3, [r3, #0] 80182a4: 685b ldr r3, [r3, #4] 80182a6: 2b00 cmp r3, #0 80182a8: d067 beq.n 801837a (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 80182aa: 68fb ldr r3, [r7, #12] 80182ac: 681b ldr r3, [r3, #0] 80182ae: 781b ldrb r3, [r3, #0] 80182b0: f003 03f0 and.w r3, r3, #240 @ 0xf0 if ((msg->conn->pcb.tcp != NULL) && 80182b4: 2b10 cmp r3, #16 80182b6: d160 bne.n 801837a ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 80182b8: 68fb ldr r3, [r7, #12] 80182ba: 7a1b ldrb r3, [r3, #8] (NETCONNTYPE_GROUP(msg->conn->type) == NETCONN_TCP) && 80182bc: 2b03 cmp r3, #3 80182be: d002 beq.n 80182c6 ((msg->msg.sd.shut == NETCONN_SHUT_RDWR) || (state != NETCONN_LISTEN))) { 80182c0: 7afb ldrb r3, [r7, #11] 80182c2: 2b02 cmp r3, #2 80182c4: d059 beq.n 801837a /* Check if we are in a connected state */ if (state == NETCONN_CONNECT) { 80182c6: 7afb ldrb r3, [r7, #11] 80182c8: 2b03 cmp r3, #3 80182ca: d103 bne.n 80182d4 /* TCP connect in progress: cannot shutdown */ msg->err = ERR_CONN; 80182cc: 68fb ldr r3, [r7, #12] 80182ce: 22f5 movs r2, #245 @ 0xf5 80182d0: 711a strb r2, [r3, #4] if (state == NETCONN_CONNECT) { 80182d2: e057 b.n 8018384 } else if (state == NETCONN_WRITE) { 80182d4: 7afb ldrb r3, [r7, #11] 80182d6: 2b01 cmp r3, #1 80182d8: d103 bne.n 80182e2 msg->err = tcp_shutdown(msg->conn->pcb.tcp, 1, 0); } } if (state == NETCONN_NONE) { #else /* LWIP_NETCONN_FULLDUPLEX */ msg->err = ERR_INPROGRESS; 80182da: 68fb ldr r3, [r7, #12] 80182dc: 22fb movs r2, #251 @ 0xfb 80182de: 711a strb r2, [r3, #4] if (state == NETCONN_CONNECT) { 80182e0: e050 b.n 8018384 } else { #endif /* LWIP_NETCONN_FULLDUPLEX */ if (msg->msg.sd.shut & NETCONN_SHUT_RD) { 80182e2: 68fb ldr r3, [r7, #12] 80182e4: 7a1b ldrb r3, [r3, #8] 80182e6: f003 0301 and.w r3, r3, #1 80182ea: 2b00 cmp r3, #0 80182ec: d004 beq.n 80182f8 #if LWIP_NETCONN_FULLDUPLEX /* Mark mboxes invalid */ netconn_mark_mbox_invalid(msg->conn); #else /* LWIP_NETCONN_FULLDUPLEX */ netconn_drain(msg->conn); 80182ee: 68fb ldr r3, [r7, #12] 80182f0: 681b ldr r3, [r3, #0] 80182f2: 4618 mov r0, r3 80182f4: f7ff f82e bl 8017354 #endif /* LWIP_NETCONN_FULLDUPLEX */ } LWIP_ASSERT("already writing or closing", msg->conn->current_msg == NULL); 80182f8: 68fb ldr r3, [r7, #12] 80182fa: 681b ldr r3, [r3, #0] 80182fc: 6adb ldr r3, [r3, #44] @ 0x2c 80182fe: 2b00 cmp r3, #0 8018300: d006 beq.n 8018310 8018302: 4b22 ldr r3, [pc, #136] @ (801838c ) 8018304: f240 72bd movw r2, #1981 @ 0x7bd 8018308: 4921 ldr r1, [pc, #132] @ (8018390 ) 801830a: 4822 ldr r0, [pc, #136] @ (8018394 ) 801830c: f012 fac6 bl 802a89c msg->conn->state = NETCONN_CLOSE; 8018310: 68fb ldr r3, [r7, #12] 8018312: 681b ldr r3, [r3, #0] 8018314: 2204 movs r2, #4 8018316: 705a strb r2, [r3, #1] msg->conn->current_msg = msg; 8018318: 68fb ldr r3, [r7, #12] 801831a: 681b ldr r3, [r3, #0] 801831c: 68fa ldr r2, [r7, #12] 801831e: 62da str r2, [r3, #44] @ 0x2c #if LWIP_TCPIP_CORE_LOCKING if (lwip_netconn_do_close_internal(msg->conn, 0) != ERR_OK) { 8018320: 68fb ldr r3, [r7, #12] 8018322: 681b ldr r3, [r3, #0] 8018324: 2100 movs r1, #0 8018326: 4618 mov r0, r3 8018328: f7ff f892 bl 8017450 801832c: 4603 mov r3, r0 801832e: 2b00 cmp r3, #0 8018330: d027 beq.n 8018382 LWIP_ASSERT("state!", msg->conn->state == NETCONN_CLOSE); 8018332: 68fb ldr r3, [r7, #12] 8018334: 681b ldr r3, [r3, #0] 8018336: 785b ldrb r3, [r3, #1] 8018338: 2b04 cmp r3, #4 801833a: d006 beq.n 801834a 801833c: 4b13 ldr r3, [pc, #76] @ (801838c ) 801833e: f240 72c2 movw r2, #1986 @ 0x7c2 8018342: 4915 ldr r1, [pc, #84] @ (8018398 ) 8018344: 4813 ldr r0, [pc, #76] @ (8018394 ) 8018346: f012 faa9 bl 802a89c UNLOCK_TCPIP_CORE(); 801834a: f7f8 fe6f bl 801102c sys_arch_sem_wait(LWIP_API_MSG_SEM(msg), 0); 801834e: 68fb ldr r3, [r7, #12] 8018350: 681b ldr r3, [r3, #0] 8018352: 330c adds r3, #12 8018354: 2100 movs r1, #0 8018356: 4618 mov r0, r3 8018358: f00e ff43 bl 80271e2 LOCK_TCPIP_CORE(); 801835c: f7f8 fe56 bl 801100c LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE); 8018360: 68fb ldr r3, [r7, #12] 8018362: 681b ldr r3, [r3, #0] 8018364: 785b ldrb r3, [r3, #1] 8018366: 2b00 cmp r3, #0 8018368: d00b beq.n 8018382 801836a: 4b08 ldr r3, [pc, #32] @ (801838c ) 801836c: f240 72c6 movw r2, #1990 @ 0x7c6 8018370: 4909 ldr r1, [pc, #36] @ (8018398 ) 8018372: 4808 ldr r0, [pc, #32] @ (8018394 ) 8018374: f012 fa92 bl 802a89c } #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; 8018378: e003 b.n 8018382 } } else #endif /* LWIP_TCP */ { msg->err = ERR_CONN; 801837a: 68fb ldr r3, [r7, #12] 801837c: 22f5 movs r2, #245 @ 0xf5 801837e: 711a strb r2, [r3, #4] 8018380: e000 b.n 8018384 return; 8018382: bf00 nop } TCPIP_APIMSG_ACK(msg); } 8018384: 3710 adds r7, #16 8018386: 46bd mov sp, r7 8018388: bd80 pop {r7, pc} 801838a: bf00 nop 801838c: 0802df0c .word 0x0802df0c 8018390: 0802e2b0 .word 0x0802e2b0 8018394: 0802df50 .word 0x0802df50 8018398: 0802e2cc .word 0x0802e2cc 0801839c : EIO /* ERR_ARG -16 Illegal argument. */ }; int err_to_errno(err_t err) { 801839c: b480 push {r7} 801839e: b083 sub sp, #12 80183a0: af00 add r7, sp, #0 80183a2: 4603 mov r3, r0 80183a4: 71fb strb r3, [r7, #7] if ((err > 0) || (-err >= (err_t)LWIP_ARRAYSIZE(err_to_errno_table))) { 80183a6: f997 3007 ldrsb.w r3, [r7, #7] 80183aa: 2b00 cmp r3, #0 80183ac: dc04 bgt.n 80183b8 80183ae: f997 3007 ldrsb.w r3, [r7, #7] 80183b2: f113 0f10 cmn.w r3, #16 80183b6: da01 bge.n 80183bc return EIO; 80183b8: 2305 movs r3, #5 80183ba: e005 b.n 80183c8 } return err_to_errno_table[-err]; 80183bc: f997 3007 ldrsb.w r3, [r7, #7] 80183c0: 425b negs r3, r3 80183c2: 4a04 ldr r2, [pc, #16] @ (80183d4 ) 80183c4: f852 3023 ldr.w r3, [r2, r3, lsl #2] } 80183c8: 4618 mov r0, r3 80183ca: 370c adds r7, #12 80183cc: 46bd mov sp, r7 80183ce: f85d 7b04 ldr.w r7, [sp], #4 80183d2: 4770 bx lr 80183d4: 08031b10 .word 0x08031b10 080183d8 : * * @param buf pointer to a netbuf allocated by netbuf_new() */ void netbuf_delete(struct netbuf *buf) { 80183d8: b580 push {r7, lr} 80183da: b082 sub sp, #8 80183dc: af00 add r7, sp, #0 80183de: 6078 str r0, [r7, #4] if (buf != NULL) { 80183e0: 687b ldr r3, [r7, #4] 80183e2: 2b00 cmp r3, #0 80183e4: d013 beq.n 801840e if (buf->p != NULL) { 80183e6: 687b ldr r3, [r7, #4] 80183e8: 681b ldr r3, [r3, #0] 80183ea: 2b00 cmp r3, #0 80183ec: d00b beq.n 8018406 pbuf_free(buf->p); 80183ee: 687b ldr r3, [r7, #4] 80183f0: 681b ldr r3, [r3, #0] 80183f2: 4618 mov r0, r3 80183f4: f002 ffda bl 801b3ac buf->p = buf->ptr = NULL; 80183f8: 687b ldr r3, [r7, #4] 80183fa: 2200 movs r2, #0 80183fc: 605a str r2, [r3, #4] 80183fe: 687b ldr r3, [r7, #4] 8018400: 685a ldr r2, [r3, #4] 8018402: 687b ldr r3, [r7, #4] 8018404: 601a str r2, [r3, #0] } memp_free(MEMP_NETBUF, buf); 8018406: 6879 ldr r1, [r7, #4] 8018408: 2006 movs r0, #6 801840a: f002 f8e1 bl 801a5d0 } } 801840e: bf00 nop 8018410: 3708 adds r7, #8 8018412: 46bd mov sp, r7 8018414: bd80 pop {r7, pc} ... 08018418 : * * @param buf pointer to the netbuf which contains the packet buffer to free */ void netbuf_free(struct netbuf *buf) { 8018418: b580 push {r7, lr} 801841a: b082 sub sp, #8 801841c: af00 add r7, sp, #0 801841e: 6078 str r0, [r7, #4] LWIP_ERROR("netbuf_free: invalid buf", (buf != NULL), return;); 8018420: 687b ldr r3, [r7, #4] 8018422: 2b00 cmp r3, #0 8018424: d106 bne.n 8018434 8018426: 4b0d ldr r3, [pc, #52] @ (801845c ) 8018428: 2281 movs r2, #129 @ 0x81 801842a: 490d ldr r1, [pc, #52] @ (8018460 ) 801842c: 480d ldr r0, [pc, #52] @ (8018464 ) 801842e: f012 fa35 bl 802a89c 8018432: e00f b.n 8018454 if (buf->p != NULL) { 8018434: 687b ldr r3, [r7, #4] 8018436: 681b ldr r3, [r3, #0] 8018438: 2b00 cmp r3, #0 801843a: d004 beq.n 8018446 pbuf_free(buf->p); 801843c: 687b ldr r3, [r7, #4] 801843e: 681b ldr r3, [r3, #0] 8018440: 4618 mov r0, r3 8018442: f002 ffb3 bl 801b3ac } buf->p = buf->ptr = NULL; 8018446: 687b ldr r3, [r7, #4] 8018448: 2200 movs r2, #0 801844a: 605a str r2, [r3, #4] 801844c: 687b ldr r3, [r7, #4] 801844e: 685a ldr r2, [r3, #4] 8018450: 687b ldr r3, [r7, #4] 8018452: 601a str r2, [r3, #0] #if LWIP_CHECKSUM_ON_COPY buf->flags = 0; buf->toport_chksum = 0; #endif /* LWIP_CHECKSUM_ON_COPY */ } 8018454: 3708 adds r7, #8 8018456: 46bd mov sp, r7 8018458: bd80 pop {r7, pc} 801845a: bf00 nop 801845c: 0802e464 .word 0x0802e464 8018460: 0802e500 .word 0x0802e500 8018464: 0802e4b4 .word 0x0802e4b4 08018468 : * @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) { 8018468: b580 push {r7, lr} 801846a: b084 sub sp, #16 801846c: af00 add r7, sp, #0 801846e: 60f8 str r0, [r7, #12] 8018470: 60b9 str r1, [r7, #8] 8018472: 4613 mov r3, r2 8018474: 80fb strh r3, [r7, #6] LWIP_ERROR("netbuf_ref: invalid buf", (buf != NULL), return ERR_ARG;); 8018476: 68fb ldr r3, [r7, #12] 8018478: 2b00 cmp r3, #0 801847a: d108 bne.n 801848e 801847c: 4b1c ldr r3, [pc, #112] @ (80184f0 ) 801847e: 2299 movs r2, #153 @ 0x99 8018480: 491c ldr r1, [pc, #112] @ (80184f4 ) 8018482: 481d ldr r0, [pc, #116] @ (80184f8 ) 8018484: f012 fa0a bl 802a89c 8018488: f06f 030f mvn.w r3, #15 801848c: e02b b.n 80184e6 if (buf->p != NULL) { 801848e: 68fb ldr r3, [r7, #12] 8018490: 681b ldr r3, [r3, #0] 8018492: 2b00 cmp r3, #0 8018494: d004 beq.n 80184a0 pbuf_free(buf->p); 8018496: 68fb ldr r3, [r7, #12] 8018498: 681b ldr r3, [r3, #0] 801849a: 4618 mov r0, r3 801849c: f002 ff86 bl 801b3ac } buf->p = pbuf_alloc(PBUF_TRANSPORT, 0, PBUF_REF); 80184a0: 2241 movs r2, #65 @ 0x41 80184a2: 2100 movs r1, #0 80184a4: 2036 movs r0, #54 @ 0x36 80184a6: f002 fc6b bl 801ad80 80184aa: 4602 mov r2, r0 80184ac: 68fb ldr r3, [r7, #12] 80184ae: 601a str r2, [r3, #0] if (buf->p == NULL) { 80184b0: 68fb ldr r3, [r7, #12] 80184b2: 681b ldr r3, [r3, #0] 80184b4: 2b00 cmp r3, #0 80184b6: d105 bne.n 80184c4 buf->ptr = NULL; 80184b8: 68fb ldr r3, [r7, #12] 80184ba: 2200 movs r2, #0 80184bc: 605a str r2, [r3, #4] return ERR_MEM; 80184be: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80184c2: e010 b.n 80184e6 } ((struct pbuf_rom *)buf->p)->payload = dataptr; 80184c4: 68fb ldr r3, [r7, #12] 80184c6: 681b ldr r3, [r3, #0] 80184c8: 68ba ldr r2, [r7, #8] 80184ca: 605a str r2, [r3, #4] buf->p->len = buf->p->tot_len = size; 80184cc: 68fb ldr r3, [r7, #12] 80184ce: 681b ldr r3, [r3, #0] 80184d0: 88fa ldrh r2, [r7, #6] 80184d2: 811a strh r2, [r3, #8] 80184d4: 68fa ldr r2, [r7, #12] 80184d6: 6812 ldr r2, [r2, #0] 80184d8: 891b ldrh r3, [r3, #8] 80184da: 8153 strh r3, [r2, #10] buf->ptr = buf->p; 80184dc: 68fb ldr r3, [r7, #12] 80184de: 681a ldr r2, [r3, #0] 80184e0: 68fb ldr r3, [r7, #12] 80184e2: 605a str r2, [r3, #4] return ERR_OK; 80184e4: 2300 movs r3, #0 } 80184e6: 4618 mov r0, r3 80184e8: 3710 adds r7, #16 80184ea: 46bd mov sp, r7 80184ec: bd80 pop {r7, pc} 80184ee: bf00 nop 80184f0: 0802e464 .word 0x0802e464 80184f4: 0802e51c .word 0x0802e51c 80184f8: 0802e4b4 .word 0x0802e4b4 080184fc : #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) { 80184fc: b480 push {r7} 80184fe: b085 sub sp, #20 8018500: af00 add r7, sp, #0 8018502: 6078 str r0, [r7, #4] int s = fd - LWIP_SOCKET_OFFSET; 8018504: 687b ldr r3, [r7, #4] 8018506: 60fb str r3, [r7, #12] if ((s < 0) || (s >= NUM_SOCKETS)) { 8018508: 68fb ldr r3, [r7, #12] 801850a: 2b00 cmp r3, #0 801850c: db02 blt.n 8018514 801850e: 68fb ldr r3, [r7, #12] 8018510: 2b03 cmp r3, #3 8018512: dd01 ble.n 8018518 LWIP_DEBUGF(SOCKETS_DEBUG, ("tryget_socket_unconn(%d): invalid\n", fd)); return NULL; 8018514: 2300 movs r3, #0 8018516: e003 b.n 8018520 } return &sockets[s]; 8018518: 68fb ldr r3, [r7, #12] 801851a: 011b lsls r3, r3, #4 801851c: 4a03 ldr r2, [pc, #12] @ (801852c ) 801851e: 4413 add r3, r2 } 8018520: 4618 mov r0, r3 8018522: 3714 adds r7, #20 8018524: 46bd mov sp, r7 8018526: f85d 7b04 ldr.w r7, [sp], #4 801852a: 4770 bx lr 801852c: 240243d4 .word 0x240243d4 08018530 : } /* Translate a socket 'int' into a pointer (only fails if the index is invalid) */ static struct lwip_sock * tryget_socket_unconn(int fd) { 8018530: b580 push {r7, lr} 8018532: b084 sub sp, #16 8018534: af00 add r7, sp, #0 8018536: 6078 str r0, [r7, #4] struct lwip_sock *ret = tryget_socket_unconn_nouse(fd); 8018538: 6878 ldr r0, [r7, #4] 801853a: f7ff ffdf bl 80184fc 801853e: 60f8 str r0, [r7, #12] if (ret != NULL) { if (!sock_inc_used(ret)) { return NULL; } } return ret; 8018540: 68fb ldr r3, [r7, #12] } 8018542: 4618 mov r0, r3 8018544: 3710 adds r7, #16 8018546: 46bd mov sp, r7 8018548: bd80 pop {r7, pc} 0801854a : * @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) { 801854a: b580 push {r7, lr} 801854c: b084 sub sp, #16 801854e: af00 add r7, sp, #0 8018550: 6078 str r0, [r7, #4] struct lwip_sock *sock = tryget_socket_unconn(fd); 8018552: 6878 ldr r0, [r7, #4] 8018554: f7ff ffec bl 8018530 8018558: 60f8 str r0, [r7, #12] if (sock != NULL) { 801855a: 68fb ldr r3, [r7, #12] 801855c: 2b00 cmp r3, #0 801855e: d005 beq.n 801856c if (sock->conn) { 8018560: 68fb ldr r3, [r7, #12] 8018562: 681b ldr r3, [r3, #0] 8018564: 2b00 cmp r3, #0 8018566: d001 beq.n 801856c return sock; 8018568: 68fb ldr r3, [r7, #12] 801856a: e000 b.n 801856e } done_socket(sock); } return NULL; 801856c: 2300 movs r3, #0 } 801856e: 4618 mov r0, r3 8018570: 3710 adds r7, #16 8018572: 46bd mov sp, r7 8018574: bd80 pop {r7, pc} ... 08018578 : * @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) { 8018578: b580 push {r7, lr} 801857a: b084 sub sp, #16 801857c: af00 add r7, sp, #0 801857e: 6078 str r0, [r7, #4] struct lwip_sock *sock = tryget_socket(fd); 8018580: 6878 ldr r0, [r7, #4] 8018582: f7ff ffe2 bl 801854a 8018586: 60f8 str r0, [r7, #12] if (!sock) { 8018588: 68fb ldr r3, [r7, #12] 801858a: 2b00 cmp r3, #0 801858c: d104 bne.n 8018598 if ((fd < LWIP_SOCKET_OFFSET) || (fd >= (LWIP_SOCKET_OFFSET + NUM_SOCKETS))) { LWIP_DEBUGF(SOCKETS_DEBUG, ("get_socket(%d): invalid\n", fd)); } set_errno(EBADF); 801858e: 4b05 ldr r3, [pc, #20] @ (80185a4 ) 8018590: 2209 movs r2, #9 8018592: 601a str r2, [r3, #0] return NULL; 8018594: 2300 movs r3, #0 8018596: e000 b.n 801859a } return sock; 8018598: 68fb ldr r3, [r7, #12] } 801859a: 4618 mov r0, r3 801859c: 3710 adds r7, #16 801859e: 46bd mov sp, r7 80185a0: bd80 pop {r7, pc} 80185a2: bf00 nop 80185a4: 2402b270 .word 0x2402b270 080185a8 : * 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) { 80185a8: b580 push {r7, lr} 80185aa: b084 sub sp, #16 80185ac: af00 add r7, sp, #0 80185ae: 6078 str r0, [r7, #4] 80185b0: 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) { 80185b2: 2300 movs r3, #0 80185b4: 60fb str r3, [r7, #12] 80185b6: e052 b.n 801865e /* Protect socket array */ SYS_ARCH_PROTECT(lev); 80185b8: f00e feda bl 8027370 80185bc: 60b8 str r0, [r7, #8] if (!sockets[i].conn) { 80185be: 4a2c ldr r2, [pc, #176] @ (8018670 ) 80185c0: 68fb ldr r3, [r7, #12] 80185c2: 011b lsls r3, r3, #4 80185c4: 4413 add r3, r2 80185c6: 681b ldr r3, [r3, #0] 80185c8: 2b00 cmp r3, #0 80185ca: d142 bne.n 8018652 continue; } sockets[i].fd_used = 1; sockets[i].fd_free_pending = 0; #endif sockets[i].conn = newconn; 80185cc: 4a28 ldr r2, [pc, #160] @ (8018670 ) 80185ce: 68fb ldr r3, [r7, #12] 80185d0: 011b lsls r3, r3, #4 80185d2: 4413 add r3, r2 80185d4: 687a ldr r2, [r7, #4] 80185d6: 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); 80185d8: 68b8 ldr r0, [r7, #8] 80185da: f00e fed7 bl 802738c sockets[i].lastdata.pbuf = NULL; 80185de: 4a24 ldr r2, [pc, #144] @ (8018670 ) 80185e0: 68fb ldr r3, [r7, #12] 80185e2: 011b lsls r3, r3, #4 80185e4: 4413 add r3, r2 80185e6: 3304 adds r3, #4 80185e8: 2200 movs r2, #0 80185ea: 601a str r2, [r3, #0] #if LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL LWIP_ASSERT("sockets[i].select_waiting == 0", sockets[i].select_waiting == 0); 80185ec: 4a20 ldr r2, [pc, #128] @ (8018670 ) 80185ee: 68fb ldr r3, [r7, #12] 80185f0: 011b lsls r3, r3, #4 80185f2: 4413 add r3, r2 80185f4: 330e adds r3, #14 80185f6: 781b ldrb r3, [r3, #0] 80185f8: 2b00 cmp r3, #0 80185fa: d006 beq.n 801860a 80185fc: 4b1d ldr r3, [pc, #116] @ (8018674 ) 80185fe: f240 220e movw r2, #526 @ 0x20e 8018602: 491d ldr r1, [pc, #116] @ (8018678 ) 8018604: 481d ldr r0, [pc, #116] @ (801867c ) 8018606: f012 f949 bl 802a89c sockets[i].rcvevent = 0; 801860a: 4a19 ldr r2, [pc, #100] @ (8018670 ) 801860c: 68fb ldr r3, [r7, #12] 801860e: 011b lsls r3, r3, #4 8018610: 4413 add r3, r2 8018612: 3308 adds r3, #8 8018614: 2200 movs r2, #0 8018616: 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); 8018618: 687b ldr r3, [r7, #4] 801861a: 781b ldrb r3, [r3, #0] 801861c: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018620: 2b10 cmp r3, #16 8018622: d102 bne.n 801862a 8018624: 683b ldr r3, [r7, #0] 8018626: 2b00 cmp r3, #0 8018628: d001 beq.n 801862e 801862a: 2301 movs r3, #1 801862c: e000 b.n 8018630 801862e: 2300 movs r3, #0 8018630: b299 uxth r1, r3 8018632: 4a0f ldr r2, [pc, #60] @ (8018670 ) 8018634: 68fb ldr r3, [r7, #12] 8018636: 011b lsls r3, r3, #4 8018638: 4413 add r3, r2 801863a: 330a adds r3, #10 801863c: 460a mov r2, r1 801863e: 801a strh r2, [r3, #0] sockets[i].errevent = 0; 8018640: 4a0b ldr r2, [pc, #44] @ (8018670 ) 8018642: 68fb ldr r3, [r7, #12] 8018644: 011b lsls r3, r3, #4 8018646: 4413 add r3, r2 8018648: 330c adds r3, #12 801864a: 2200 movs r2, #0 801864c: 801a strh r2, [r3, #0] #endif /* LWIP_SOCKET_SELECT || LWIP_SOCKET_POLL */ return i + LWIP_SOCKET_OFFSET; 801864e: 68fb ldr r3, [r7, #12] 8018650: e00a b.n 8018668 } SYS_ARCH_UNPROTECT(lev); 8018652: 68b8 ldr r0, [r7, #8] 8018654: f00e fe9a bl 802738c for (i = 0; i < NUM_SOCKETS; ++i) { 8018658: 68fb ldr r3, [r7, #12] 801865a: 3301 adds r3, #1 801865c: 60fb str r3, [r7, #12] 801865e: 68fb ldr r3, [r7, #12] 8018660: 2b03 cmp r3, #3 8018662: dda9 ble.n 80185b8 } return -1; 8018664: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8018668: 4618 mov r0, r3 801866a: 3710 adds r7, #16 801866c: 46bd mov sp, r7 801866e: bd80 pop {r7, pc} 8018670: 240243d4 .word 0x240243d4 8018674: 0802e5fc .word 0x0802e5fc 8018678: 0802e630 .word 0x0802e630 801867c: 0802e650 .word 0x0802e650 08018680 : * @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) { 8018680: b480 push {r7} 8018682: b085 sub sp, #20 8018684: af00 add r7, sp, #0 8018686: 60f8 str r0, [r7, #12] 8018688: 60b9 str r1, [r7, #8] 801868a: 607a str r2, [r7, #4] 801868c: 603b str r3, [r7, #0] } #else /* LWIP_NETCONN_FULLDUPLEX */ LWIP_UNUSED_ARG(is_tcp); #endif /* LWIP_NETCONN_FULLDUPLEX */ *lastdata = sock->lastdata; 801868e: 683b ldr r3, [r7, #0] 8018690: 68fa ldr r2, [r7, #12] 8018692: 6852 ldr r2, [r2, #4] 8018694: 601a str r2, [r3, #0] sock->lastdata.pbuf = NULL; 8018696: 68fb ldr r3, [r7, #12] 8018698: 2200 movs r2, #0 801869a: 605a str r2, [r3, #4] *conn = sock->conn; 801869c: 68fb ldr r3, [r7, #12] 801869e: 681a ldr r2, [r3, #0] 80186a0: 687b ldr r3, [r7, #4] 80186a2: 601a str r2, [r3, #0] sock->conn = NULL; 80186a4: 68fb ldr r3, [r7, #12] 80186a6: 2200 movs r2, #0 80186a8: 601a str r2, [r3, #0] return 1; 80186aa: 2301 movs r3, #1 } 80186ac: 4618 mov r0, r3 80186ae: 3714 adds r7, #20 80186b0: 46bd mov sp, r7 80186b2: f85d 7b04 ldr.w r7, [sp], #4 80186b6: 4770 bx lr 080186b8 : /** Free a socket's leftover members. */ static void free_socket_free_elements(int is_tcp, struct netconn *conn, union lwip_sock_lastdata *lastdata) { 80186b8: b580 push {r7, lr} 80186ba: b084 sub sp, #16 80186bc: af00 add r7, sp, #0 80186be: 60f8 str r0, [r7, #12] 80186c0: 60b9 str r1, [r7, #8] 80186c2: 607a str r2, [r7, #4] if (lastdata->pbuf != NULL) { 80186c4: 687b ldr r3, [r7, #4] 80186c6: 681b ldr r3, [r3, #0] 80186c8: 2b00 cmp r3, #0 80186ca: d00d beq.n 80186e8 if (is_tcp) { 80186cc: 68fb ldr r3, [r7, #12] 80186ce: 2b00 cmp r3, #0 80186d0: d005 beq.n 80186de pbuf_free(lastdata->pbuf); 80186d2: 687b ldr r3, [r7, #4] 80186d4: 681b ldr r3, [r3, #0] 80186d6: 4618 mov r0, r3 80186d8: f002 fe68 bl 801b3ac 80186dc: e004 b.n 80186e8 } else { netbuf_delete(lastdata->netbuf); 80186de: 687b ldr r3, [r7, #4] 80186e0: 681b ldr r3, [r3, #0] 80186e2: 4618 mov r0, r3 80186e4: f7ff fe78 bl 80183d8 } } if (conn != NULL) { 80186e8: 68bb ldr r3, [r7, #8] 80186ea: 2b00 cmp r3, #0 80186ec: d002 beq.n 80186f4 /* netconn_prepare_delete() has already been called, here we only free the conn */ netconn_delete(conn); 80186ee: 68b8 ldr r0, [r7, #8] 80186f0: f7fd fd50 bl 8016194 } } 80186f4: bf00 nop 80186f6: 3710 adds r7, #16 80186f8: 46bd mov sp, r7 80186fa: bd80 pop {r7, pc} 080186fc : * @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) { 80186fc: b580 push {r7, lr} 80186fe: b086 sub sp, #24 8018700: af00 add r7, sp, #0 8018702: 6078 str r0, [r7, #4] 8018704: 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); 8018706: f00e fe33 bl 8027370 801870a: 6178 str r0, [r7, #20] freed = free_socket_locked(sock, is_tcp, &conn, &lastdata); 801870c: f107 0308 add.w r3, r7, #8 8018710: f107 020c add.w r2, r7, #12 8018714: 6839 ldr r1, [r7, #0] 8018716: 6878 ldr r0, [r7, #4] 8018718: f7ff ffb2 bl 8018680 801871c: 6138 str r0, [r7, #16] SYS_ARCH_UNPROTECT(lev); 801871e: 6978 ldr r0, [r7, #20] 8018720: f00e fe34 bl 802738c /* don't use 'sock' after this line, as another task might have allocated it */ if (freed) { 8018724: 693b ldr r3, [r7, #16] 8018726: 2b00 cmp r3, #0 8018728: d006 beq.n 8018738 free_socket_free_elements(is_tcp, conn, &lastdata); 801872a: 68fb ldr r3, [r7, #12] 801872c: f107 0208 add.w r2, r7, #8 8018730: 4619 mov r1, r3 8018732: 6838 ldr r0, [r7, #0] 8018734: f7ff ffc0 bl 80186b8 } } 8018738: bf00 nop 801873a: 3718 adds r7, #24 801873c: 46bd mov sp, r7 801873e: bd80 pop {r7, pc} 08018740 : return 0; } int lwip_close(int s) { 8018740: b580 push {r7, lr} 8018742: b086 sub sp, #24 8018744: af00 add r7, sp, #0 8018746: 6078 str r0, [r7, #4] struct lwip_sock *sock; int is_tcp = 0; 8018748: 2300 movs r3, #0 801874a: 617b str r3, [r7, #20] err_t err; LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_close(%d)\n", s)); sock = get_socket(s); 801874c: 6878 ldr r0, [r7, #4] 801874e: f7ff ff13 bl 8018578 8018752: 6138 str r0, [r7, #16] if (!sock) { 8018754: 693b ldr r3, [r7, #16] 8018756: 2b00 cmp r3, #0 8018758: d102 bne.n 8018760 return -1; 801875a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801875e: e039 b.n 80187d4 } if (sock->conn != NULL) { 8018760: 693b ldr r3, [r7, #16] 8018762: 681b ldr r3, [r3, #0] 8018764: 2b00 cmp r3, #0 8018766: d00b beq.n 8018780 is_tcp = NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP; 8018768: 693b ldr r3, [r7, #16] 801876a: 681b ldr r3, [r3, #0] 801876c: 781b ldrb r3, [r3, #0] 801876e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018772: 2b10 cmp r3, #16 8018774: bf0c ite eq 8018776: 2301 moveq r3, #1 8018778: 2300 movne r3, #0 801877a: b2db uxtb r3, r3 801877c: 617b str r3, [r7, #20] 801877e: e00a b.n 8018796 } else { LWIP_ASSERT("sock->lastdata == NULL", sock->lastdata.pbuf == NULL); 8018780: 693b ldr r3, [r7, #16] 8018782: 685b ldr r3, [r3, #4] 8018784: 2b00 cmp r3, #0 8018786: d006 beq.n 8018796 8018788: 4b14 ldr r3, [pc, #80] @ (80187dc ) 801878a: f44f 7245 mov.w r2, #788 @ 0x314 801878e: 4914 ldr r1, [pc, #80] @ (80187e0 ) 8018790: 4814 ldr r0, [pc, #80] @ (80187e4 ) 8018792: f012 f883 bl 802a89c #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); 8018796: 693b ldr r3, [r7, #16] 8018798: 681b ldr r3, [r3, #0] 801879a: 4618 mov r0, r3 801879c: f7fd fcd6 bl 801614c 80187a0: 4603 mov r3, r0 80187a2: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 80187a4: f997 300f ldrsb.w r3, [r7, #15] 80187a8: 2b00 cmp r3, #0 80187aa: d00e beq.n 80187ca sock_set_errno(sock, err_to_errno(err)); 80187ac: f997 300f ldrsb.w r3, [r7, #15] 80187b0: 4618 mov r0, r3 80187b2: f7ff fdf3 bl 801839c 80187b6: 60b8 str r0, [r7, #8] 80187b8: 68bb ldr r3, [r7, #8] 80187ba: 2b00 cmp r3, #0 80187bc: d002 beq.n 80187c4 80187be: 4a0a ldr r2, [pc, #40] @ (80187e8 ) 80187c0: 68bb ldr r3, [r7, #8] 80187c2: 6013 str r3, [r2, #0] done_socket(sock); return -1; 80187c4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80187c8: e004 b.n 80187d4 } free_socket(sock, is_tcp); 80187ca: 6979 ldr r1, [r7, #20] 80187cc: 6938 ldr r0, [r7, #16] 80187ce: f7ff ff95 bl 80186fc set_errno(0); return 0; 80187d2: 2300 movs r3, #0 } 80187d4: 4618 mov r0, r3 80187d6: 3718 adds r7, #24 80187d8: 46bd mov sp, r7 80187da: bd80 pop {r7, pc} 80187dc: 0802e5fc .word 0x0802e5fc 80187e0: 0802e6bc .word 0x0802e6bc 80187e4: 0802e650 .word 0x0802e650 80187e8: 2402b270 .word 0x2402b270 080187ec : int lwip_connect(int s, const struct sockaddr *name, socklen_t namelen) { 80187ec: b580 push {r7, lr} 80187ee: b08a sub sp, #40 @ 0x28 80187f0: af00 add r7, sp, #0 80187f2: 60f8 str r0, [r7, #12] 80187f4: 60b9 str r1, [r7, #8] 80187f6: 607a str r2, [r7, #4] struct lwip_sock *sock; err_t err; sock = get_socket(s); 80187f8: 68f8 ldr r0, [r7, #12] 80187fa: f7ff febd bl 8018578 80187fe: 6278 str r0, [r7, #36] @ 0x24 if (!sock) { 8018800: 6a7b ldr r3, [r7, #36] @ 0x24 8018802: 2b00 cmp r3, #0 8018804: d102 bne.n 801880c return -1; 8018806: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801880a: e062 b.n 80188d2 done_socket(sock); return -1; } LWIP_UNUSED_ARG(namelen); if (name->sa_family == AF_UNSPEC) { 801880c: 68bb ldr r3, [r7, #8] 801880e: 785b ldrb r3, [r3, #1] 8018810: 2b00 cmp r3, #0 8018812: d108 bne.n 8018826 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d, AF_UNSPEC)\n", s)); err = netconn_disconnect(sock->conn); 8018814: 6a7b ldr r3, [r7, #36] @ 0x24 8018816: 681b ldr r3, [r3, #0] 8018818: 4618 mov r0, r3 801881a: f7fd fd61 bl 80162e0 801881e: 4603 mov r3, r0 8018820: f887 3021 strb.w r3, [r7, #33] @ 0x21 8018824: e039 b.n 801889a } 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) && 8018826: 687b ldr r3, [r7, #4] 8018828: 2b10 cmp r3, #16 801882a: d10c bne.n 8018846 801882c: 68bb ldr r3, [r7, #8] 801882e: 785b ldrb r3, [r3, #1] 8018830: 2b00 cmp r3, #0 8018832: d003 beq.n 801883c 8018834: 68bb ldr r3, [r7, #8] 8018836: 785b ldrb r3, [r3, #1] 8018838: 2b02 cmp r3, #2 801883a: d104 bne.n 8018846 801883c: 68bb ldr r3, [r7, #8] 801883e: f003 0303 and.w r3, r3, #3 8018842: 2b00 cmp r3, #0 8018844: d014 beq.n 8018870 8018846: 4b25 ldr r3, [pc, #148] @ (80188dc ) 8018848: f240 3247 movw r2, #839 @ 0x347 801884c: 4924 ldr r1, [pc, #144] @ (80188e0 ) 801884e: 4825 ldr r0, [pc, #148] @ (80188e4 ) 8018850: f012 f824 bl 802a89c 8018854: f06f 000f mvn.w r0, #15 8018858: f7ff fda0 bl 801839c 801885c: 61f8 str r0, [r7, #28] 801885e: 69fb ldr r3, [r7, #28] 8018860: 2b00 cmp r3, #0 8018862: d002 beq.n 801886a 8018864: 4a20 ldr r2, [pc, #128] @ (80188e8 ) 8018866: 69fb ldr r3, [r7, #28] 8018868: 6013 str r3, [r2, #0] 801886a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801886e: e030 b.n 80188d2 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); 8018870: 68bb ldr r3, [r7, #8] 8018872: 685b ldr r3, [r3, #4] 8018874: 613b str r3, [r7, #16] 8018876: 68bb ldr r3, [r7, #8] 8018878: 885b ldrh r3, [r3, #2] 801887a: 4618 mov r0, r3 801887c: f001 f8b4 bl 80199e8 8018880: 4603 mov r3, r0 8018882: 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); 8018884: 6a7b ldr r3, [r7, #36] @ 0x24 8018886: 681b ldr r3, [r3, #0] 8018888: 8c7a ldrh r2, [r7, #34] @ 0x22 801888a: f107 0110 add.w r1, r7, #16 801888e: 4618 mov r0, r3 8018890: f7fd fcee bl 8016270 8018894: 4603 mov r3, r0 8018896: f887 3021 strb.w r3, [r7, #33] @ 0x21 } if (err != ERR_OK) { 801889a: f997 3021 ldrsb.w r3, [r7, #33] @ 0x21 801889e: 2b00 cmp r3, #0 80188a0: d00e beq.n 80188c0 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) failed, err=%d\n", s, err)); sock_set_errno(sock, err_to_errno(err)); 80188a2: f997 3021 ldrsb.w r3, [r7, #33] @ 0x21 80188a6: 4618 mov r0, r3 80188a8: f7ff fd78 bl 801839c 80188ac: 6178 str r0, [r7, #20] 80188ae: 697b ldr r3, [r7, #20] 80188b0: 2b00 cmp r3, #0 80188b2: d002 beq.n 80188ba 80188b4: 4a0c ldr r2, [pc, #48] @ (80188e8 ) 80188b6: 697b ldr r3, [r7, #20] 80188b8: 6013 str r3, [r2, #0] done_socket(sock); return -1; 80188ba: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80188be: e008 b.n 80188d2 } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_connect(%d) succeeded\n", s)); sock_set_errno(sock, 0); 80188c0: 2300 movs r3, #0 80188c2: 61bb str r3, [r7, #24] 80188c4: 69bb ldr r3, [r7, #24] 80188c6: 2b00 cmp r3, #0 80188c8: d002 beq.n 80188d0 80188ca: 4a07 ldr r2, [pc, #28] @ (80188e8 ) 80188cc: 69bb ldr r3, [r7, #24] 80188ce: 6013 str r3, [r2, #0] done_socket(sock); return 0; 80188d0: 2300 movs r3, #0 } 80188d2: 4618 mov r0, r3 80188d4: 3728 adds r7, #40 @ 0x28 80188d6: 46bd mov sp, r7 80188d8: bd80 pop {r7, pc} 80188da: bf00 nop 80188dc: 0802e5fc .word 0x0802e5fc 80188e0: 0802e6d4 .word 0x0802e6d4 80188e4: 0802e650 .word 0x0802e650 80188e8: 2402b270 .word 0x2402b270 080188ec : * 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) { 80188ec: b580 push {r7, lr} 80188ee: b08c sub sp, #48 @ 0x30 80188f0: af00 add r7, sp, #0 80188f2: 60f8 str r0, [r7, #12] 80188f4: 60b9 str r1, [r7, #8] 80188f6: 607a str r2, [r7, #4] 80188f8: 603b str r3, [r7, #0] u8_t apiflags = NETCONN_NOAUTORCVD; 80188fa: 2308 movs r3, #8 80188fc: f887 3023 strb.w r3, [r7, #35] @ 0x23 ssize_t recvd = 0; 8018900: 2300 movs r3, #0 8018902: 62bb str r3, [r7, #40] @ 0x28 ssize_t recv_left = (len <= SSIZE_MAX) ? (ssize_t)len : SSIZE_MAX; 8018904: 687b ldr r3, [r7, #4] 8018906: 2b00 cmp r3, #0 8018908: db01 blt.n 801890e 801890a: 687b ldr r3, [r7, #4] 801890c: e001 b.n 8018912 801890e: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 8018912: 627b str r3, [r7, #36] @ 0x24 LWIP_ASSERT("no socket given", sock != NULL); 8018914: 68fb ldr r3, [r7, #12] 8018916: 2b00 cmp r3, #0 8018918: d106 bne.n 8018928 801891a: 4b74 ldr r3, [pc, #464] @ (8018aec ) 801891c: f240 329e movw r2, #926 @ 0x39e 8018920: 4973 ldr r1, [pc, #460] @ (8018af0 ) 8018922: 4874 ldr r0, [pc, #464] @ (8018af4 ) 8018924: f011 ffba bl 802a89c LWIP_ASSERT("this should be checked internally", NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP); 8018928: 68fb ldr r3, [r7, #12] 801892a: 681b ldr r3, [r3, #0] 801892c: 781b ldrb r3, [r3, #0] 801892e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018932: 2b10 cmp r3, #16 8018934: d006 beq.n 8018944 8018936: 4b6d ldr r3, [pc, #436] @ (8018aec ) 8018938: f240 329f movw r2, #927 @ 0x39f 801893c: 496e ldr r1, [pc, #440] @ (8018af8 ) 801893e: 486d ldr r0, [pc, #436] @ (8018af4 ) 8018940: f011 ffac bl 802a89c if (flags & MSG_DONTWAIT) { 8018944: 683b ldr r3, [r7, #0] 8018946: f003 0308 and.w r3, r3, #8 801894a: 2b00 cmp r3, #0 801894c: d005 beq.n 801895a apiflags |= NETCONN_DONTBLOCK; 801894e: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8018952: f043 0304 orr.w r3, r3, #4 8018956: 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) { 801895a: 68fb ldr r3, [r7, #12] 801895c: 685b ldr r3, [r3, #4] 801895e: 2b00 cmp r3, #0 8018960: d003 beq.n 801896a p = sock->lastdata.pbuf; 8018962: 68fb ldr r3, [r7, #12] 8018964: 685b ldr r3, [r3, #4] 8018966: 617b str r3, [r7, #20] 8018968: e036 b.n 80189d8 } 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); 801896a: 68fb ldr r3, [r7, #12] 801896c: 681b ldr r3, [r3, #0] 801896e: f897 2023 ldrb.w r2, [r7, #35] @ 0x23 8018972: f107 0114 add.w r1, r7, #20 8018976: 4618 mov r0, r3 8018978: f7fd fea4 bl 80166c4 801897c: 4603 mov r3, r0 801897e: 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) { 8018982: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 8018986: 2b00 cmp r3, #0 8018988: d019 beq.n 80189be if (recvd > 0) { 801898a: 6abb ldr r3, [r7, #40] @ 0x28 801898c: 2b00 cmp r3, #0 801898e: f300 808d bgt.w 8018aac 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)); 8018992: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 8018996: 4618 mov r0, r3 8018998: f7ff fd00 bl 801839c 801899c: 61f8 str r0, [r7, #28] 801899e: 69fb ldr r3, [r7, #28] 80189a0: 2b00 cmp r3, #0 80189a2: d002 beq.n 80189aa 80189a4: 4a55 ldr r2, [pc, #340] @ (8018afc ) 80189a6: 69fb ldr r3, [r7, #28] 80189a8: 6013 str r3, [r2, #0] if (err == ERR_CLSD) { 80189aa: f997 3022 ldrsb.w r3, [r7, #34] @ 0x22 80189ae: f113 0f0f cmn.w r3, #15 80189b2: d101 bne.n 80189b8 return 0; 80189b4: 2300 movs r3, #0 80189b6: e094 b.n 8018ae2 } else { return -1; 80189b8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80189bc: e091 b.n 8018ae2 } } LWIP_ASSERT("p != NULL", p != NULL); 80189be: 697b ldr r3, [r7, #20] 80189c0: 2b00 cmp r3, #0 80189c2: d106 bne.n 80189d2 80189c4: 4b49 ldr r3, [pc, #292] @ (8018aec ) 80189c6: f240 32c5 movw r2, #965 @ 0x3c5 80189ca: 494d ldr r1, [pc, #308] @ (8018b00 ) 80189cc: 4849 ldr r0, [pc, #292] @ (8018af4 ) 80189ce: f011 ff65 bl 802a89c sock->lastdata.pbuf = p; 80189d2: 697a ldr r2, [r7, #20] 80189d4: 68fb ldr r3, [r7, #12] 80189d6: 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) { 80189d8: 697b ldr r3, [r7, #20] 80189da: 891b ldrh r3, [r3, #8] 80189dc: 461a mov r2, r3 80189de: 6a7b ldr r3, [r7, #36] @ 0x24 80189e0: 4293 cmp r3, r2 80189e2: dd03 ble.n 80189ec copylen = p->tot_len; 80189e4: 697b ldr r3, [r7, #20] 80189e6: 891b ldrh r3, [r3, #8] 80189e8: 85fb strh r3, [r7, #46] @ 0x2e 80189ea: e001 b.n 80189f0 } else { copylen = (u16_t)recv_left; 80189ec: 6a7b ldr r3, [r7, #36] @ 0x24 80189ee: 85fb strh r3, [r7, #46] @ 0x2e } if (recvd + copylen < recvd) { 80189f0: 8dfa ldrh r2, [r7, #46] @ 0x2e 80189f2: 6abb ldr r3, [r7, #40] @ 0x28 80189f4: 4413 add r3, r2 80189f6: 6aba ldr r2, [r7, #40] @ 0x28 80189f8: 429a cmp r2, r3 80189fa: dd03 ble.n 8018a04 /* overflow */ copylen = (u16_t)(SSIZE_MAX - recvd); 80189fc: 6abb ldr r3, [r7, #40] @ 0x28 80189fe: b29b uxth r3, r3 8018a00: 43db mvns r3, r3 8018a02: 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); 8018a04: 6978 ldr r0, [r7, #20] 8018a06: 6abb ldr r3, [r7, #40] @ 0x28 8018a08: 68ba ldr r2, [r7, #8] 8018a0a: 18d1 adds r1, r2, r3 8018a0c: 8dfa ldrh r2, [r7, #46] @ 0x2e 8018a0e: 2300 movs r3, #0 8018a10: f002 fed2 bl 801b7b8 recvd += copylen; 8018a14: 8dfb ldrh r3, [r7, #46] @ 0x2e 8018a16: 6aba ldr r2, [r7, #40] @ 0x28 8018a18: 4413 add r3, r2 8018a1a: 62bb str r3, [r7, #40] @ 0x28 /* TCP combines multiple pbufs for one recv */ LWIP_ASSERT("invalid copylen, len would underflow", recv_left >= copylen); 8018a1c: 8dfb ldrh r3, [r7, #46] @ 0x2e 8018a1e: 6a7a ldr r2, [r7, #36] @ 0x24 8018a20: 429a cmp r2, r3 8018a22: da06 bge.n 8018a32 8018a24: 4b31 ldr r3, [pc, #196] @ (8018aec ) 8018a26: f240 32dd movw r2, #989 @ 0x3dd 8018a2a: 4936 ldr r1, [pc, #216] @ (8018b04 ) 8018a2c: 4831 ldr r0, [pc, #196] @ (8018af4 ) 8018a2e: f011 ff35 bl 802a89c recv_left -= copylen; 8018a32: 8dfb ldrh r3, [r7, #46] @ 0x2e 8018a34: 6a7a ldr r2, [r7, #36] @ 0x24 8018a36: 1ad3 subs r3, r2, r3 8018a38: 627b str r3, [r7, #36] @ 0x24 /* Unless we peek the incoming message... */ if ((flags & MSG_PEEK) == 0) { 8018a3a: 683b ldr r3, [r7, #0] 8018a3c: f003 0301 and.w r3, r3, #1 8018a40: 2b00 cmp r3, #0 8018a42: d123 bne.n 8018a8c /* ... check if there is data left in the pbuf */ LWIP_ASSERT("invalid copylen", p->tot_len >= copylen); 8018a44: 697b ldr r3, [r7, #20] 8018a46: 891b ldrh r3, [r3, #8] 8018a48: 8dfa ldrh r2, [r7, #46] @ 0x2e 8018a4a: 429a cmp r2, r3 8018a4c: d906 bls.n 8018a5c 8018a4e: 4b27 ldr r3, [pc, #156] @ (8018aec ) 8018a50: f240 32e3 movw r2, #995 @ 0x3e3 8018a54: 492c ldr r1, [pc, #176] @ (8018b08 ) 8018a56: 4827 ldr r0, [pc, #156] @ (8018af4 ) 8018a58: f011 ff20 bl 802a89c if (p->tot_len - copylen > 0) { 8018a5c: 697b ldr r3, [r7, #20] 8018a5e: 891b ldrh r3, [r3, #8] 8018a60: 461a mov r2, r3 8018a62: 8dfb ldrh r3, [r7, #46] @ 0x2e 8018a64: 1ad3 subs r3, r2, r3 8018a66: 2b00 cmp r3, #0 8018a68: dd09 ble.n 8018a7e /* 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); 8018a6a: 697b ldr r3, [r7, #20] 8018a6c: 8dfa ldrh r2, [r7, #46] @ 0x2e 8018a6e: 4611 mov r1, r2 8018a70: 4618 mov r0, r3 8018a72: f002 fc68 bl 801b346 8018a76: 4602 mov r2, r0 8018a78: 68fb ldr r3, [r7, #12] 8018a7a: 605a str r2, [r3, #4] 8018a7c: e006 b.n 8018a8c LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: lastdata now pbuf=%p\n", (void *)sock->lastdata.pbuf)); } else { sock->lastdata.pbuf = NULL; 8018a7e: 68fb ldr r3, [r7, #12] 8018a80: 2200 movs r2, #0 8018a82: 605a str r2, [r3, #4] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recv_tcp: deleting pbuf=%p\n", (void *)p)); pbuf_free(p); 8018a84: 697b ldr r3, [r7, #20] 8018a86: 4618 mov r0, r3 8018a88: f002 fc90 bl 801b3ac } } /* once we have some data to return, only add more if we don't need to wait */ apiflags |= NETCONN_DONTBLOCK | NETCONN_NOFIN; 8018a8c: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8018a90: f043 0314 orr.w r3, r3, #20 8018a94: 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)); 8018a98: 6a7b ldr r3, [r7, #36] @ 0x24 8018a9a: 2b00 cmp r3, #0 8018a9c: dd08 ble.n 8018ab0 8018a9e: 683b ldr r3, [r7, #0] 8018aa0: f003 0301 and.w r3, r3, #1 8018aa4: 2b00 cmp r3, #0 8018aa6: f43f af58 beq.w 801895a lwip_recv_tcp_done: 8018aaa: e001 b.n 8018ab0 goto lwip_recv_tcp_done; 8018aac: bf00 nop 8018aae: e000 b.n 8018ab2 lwip_recv_tcp_done: 8018ab0: bf00 nop if ((recvd > 0) && !(flags & MSG_PEEK)) { 8018ab2: 6abb ldr r3, [r7, #40] @ 0x28 8018ab4: 2b00 cmp r3, #0 8018ab6: dd0b ble.n 8018ad0 8018ab8: 683b ldr r3, [r7, #0] 8018aba: f003 0301 and.w r3, r3, #1 8018abe: 2b00 cmp r3, #0 8018ac0: d106 bne.n 8018ad0 /* ensure window update after copying all data */ netconn_tcp_recvd(sock->conn, (size_t)recvd); 8018ac2: 68fb ldr r3, [r7, #12] 8018ac4: 681b ldr r3, [r3, #0] 8018ac6: 6aba ldr r2, [r7, #40] @ 0x28 8018ac8: 4611 mov r1, r2 8018aca: 4618 mov r0, r3 8018acc: f7fd fd42 bl 8016554 } sock_set_errno(sock, 0); 8018ad0: 2300 movs r3, #0 8018ad2: 61bb str r3, [r7, #24] 8018ad4: 69bb ldr r3, [r7, #24] 8018ad6: 2b00 cmp r3, #0 8018ad8: d002 beq.n 8018ae0 8018ada: 4a08 ldr r2, [pc, #32] @ (8018afc ) 8018adc: 69bb ldr r3, [r7, #24] 8018ade: 6013 str r3, [r2, #0] return recvd; 8018ae0: 6abb ldr r3, [r7, #40] @ 0x28 } 8018ae2: 4618 mov r0, r3 8018ae4: 3730 adds r7, #48 @ 0x30 8018ae6: 46bd mov sp, r7 8018ae8: bd80 pop {r7, pc} 8018aea: bf00 nop 8018aec: 0802e5fc .word 0x0802e5fc 8018af0: 0802e6f4 .word 0x0802e6f4 8018af4: 0802e650 .word 0x0802e650 8018af8: 0802e704 .word 0x0802e704 8018afc: 2402b270 .word 0x2402b270 8018b00: 0802e728 .word 0x0802e728 8018b04: 0802e734 .word 0x0802e734 8018b08: 0802e75c .word 0x0802e75c 08018b0c : /* 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) { 8018b0c: b590 push {r4, r7, lr} 8018b0e: b08b sub sp, #44 @ 0x2c 8018b10: af00 add r7, sp, #0 8018b12: 60f8 str r0, [r7, #12] 8018b14: 60b9 str r1, [r7, #8] 8018b16: 603b str r3, [r7, #0] 8018b18: 4613 mov r3, r2 8018b1a: 80fb strh r3, [r7, #6] int truncated = 0; 8018b1c: 2300 movs r3, #0 8018b1e: 627b str r3, [r7, #36] @ 0x24 union sockaddr_aligned saddr; LWIP_UNUSED_ARG(conn); LWIP_ASSERT("fromaddr != NULL", fromaddr != NULL); 8018b20: 68bb ldr r3, [r7, #8] 8018b22: 2b00 cmp r3, #0 8018b24: d106 bne.n 8018b34 8018b26: 4b2b ldr r3, [pc, #172] @ (8018bd4 ) 8018b28: f240 4207 movw r2, #1031 @ 0x407 8018b2c: 492a ldr r1, [pc, #168] @ (8018bd8 ) 8018b2e: 482b ldr r0, [pc, #172] @ (8018bdc ) 8018b30: f011 feb4 bl 802a89c LWIP_ASSERT("from != NULL", from != NULL); 8018b34: 683b ldr r3, [r7, #0] 8018b36: 2b00 cmp r3, #0 8018b38: d106 bne.n 8018b48 8018b3a: 4b26 ldr r3, [pc, #152] @ (8018bd4 ) 8018b3c: f44f 6281 mov.w r2, #1032 @ 0x408 8018b40: 4927 ldr r1, [pc, #156] @ (8018be0 ) 8018b42: 4826 ldr r0, [pc, #152] @ (8018bdc ) 8018b44: f011 feaa bl 802a89c LWIP_ASSERT("fromlen != NULL", fromlen != NULL); 8018b48: 6bbb ldr r3, [r7, #56] @ 0x38 8018b4a: 2b00 cmp r3, #0 8018b4c: d106 bne.n 8018b5c 8018b4e: 4b21 ldr r3, [pc, #132] @ (8018bd4 ) 8018b50: f240 4209 movw r2, #1033 @ 0x409 8018b54: 4923 ldr r1, [pc, #140] @ (8018be4 ) 8018b56: 4821 ldr r0, [pc, #132] @ (8018bdc ) 8018b58: f011 fea0 bl 802a89c 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); 8018b5c: f107 0314 add.w r3, r7, #20 8018b60: 2210 movs r2, #16 8018b62: 701a strb r2, [r3, #0] 8018b64: f107 0314 add.w r3, r7, #20 8018b68: 2202 movs r2, #2 8018b6a: 705a strb r2, [r3, #1] 8018b6c: f107 0414 add.w r4, r7, #20 8018b70: 88fb ldrh r3, [r7, #6] 8018b72: 4618 mov r0, r3 8018b74: f000 ff38 bl 80199e8 8018b78: 4603 mov r3, r0 8018b7a: 8063 strh r3, [r4, #2] 8018b7c: f107 0314 add.w r3, r7, #20 8018b80: 68ba ldr r2, [r7, #8] 8018b82: 6812 ldr r2, [r2, #0] 8018b84: 605a str r2, [r3, #4] 8018b86: f107 0314 add.w r3, r7, #20 8018b8a: 3308 adds r3, #8 8018b8c: 2208 movs r2, #8 8018b8e: 2100 movs r1, #0 8018b90: 4618 mov r0, r3 8018b92: f012 f815 bl 802abc0 if (*fromlen < saddr.sa.sa_len) { 8018b96: 6bbb ldr r3, [r7, #56] @ 0x38 8018b98: 681b ldr r3, [r3, #0] 8018b9a: 7d3a ldrb r2, [r7, #20] 8018b9c: 4293 cmp r3, r2 8018b9e: d202 bcs.n 8018ba6 truncated = 1; 8018ba0: 2301 movs r3, #1 8018ba2: 627b str r3, [r7, #36] @ 0x24 8018ba4: e008 b.n 8018bb8 } else if (*fromlen > saddr.sa.sa_len) { 8018ba6: 6bbb ldr r3, [r7, #56] @ 0x38 8018ba8: 681b ldr r3, [r3, #0] 8018baa: 7d3a ldrb r2, [r7, #20] 8018bac: 4293 cmp r3, r2 8018bae: d903 bls.n 8018bb8 *fromlen = saddr.sa.sa_len; 8018bb0: 7d3b ldrb r3, [r7, #20] 8018bb2: 461a mov r2, r3 8018bb4: 6bbb ldr r3, [r7, #56] @ 0x38 8018bb6: 601a str r2, [r3, #0] } MEMCPY(from, &saddr, *fromlen); 8018bb8: 6bbb ldr r3, [r7, #56] @ 0x38 8018bba: 681a ldr r2, [r3, #0] 8018bbc: f107 0314 add.w r3, r7, #20 8018bc0: 4619 mov r1, r3 8018bc2: 6838 ldr r0, [r7, #0] 8018bc4: f012 f8f3 bl 802adae return truncated; 8018bc8: 6a7b ldr r3, [r7, #36] @ 0x24 } 8018bca: 4618 mov r0, r3 8018bcc: 372c adds r7, #44 @ 0x2c 8018bce: 46bd mov sp, r7 8018bd0: bd90 pop {r4, r7, pc} 8018bd2: bf00 nop 8018bd4: 0802e5fc .word 0x0802e5fc 8018bd8: 0802e76c .word 0x0802e76c 8018bdc: 0802e650 .word 0x0802e650 8018be0: 0802e780 .word 0x0802e780 8018be4: 0802e790 .word 0x0802e790 08018be8 : #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) { 8018be8: b580 push {r7, lr} 8018bea: b088 sub sp, #32 8018bec: af02 add r7, sp, #8 8018bee: 60f8 str r0, [r7, #12] 8018bf0: 60b9 str r1, [r7, #8] 8018bf2: 607a str r2, [r7, #4] 8018bf4: 603b str r3, [r7, #0] if (sock == NULL) { 8018bf6: 68fb ldr r3, [r7, #12] 8018bf8: 2b00 cmp r3, #0 8018bfa: d101 bne.n 8018c00 return 0; 8018bfc: 2300 movs r3, #0 8018bfe: e021 b.n 8018c44 LWIP_UNUSED_ARG(dbg_fn); LWIP_UNUSED_ARG(dbg_s); LWIP_UNUSED_ARG(dbg_ret); #if !SOCKETS_DEBUG if (from && fromlen) 8018c00: 68bb ldr r3, [r7, #8] 8018c02: 2b00 cmp r3, #0 8018c04: d01d beq.n 8018c42 8018c06: 687b ldr r3, [r7, #4] 8018c08: 2b00 cmp r3, #0 8018c0a: d01a beq.n 8018c42 #endif /* !SOCKETS_DEBUG */ { /* get remote addr/port from tcp_pcb */ u16_t port; ip_addr_t tmpaddr; netconn_getaddr(sock->conn, &tmpaddr, &port, 0); 8018c0c: 68fb ldr r3, [r7, #12] 8018c0e: 6818 ldr r0, [r3, #0] 8018c10: f107 0216 add.w r2, r7, #22 8018c14: f107 0110 add.w r1, r7, #16 8018c18: 2300 movs r3, #0 8018c1a: f7fd fad7 bl 80161cc 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) { 8018c1e: 68bb ldr r3, [r7, #8] 8018c20: 2b00 cmp r3, #0 8018c22: d00e beq.n 8018c42 8018c24: 687b ldr r3, [r7, #4] 8018c26: 2b00 cmp r3, #0 8018c28: d00b beq.n 8018c42 return lwip_sock_make_addr(sock->conn, &tmpaddr, port, from, fromlen); 8018c2a: 68fb ldr r3, [r7, #12] 8018c2c: 6818 ldr r0, [r3, #0] 8018c2e: 8afa ldrh r2, [r7, #22] 8018c30: f107 0110 add.w r1, r7, #16 8018c34: 687b ldr r3, [r7, #4] 8018c36: 9300 str r3, [sp, #0] 8018c38: 68bb ldr r3, [r7, #8] 8018c3a: f7ff ff67 bl 8018b0c 8018c3e: 4603 mov r3, r0 8018c40: e000 b.n 8018c44 } } return 0; 8018c42: 2300 movs r3, #0 } 8018c44: 4618 mov r0, r3 8018c46: 3718 adds r7, #24 8018c48: 46bd mov sp, r7 8018c4a: bd80 pop {r7, pc} 08018c4c : /* 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) { 8018c4c: b590 push {r4, r7, lr} 8018c4e: b08d sub sp, #52 @ 0x34 8018c50: af02 add r7, sp, #8 8018c52: 60f8 str r0, [r7, #12] 8018c54: 60b9 str r1, [r7, #8] 8018c56: 607a str r2, [r7, #4] 8018c58: 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;); 8018c5a: 687b ldr r3, [r7, #4] 8018c5c: 689b ldr r3, [r3, #8] 8018c5e: 2b00 cmp r3, #0 8018c60: d10d bne.n 8018c7e 8018c62: 687b ldr r3, [r7, #4] 8018c64: 68db ldr r3, [r3, #12] 8018c66: 2b00 cmp r3, #0 8018c68: dd09 ble.n 8018c7e 8018c6a: 4b5e ldr r3, [pc, #376] @ (8018de4 ) 8018c6c: f240 4249 movw r2, #1097 @ 0x449 8018c70: 495d ldr r1, [pc, #372] @ (8018de8 ) 8018c72: 485e ldr r0, [pc, #376] @ (8018dec ) 8018c74: f011 fe12 bl 802a89c 8018c78: f06f 030f mvn.w r3, #15 8018c7c: e0ae b.n 8018ddc if (flags & MSG_DONTWAIT) { 8018c7e: 68bb ldr r3, [r7, #8] 8018c80: f003 0308 and.w r3, r3, #8 8018c84: 2b00 cmp r3, #0 8018c86: d003 beq.n 8018c90 apiflags = NETCONN_DONTBLOCK; 8018c88: 2304 movs r3, #4 8018c8a: f887 3026 strb.w r3, [r7, #38] @ 0x26 8018c8e: e002 b.n 8018c96 } else { apiflags = 0; 8018c90: 2300 movs r3, #0 8018c92: 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; 8018c96: 68fb ldr r3, [r7, #12] 8018c98: 685b ldr r3, [r3, #4] 8018c9a: 613b str r3, [r7, #16] if (buf == NULL) { 8018c9c: 693b ldr r3, [r7, #16] 8018c9e: 2b00 cmp r3, #0 8018ca0: d11f bne.n 8018ce2 /* 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); 8018ca2: 68fb ldr r3, [r7, #12] 8018ca4: 681b ldr r3, [r3, #0] 8018ca6: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 8018caa: f107 0110 add.w r1, r7, #16 8018cae: 4618 mov r0, r3 8018cb0: f7fd fd34 bl 801671c 8018cb4: 4603 mov r3, r0 8018cb6: 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) { 8018cba: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8018cbe: 2b00 cmp r3, #0 8018cc0: d002 beq.n 8018cc8 return err; 8018cc2: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8018cc6: e089 b.n 8018ddc } LWIP_ASSERT("buf != NULL", buf != NULL); 8018cc8: 693b ldr r3, [r7, #16] 8018cca: 2b00 cmp r3, #0 8018ccc: d106 bne.n 8018cdc 8018cce: 4b45 ldr r3, [pc, #276] @ (8018de4 ) 8018cd0: f240 425e movw r2, #1118 @ 0x45e 8018cd4: 4946 ldr r1, [pc, #280] @ (8018df0 ) 8018cd6: 4845 ldr r0, [pc, #276] @ (8018dec ) 8018cd8: f011 fde0 bl 802a89c sock->lastdata.netbuf = buf; 8018cdc: 693a ldr r2, [r7, #16] 8018cde: 68fb ldr r3, [r7, #12] 8018ce0: 605a str r2, [r3, #4] } buflen = buf->p->tot_len; 8018ce2: 693b ldr r3, [r7, #16] 8018ce4: 681b ldr r3, [r3, #0] 8018ce6: 891b ldrh r3, [r3, #8] 8018ce8: 837b strh r3, [r7, #26] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom_udp_raw: buflen=%"U16_F"\n", buflen)); copied = 0; 8018cea: 2300 movs r3, #0 8018cec: 847b strh r3, [r7, #34] @ 0x22 /* copy the pbuf payload into the iovs */ for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 8018cee: 2300 movs r3, #0 8018cf0: 61fb str r3, [r7, #28] 8018cf2: e029 b.n 8018d48 u16_t len_left = (u16_t)(buflen - copied); 8018cf4: 8b7a ldrh r2, [r7, #26] 8018cf6: 8c7b ldrh r3, [r7, #34] @ 0x22 8018cf8: 1ad3 subs r3, r2, r3 8018cfa: 833b strh r3, [r7, #24] if (msg->msg_iov[i].iov_len > len_left) { 8018cfc: 687b ldr r3, [r7, #4] 8018cfe: 689a ldr r2, [r3, #8] 8018d00: 69fb ldr r3, [r7, #28] 8018d02: 00db lsls r3, r3, #3 8018d04: 4413 add r3, r2 8018d06: 685a ldr r2, [r3, #4] 8018d08: 8b3b ldrh r3, [r7, #24] 8018d0a: 429a cmp r2, r3 8018d0c: d902 bls.n 8018d14 copylen = len_left; 8018d0e: 8b3b ldrh r3, [r7, #24] 8018d10: 84bb strh r3, [r7, #36] @ 0x24 8018d12: e006 b.n 8018d22 } else { copylen = (u16_t)msg->msg_iov[i].iov_len; 8018d14: 687b ldr r3, [r7, #4] 8018d16: 689a ldr r2, [r3, #8] 8018d18: 69fb ldr r3, [r7, #28] 8018d1a: 00db lsls r3, r3, #3 8018d1c: 4413 add r3, r2 8018d1e: 685b ldr r3, [r3, #4] 8018d20: 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); 8018d22: 693b ldr r3, [r7, #16] 8018d24: 6818 ldr r0, [r3, #0] 8018d26: 687b ldr r3, [r7, #4] 8018d28: 689a ldr r2, [r3, #8] 8018d2a: 69fb ldr r3, [r7, #28] 8018d2c: 00db lsls r3, r3, #3 8018d2e: 4413 add r3, r2 8018d30: 6819 ldr r1, [r3, #0] 8018d32: 8c7b ldrh r3, [r7, #34] @ 0x22 8018d34: 8cba ldrh r2, [r7, #36] @ 0x24 8018d36: f002 fd3f bl 801b7b8 copied = (u16_t)(copied + copylen); 8018d3a: 8c7a ldrh r2, [r7, #34] @ 0x22 8018d3c: 8cbb ldrh r3, [r7, #36] @ 0x24 8018d3e: 4413 add r3, r2 8018d40: 847b strh r3, [r7, #34] @ 0x22 for (i = 0; (i < msg->msg_iovlen) && (copied < buflen); i++) { 8018d42: 69fb ldr r3, [r7, #28] 8018d44: 3301 adds r3, #1 8018d46: 61fb str r3, [r7, #28] 8018d48: 687b ldr r3, [r7, #4] 8018d4a: 68db ldr r3, [r3, #12] 8018d4c: 69fa ldr r2, [r7, #28] 8018d4e: 429a cmp r2, r3 8018d50: da03 bge.n 8018d5a 8018d52: 8c7a ldrh r2, [r7, #34] @ 0x22 8018d54: 8b7b ldrh r3, [r7, #26] 8018d56: 429a cmp r2, r3 8018d58: d3cc bcc.n 8018cf4 } /* Check to see from where the data was.*/ #if !SOCKETS_DEBUG if (msg->msg_name && msg->msg_namelen) 8018d5a: 687b ldr r3, [r7, #4] 8018d5c: 681b ldr r3, [r3, #0] 8018d5e: 2b00 cmp r3, #0 8018d60: d01a beq.n 8018d98 8018d62: 687b ldr r3, [r7, #4] 8018d64: 685b ldr r3, [r3, #4] 8018d66: 2b00 cmp r3, #0 8018d68: d016 beq.n 8018d98 #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) { 8018d6a: 687b ldr r3, [r7, #4] 8018d6c: 681b ldr r3, [r3, #0] 8018d6e: 2b00 cmp r3, #0 8018d70: d012 beq.n 8018d98 8018d72: 687b ldr r3, [r7, #4] 8018d74: 685b ldr r3, [r3, #4] 8018d76: 2b00 cmp r3, #0 8018d78: d00e beq.n 8018d98 lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), 8018d7a: 68fb ldr r3, [r7, #12] 8018d7c: 6818 ldr r0, [r3, #0] 8018d7e: 693b ldr r3, [r7, #16] 8018d80: f103 0108 add.w r1, r3, #8 8018d84: 693b ldr r3, [r7, #16] 8018d86: 899a ldrh r2, [r3, #12] (struct sockaddr *)msg->msg_name, &msg->msg_namelen); 8018d88: 687b ldr r3, [r7, #4] 8018d8a: 681c ldr r4, [r3, #0] lwip_sock_make_addr(sock->conn, netbuf_fromaddr(buf), netbuf_fromport(buf), 8018d8c: 687b ldr r3, [r7, #4] 8018d8e: 3304 adds r3, #4 8018d90: 9300 str r3, [sp, #0] 8018d92: 4623 mov r3, r4 8018d94: f7ff feba bl 8018b0c } } /* Initialize flag output */ msg->msg_flags = 0; 8018d98: 687b ldr r3, [r7, #4] 8018d9a: 2200 movs r2, #0 8018d9c: 619a str r2, [r3, #24] if (msg->msg_control) { 8018d9e: 687b ldr r3, [r7, #4] 8018da0: 691b ldr r3, [r3, #16] 8018da2: 2b00 cmp r3, #0 8018da4: d007 beq.n 8018db6 u8_t wrote_msg = 0; 8018da6: 2300 movs r3, #0 8018da8: 75fb strb r3, [r7, #23] #endif /* LWIP_IPV4 */ } } #endif /* LWIP_NETBUF_RECVINFO */ if (!wrote_msg) { 8018daa: 7dfb ldrb r3, [r7, #23] 8018dac: 2b00 cmp r3, #0 8018dae: d102 bne.n 8018db6 msg->msg_controllen = 0; 8018db0: 687b ldr r3, [r7, #4] 8018db2: 2200 movs r2, #0 8018db4: 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) { 8018db6: 68bb ldr r3, [r7, #8] 8018db8: f003 0301 and.w r3, r3, #1 8018dbc: 2b00 cmp r3, #0 8018dbe: d106 bne.n 8018dce sock->lastdata.netbuf = NULL; 8018dc0: 68fb ldr r3, [r7, #12] 8018dc2: 2200 movs r2, #0 8018dc4: 605a str r2, [r3, #4] netbuf_delete(buf); 8018dc6: 693b ldr r3, [r7, #16] 8018dc8: 4618 mov r0, r3 8018dca: f7ff fb05 bl 80183d8 } if (datagram_len) { 8018dce: 683b ldr r3, [r7, #0] 8018dd0: 2b00 cmp r3, #0 8018dd2: d002 beq.n 8018dda *datagram_len = buflen; 8018dd4: 683b ldr r3, [r7, #0] 8018dd6: 8b7a ldrh r2, [r7, #26] 8018dd8: 801a strh r2, [r3, #0] } return ERR_OK; 8018dda: 2300 movs r3, #0 } 8018ddc: 4618 mov r0, r3 8018dde: 372c adds r7, #44 @ 0x2c 8018de0: 46bd mov sp, r7 8018de2: bd90 pop {r4, r7, pc} 8018de4: 0802e5fc .word 0x0802e5fc 8018de8: 0802e7a0 .word 0x0802e7a0 8018dec: 0802e650 .word 0x0802e650 8018df0: 0802e7cc .word 0x0802e7cc 08018df4 : ssize_t lwip_recvfrom(int s, void *mem, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { 8018df4: b580 push {r7, lr} 8018df6: b096 sub sp, #88 @ 0x58 8018df8: af02 add r7, sp, #8 8018dfa: 60f8 str r0, [r7, #12] 8018dfc: 60b9 str r1, [r7, #8] 8018dfe: 607a str r2, [r7, #4] 8018e00: 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); 8018e02: 68f8 ldr r0, [r7, #12] 8018e04: f7ff fbb8 bl 8018578 8018e08: 64f8 str r0, [r7, #76] @ 0x4c if (!sock) { 8018e0a: 6cfb ldr r3, [r7, #76] @ 0x4c 8018e0c: 2b00 cmp r3, #0 8018e0e: d102 bne.n 8018e16 return -1; 8018e10: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018e14: e078 b.n 8018f08 } #if LWIP_TCP if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 8018e16: 6cfb ldr r3, [r7, #76] @ 0x4c 8018e18: 681b ldr r3, [r3, #0] 8018e1a: 781b ldrb r3, [r3, #0] 8018e1c: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018e20: 2b10 cmp r3, #16 8018e22: d112 bne.n 8018e4a ret = lwip_recv_tcp(sock, mem, len, flags); 8018e24: 683b ldr r3, [r7, #0] 8018e26: 687a ldr r2, [r7, #4] 8018e28: 68b9 ldr r1, [r7, #8] 8018e2a: 6cf8 ldr r0, [r7, #76] @ 0x4c 8018e2c: f7ff fd5e bl 80188ec 8018e30: 6478 str r0, [r7, #68] @ 0x44 lwip_recv_tcp_from(sock, from, fromlen, "lwip_recvfrom", s, ret); 8018e32: 6c7b ldr r3, [r7, #68] @ 0x44 8018e34: 9301 str r3, [sp, #4] 8018e36: 68fb ldr r3, [r7, #12] 8018e38: 9300 str r3, [sp, #0] 8018e3a: 4b35 ldr r3, [pc, #212] @ (8018f10 ) 8018e3c: 6dfa ldr r2, [r7, #92] @ 0x5c 8018e3e: 6db9 ldr r1, [r7, #88] @ 0x58 8018e40: 6cf8 ldr r0, [r7, #76] @ 0x4c 8018e42: f7ff fed1 bl 8018be8 done_socket(sock); return ret; 8018e46: 6c7b ldr r3, [r7, #68] @ 0x44 8018e48: e05e b.n 8018f08 } else #endif { u16_t datagram_len = 0; 8018e4a: 2300 movs r3, #0 8018e4c: 877b strh r3, [r7, #58] @ 0x3a struct iovec vec; struct msghdr msg; err_t err; vec.iov_base = mem; 8018e4e: 68bb ldr r3, [r7, #8] 8018e50: 633b str r3, [r7, #48] @ 0x30 vec.iov_len = len; 8018e52: 687b ldr r3, [r7, #4] 8018e54: 637b str r3, [r7, #52] @ 0x34 msg.msg_control = NULL; 8018e56: 2300 movs r3, #0 8018e58: 627b str r3, [r7, #36] @ 0x24 msg.msg_controllen = 0; 8018e5a: 2300 movs r3, #0 8018e5c: 62bb str r3, [r7, #40] @ 0x28 msg.msg_flags = 0; 8018e5e: 2300 movs r3, #0 8018e60: 62fb str r3, [r7, #44] @ 0x2c msg.msg_iov = &vec; 8018e62: f107 0330 add.w r3, r7, #48 @ 0x30 8018e66: 61fb str r3, [r7, #28] msg.msg_iovlen = 1; 8018e68: 2301 movs r3, #1 8018e6a: 623b str r3, [r7, #32] msg.msg_name = from; 8018e6c: 6dbb ldr r3, [r7, #88] @ 0x58 8018e6e: 617b str r3, [r7, #20] msg.msg_namelen = (fromlen ? *fromlen : 0); 8018e70: 6dfb ldr r3, [r7, #92] @ 0x5c 8018e72: 2b00 cmp r3, #0 8018e74: d002 beq.n 8018e7c 8018e76: 6dfb ldr r3, [r7, #92] @ 0x5c 8018e78: 681b ldr r3, [r3, #0] 8018e7a: e000 b.n 8018e7e 8018e7c: 2300 movs r3, #0 8018e7e: 61bb str r3, [r7, #24] err = lwip_recvfrom_udp_raw(sock, flags, &msg, &datagram_len, s); 8018e80: f107 013a add.w r1, r7, #58 @ 0x3a 8018e84: f107 0214 add.w r2, r7, #20 8018e88: 68fb ldr r3, [r7, #12] 8018e8a: 9300 str r3, [sp, #0] 8018e8c: 460b mov r3, r1 8018e8e: 6839 ldr r1, [r7, #0] 8018e90: 6cf8 ldr r0, [r7, #76] @ 0x4c 8018e92: f7ff fedb bl 8018c4c 8018e96: 4603 mov r3, r0 8018e98: f887 304b strb.w r3, [r7, #75] @ 0x4b if (err != ERR_OK) { 8018e9c: f997 304b ldrsb.w r3, [r7, #75] @ 0x4b 8018ea0: 2b00 cmp r3, #0 8018ea2: d00e beq.n 8018ec2 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)); 8018ea4: f997 304b ldrsb.w r3, [r7, #75] @ 0x4b 8018ea8: 4618 mov r0, r3 8018eaa: f7ff fa77 bl 801839c 8018eae: 63f8 str r0, [r7, #60] @ 0x3c 8018eb0: 6bfb ldr r3, [r7, #60] @ 0x3c 8018eb2: 2b00 cmp r3, #0 8018eb4: d002 beq.n 8018ebc 8018eb6: 4a17 ldr r2, [pc, #92] @ (8018f14 ) 8018eb8: 6bfb ldr r3, [r7, #60] @ 0x3c 8018eba: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8018ebc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018ec0: e022 b.n 8018f08 } ret = (ssize_t)LWIP_MIN(LWIP_MIN(len, datagram_len), SSIZE_MAX); 8018ec2: 8f7b ldrh r3, [r7, #58] @ 0x3a 8018ec4: 461a mov r2, r3 8018ec6: 687b ldr r3, [r7, #4] 8018ec8: 4293 cmp r3, r2 8018eca: bf28 it cs 8018ecc: 4613 movcs r3, r2 8018ece: f06f 4200 mvn.w r2, #2147483648 @ 0x80000000 8018ed2: 4293 cmp r3, r2 8018ed4: d206 bcs.n 8018ee4 8018ed6: 8f7b ldrh r3, [r7, #58] @ 0x3a 8018ed8: 461a mov r2, r3 8018eda: 687b ldr r3, [r7, #4] 8018edc: 4293 cmp r3, r2 8018ede: bf28 it cs 8018ee0: 4613 movcs r3, r2 8018ee2: e001 b.n 8018ee8 8018ee4: f06f 4300 mvn.w r3, #2147483648 @ 0x80000000 8018ee8: 647b str r3, [r7, #68] @ 0x44 if (fromlen) { 8018eea: 6dfb ldr r3, [r7, #92] @ 0x5c 8018eec: 2b00 cmp r3, #0 8018eee: d002 beq.n 8018ef6 *fromlen = msg.msg_namelen; 8018ef0: 69ba ldr r2, [r7, #24] 8018ef2: 6dfb ldr r3, [r7, #92] @ 0x5c 8018ef4: 601a str r2, [r3, #0] } } sock_set_errno(sock, 0); 8018ef6: 2300 movs r3, #0 8018ef8: 643b str r3, [r7, #64] @ 0x40 8018efa: 6c3b ldr r3, [r7, #64] @ 0x40 8018efc: 2b00 cmp r3, #0 8018efe: d002 beq.n 8018f06 8018f00: 4a04 ldr r2, [pc, #16] @ (8018f14 ) 8018f02: 6c3b ldr r3, [r7, #64] @ 0x40 8018f04: 6013 str r3, [r2, #0] done_socket(sock); return ret; 8018f06: 6c7b ldr r3, [r7, #68] @ 0x44 } 8018f08: 4618 mov r0, r3 8018f0a: 3750 adds r7, #80 @ 0x50 8018f0c: 46bd mov sp, r7 8018f0e: bd80 pop {r7, pc} 8018f10: 0802e7d8 .word 0x0802e7d8 8018f14: 2402b270 .word 0x2402b270 08018f18 : return lwip_recvmsg(s, &msg, 0); } ssize_t lwip_recv(int s, void *mem, size_t len, int flags) { 8018f18: b580 push {r7, lr} 8018f1a: b086 sub sp, #24 8018f1c: af02 add r7, sp, #8 8018f1e: 60f8 str r0, [r7, #12] 8018f20: 60b9 str r1, [r7, #8] 8018f22: 607a str r2, [r7, #4] 8018f24: 603b str r3, [r7, #0] return lwip_recvfrom(s, mem, len, flags, NULL, NULL); 8018f26: 2300 movs r3, #0 8018f28: 9301 str r3, [sp, #4] 8018f2a: 2300 movs r3, #0 8018f2c: 9300 str r3, [sp, #0] 8018f2e: 683b ldr r3, [r7, #0] 8018f30: 687a ldr r2, [r7, #4] 8018f32: 68b9 ldr r1, [r7, #8] 8018f34: 68f8 ldr r0, [r7, #12] 8018f36: f7ff ff5d bl 8018df4 8018f3a: 4603 mov r3, r0 } 8018f3c: 4618 mov r0, r3 8018f3e: 3710 adds r7, #16 8018f40: 46bd mov sp, r7 8018f42: bd80 pop {r7, pc} 08018f44 : #endif /* LWIP_UDP || LWIP_RAW */ } ssize_t lwip_send(int s, const void *data, size_t size, int flags) { 8018f44: b580 push {r7, lr} 8018f46: b08a sub sp, #40 @ 0x28 8018f48: af02 add r7, sp, #8 8018f4a: 60f8 str r0, [r7, #12] 8018f4c: 60b9 str r1, [r7, #8] 8018f4e: 607a str r2, [r7, #4] 8018f50: 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); 8018f52: 68f8 ldr r0, [r7, #12] 8018f54: f7ff fb10 bl 8018578 8018f58: 61f8 str r0, [r7, #28] if (!sock) { 8018f5a: 69fb ldr r3, [r7, #28] 8018f5c: 2b00 cmp r3, #0 8018f5e: d102 bne.n 8018f66 return -1; 8018f60: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8018f64: e046 b.n 8018ff4 } if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_TCP) { 8018f66: 69fb ldr r3, [r7, #28] 8018f68: 681b ldr r3, [r3, #0] 8018f6a: 781b ldrb r3, [r3, #0] 8018f6c: f003 03f0 and.w r3, r3, #240 @ 0xf0 8018f70: 2b10 cmp r3, #16 8018f72: d00b beq.n 8018f8c #if (LWIP_UDP || LWIP_RAW) done_socket(sock); return lwip_sendto(s, data, size, flags, NULL, 0); 8018f74: 2300 movs r3, #0 8018f76: 9301 str r3, [sp, #4] 8018f78: 2300 movs r3, #0 8018f7a: 9300 str r3, [sp, #0] 8018f7c: 683b ldr r3, [r7, #0] 8018f7e: 687a ldr r2, [r7, #4] 8018f80: 68b9 ldr r1, [r7, #8] 8018f82: 68f8 ldr r0, [r7, #12] 8018f84: f000 f83c bl 8019000 8018f88: 4603 mov r3, r0 8018f8a: e033 b.n 8018ff4 return -1; #endif /* (LWIP_UDP || LWIP_RAW) */ } write_flags = (u8_t)(NETCONN_COPY | ((flags & MSG_MORE) ? NETCONN_MORE : 0) | 8018f8c: 683b ldr r3, [r7, #0] 8018f8e: f003 0310 and.w r3, r3, #16 write_flags = (u8_t)(NETCONN_COPY | 8018f92: 2b00 cmp r3, #0 8018f94: d001 beq.n 8018f9a 8018f96: 2203 movs r2, #3 8018f98: e000 b.n 8018f9c 8018f9a: 2201 movs r2, #1 ((flags & MSG_MORE) ? NETCONN_MORE : 0) | 8018f9c: 683b ldr r3, [r7, #0] 8018f9e: 105b asrs r3, r3, #1 8018fa0: b25b sxtb r3, r3 8018fa2: f003 0304 and.w r3, r3, #4 8018fa6: b25b sxtb r3, r3 8018fa8: 4313 orrs r3, r2 8018faa: b25b sxtb r3, r3 write_flags = (u8_t)(NETCONN_COPY | 8018fac: 76fb strb r3, [r7, #27] ((flags & MSG_DONTWAIT) ? NETCONN_DONTBLOCK : 0)); written = 0; 8018fae: 2300 movs r3, #0 8018fb0: 613b str r3, [r7, #16] err = netconn_write_partly(sock->conn, data, size, write_flags, &written); 8018fb2: 69fb ldr r3, [r7, #28] 8018fb4: 6818 ldr r0, [r3, #0] 8018fb6: 7efa ldrb r2, [r7, #27] 8018fb8: f107 0310 add.w r3, r7, #16 8018fbc: 9300 str r3, [sp, #0] 8018fbe: 4613 mov r3, r2 8018fc0: 687a ldr r2, [r7, #4] 8018fc2: 68b9 ldr r1, [r7, #8] 8018fc4: f7fd fc04 bl 80167d0 8018fc8: 4603 mov r3, r0 8018fca: 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)); 8018fcc: f997 301a ldrsb.w r3, [r7, #26] 8018fd0: 4618 mov r0, r3 8018fd2: f7ff f9e3 bl 801839c 8018fd6: 6178 str r0, [r7, #20] 8018fd8: 697b ldr r3, [r7, #20] 8018fda: 2b00 cmp r3, #0 8018fdc: d002 beq.n 8018fe4 8018fde: 4a07 ldr r2, [pc, #28] @ (8018ffc ) 8018fe0: 697b ldr r3, [r7, #20] 8018fe2: 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); 8018fe4: f997 301a ldrsb.w r3, [r7, #26] 8018fe8: 2b00 cmp r3, #0 8018fea: d101 bne.n 8018ff0 8018fec: 693b ldr r3, [r7, #16] 8018fee: e001 b.n 8018ff4 8018ff0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8018ff4: 4618 mov r0, r3 8018ff6: 3720 adds r7, #32 8018ff8: 46bd mov sp, r7 8018ffa: bd80 pop {r7, pc} 8018ffc: 2402b270 .word 0x2402b270 08019000 : } ssize_t lwip_sendto(int s, const void *data, size_t size, int flags, const struct sockaddr *to, socklen_t tolen) { 8019000: b580 push {r7, lr} 8019002: b08e sub sp, #56 @ 0x38 8019004: af00 add r7, sp, #0 8019006: 60f8 str r0, [r7, #12] 8019008: 60b9 str r1, [r7, #8] 801900a: 607a str r2, [r7, #4] 801900c: 603b str r3, [r7, #0] err_t err; u16_t short_size; u16_t remote_port; struct netbuf buf; sock = get_socket(s); 801900e: 68f8 ldr r0, [r7, #12] 8019010: f7ff fab2 bl 8018578 8019014: 6338 str r0, [r7, #48] @ 0x30 if (!sock) { 8019016: 6b3b ldr r3, [r7, #48] @ 0x30 8019018: 2b00 cmp r3, #0 801901a: d102 bne.n 8019022 return -1; 801901c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8019020: e093 b.n 801914a } if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 8019022: 6b3b ldr r3, [r7, #48] @ 0x30 8019024: 681b ldr r3, [r3, #0] 8019026: 781b ldrb r3, [r3, #0] 8019028: f003 03f0 and.w r3, r3, #240 @ 0xf0 801902c: 2b10 cmp r3, #16 801902e: d107 bne.n 8019040 #if LWIP_TCP done_socket(sock); return lwip_send(s, data, size, flags); 8019030: 683b ldr r3, [r7, #0] 8019032: 687a ldr r2, [r7, #4] 8019034: 68b9 ldr r1, [r7, #8] 8019036: 68f8 ldr r0, [r7, #12] 8019038: f7ff ff84 bl 8018f44 801903c: 4603 mov r3, r0 801903e: e084 b.n 801914a done_socket(sock); return -1; #endif /* LWIP_TCP */ } if (size > LWIP_MIN(0xFFFF, SSIZE_MAX)) { 8019040: 687b ldr r3, [r7, #4] 8019042: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8019046: d30a bcc.n 801905e /* cannot fit into one datagram (at least for us) */ sock_set_errno(sock, EMSGSIZE); 8019048: 235a movs r3, #90 @ 0x5a 801904a: 623b str r3, [r7, #32] 801904c: 6a3b ldr r3, [r7, #32] 801904e: 2b00 cmp r3, #0 8019050: d002 beq.n 8019058 8019052: 4a40 ldr r2, [pc, #256] @ (8019154 ) 8019054: 6a3b ldr r3, [r7, #32] 8019056: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8019058: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801905c: e075 b.n 801914a } short_size = (u16_t)size; 801905e: 687b ldr r3, [r7, #4] 8019060: 85fb strh r3, [r7, #46] @ 0x2e LWIP_ERROR("lwip_sendto: invalid address", (((to == NULL) && (tolen == 0)) || 8019062: 6c3b ldr r3, [r7, #64] @ 0x40 8019064: 2b00 cmp r3, #0 8019066: d102 bne.n 801906e 8019068: 6c7b ldr r3, [r7, #68] @ 0x44 801906a: 2b00 cmp r3, #0 801906c: d023 beq.n 80190b6 801906e: 6c7b ldr r3, [r7, #68] @ 0x44 8019070: 2b10 cmp r3, #16 8019072: d10b bne.n 801908c 8019074: 6c3b ldr r3, [r7, #64] @ 0x40 8019076: 2b00 cmp r3, #0 8019078: d008 beq.n 801908c 801907a: 6c3b ldr r3, [r7, #64] @ 0x40 801907c: 785b ldrb r3, [r3, #1] 801907e: 2b02 cmp r3, #2 8019080: d104 bne.n 801908c 8019082: 6c3b ldr r3, [r7, #64] @ 0x40 8019084: f003 0303 and.w r3, r3, #3 8019088: 2b00 cmp r3, #0 801908a: d014 beq.n 80190b6 801908c: 4b32 ldr r3, [pc, #200] @ (8019158 ) 801908e: f240 6252 movw r2, #1618 @ 0x652 8019092: 4932 ldr r1, [pc, #200] @ (801915c ) 8019094: 4832 ldr r0, [pc, #200] @ (8019160 ) 8019096: f011 fc01 bl 802a89c 801909a: f06f 000f mvn.w r0, #15 801909e: f7ff f97d bl 801839c 80190a2: 62b8 str r0, [r7, #40] @ 0x28 80190a4: 6abb ldr r3, [r7, #40] @ 0x28 80190a6: 2b00 cmp r3, #0 80190a8: d002 beq.n 80190b0 80190aa: 4a2a ldr r2, [pc, #168] @ (8019154 ) 80190ac: 6abb ldr r3, [r7, #40] @ 0x28 80190ae: 6013 str r3, [r2, #0] 80190b0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80190b4: e049 b.n 801914a ((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; 80190b6: 2300 movs r3, #0 80190b8: 617b str r3, [r7, #20] 80190ba: 697b ldr r3, [r7, #20] 80190bc: 613b str r3, [r7, #16] #if LWIP_CHECKSUM_ON_COPY buf.flags = 0; #endif /* LWIP_CHECKSUM_ON_COPY */ if (to) { 80190be: 6c3b ldr r3, [r7, #64] @ 0x40 80190c0: 2b00 cmp r3, #0 80190c2: d00a beq.n 80190da SOCKADDR_TO_IPADDR_PORT(to, &buf.addr, remote_port); 80190c4: 6c3b ldr r3, [r7, #64] @ 0x40 80190c6: 685b ldr r3, [r3, #4] 80190c8: 61bb str r3, [r7, #24] 80190ca: 6c3b ldr r3, [r7, #64] @ 0x40 80190cc: 885b ldrh r3, [r3, #2] 80190ce: 4618 mov r0, r3 80190d0: f000 fc8a bl 80199e8 80190d4: 4603 mov r3, r0 80190d6: 86fb strh r3, [r7, #54] @ 0x36 80190d8: e003 b.n 80190e2 } else { remote_port = 0; 80190da: 2300 movs r3, #0 80190dc: 86fb strh r3, [r7, #54] @ 0x36 ip_addr_set_any(NETCONNTYPE_ISIPV6(netconn_type(sock->conn)), &buf.addr); 80190de: 2300 movs r3, #0 80190e0: 61bb str r3, [r7, #24] } netbuf_fromport(&buf) = remote_port; 80190e2: 8efb ldrh r3, [r7, #54] @ 0x36 80190e4: 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); 80190e6: 8dfa ldrh r2, [r7, #46] @ 0x2e 80190e8: f107 0310 add.w r3, r7, #16 80190ec: 68b9 ldr r1, [r7, #8] 80190ee: 4618 mov r0, r3 80190f0: f7ff f9ba bl 8018468 80190f4: 4603 mov r3, r0 80190f6: f887 302d strb.w r3, [r7, #45] @ 0x2d #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ if (err == ERR_OK) { 80190fa: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 80190fe: 2b00 cmp r3, #0 8019100: d10a bne.n 8019118 IP_SET_TYPE_VAL(buf.addr, IPADDR_TYPE_V4); } #endif /* LWIP_IPV4 && LWIP_IPV6 */ /* send the data */ err = netconn_send(sock->conn, &buf); 8019102: 6b3b ldr r3, [r7, #48] @ 0x30 8019104: 681b ldr r3, [r3, #0] 8019106: f107 0210 add.w r2, r7, #16 801910a: 4611 mov r1, r2 801910c: 4618 mov r0, r3 801910e: f7fd fb31 bl 8016774 8019112: 4603 mov r3, r0 8019114: f887 302d strb.w r3, [r7, #45] @ 0x2d } /* deallocated the buffer */ netbuf_free(&buf); 8019118: f107 0310 add.w r3, r7, #16 801911c: 4618 mov r0, r3 801911e: f7ff f97b bl 8018418 sock_set_errno(sock, err_to_errno(err)); 8019122: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 8019126: 4618 mov r0, r3 8019128: f7ff f938 bl 801839c 801912c: 6278 str r0, [r7, #36] @ 0x24 801912e: 6a7b ldr r3, [r7, #36] @ 0x24 8019130: 2b00 cmp r3, #0 8019132: d002 beq.n 801913a 8019134: 4a07 ldr r2, [pc, #28] @ (8019154 ) 8019136: 6a7b ldr r3, [r7, #36] @ 0x24 8019138: 6013 str r3, [r2, #0] done_socket(sock); return (err == ERR_OK ? short_size : -1); 801913a: f997 302d ldrsb.w r3, [r7, #45] @ 0x2d 801913e: 2b00 cmp r3, #0 8019140: d101 bne.n 8019146 8019142: 8dfb ldrh r3, [r7, #46] @ 0x2e 8019144: e001 b.n 801914a 8019146: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 801914a: 4618 mov r0, r3 801914c: 3738 adds r7, #56 @ 0x38 801914e: 46bd mov sp, r7 8019150: bd80 pop {r7, pc} 8019152: bf00 nop 8019154: 2402b270 .word 0x2402b270 8019158: 0802e5fc .word 0x0802e5fc 801915c: 0802e8dc .word 0x0802e8dc 8019160: 0802e650 .word 0x0802e650 08019164 : int lwip_socket(int domain, int type, int protocol) { 8019164: b580 push {r7, lr} 8019166: b086 sub sp, #24 8019168: af00 add r7, sp, #0 801916a: 60f8 str r0, [r7, #12] 801916c: 60b9 str r1, [r7, #8] 801916e: 607a str r2, [r7, #4] int i; LWIP_UNUSED_ARG(domain); /* @todo: check this */ /* create a netconn */ switch (type) { 8019170: 68bb ldr r3, [r7, #8] 8019172: 2b03 cmp r3, #3 8019174: d009 beq.n 801918a 8019176: 68bb ldr r3, [r7, #8] 8019178: 2b03 cmp r3, #3 801917a: dc23 bgt.n 80191c4 801917c: 68bb ldr r3, [r7, #8] 801917e: 2b01 cmp r3, #1 8019180: d019 beq.n 80191b6 8019182: 68bb ldr r3, [r7, #8] 8019184: 2b02 cmp r3, #2 8019186: d009 beq.n 801919c 8019188: e01c b.n 80191c4 case SOCK_RAW: conn = netconn_new_with_proto_and_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_RAW), 801918a: 687b ldr r3, [r7, #4] 801918c: b2db uxtb r3, r3 801918e: 4a22 ldr r2, [pc, #136] @ (8019218 ) 8019190: 4619 mov r1, r3 8019192: 2040 movs r0, #64 @ 0x40 8019194: f7fc ff60 bl 8016058 8019198: 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; 801919a: e019 b.n 80191d0 case SOCK_DGRAM: conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, 801919c: 687b ldr r3, [r7, #4] 801919e: 2b88 cmp r3, #136 @ 0x88 80191a0: d101 bne.n 80191a6 80191a2: 2321 movs r3, #33 @ 0x21 80191a4: e000 b.n 80191a8 80191a6: 2320 movs r3, #32 80191a8: 4a1b ldr r2, [pc, #108] @ (8019218 ) 80191aa: 2100 movs r1, #0 80191ac: 4618 mov r0, r3 80191ae: f7fc ff53 bl 8016058 80191b2: 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; 80191b4: e00c b.n 80191d0 case SOCK_STREAM: conn = netconn_new_with_callback(DOMAIN_TO_NETCONN_TYPE(domain, NETCONN_TCP), DEFAULT_SOCKET_EVENTCB); 80191b6: 4a18 ldr r2, [pc, #96] @ (8019218 ) 80191b8: 2100 movs r1, #0 80191ba: 2010 movs r0, #16 80191bc: f7fc ff4c bl 8016058 80191c0: 6178 str r0, [r7, #20] LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%s, SOCK_STREAM, %d) = ", domain == PF_INET ? "PF_INET" : "UNKNOWN", protocol)); break; 80191c2: e005 b.n 80191d0 default: LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_socket(%d, %d/UNKNOWN, %d) = -1\n", domain, type, protocol)); set_errno(EINVAL); 80191c4: 4b15 ldr r3, [pc, #84] @ (801921c ) 80191c6: 2216 movs r2, #22 80191c8: 601a str r2, [r3, #0] return -1; 80191ca: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80191ce: e01e b.n 801920e } if (!conn) { 80191d0: 697b ldr r3, [r7, #20] 80191d2: 2b00 cmp r3, #0 80191d4: d105 bne.n 80191e2 LWIP_DEBUGF(SOCKETS_DEBUG, ("-1 / ENOBUFS (could not create netconn)\n")); set_errno(ENOBUFS); 80191d6: 4b11 ldr r3, [pc, #68] @ (801921c ) 80191d8: 2269 movs r2, #105 @ 0x69 80191da: 601a str r2, [r3, #0] return -1; 80191dc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80191e0: e015 b.n 801920e } i = alloc_socket(conn, 0); 80191e2: 2100 movs r1, #0 80191e4: 6978 ldr r0, [r7, #20] 80191e6: f7ff f9df bl 80185a8 80191ea: 6138 str r0, [r7, #16] if (i == -1) { 80191ec: 693b ldr r3, [r7, #16] 80191ee: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80191f2: d108 bne.n 8019206 netconn_delete(conn); 80191f4: 6978 ldr r0, [r7, #20] 80191f6: f7fc ffcd bl 8016194 set_errno(ENFILE); 80191fa: 4b08 ldr r3, [pc, #32] @ (801921c ) 80191fc: 2217 movs r2, #23 80191fe: 601a str r2, [r3, #0] return -1; 8019200: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8019204: e003 b.n 801920e } conn->socket = i; 8019206: 697b ldr r3, [r7, #20] 8019208: 693a ldr r2, [r7, #16] 801920a: 619a str r2, [r3, #24] done_socket(&sockets[i - LWIP_SOCKET_OFFSET]); LWIP_DEBUGF(SOCKETS_DEBUG, ("%d\n", i)); set_errno(0); return i; 801920c: 693b ldr r3, [r7, #16] } 801920e: 4618 mov r0, r3 8019210: 3718 adds r7, #24 8019212: 46bd mov sp, r7 8019214: bd80 pop {r7, pc} 8019216: bf00 nop 8019218: 080192a9 .word 0x080192a9 801921c: 2402b270 .word 0x2402b270 08019220 : * 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) { 8019220: b480 push {r7} 8019222: b087 sub sp, #28 8019224: af00 add r7, sp, #0 8019226: 60f8 str r0, [r7, #12] 8019228: 60b9 str r1, [r7, #8] 801922a: 607a str r2, [r7, #4] 801922c: 603b str r3, [r7, #0] nfds_t fdi; for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 801922e: 2300 movs r3, #0 8019230: 617b str r3, [r7, #20] 8019232: e02c b.n 801928e const struct pollfd *pollfd = &scb->poll_fds[fdi]; 8019234: 68fb ldr r3, [r7, #12] 8019236: 695a ldr r2, [r3, #20] 8019238: 697b ldr r3, [r7, #20] 801923a: 00db lsls r3, r3, #3 801923c: 4413 add r3, r2 801923e: 613b str r3, [r7, #16] if (pollfd->fd == fd) { 8019240: 693b ldr r3, [r7, #16] 8019242: 681b ldr r3, [r3, #0] 8019244: 68ba ldr r2, [r7, #8] 8019246: 429a cmp r2, r3 8019248: d11e bne.n 8019288 /* 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) { 801924a: 687b ldr r3, [r7, #4] 801924c: 2b00 cmp r3, #0 801924e: d009 beq.n 8019264 8019250: 693b ldr r3, [r7, #16] 8019252: f9b3 3004 ldrsh.w r3, [r3, #4] 8019256: b29b uxth r3, r3 8019258: f003 0301 and.w r3, r3, #1 801925c: 2b00 cmp r3, #0 801925e: d001 beq.n 8019264 return 1; 8019260: 2301 movs r3, #1 8019262: e01a b.n 801929a } if (has_sendevent && (pollfd->events & POLLOUT) != 0) { 8019264: 683b ldr r3, [r7, #0] 8019266: 2b00 cmp r3, #0 8019268: d009 beq.n 801927e 801926a: 693b ldr r3, [r7, #16] 801926c: f9b3 3004 ldrsh.w r3, [r3, #4] 8019270: b29b uxth r3, r3 8019272: f003 0302 and.w r3, r3, #2 8019276: 2b00 cmp r3, #0 8019278: d001 beq.n 801927e return 1; 801927a: 2301 movs r3, #1 801927c: e00d b.n 801929a } if (has_errevent) { 801927e: 6a3b ldr r3, [r7, #32] 8019280: 2b00 cmp r3, #0 8019282: d001 beq.n 8019288 /* POLLERR is output only. */ return 1; 8019284: 2301 movs r3, #1 8019286: e008 b.n 801929a for (fdi = 0; fdi < scb->poll_nfds; fdi++) { 8019288: 697b ldr r3, [r7, #20] 801928a: 3301 adds r3, #1 801928c: 617b str r3, [r7, #20] 801928e: 68fb ldr r3, [r7, #12] 8019290: 699b ldr r3, [r3, #24] 8019292: 697a ldr r2, [r7, #20] 8019294: 429a cmp r2, r3 8019296: d3cd bcc.n 8019234 } } } return 0; 8019298: 2300 movs r3, #0 } 801929a: 4618 mov r0, r3 801929c: 371c adds r7, #28 801929e: 46bd mov sp, r7 80192a0: f85d 7b04 ldr.w r7, [sp], #4 80192a4: 4770 bx lr ... 080192a8 : * 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) { 80192a8: b580 push {r7, lr} 80192aa: b08a sub sp, #40 @ 0x28 80192ac: af00 add r7, sp, #0 80192ae: 6078 str r0, [r7, #4] 80192b0: 460b mov r3, r1 80192b2: 70fb strb r3, [r7, #3] 80192b4: 4613 mov r3, r2 80192b6: 803b strh r3, [r7, #0] SYS_ARCH_DECL_PROTECT(lev); LWIP_UNUSED_ARG(len); /* Get socket */ if (conn) { 80192b8: 687b ldr r3, [r7, #4] 80192ba: 2b00 cmp r3, #0 80192bc: f000 80a4 beq.w 8019408 s = conn->socket; 80192c0: 687b ldr r3, [r7, #4] 80192c2: 699b ldr r3, [r3, #24] 80192c4: 627b str r3, [r7, #36] @ 0x24 if (s < 0) { 80192c6: 6a7b ldr r3, [r7, #36] @ 0x24 80192c8: 2b00 cmp r3, #0 80192ca: da18 bge.n 80192fe /* 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); 80192cc: f00e f850 bl 8027370 80192d0: 61f8 str r0, [r7, #28] if (conn->socket < 0) { 80192d2: 687b ldr r3, [r7, #4] 80192d4: 699b ldr r3, [r3, #24] 80192d6: 2b00 cmp r3, #0 80192d8: da0b bge.n 80192f2 if (evt == NETCONN_EVT_RCVPLUS) { 80192da: 78fb ldrb r3, [r7, #3] 80192dc: 2b00 cmp r3, #0 80192de: d104 bne.n 80192ea /* conn->socket is -1 on initialization lwip_accept adjusts sock->recvevent if conn->socket < -1 */ conn->socket--; 80192e0: 687b ldr r3, [r7, #4] 80192e2: 699b ldr r3, [r3, #24] 80192e4: 1e5a subs r2, r3, #1 80192e6: 687b ldr r3, [r7, #4] 80192e8: 619a str r2, [r3, #24] } SYS_ARCH_UNPROTECT(lev); 80192ea: 69f8 ldr r0, [r7, #28] 80192ec: f00e f84e bl 802738c return; 80192f0: e08d b.n 801940e } s = conn->socket; 80192f2: 687b ldr r3, [r7, #4] 80192f4: 699b ldr r3, [r3, #24] 80192f6: 627b str r3, [r7, #36] @ 0x24 SYS_ARCH_UNPROTECT(lev); 80192f8: 69f8 ldr r0, [r7, #28] 80192fa: f00e f847 bl 802738c } sock = get_socket(s); 80192fe: 6a78 ldr r0, [r7, #36] @ 0x24 8019300: f7ff f93a bl 8018578 8019304: 61b8 str r0, [r7, #24] if (!sock) { 8019306: 69bb ldr r3, [r7, #24] 8019308: 2b00 cmp r3, #0 801930a: d07f beq.n 801940c } } else { return; } check_waiters = 1; 801930c: 2301 movs r3, #1 801930e: 623b str r3, [r7, #32] SYS_ARCH_PROTECT(lev); 8019310: f00e f82e bl 8027370 8019314: 61f8 str r0, [r7, #28] /* Set event as required */ switch (evt) { 8019316: 78fb ldrb r3, [r7, #3] 8019318: 2b04 cmp r3, #4 801931a: d83e bhi.n 801939a 801931c: a201 add r2, pc, #4 @ (adr r2, 8019324 ) 801931e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8019322: bf00 nop 8019324: 08019339 .word 0x08019339 8019328: 0801935b .word 0x0801935b 801932c: 08019373 .word 0x08019373 8019330: 08019387 .word 0x08019387 8019334: 08019393 .word 0x08019393 case NETCONN_EVT_RCVPLUS: sock->rcvevent++; 8019338: 69bb ldr r3, [r7, #24] 801933a: f9b3 3008 ldrsh.w r3, [r3, #8] 801933e: b29b uxth r3, r3 8019340: 3301 adds r3, #1 8019342: b29b uxth r3, r3 8019344: b21a sxth r2, r3 8019346: 69bb ldr r3, [r7, #24] 8019348: 811a strh r2, [r3, #8] if (sock->rcvevent > 1) { 801934a: 69bb ldr r3, [r7, #24] 801934c: f9b3 3008 ldrsh.w r3, [r3, #8] 8019350: 2b01 cmp r3, #1 8019352: dd2a ble.n 80193aa check_waiters = 0; 8019354: 2300 movs r3, #0 8019356: 623b str r3, [r7, #32] } break; 8019358: e027 b.n 80193aa case NETCONN_EVT_RCVMINUS: sock->rcvevent--; 801935a: 69bb ldr r3, [r7, #24] 801935c: f9b3 3008 ldrsh.w r3, [r3, #8] 8019360: b29b uxth r3, r3 8019362: 3b01 subs r3, #1 8019364: b29b uxth r3, r3 8019366: b21a sxth r2, r3 8019368: 69bb ldr r3, [r7, #24] 801936a: 811a strh r2, [r3, #8] check_waiters = 0; 801936c: 2300 movs r3, #0 801936e: 623b str r3, [r7, #32] break; 8019370: e01c b.n 80193ac case NETCONN_EVT_SENDPLUS: if (sock->sendevent) { 8019372: 69bb ldr r3, [r7, #24] 8019374: 895b ldrh r3, [r3, #10] 8019376: 2b00 cmp r3, #0 8019378: d001 beq.n 801937e check_waiters = 0; 801937a: 2300 movs r3, #0 801937c: 623b str r3, [r7, #32] } sock->sendevent = 1; 801937e: 69bb ldr r3, [r7, #24] 8019380: 2201 movs r2, #1 8019382: 815a strh r2, [r3, #10] break; 8019384: e012 b.n 80193ac case NETCONN_EVT_SENDMINUS: sock->sendevent = 0; 8019386: 69bb ldr r3, [r7, #24] 8019388: 2200 movs r2, #0 801938a: 815a strh r2, [r3, #10] check_waiters = 0; 801938c: 2300 movs r3, #0 801938e: 623b str r3, [r7, #32] break; 8019390: e00c b.n 80193ac case NETCONN_EVT_ERROR: sock->errevent = 1; 8019392: 69bb ldr r3, [r7, #24] 8019394: 2201 movs r2, #1 8019396: 819a strh r2, [r3, #12] break; 8019398: e008 b.n 80193ac default: LWIP_ASSERT("unknown event", 0); 801939a: 4b1e ldr r3, [pc, #120] @ (8019414 ) 801939c: f44f 621f mov.w r2, #2544 @ 0x9f0 80193a0: 491d ldr r1, [pc, #116] @ (8019418 ) 80193a2: 481e ldr r0, [pc, #120] @ (801941c ) 80193a4: f011 fa7a bl 802a89c break; 80193a8: e000 b.n 80193ac break; 80193aa: bf00 nop } if (sock->select_waiting && check_waiters) { 80193ac: 69bb ldr r3, [r7, #24] 80193ae: 7b9b ldrb r3, [r3, #14] 80193b0: 2b00 cmp r3, #0 80193b2: d025 beq.n 8019400 80193b4: 6a3b ldr r3, [r7, #32] 80193b6: 2b00 cmp r3, #0 80193b8: d022 beq.n 8019400 /* Save which events are active */ int has_recvevent, has_sendevent, has_errevent; has_recvevent = sock->rcvevent > 0; 80193ba: 69bb ldr r3, [r7, #24] 80193bc: f9b3 3008 ldrsh.w r3, [r3, #8] 80193c0: 2b00 cmp r3, #0 80193c2: bfcc ite gt 80193c4: 2301 movgt r3, #1 80193c6: 2300 movle r3, #0 80193c8: b2db uxtb r3, r3 80193ca: 617b str r3, [r7, #20] has_sendevent = sock->sendevent != 0; 80193cc: 69bb ldr r3, [r7, #24] 80193ce: 895b ldrh r3, [r3, #10] 80193d0: 2b00 cmp r3, #0 80193d2: bf14 ite ne 80193d4: 2301 movne r3, #1 80193d6: 2300 moveq r3, #0 80193d8: b2db uxtb r3, r3 80193da: 613b str r3, [r7, #16] has_errevent = sock->errevent != 0; 80193dc: 69bb ldr r3, [r7, #24] 80193de: 899b ldrh r3, [r3, #12] 80193e0: 2b00 cmp r3, #0 80193e2: bf14 ite ne 80193e4: 2301 movne r3, #1 80193e6: 2300 moveq r3, #0 80193e8: b2db uxtb r3, r3 80193ea: 60fb str r3, [r7, #12] SYS_ARCH_UNPROTECT(lev); 80193ec: 69f8 ldr r0, [r7, #28] 80193ee: f00d ffcd bl 802738c /* Check any select calls waiting on this socket */ select_check_waiters(s, has_recvevent, has_sendevent, has_errevent); 80193f2: 68fb ldr r3, [r7, #12] 80193f4: 693a ldr r2, [r7, #16] 80193f6: 6979 ldr r1, [r7, #20] 80193f8: 6a78 ldr r0, [r7, #36] @ 0x24 80193fa: f000 f811 bl 8019420 if (sock->select_waiting && check_waiters) { 80193fe: e006 b.n 801940e } else { SYS_ARCH_UNPROTECT(lev); 8019400: 69f8 ldr r0, [r7, #28] 8019402: f00d ffc3 bl 802738c 8019406: e002 b.n 801940e return; 8019408: bf00 nop 801940a: e000 b.n 801940e return; 801940c: bf00 nop } done_socket(sock); } 801940e: 3728 adds r7, #40 @ 0x28 8019410: 46bd mov sp, r7 8019412: bd80 pop {r7, pc} 8019414: 0802e5fc .word 0x0802e5fc 8019418: 0802e978 .word 0x0802e978 801941c: 0802e650 .word 0x0802e650 08019420 : * 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) { 8019420: b580 push {r7, lr} 8019422: b088 sub sp, #32 8019424: af02 add r7, sp, #8 8019426: 60f8 str r0, [r7, #12] 8019428: 60b9 str r1, [r7, #8] 801942a: 607a str r2, [r7, #4] 801942c: 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(); 801942e: f7f7 fe0b bl 8011048 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) { 8019432: 4b42 ldr r3, [pc, #264] @ (801953c ) 8019434: 681b ldr r3, [r3, #0] 8019436: 617b str r3, [r7, #20] 8019438: e078 b.n 801952c if (scb->sem_signalled == 0) { 801943a: 697b ldr r3, [r7, #20] 801943c: 69db ldr r3, [r3, #28] 801943e: 2b00 cmp r3, #0 8019440: d171 bne.n 8019526 /* semaphore not signalled yet */ int do_signal = 0; 8019442: 2300 movs r3, #0 8019444: 613b str r3, [r7, #16] #if LWIP_SOCKET_POLL if (scb->poll_fds != NULL) { 8019446: 697b ldr r3, [r7, #20] 8019448: 695b ldr r3, [r3, #20] 801944a: 2b00 cmp r3, #0 801944c: d009 beq.n 8019462 do_signal = lwip_poll_should_wake(scb, s, has_recvevent, has_sendevent, has_errevent); 801944e: 683b ldr r3, [r7, #0] 8019450: 9300 str r3, [sp, #0] 8019452: 687b ldr r3, [r7, #4] 8019454: 68ba ldr r2, [r7, #8] 8019456: 68f9 ldr r1, [r7, #12] 8019458: 6978 ldr r0, [r7, #20] 801945a: f7ff fee1 bl 8019220 801945e: 6138 str r0, [r7, #16] 8019460: e056 b.n 8019510 else #endif /* LWIP_SOCKET_SELECT && LWIP_SOCKET_POLL */ #if LWIP_SOCKET_SELECT { /* Test this select call for our socket */ if (has_recvevent) { 8019462: 68bb ldr r3, [r7, #8] 8019464: 2b00 cmp r3, #0 8019466: d017 beq.n 8019498 if (scb->readset && FD_ISSET(s, scb->readset)) { 8019468: 697b ldr r3, [r7, #20] 801946a: 689b ldr r3, [r3, #8] 801946c: 2b00 cmp r3, #0 801946e: d013 beq.n 8019498 8019470: 697b ldr r3, [r7, #20] 8019472: 689a ldr r2, [r3, #8] 8019474: 68fb ldr r3, [r7, #12] 8019476: 2b00 cmp r3, #0 8019478: da00 bge.n 801947c 801947a: 331f adds r3, #31 801947c: 115b asrs r3, r3, #5 801947e: f852 2023 ldr.w r2, [r2, r3, lsl #2] 8019482: 68fb ldr r3, [r7, #12] 8019484: f003 031f and.w r3, r3, #31 8019488: fa22 f303 lsr.w r3, r2, r3 801948c: f003 0301 and.w r3, r3, #1 8019490: 2b00 cmp r3, #0 8019492: d001 beq.n 8019498 do_signal = 1; 8019494: 2301 movs r3, #1 8019496: 613b str r3, [r7, #16] } } if (has_sendevent) { 8019498: 687b ldr r3, [r7, #4] 801949a: 2b00 cmp r3, #0 801949c: d01a beq.n 80194d4 if (!do_signal && scb->writeset && FD_ISSET(s, scb->writeset)) { 801949e: 693b ldr r3, [r7, #16] 80194a0: 2b00 cmp r3, #0 80194a2: d117 bne.n 80194d4 80194a4: 697b ldr r3, [r7, #20] 80194a6: 68db ldr r3, [r3, #12] 80194a8: 2b00 cmp r3, #0 80194aa: d013 beq.n 80194d4 80194ac: 697b ldr r3, [r7, #20] 80194ae: 68da ldr r2, [r3, #12] 80194b0: 68fb ldr r3, [r7, #12] 80194b2: 2b00 cmp r3, #0 80194b4: da00 bge.n 80194b8 80194b6: 331f adds r3, #31 80194b8: 115b asrs r3, r3, #5 80194ba: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80194be: 68fb ldr r3, [r7, #12] 80194c0: f003 031f and.w r3, r3, #31 80194c4: fa22 f303 lsr.w r3, r2, r3 80194c8: f003 0301 and.w r3, r3, #1 80194cc: 2b00 cmp r3, #0 80194ce: d001 beq.n 80194d4 do_signal = 1; 80194d0: 2301 movs r3, #1 80194d2: 613b str r3, [r7, #16] } } if (has_errevent) { 80194d4: 683b ldr r3, [r7, #0] 80194d6: 2b00 cmp r3, #0 80194d8: d01a beq.n 8019510 if (!do_signal && scb->exceptset && FD_ISSET(s, scb->exceptset)) { 80194da: 693b ldr r3, [r7, #16] 80194dc: 2b00 cmp r3, #0 80194de: d117 bne.n 8019510 80194e0: 697b ldr r3, [r7, #20] 80194e2: 691b ldr r3, [r3, #16] 80194e4: 2b00 cmp r3, #0 80194e6: d013 beq.n 8019510 80194e8: 697b ldr r3, [r7, #20] 80194ea: 691a ldr r2, [r3, #16] 80194ec: 68fb ldr r3, [r7, #12] 80194ee: 2b00 cmp r3, #0 80194f0: da00 bge.n 80194f4 80194f2: 331f adds r3, #31 80194f4: 115b asrs r3, r3, #5 80194f6: f852 2023 ldr.w r2, [r2, r3, lsl #2] 80194fa: 68fb ldr r3, [r7, #12] 80194fc: f003 031f and.w r3, r3, #31 8019500: fa22 f303 lsr.w r3, r2, r3 8019504: f003 0301 and.w r3, r3, #1 8019508: 2b00 cmp r3, #0 801950a: d001 beq.n 8019510 do_signal = 1; 801950c: 2301 movs r3, #1 801950e: 613b str r3, [r7, #16] } } } #endif /* LWIP_SOCKET_SELECT */ if (do_signal) { 8019510: 693b ldr r3, [r7, #16] 8019512: 2b00 cmp r3, #0 8019514: d007 beq.n 8019526 scb->sem_signalled = 1; 8019516: 697b ldr r3, [r7, #20] 8019518: 2201 movs r2, #1 801951a: 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)); 801951c: 697b ldr r3, [r7, #20] 801951e: 3320 adds r3, #32 8019520: 4618 mov r0, r3 8019522: f00d fe8f bl 8027244 for (scb = select_cb_list; scb != NULL; scb = scb->next) { 8019526: 697b ldr r3, [r7, #20] 8019528: 681b ldr r3, [r3, #0] 801952a: 617b str r3, [r7, #20] 801952c: 697b ldr r3, [r7, #20] 801952e: 2b00 cmp r3, #0 8019530: d183 bne.n 801943a /* remember the state of select_cb_list to detect changes */ last_select_cb_ctr = select_cb_ctr; } SYS_ARCH_UNPROTECT(lev); #endif } 8019532: bf00 nop 8019534: bf00 nop 8019536: 3718 adds r7, #24 8019538: 46bd mov sp, r7 801953a: bd80 pop {r7, pc} 801953c: 24024414 .word 0x24024414 08019540 : return err; } int lwip_ioctl(int s, long cmd, void *argp) { 8019540: b580 push {r7, lr} 8019542: b08c sub sp, #48 @ 0x30 8019544: af00 add r7, sp, #0 8019546: 60f8 str r0, [r7, #12] 8019548: 60b9 str r1, [r7, #8] 801954a: 607a str r2, [r7, #4] struct lwip_sock *sock = get_socket(s); 801954c: 68f8 ldr r0, [r7, #12] 801954e: f7ff f813 bl 8018578 8019552: 6278 str r0, [r7, #36] @ 0x24 u8_t val; #if LWIP_SO_RCVBUF int recv_avail; #endif /* LWIP_SO_RCVBUF */ if (!sock) { 8019554: 6a7b ldr r3, [r7, #36] @ 0x24 8019556: 2b00 cmp r3, #0 8019558: d102 bne.n 8019560 return -1; 801955a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801955e: e089 b.n 8019674 } switch (cmd) { 8019560: 68bb ldr r3, [r7, #8] 8019562: 4a46 ldr r2, [pc, #280] @ (801967c ) 8019564: 4293 cmp r3, r2 8019566: d048 beq.n 80195fa 8019568: 68bb ldr r3, [r7, #8] 801956a: 4a45 ldr r2, [pc, #276] @ (8019680 ) 801956c: 4293 cmp r3, r2 801956e: d176 bne.n 801965e #if LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE case FIONREAD: if (!argp) { 8019570: 687b ldr r3, [r7, #4] 8019572: 2b00 cmp r3, #0 8019574: d10a bne.n 801958c sock_set_errno(sock, EINVAL); 8019576: 2316 movs r3, #22 8019578: 61bb str r3, [r7, #24] 801957a: 69bb ldr r3, [r7, #24] 801957c: 2b00 cmp r3, #0 801957e: d002 beq.n 8019586 8019580: 4a40 ldr r2, [pc, #256] @ (8019684 ) 8019582: 69bb ldr r3, [r7, #24] 8019584: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8019586: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801958a: e073 b.n 8019674 } #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); 801958c: f00d fef0 bl 8027370 8019590: 6238 str r0, [r7, #32] 8019592: 6a7b ldr r3, [r7, #36] @ 0x24 8019594: 681b ldr r3, [r3, #0] 8019596: 6a5b ldr r3, [r3, #36] @ 0x24 8019598: 62fb str r3, [r7, #44] @ 0x2c 801959a: 6a38 ldr r0, [r7, #32] 801959c: f00d fef6 bl 802738c if (recv_avail < 0) { 80195a0: 6afb ldr r3, [r7, #44] @ 0x2c 80195a2: 2b00 cmp r3, #0 80195a4: da01 bge.n 80195aa recv_avail = 0; 80195a6: 2300 movs r3, #0 80195a8: 62fb str r3, [r7, #44] @ 0x2c } /* Check if there is data left from the last recv operation. /maq 041215 */ if (sock->lastdata.netbuf) { 80195aa: 6a7b ldr r3, [r7, #36] @ 0x24 80195ac: 685b ldr r3, [r3, #4] 80195ae: 2b00 cmp r3, #0 80195b0: d016 beq.n 80195e0 if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_TCP) { 80195b2: 6a7b ldr r3, [r7, #36] @ 0x24 80195b4: 681b ldr r3, [r3, #0] 80195b6: 781b ldrb r3, [r3, #0] 80195b8: f003 03f0 and.w r3, r3, #240 @ 0xf0 80195bc: 2b10 cmp r3, #16 80195be: d107 bne.n 80195d0 recv_avail += sock->lastdata.pbuf->tot_len; 80195c0: 6a7b ldr r3, [r7, #36] @ 0x24 80195c2: 685b ldr r3, [r3, #4] 80195c4: 891b ldrh r3, [r3, #8] 80195c6: 461a mov r2, r3 80195c8: 6afb ldr r3, [r7, #44] @ 0x2c 80195ca: 4413 add r3, r2 80195cc: 62fb str r3, [r7, #44] @ 0x2c 80195ce: e007 b.n 80195e0 } else { recv_avail += sock->lastdata.netbuf->p->tot_len; 80195d0: 6a7b ldr r3, [r7, #36] @ 0x24 80195d2: 685b ldr r3, [r3, #4] 80195d4: 681b ldr r3, [r3, #0] 80195d6: 891b ldrh r3, [r3, #8] 80195d8: 461a mov r2, r3 80195da: 6afb ldr r3, [r7, #44] @ 0x2c 80195dc: 4413 add r3, r2 80195de: 62fb str r3, [r7, #44] @ 0x2c } } *((int *)argp) = recv_avail; 80195e0: 687b ldr r3, [r7, #4] 80195e2: 6afa ldr r2, [r7, #44] @ 0x2c 80195e4: 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); 80195e6: 2300 movs r3, #0 80195e8: 61fb str r3, [r7, #28] 80195ea: 69fb ldr r3, [r7, #28] 80195ec: 2b00 cmp r3, #0 80195ee: d002 beq.n 80195f6 80195f0: 4a24 ldr r2, [pc, #144] @ (8019684 ) 80195f2: 69fb ldr r3, [r7, #28] 80195f4: 6013 str r3, [r2, #0] done_socket(sock); return 0; 80195f6: 2300 movs r3, #0 80195f8: e03c b.n 8019674 break; #endif /* LWIP_SO_RCVBUF */ #endif /* LWIP_SO_RCVBUF || LWIP_FIONREAD_LINUXMODE */ case (long)FIONBIO: val = 0; 80195fa: 2300 movs r3, #0 80195fc: f887 302b strb.w r3, [r7, #43] @ 0x2b if (argp && *(int *)argp) { 8019600: 687b ldr r3, [r7, #4] 8019602: 2b00 cmp r3, #0 8019604: d006 beq.n 8019614 8019606: 687b ldr r3, [r7, #4] 8019608: 681b ldr r3, [r3, #0] 801960a: 2b00 cmp r3, #0 801960c: d002 beq.n 8019614 val = 1; 801960e: 2301 movs r3, #1 8019610: f887 302b strb.w r3, [r7, #43] @ 0x2b } netconn_set_nonblocking(sock->conn, val); 8019614: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8019618: 2b00 cmp r3, #0 801961a: d00b beq.n 8019634 801961c: 6a7b ldr r3, [r7, #36] @ 0x24 801961e: 681b ldr r3, [r3, #0] 8019620: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 8019624: 6a7b ldr r3, [r7, #36] @ 0x24 8019626: 681b ldr r3, [r3, #0] 8019628: f042 0202 orr.w r2, r2, #2 801962c: b2d2 uxtb r2, r2 801962e: f883 2028 strb.w r2, [r3, #40] @ 0x28 8019632: e00a b.n 801964a 8019634: 6a7b ldr r3, [r7, #36] @ 0x24 8019636: 681b ldr r3, [r3, #0] 8019638: f893 2028 ldrb.w r2, [r3, #40] @ 0x28 801963c: 6a7b ldr r3, [r7, #36] @ 0x24 801963e: 681b ldr r3, [r3, #0] 8019640: f022 0202 bic.w r2, r2, #2 8019644: b2d2 uxtb r2, r2 8019646: 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); 801964a: 2300 movs r3, #0 801964c: 617b str r3, [r7, #20] 801964e: 697b ldr r3, [r7, #20] 8019650: 2b00 cmp r3, #0 8019652: d002 beq.n 801965a 8019654: 4a0b ldr r2, [pc, #44] @ (8019684 ) 8019656: 697b ldr r3, [r7, #20] 8019658: 6013 str r3, [r2, #0] done_socket(sock); return 0; 801965a: 2300 movs r3, #0 801965c: e00a b.n 8019674 default: break; 801965e: 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 */ 8019660: 2326 movs r3, #38 @ 0x26 8019662: 613b str r3, [r7, #16] 8019664: 693b ldr r3, [r7, #16] 8019666: 2b00 cmp r3, #0 8019668: d002 beq.n 8019670 801966a: 4a06 ldr r2, [pc, #24] @ (8019684 ) 801966c: 693b ldr r3, [r7, #16] 801966e: 6013 str r3, [r2, #0] done_socket(sock); return -1; 8019670: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8019674: 4618 mov r0, r3 8019676: 3730 adds r7, #48 @ 0x30 8019678: 46bd mov sp, r7 801967a: bd80 pop {r7, pc} 801967c: 8004667e .word 0x8004667e 8019680: 4004667f .word 0x4004667f 8019684: 2402b270 .word 0x2402b270 08019688 : * @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) { 8019688: b580 push {r7, lr} 801968a: b084 sub sp, #16 801968c: af00 add r7, sp, #0 801968e: 6078 str r0, [r7, #4] 8019690: 6039 str r1, [r7, #0] u32_t sleeptime, res; again: LWIP_ASSERT_CORE_LOCKED(); 8019692: f7f7 fcd9 bl 8011048 sleeptime = sys_timeouts_sleeptime(); 8019696: f008 fb41 bl 8021d1c 801969a: 60f8 str r0, [r7, #12] if (sleeptime == SYS_TIMEOUTS_SLEEPTIME_INFINITE) { 801969c: 68fb ldr r3, [r7, #12] 801969e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80196a2: d109 bne.n 80196b8 UNLOCK_TCPIP_CORE(); 80196a4: f7f7 fcc2 bl 801102c sys_arch_mbox_fetch(mbox, msg, 0); 80196a8: 2200 movs r2, #0 80196aa: 6839 ldr r1, [r7, #0] 80196ac: 6878 ldr r0, [r7, #4] 80196ae: f00d fd0d bl 80270cc LOCK_TCPIP_CORE(); 80196b2: f7f7 fcab bl 801100c return; 80196b6: e016 b.n 80196e6 } else if (sleeptime == 0) { 80196b8: 68fb ldr r3, [r7, #12] 80196ba: 2b00 cmp r3, #0 80196bc: d102 bne.n 80196c4 sys_check_timeouts(); 80196be: f008 faf1 bl 8021ca4 /* We try again to fetch a message from the mbox. */ goto again; 80196c2: e7e6 b.n 8019692 } UNLOCK_TCPIP_CORE(); 80196c4: f7f7 fcb2 bl 801102c res = sys_arch_mbox_fetch(mbox, msg, sleeptime); 80196c8: 68fa ldr r2, [r7, #12] 80196ca: 6839 ldr r1, [r7, #0] 80196cc: 6878 ldr r0, [r7, #4] 80196ce: f00d fcfd bl 80270cc 80196d2: 60b8 str r0, [r7, #8] LOCK_TCPIP_CORE(); 80196d4: f7f7 fc9a bl 801100c if (res == SYS_ARCH_TIMEOUT) { 80196d8: 68bb ldr r3, [r7, #8] 80196da: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80196de: d102 bne.n 80196e6 /* If a SYS_ARCH_TIMEOUT value is returned, a timeout occurred before a message could be fetched. */ sys_check_timeouts(); 80196e0: f008 fae0 bl 8021ca4 /* We try again to fetch a message from the mbox. */ goto again; 80196e4: e7d5 b.n 8019692 } } 80196e6: 3710 adds r7, #16 80196e8: 46bd mov sp, r7 80196ea: bd80 pop {r7, pc} 080196ec : * * @param arg unused argument */ static void tcpip_thread(void *arg) { 80196ec: b580 push {r7, lr} 80196ee: b084 sub sp, #16 80196f0: af00 add r7, sp, #0 80196f2: 6078 str r0, [r7, #4] struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); LWIP_MARK_TCPIP_THREAD(); 80196f4: f7f7 fce4 bl 80110c0 LOCK_TCPIP_CORE(); 80196f8: f7f7 fc88 bl 801100c if (tcpip_init_done != NULL) { 80196fc: 4b0f ldr r3, [pc, #60] @ (801973c ) 80196fe: 681b ldr r3, [r3, #0] 8019700: 2b00 cmp r3, #0 8019702: d005 beq.n 8019710 tcpip_init_done(tcpip_init_done_arg); 8019704: 4b0d ldr r3, [pc, #52] @ (801973c ) 8019706: 681b ldr r3, [r3, #0] 8019708: 4a0d ldr r2, [pc, #52] @ (8019740 ) 801970a: 6812 ldr r2, [r2, #0] 801970c: 4610 mov r0, r2 801970e: 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); 8019710: f107 030c add.w r3, r7, #12 8019714: 4619 mov r1, r3 8019716: 480b ldr r0, [pc, #44] @ (8019744 ) 8019718: f7ff ffb6 bl 8019688 if (msg == NULL) { 801971c: 68fb ldr r3, [r7, #12] 801971e: 2b00 cmp r3, #0 8019720: d106 bne.n 8019730 LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); LWIP_ASSERT("tcpip_thread: invalid message", 0); 8019722: 4b09 ldr r3, [pc, #36] @ (8019748 ) 8019724: 2291 movs r2, #145 @ 0x91 8019726: 4909 ldr r1, [pc, #36] @ (801974c ) 8019728: 4809 ldr r0, [pc, #36] @ (8019750 ) 801972a: f011 f8b7 bl 802a89c continue; 801972e: e003 b.n 8019738 } tcpip_thread_handle_msg(msg); 8019730: 68fb ldr r3, [r7, #12] 8019732: 4618 mov r0, r3 8019734: f000 f80e bl 8019754 TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg); 8019738: e7ea b.n 8019710 801973a: bf00 nop 801973c: 24024418 .word 0x24024418 8019740: 2402441c .word 0x2402441c 8019744: 24024420 .word 0x24024420 8019748: 0802e9cc .word 0x0802e9cc 801974c: 0802e9fc .word 0x0802e9fc 8019750: 0802ea1c .word 0x0802ea1c 08019754 : /* 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) { 8019754: b580 push {r7, lr} 8019756: b082 sub sp, #8 8019758: af00 add r7, sp, #0 801975a: 6078 str r0, [r7, #4] switch (msg->type) { 801975c: 687b ldr r3, [r7, #4] 801975e: 781b ldrb r3, [r3, #0] 8019760: 2b02 cmp r3, #2 8019762: d026 beq.n 80197b2 8019764: 2b02 cmp r3, #2 8019766: dc2b bgt.n 80197c0 8019768: 2b00 cmp r3, #0 801976a: d002 beq.n 8019772 801976c: 2b01 cmp r3, #1 801976e: d015 beq.n 801979c 8019770: e026 b.n 80197c0 #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) { 8019772: 687b ldr r3, [r7, #4] 8019774: 68db ldr r3, [r3, #12] 8019776: 687a ldr r2, [r7, #4] 8019778: 6850 ldr r0, [r2, #4] 801977a: 687a ldr r2, [r7, #4] 801977c: 6892 ldr r2, [r2, #8] 801977e: 4611 mov r1, r2 8019780: 4798 blx r3 8019782: 4603 mov r3, r0 8019784: 2b00 cmp r3, #0 8019786: d004 beq.n 8019792 pbuf_free(msg->msg.inp.p); 8019788: 687b ldr r3, [r7, #4] 801978a: 685b ldr r3, [r3, #4] 801978c: 4618 mov r0, r3 801978e: f001 fe0d bl 801b3ac } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8019792: 6879 ldr r1, [r7, #4] 8019794: 2009 movs r0, #9 8019796: f000 ff1b bl 801a5d0 break; 801979a: e018 b.n 80197ce 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); 801979c: 687b ldr r3, [r7, #4] 801979e: 685b ldr r3, [r3, #4] 80197a0: 687a ldr r2, [r7, #4] 80197a2: 6892 ldr r2, [r2, #8] 80197a4: 4610 mov r0, r2 80197a6: 4798 blx r3 memp_free(MEMP_TCPIP_MSG_API, msg); 80197a8: 6879 ldr r1, [r7, #4] 80197aa: 2008 movs r0, #8 80197ac: f000 ff10 bl 801a5d0 break; 80197b0: e00d b.n 80197ce 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); 80197b2: 687b ldr r3, [r7, #4] 80197b4: 685b ldr r3, [r3, #4] 80197b6: 687a ldr r2, [r7, #4] 80197b8: 6892 ldr r2, [r2, #8] 80197ba: 4610 mov r0, r2 80197bc: 4798 blx r3 break; 80197be: e006 b.n 80197ce default: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: %d\n", msg->type)); LWIP_ASSERT("tcpip_thread: invalid message", 0); 80197c0: 4b05 ldr r3, [pc, #20] @ (80197d8 ) 80197c2: 22cf movs r2, #207 @ 0xcf 80197c4: 4905 ldr r1, [pc, #20] @ (80197dc ) 80197c6: 4806 ldr r0, [pc, #24] @ (80197e0 ) 80197c8: f011 f868 bl 802a89c break; 80197cc: bf00 nop } } 80197ce: bf00 nop 80197d0: 3708 adds r7, #8 80197d2: 46bd mov sp, r7 80197d4: bd80 pop {r7, pc} 80197d6: bf00 nop 80197d8: 0802e9cc .word 0x0802e9cc 80197dc: 0802e9fc .word 0x0802e9fc 80197e0: 0802ea1c .word 0x0802ea1c 080197e4 : * @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) { 80197e4: b580 push {r7, lr} 80197e6: b086 sub sp, #24 80197e8: af00 add r7, sp, #0 80197ea: 60f8 str r0, [r7, #12] 80197ec: 60b9 str r1, [r7, #8] 80197ee: 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)); 80197f0: 481a ldr r0, [pc, #104] @ (801985c ) 80197f2: f00d fcb3 bl 802715c 80197f6: 4603 mov r3, r0 80197f8: 2b00 cmp r3, #0 80197fa: d105 bne.n 8019808 80197fc: 4b18 ldr r3, [pc, #96] @ (8019860 ) 80197fe: 22fc movs r2, #252 @ 0xfc 8019800: 4918 ldr r1, [pc, #96] @ (8019864 ) 8019802: 4819 ldr r0, [pc, #100] @ (8019868 ) 8019804: f011 f84a bl 802a89c msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 8019808: 2009 movs r0, #9 801980a: f000 fe6b bl 801a4e4 801980e: 6178 str r0, [r7, #20] if (msg == NULL) { 8019810: 697b ldr r3, [r7, #20] 8019812: 2b00 cmp r3, #0 8019814: d102 bne.n 801981c return ERR_MEM; 8019816: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801981a: e01a b.n 8019852 } msg->type = TCPIP_MSG_INPKT; 801981c: 697b ldr r3, [r7, #20] 801981e: 2200 movs r2, #0 8019820: 701a strb r2, [r3, #0] msg->msg.inp.p = p; 8019822: 697b ldr r3, [r7, #20] 8019824: 68fa ldr r2, [r7, #12] 8019826: 605a str r2, [r3, #4] msg->msg.inp.netif = inp; 8019828: 697b ldr r3, [r7, #20] 801982a: 68ba ldr r2, [r7, #8] 801982c: 609a str r2, [r3, #8] msg->msg.inp.input_fn = input_fn; 801982e: 697b ldr r3, [r7, #20] 8019830: 687a ldr r2, [r7, #4] 8019832: 60da str r2, [r3, #12] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 8019834: 6979 ldr r1, [r7, #20] 8019836: 4809 ldr r0, [pc, #36] @ (801985c ) 8019838: f00d fc2e bl 8027098 801983c: 4603 mov r3, r0 801983e: 2b00 cmp r3, #0 8019840: d006 beq.n 8019850 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8019842: 6979 ldr r1, [r7, #20] 8019844: 2009 movs r0, #9 8019846: f000 fec3 bl 801a5d0 return ERR_MEM; 801984a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801984e: e000 b.n 8019852 } return ERR_OK; 8019850: 2300 movs r3, #0 #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 8019852: 4618 mov r0, r3 8019854: 3718 adds r7, #24 8019856: 46bd mov sp, r7 8019858: bd80 pop {r7, pc} 801985a: bf00 nop 801985c: 24024420 .word 0x24024420 8019860: 0802e9cc .word 0x0802e9cc 8019864: 0802ea44 .word 0x0802ea44 8019868: 0802ea1c .word 0x0802ea1c 0801986c : * 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) { 801986c: b580 push {r7, lr} 801986e: b082 sub sp, #8 8019870: af00 add r7, sp, #0 8019872: 6078 str r0, [r7, #4] 8019874: 6039 str r1, [r7, #0] #if LWIP_ETHERNET if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 8019876: 683b ldr r3, [r7, #0] 8019878: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801987c: f003 0318 and.w r3, r3, #24 8019880: 2b00 cmp r3, #0 8019882: d006 beq.n 8019892 return tcpip_inpkt(p, inp, ethernet_input); 8019884: 4a08 ldr r2, [pc, #32] @ (80198a8 ) 8019886: 6839 ldr r1, [r7, #0] 8019888: 6878 ldr r0, [r7, #4] 801988a: f7ff ffab bl 80197e4 801988e: 4603 mov r3, r0 8019890: e005 b.n 801989e } else #endif /* LWIP_ETHERNET */ return tcpip_inpkt(p, inp, ip_input); 8019892: 4a06 ldr r2, [pc, #24] @ (80198ac ) 8019894: 6839 ldr r1, [r7, #0] 8019896: 6878 ldr r0, [r7, #4] 8019898: f7ff ffa4 bl 80197e4 801989c: 4603 mov r3, r0 } 801989e: 4618 mov r0, r3 80198a0: 3708 adds r7, #8 80198a2: 46bd mov sp, r7 80198a4: bd80 pop {r7, pc} 80198a6: bf00 nop 80198a8: 08026e8d .word 0x08026e8d 80198ac: 080259b5 .word 0x080259b5 080198b0 : * * @see tcpip_callback */ err_t tcpip_try_callback(tcpip_callback_fn function, void *ctx) { 80198b0: b580 push {r7, lr} 80198b2: b084 sub sp, #16 80198b4: af00 add r7, sp, #0 80198b6: 6078 str r0, [r7, #4] 80198b8: 6039 str r1, [r7, #0] struct tcpip_msg *msg; LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(tcpip_mbox)); 80198ba: 4819 ldr r0, [pc, #100] @ (8019920 ) 80198bc: f00d fc4e bl 802715c 80198c0: 4603 mov r3, r0 80198c2: 2b00 cmp r3, #0 80198c4: d106 bne.n 80198d4 80198c6: 4b17 ldr r3, [pc, #92] @ (8019924 ) 80198c8: f240 125d movw r2, #349 @ 0x15d 80198cc: 4916 ldr r1, [pc, #88] @ (8019928 ) 80198ce: 4817 ldr r0, [pc, #92] @ (801992c ) 80198d0: f010 ffe4 bl 802a89c msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_API); 80198d4: 2008 movs r0, #8 80198d6: f000 fe05 bl 801a4e4 80198da: 60f8 str r0, [r7, #12] if (msg == NULL) { 80198dc: 68fb ldr r3, [r7, #12] 80198de: 2b00 cmp r3, #0 80198e0: d102 bne.n 80198e8 return ERR_MEM; 80198e2: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80198e6: e017 b.n 8019918 } msg->type = TCPIP_MSG_CALLBACK; 80198e8: 68fb ldr r3, [r7, #12] 80198ea: 2201 movs r2, #1 80198ec: 701a strb r2, [r3, #0] msg->msg.cb.function = function; 80198ee: 68fb ldr r3, [r7, #12] 80198f0: 687a ldr r2, [r7, #4] 80198f2: 605a str r2, [r3, #4] msg->msg.cb.ctx = ctx; 80198f4: 68fb ldr r3, [r7, #12] 80198f6: 683a ldr r2, [r7, #0] 80198f8: 609a str r2, [r3, #8] if (sys_mbox_trypost(&tcpip_mbox, msg) != ERR_OK) { 80198fa: 68f9 ldr r1, [r7, #12] 80198fc: 4808 ldr r0, [pc, #32] @ (8019920 ) 80198fe: f00d fbcb bl 8027098 8019902: 4603 mov r3, r0 8019904: 2b00 cmp r3, #0 8019906: d006 beq.n 8019916 memp_free(MEMP_TCPIP_MSG_API, msg); 8019908: 68f9 ldr r1, [r7, #12] 801990a: 2008 movs r0, #8 801990c: f000 fe60 bl 801a5d0 return ERR_MEM; 8019910: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8019914: e000 b.n 8019918 } return ERR_OK; 8019916: 2300 movs r3, #0 } 8019918: 4618 mov r0, r3 801991a: 3710 adds r7, #16 801991c: 46bd mov sp, r7 801991e: bd80 pop {r7, pc} 8019920: 24024420 .word 0x24024420 8019924: 0802e9cc .word 0x0802e9cc 8019928: 0802ea44 .word 0x0802ea44 801992c: 0802ea1c .word 0x0802ea1c 08019930 : * @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) { 8019930: b580 push {r7, lr} 8019932: b084 sub sp, #16 8019934: af00 add r7, sp, #0 8019936: 60f8 str r0, [r7, #12] 8019938: 60b9 str r1, [r7, #8] 801993a: 607a str r2, [r7, #4] #if LWIP_TCPIP_CORE_LOCKING LWIP_UNUSED_ARG(sem); LOCK_TCPIP_CORE(); 801993c: f7f7 fb66 bl 801100c fn(apimsg); 8019940: 68fb ldr r3, [r7, #12] 8019942: 68b8 ldr r0, [r7, #8] 8019944: 4798 blx r3 UNLOCK_TCPIP_CORE(); 8019946: f7f7 fb71 bl 801102c return ERR_OK; 801994a: 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 */ } 801994c: 4618 mov r0, r3 801994e: 3710 adds r7, #16 8019950: 46bd mov sp, r7 8019952: bd80 pop {r7, pc} 08019954 : * @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) { 8019954: b580 push {r7, lr} 8019956: b084 sub sp, #16 8019958: af02 add r7, sp, #8 801995a: 6078 str r0, [r7, #4] 801995c: 6039 str r1, [r7, #0] lwip_init(); 801995e: f000 f92d bl 8019bbc tcpip_init_done = initfunc; 8019962: 4a17 ldr r2, [pc, #92] @ (80199c0 ) 8019964: 687b ldr r3, [r7, #4] 8019966: 6013 str r3, [r2, #0] tcpip_init_done_arg = arg; 8019968: 4a16 ldr r2, [pc, #88] @ (80199c4 ) 801996a: 683b ldr r3, [r7, #0] 801996c: 6013 str r3, [r2, #0] if (sys_mbox_new(&tcpip_mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 801996e: 2106 movs r1, #6 8019970: 4815 ldr r0, [pc, #84] @ (80199c8 ) 8019972: f00d fb65 bl 8027040 8019976: 4603 mov r3, r0 8019978: 2b00 cmp r3, #0 801997a: d006 beq.n 801998a LWIP_ASSERT("failed to create tcpip_thread mbox", 0); 801997c: 4b13 ldr r3, [pc, #76] @ (80199cc ) 801997e: f240 2261 movw r2, #609 @ 0x261 8019982: 4913 ldr r1, [pc, #76] @ (80199d0 ) 8019984: 4813 ldr r0, [pc, #76] @ (80199d4 ) 8019986: f010 ff89 bl 802a89c } #if LWIP_TCPIP_CORE_LOCKING if (sys_mutex_new(&lock_tcpip_core) != ERR_OK) { 801998a: 4813 ldr r0, [pc, #76] @ (80199d8 ) 801998c: f00d fc9e bl 80272cc 8019990: 4603 mov r3, r0 8019992: 2b00 cmp r3, #0 8019994: d006 beq.n 80199a4 LWIP_ASSERT("failed to create lock_tcpip_core", 0); 8019996: 4b0d ldr r3, [pc, #52] @ (80199cc ) 8019998: f240 2265 movw r2, #613 @ 0x265 801999c: 490f ldr r1, [pc, #60] @ (80199dc ) 801999e: 480d ldr r0, [pc, #52] @ (80199d4 ) 80199a0: f010 ff7c bl 802a89c } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO); 80199a4: 2330 movs r3, #48 @ 0x30 80199a6: 9300 str r3, [sp, #0] 80199a8: f44f 5380 mov.w r3, #4096 @ 0x1000 80199ac: 2200 movs r2, #0 80199ae: 490c ldr r1, [pc, #48] @ (80199e0 ) 80199b0: 480c ldr r0, [pc, #48] @ (80199e4 ) 80199b2: f00d fcbd bl 8027330 } 80199b6: bf00 nop 80199b8: 3708 adds r7, #8 80199ba: 46bd mov sp, r7 80199bc: bd80 pop {r7, pc} 80199be: bf00 nop 80199c0: 24024418 .word 0x24024418 80199c4: 2402441c .word 0x2402441c 80199c8: 24024420 .word 0x24024420 80199cc: 0802e9cc .word 0x0802e9cc 80199d0: 0802ea54 .word 0x0802ea54 80199d4: 0802ea1c .word 0x0802ea1c 80199d8: 24024424 .word 0x24024424 80199dc: 0802ea78 .word 0x0802ea78 80199e0: 080196ed .word 0x080196ed 80199e4: 0802ea9c .word 0x0802ea9c 080199e8 : * @param n u16_t in host byte order * @return n in network byte order */ u16_t lwip_htons(u16_t n) { 80199e8: b480 push {r7} 80199ea: b083 sub sp, #12 80199ec: af00 add r7, sp, #0 80199ee: 4603 mov r3, r0 80199f0: 80fb strh r3, [r7, #6] return PP_HTONS(n); 80199f2: 88fb ldrh r3, [r7, #6] 80199f4: 021b lsls r3, r3, #8 80199f6: b21a sxth r2, r3 80199f8: 88fb ldrh r3, [r7, #6] 80199fa: 0a1b lsrs r3, r3, #8 80199fc: b29b uxth r3, r3 80199fe: b21b sxth r3, r3 8019a00: 4313 orrs r3, r2 8019a02: b21b sxth r3, r3 8019a04: b29b uxth r3, r3 } 8019a06: 4618 mov r0, r3 8019a08: 370c adds r7, #12 8019a0a: 46bd mov sp, r7 8019a0c: f85d 7b04 ldr.w r7, [sp], #4 8019a10: 4770 bx lr 08019a12 : * @param n u32_t in host byte order * @return n in network byte order */ u32_t lwip_htonl(u32_t n) { 8019a12: b480 push {r7} 8019a14: b083 sub sp, #12 8019a16: af00 add r7, sp, #0 8019a18: 6078 str r0, [r7, #4] return PP_HTONL(n); 8019a1a: 687b ldr r3, [r7, #4] 8019a1c: 061a lsls r2, r3, #24 8019a1e: 687b ldr r3, [r7, #4] 8019a20: 021b lsls r3, r3, #8 8019a22: f403 037f and.w r3, r3, #16711680 @ 0xff0000 8019a26: 431a orrs r2, r3 8019a28: 687b ldr r3, [r7, #4] 8019a2a: 0a1b lsrs r3, r3, #8 8019a2c: f403 437f and.w r3, r3, #65280 @ 0xff00 8019a30: 431a orrs r2, r3 8019a32: 687b ldr r3, [r7, #4] 8019a34: 0e1b lsrs r3, r3, #24 8019a36: 4313 orrs r3, r2 } 8019a38: 4618 mov r0, r3 8019a3a: 370c adds r7, #12 8019a3c: 46bd mov sp, r7 8019a3e: f85d 7b04 ldr.w r7, [sp], #4 8019a42: 4770 bx lr 08019a44 : * @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) { 8019a44: b480 push {r7} 8019a46: b089 sub sp, #36 @ 0x24 8019a48: af00 add r7, sp, #0 8019a4a: 6078 str r0, [r7, #4] 8019a4c: 6039 str r1, [r7, #0] const u8_t *pb = (const u8_t *)dataptr; 8019a4e: 687b ldr r3, [r7, #4] 8019a50: 61fb str r3, [r7, #28] const u16_t *ps; u16_t t = 0; 8019a52: 2300 movs r3, #0 8019a54: 81fb strh r3, [r7, #14] u32_t sum = 0; 8019a56: 2300 movs r3, #0 8019a58: 617b str r3, [r7, #20] int odd = ((mem_ptr_t)pb & 1); 8019a5a: 69fb ldr r3, [r7, #28] 8019a5c: f003 0301 and.w r3, r3, #1 8019a60: 613b str r3, [r7, #16] /* Get aligned to u16_t */ if (odd && len > 0) { 8019a62: 693b ldr r3, [r7, #16] 8019a64: 2b00 cmp r3, #0 8019a66: d00d beq.n 8019a84 8019a68: 683b ldr r3, [r7, #0] 8019a6a: 2b00 cmp r3, #0 8019a6c: dd0a ble.n 8019a84 ((u8_t *)&t)[1] = *pb++; 8019a6e: 69fa ldr r2, [r7, #28] 8019a70: 1c53 adds r3, r2, #1 8019a72: 61fb str r3, [r7, #28] 8019a74: f107 030e add.w r3, r7, #14 8019a78: 3301 adds r3, #1 8019a7a: 7812 ldrb r2, [r2, #0] 8019a7c: 701a strb r2, [r3, #0] len--; 8019a7e: 683b ldr r3, [r7, #0] 8019a80: 3b01 subs r3, #1 8019a82: 603b str r3, [r7, #0] } /* Add the bulk of the data */ ps = (const u16_t *)(const void *)pb; 8019a84: 69fb ldr r3, [r7, #28] 8019a86: 61bb str r3, [r7, #24] while (len > 1) { 8019a88: e00a b.n 8019aa0 sum += *ps++; 8019a8a: 69bb ldr r3, [r7, #24] 8019a8c: 1c9a adds r2, r3, #2 8019a8e: 61ba str r2, [r7, #24] 8019a90: 881b ldrh r3, [r3, #0] 8019a92: 461a mov r2, r3 8019a94: 697b ldr r3, [r7, #20] 8019a96: 4413 add r3, r2 8019a98: 617b str r3, [r7, #20] len -= 2; 8019a9a: 683b ldr r3, [r7, #0] 8019a9c: 3b02 subs r3, #2 8019a9e: 603b str r3, [r7, #0] while (len > 1) { 8019aa0: 683b ldr r3, [r7, #0] 8019aa2: 2b01 cmp r3, #1 8019aa4: dcf1 bgt.n 8019a8a } /* Consume left-over byte, if any */ if (len > 0) { 8019aa6: 683b ldr r3, [r7, #0] 8019aa8: 2b00 cmp r3, #0 8019aaa: dd04 ble.n 8019ab6 ((u8_t *)&t)[0] = *(const u8_t *)ps; 8019aac: f107 030e add.w r3, r7, #14 8019ab0: 69ba ldr r2, [r7, #24] 8019ab2: 7812 ldrb r2, [r2, #0] 8019ab4: 701a strb r2, [r3, #0] } /* Add end bytes */ sum += t; 8019ab6: 89fb ldrh r3, [r7, #14] 8019ab8: 461a mov r2, r3 8019aba: 697b ldr r3, [r7, #20] 8019abc: 4413 add r3, r2 8019abe: 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); 8019ac0: 697b ldr r3, [r7, #20] 8019ac2: 0c1a lsrs r2, r3, #16 8019ac4: 697b ldr r3, [r7, #20] 8019ac6: b29b uxth r3, r3 8019ac8: 4413 add r3, r2 8019aca: 617b str r3, [r7, #20] sum = FOLD_U32T(sum); 8019acc: 697b ldr r3, [r7, #20] 8019ace: 0c1a lsrs r2, r3, #16 8019ad0: 697b ldr r3, [r7, #20] 8019ad2: b29b uxth r3, r3 8019ad4: 4413 add r3, r2 8019ad6: 617b str r3, [r7, #20] /* Swap if alignment was odd */ if (odd) { 8019ad8: 693b ldr r3, [r7, #16] 8019ada: 2b00 cmp r3, #0 8019adc: d007 beq.n 8019aee sum = SWAP_BYTES_IN_WORD(sum); 8019ade: 697b ldr r3, [r7, #20] 8019ae0: 021b lsls r3, r3, #8 8019ae2: b29a uxth r2, r3 8019ae4: 697b ldr r3, [r7, #20] 8019ae6: 0a1b lsrs r3, r3, #8 8019ae8: b2db uxtb r3, r3 8019aea: 4313 orrs r3, r2 8019aec: 617b str r3, [r7, #20] } return (u16_t)sum; 8019aee: 697b ldr r3, [r7, #20] 8019af0: b29b uxth r3, r3 } 8019af2: 4618 mov r0, r3 8019af4: 3724 adds r7, #36 @ 0x24 8019af6: 46bd mov sp, r7 8019af8: f85d 7b04 ldr.w r7, [sp], #4 8019afc: 4770 bx lr 08019afe : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(const void *dataptr, u16_t len) { 8019afe: b580 push {r7, lr} 8019b00: b082 sub sp, #8 8019b02: af00 add r7, sp, #0 8019b04: 6078 str r0, [r7, #4] 8019b06: 460b mov r3, r1 8019b08: 807b strh r3, [r7, #2] return (u16_t)~(unsigned int)LWIP_CHKSUM(dataptr, len); 8019b0a: 887b ldrh r3, [r7, #2] 8019b0c: 4619 mov r1, r3 8019b0e: 6878 ldr r0, [r7, #4] 8019b10: f7ff ff98 bl 8019a44 8019b14: 4603 mov r3, r0 8019b16: 43db mvns r3, r3 8019b18: b29b uxth r3, r3 } 8019b1a: 4618 mov r0, r3 8019b1c: 3708 adds r7, #8 8019b1e: 46bd mov sp, r7 8019b20: bd80 pop {r7, pc} 08019b22 : * @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) { 8019b22: b580 push {r7, lr} 8019b24: b086 sub sp, #24 8019b26: af00 add r7, sp, #0 8019b28: 6078 str r0, [r7, #4] u32_t acc; struct pbuf *q; int swapped = 0; 8019b2a: 2300 movs r3, #0 8019b2c: 60fb str r3, [r7, #12] acc = 0; 8019b2e: 2300 movs r3, #0 8019b30: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 8019b32: 687b ldr r3, [r7, #4] 8019b34: 613b str r3, [r7, #16] 8019b36: e02b b.n 8019b90 acc += LWIP_CHKSUM(q->payload, q->len); 8019b38: 693b ldr r3, [r7, #16] 8019b3a: 685a ldr r2, [r3, #4] 8019b3c: 693b ldr r3, [r7, #16] 8019b3e: 895b ldrh r3, [r3, #10] 8019b40: 4619 mov r1, r3 8019b42: 4610 mov r0, r2 8019b44: f7ff ff7e bl 8019a44 8019b48: 4603 mov r3, r0 8019b4a: 461a mov r2, r3 8019b4c: 697b ldr r3, [r7, #20] 8019b4e: 4413 add r3, r2 8019b50: 617b str r3, [r7, #20] acc = FOLD_U32T(acc); 8019b52: 697b ldr r3, [r7, #20] 8019b54: 0c1a lsrs r2, r3, #16 8019b56: 697b ldr r3, [r7, #20] 8019b58: b29b uxth r3, r3 8019b5a: 4413 add r3, r2 8019b5c: 617b str r3, [r7, #20] if (q->len % 2 != 0) { 8019b5e: 693b ldr r3, [r7, #16] 8019b60: 895b ldrh r3, [r3, #10] 8019b62: f003 0301 and.w r3, r3, #1 8019b66: b29b uxth r3, r3 8019b68: 2b00 cmp r3, #0 8019b6a: d00e beq.n 8019b8a swapped = !swapped; 8019b6c: 68fb ldr r3, [r7, #12] 8019b6e: 2b00 cmp r3, #0 8019b70: bf0c ite eq 8019b72: 2301 moveq r3, #1 8019b74: 2300 movne r3, #0 8019b76: b2db uxtb r3, r3 8019b78: 60fb str r3, [r7, #12] acc = SWAP_BYTES_IN_WORD(acc); 8019b7a: 697b ldr r3, [r7, #20] 8019b7c: 021b lsls r3, r3, #8 8019b7e: b29a uxth r2, r3 8019b80: 697b ldr r3, [r7, #20] 8019b82: 0a1b lsrs r3, r3, #8 8019b84: b2db uxtb r3, r3 8019b86: 4313 orrs r3, r2 8019b88: 617b str r3, [r7, #20] for (q = p; q != NULL; q = q->next) { 8019b8a: 693b ldr r3, [r7, #16] 8019b8c: 681b ldr r3, [r3, #0] 8019b8e: 613b str r3, [r7, #16] 8019b90: 693b ldr r3, [r7, #16] 8019b92: 2b00 cmp r3, #0 8019b94: d1d0 bne.n 8019b38 } } if (swapped) { 8019b96: 68fb ldr r3, [r7, #12] 8019b98: 2b00 cmp r3, #0 8019b9a: d007 beq.n 8019bac acc = SWAP_BYTES_IN_WORD(acc); 8019b9c: 697b ldr r3, [r7, #20] 8019b9e: 021b lsls r3, r3, #8 8019ba0: b29a uxth r2, r3 8019ba2: 697b ldr r3, [r7, #20] 8019ba4: 0a1b lsrs r3, r3, #8 8019ba6: b2db uxtb r3, r3 8019ba8: 4313 orrs r3, r2 8019baa: 617b str r3, [r7, #20] } return (u16_t)~(acc & 0xffffUL); 8019bac: 697b ldr r3, [r7, #20] 8019bae: b29b uxth r3, r3 8019bb0: 43db mvns r3, r3 8019bb2: b29b uxth r3, r3 } 8019bb4: 4618 mov r0, r3 8019bb6: 3718 adds r7, #24 8019bb8: 46bd mov sp, r7 8019bba: bd80 pop {r7, pc} 08019bbc : * Initialize all modules. * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ void lwip_init(void) { 8019bbc: b580 push {r7, lr} 8019bbe: b082 sub sp, #8 8019bc0: af00 add r7, sp, #0 #ifndef LWIP_SKIP_CONST_CHECK int a = 0; 8019bc2: 2300 movs r3, #0 8019bc4: 607b str r3, [r7, #4] #endif /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 8019bc6: f00d fb75 bl 80272b4 #endif /* !NO_SYS */ mem_init(); 8019bca: f000 f8d3 bl 8019d74 memp_init(); 8019bce: f000 fc1b bl 801a408 pbuf_init(); netif_init(); 8019bd2: f000 fd27 bl 801a624 #endif /* LWIP_IPV4 */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 8019bd6: f008 f8db bl 8021d90 #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 8019bda: f001 fe91 bl 801b900 #if PPP_SUPPORT ppp_init(); #endif #if LWIP_TIMERS sys_timeouts_init(); 8019bde: f008 f817 bl 8021c10 #endif /* LWIP_TIMERS */ } 8019be2: bf00 nop 8019be4: 3708 adds r7, #8 8019be6: 46bd mov sp, r7 8019be8: bd80 pop {r7, pc} ... 08019bec : #define mem_overflow_check_element(mem) #endif /* MEM_OVERFLOW_CHECK */ static struct mem * ptr_to_mem(mem_size_t ptr) { 8019bec: b480 push {r7} 8019bee: b083 sub sp, #12 8019bf0: af00 add r7, sp, #0 8019bf2: 6078 str r0, [r7, #4] return (struct mem *)(void *)&ram[ptr]; 8019bf4: 4b04 ldr r3, [pc, #16] @ (8019c08 ) 8019bf6: 681a ldr r2, [r3, #0] 8019bf8: 687b ldr r3, [r7, #4] 8019bfa: 4413 add r3, r2 } 8019bfc: 4618 mov r0, r3 8019bfe: 370c adds r7, #12 8019c00: 46bd mov sp, r7 8019c02: f85d 7b04 ldr.w r7, [sp], #4 8019c06: 4770 bx lr 8019c08: 24024440 .word 0x24024440 08019c0c : static mem_size_t mem_to_ptr(void *mem) { 8019c0c: b480 push {r7} 8019c0e: b083 sub sp, #12 8019c10: af00 add r7, sp, #0 8019c12: 6078 str r0, [r7, #4] return (mem_size_t)((u8_t *)mem - ram); 8019c14: 4b04 ldr r3, [pc, #16] @ (8019c28 ) 8019c16: 681b ldr r3, [r3, #0] 8019c18: 687a ldr r2, [r7, #4] 8019c1a: 1ad3 subs r3, r2, r3 } 8019c1c: 4618 mov r0, r3 8019c1e: 370c adds r7, #12 8019c20: 46bd mov sp, r7 8019c22: f85d 7b04 ldr.w r7, [sp], #4 8019c26: 4770 bx lr 8019c28: 24024440 .word 0x24024440 08019c2c : * This assumes access to the heap is protected by the calling function * already. */ static void plug_holes(struct mem *mem) { 8019c2c: b590 push {r4, r7, lr} 8019c2e: b085 sub sp, #20 8019c30: af00 add r7, sp, #0 8019c32: 6078 str r0, [r7, #4] struct mem *nmem; struct mem *pmem; LWIP_ASSERT("plug_holes: mem >= ram", (u8_t *)mem >= ram); 8019c34: 4b45 ldr r3, [pc, #276] @ (8019d4c ) 8019c36: 681b ldr r3, [r3, #0] 8019c38: 687a ldr r2, [r7, #4] 8019c3a: 429a cmp r2, r3 8019c3c: d206 bcs.n 8019c4c 8019c3e: 4b44 ldr r3, [pc, #272] @ (8019d50 ) 8019c40: f240 12df movw r2, #479 @ 0x1df 8019c44: 4943 ldr r1, [pc, #268] @ (8019d54 ) 8019c46: 4844 ldr r0, [pc, #272] @ (8019d58 ) 8019c48: f010 fe28 bl 802a89c LWIP_ASSERT("plug_holes: mem < ram_end", (u8_t *)mem < (u8_t *)ram_end); 8019c4c: 4b43 ldr r3, [pc, #268] @ (8019d5c ) 8019c4e: 681b ldr r3, [r3, #0] 8019c50: 687a ldr r2, [r7, #4] 8019c52: 429a cmp r2, r3 8019c54: d306 bcc.n 8019c64 8019c56: 4b3e ldr r3, [pc, #248] @ (8019d50 ) 8019c58: f44f 72f0 mov.w r2, #480 @ 0x1e0 8019c5c: 4940 ldr r1, [pc, #256] @ (8019d60 ) 8019c5e: 483e ldr r0, [pc, #248] @ (8019d58 ) 8019c60: f010 fe1c bl 802a89c LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); 8019c64: 687b ldr r3, [r7, #4] 8019c66: 7a1b ldrb r3, [r3, #8] 8019c68: 2b00 cmp r3, #0 8019c6a: d006 beq.n 8019c7a 8019c6c: 4b38 ldr r3, [pc, #224] @ (8019d50 ) 8019c6e: f240 12e1 movw r2, #481 @ 0x1e1 8019c72: 493c ldr r1, [pc, #240] @ (8019d64 ) 8019c74: 4838 ldr r0, [pc, #224] @ (8019d58 ) 8019c76: f010 fe11 bl 802a89c /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); 8019c7a: 687b ldr r3, [r7, #4] 8019c7c: 681b ldr r3, [r3, #0] 8019c7e: 4a3a ldr r2, [pc, #232] @ (8019d68 ) 8019c80: 4293 cmp r3, r2 8019c82: d906 bls.n 8019c92 8019c84: 4b32 ldr r3, [pc, #200] @ (8019d50 ) 8019c86: f44f 72f2 mov.w r2, #484 @ 0x1e4 8019c8a: 4938 ldr r1, [pc, #224] @ (8019d6c ) 8019c8c: 4832 ldr r0, [pc, #200] @ (8019d58 ) 8019c8e: f010 fe05 bl 802a89c nmem = ptr_to_mem(mem->next); 8019c92: 687b ldr r3, [r7, #4] 8019c94: 681b ldr r3, [r3, #0] 8019c96: 4618 mov r0, r3 8019c98: f7ff ffa8 bl 8019bec 8019c9c: 60f8 str r0, [r7, #12] if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 8019c9e: 687a ldr r2, [r7, #4] 8019ca0: 68fb ldr r3, [r7, #12] 8019ca2: 429a cmp r2, r3 8019ca4: d024 beq.n 8019cf0 8019ca6: 68fb ldr r3, [r7, #12] 8019ca8: 7a1b ldrb r3, [r3, #8] 8019caa: 2b00 cmp r3, #0 8019cac: d120 bne.n 8019cf0 8019cae: 4b2b ldr r3, [pc, #172] @ (8019d5c ) 8019cb0: 681b ldr r3, [r3, #0] 8019cb2: 68fa ldr r2, [r7, #12] 8019cb4: 429a cmp r2, r3 8019cb6: d01b beq.n 8019cf0 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 8019cb8: 4b2d ldr r3, [pc, #180] @ (8019d70 ) 8019cba: 681b ldr r3, [r3, #0] 8019cbc: 68fa ldr r2, [r7, #12] 8019cbe: 429a cmp r2, r3 8019cc0: d102 bne.n 8019cc8 lfree = mem; 8019cc2: 4a2b ldr r2, [pc, #172] @ (8019d70 ) 8019cc4: 687b ldr r3, [r7, #4] 8019cc6: 6013 str r3, [r2, #0] } mem->next = nmem->next; 8019cc8: 68fb ldr r3, [r7, #12] 8019cca: 681a ldr r2, [r3, #0] 8019ccc: 687b ldr r3, [r7, #4] 8019cce: 601a str r2, [r3, #0] if (nmem->next != MEM_SIZE_ALIGNED) { 8019cd0: 68fb ldr r3, [r7, #12] 8019cd2: 681b ldr r3, [r3, #0] 8019cd4: 4a24 ldr r2, [pc, #144] @ (8019d68 ) 8019cd6: 4293 cmp r3, r2 8019cd8: d00a beq.n 8019cf0 ptr_to_mem(nmem->next)->prev = mem_to_ptr(mem); 8019cda: 68fb ldr r3, [r7, #12] 8019cdc: 681b ldr r3, [r3, #0] 8019cde: 4618 mov r0, r3 8019ce0: f7ff ff84 bl 8019bec 8019ce4: 4604 mov r4, r0 8019ce6: 6878 ldr r0, [r7, #4] 8019ce8: f7ff ff90 bl 8019c0c 8019cec: 4603 mov r3, r0 8019cee: 6063 str r3, [r4, #4] } } /* plug hole backward */ pmem = ptr_to_mem(mem->prev); 8019cf0: 687b ldr r3, [r7, #4] 8019cf2: 685b ldr r3, [r3, #4] 8019cf4: 4618 mov r0, r3 8019cf6: f7ff ff79 bl 8019bec 8019cfa: 60b8 str r0, [r7, #8] if (pmem != mem && pmem->used == 0) { 8019cfc: 68ba ldr r2, [r7, #8] 8019cfe: 687b ldr r3, [r7, #4] 8019d00: 429a cmp r2, r3 8019d02: d01f beq.n 8019d44 8019d04: 68bb ldr r3, [r7, #8] 8019d06: 7a1b ldrb r3, [r3, #8] 8019d08: 2b00 cmp r3, #0 8019d0a: d11b bne.n 8019d44 /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 8019d0c: 4b18 ldr r3, [pc, #96] @ (8019d70 ) 8019d0e: 681b ldr r3, [r3, #0] 8019d10: 687a ldr r2, [r7, #4] 8019d12: 429a cmp r2, r3 8019d14: d102 bne.n 8019d1c lfree = pmem; 8019d16: 4a16 ldr r2, [pc, #88] @ (8019d70 ) 8019d18: 68bb ldr r3, [r7, #8] 8019d1a: 6013 str r3, [r2, #0] } pmem->next = mem->next; 8019d1c: 687b ldr r3, [r7, #4] 8019d1e: 681a ldr r2, [r3, #0] 8019d20: 68bb ldr r3, [r7, #8] 8019d22: 601a str r2, [r3, #0] if (mem->next != MEM_SIZE_ALIGNED) { 8019d24: 687b ldr r3, [r7, #4] 8019d26: 681b ldr r3, [r3, #0] 8019d28: 4a0f ldr r2, [pc, #60] @ (8019d68 ) 8019d2a: 4293 cmp r3, r2 8019d2c: d00a beq.n 8019d44 ptr_to_mem(mem->next)->prev = mem_to_ptr(pmem); 8019d2e: 687b ldr r3, [r7, #4] 8019d30: 681b ldr r3, [r3, #0] 8019d32: 4618 mov r0, r3 8019d34: f7ff ff5a bl 8019bec 8019d38: 4604 mov r4, r0 8019d3a: 68b8 ldr r0, [r7, #8] 8019d3c: f7ff ff66 bl 8019c0c 8019d40: 4603 mov r3, r0 8019d42: 6063 str r3, [r4, #4] } } } 8019d44: bf00 nop 8019d46: 3714 adds r7, #20 8019d48: 46bd mov sp, r7 8019d4a: bd90 pop {r4, r7, pc} 8019d4c: 24024440 .word 0x24024440 8019d50: 0802eaac .word 0x0802eaac 8019d54: 0802eadc .word 0x0802eadc 8019d58: 0802eaf4 .word 0x0802eaf4 8019d5c: 24024444 .word 0x24024444 8019d60: 0802eb1c .word 0x0802eb1c 8019d64: 0802eb38 .word 0x0802eb38 8019d68: 0001ffe8 .word 0x0001ffe8 8019d6c: 0802eb54 .word 0x0802eb54 8019d70: 2402444c .word 0x2402444c 08019d74 : /** * Zero the heap and initialize start, end and lowest-free */ void mem_init(void) { 8019d74: b580 push {r7, lr} 8019d76: b082 sub sp, #8 8019d78: 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); 8019d7a: 4b1b ldr r3, [pc, #108] @ (8019de8 ) 8019d7c: 4a1b ldr r2, [pc, #108] @ (8019dec ) 8019d7e: 601a str r2, [r3, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; 8019d80: 4b19 ldr r3, [pc, #100] @ (8019de8 ) 8019d82: 681b ldr r3, [r3, #0] 8019d84: 607b str r3, [r7, #4] mem->next = MEM_SIZE_ALIGNED; 8019d86: 687b ldr r3, [r7, #4] 8019d88: 4a19 ldr r2, [pc, #100] @ (8019df0 ) 8019d8a: 601a str r2, [r3, #0] mem->prev = 0; 8019d8c: 687b ldr r3, [r7, #4] 8019d8e: 2200 movs r2, #0 8019d90: 605a str r2, [r3, #4] mem->used = 0; 8019d92: 687b ldr r3, [r7, #4] 8019d94: 2200 movs r2, #0 8019d96: 721a strb r2, [r3, #8] /* initialize the end of the heap */ ram_end = ptr_to_mem(MEM_SIZE_ALIGNED); 8019d98: 4815 ldr r0, [pc, #84] @ (8019df0 ) 8019d9a: f7ff ff27 bl 8019bec 8019d9e: 4603 mov r3, r0 8019da0: 4a14 ldr r2, [pc, #80] @ (8019df4 ) 8019da2: 6013 str r3, [r2, #0] ram_end->used = 1; 8019da4: 4b13 ldr r3, [pc, #76] @ (8019df4 ) 8019da6: 681b ldr r3, [r3, #0] 8019da8: 2201 movs r2, #1 8019daa: 721a strb r2, [r3, #8] ram_end->next = MEM_SIZE_ALIGNED; 8019dac: 4b11 ldr r3, [pc, #68] @ (8019df4 ) 8019dae: 681b ldr r3, [r3, #0] 8019db0: 4a0f ldr r2, [pc, #60] @ (8019df0 ) 8019db2: 601a str r2, [r3, #0] ram_end->prev = MEM_SIZE_ALIGNED; 8019db4: 4b0f ldr r3, [pc, #60] @ (8019df4 ) 8019db6: 681b ldr r3, [r3, #0] 8019db8: 4a0d ldr r2, [pc, #52] @ (8019df0 ) 8019dba: 605a str r2, [r3, #4] MEM_SANITY(); /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; 8019dbc: 4b0a ldr r3, [pc, #40] @ (8019de8 ) 8019dbe: 681b ldr r3, [r3, #0] 8019dc0: 4a0d ldr r2, [pc, #52] @ (8019df8 ) 8019dc2: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if (sys_mutex_new(&mem_mutex) != ERR_OK) { 8019dc4: 480d ldr r0, [pc, #52] @ (8019dfc ) 8019dc6: f00d fa81 bl 80272cc 8019dca: 4603 mov r3, r0 8019dcc: 2b00 cmp r3, #0 8019dce: d006 beq.n 8019dde LWIP_ASSERT("failed to create mem_mutex", 0); 8019dd0: 4b0b ldr r3, [pc, #44] @ (8019e00 ) 8019dd2: f240 221f movw r2, #543 @ 0x21f 8019dd6: 490b ldr r1, [pc, #44] @ (8019e04 ) 8019dd8: 480b ldr r0, [pc, #44] @ (8019e08 ) 8019dda: f010 fd5f bl 802a89c } } 8019dde: bf00 nop 8019de0: 3708 adds r7, #8 8019de2: 46bd mov sp, r7 8019de4: bd80 pop {r7, pc} 8019de6: bf00 nop 8019de8: 24024440 .word 0x24024440 8019dec: 24020000 .word 0x24020000 8019df0: 0001ffe8 .word 0x0001ffe8 8019df4: 24024444 .word 0x24024444 8019df8: 2402444c .word 0x2402444c 8019dfc: 24024448 .word 0x24024448 8019e00: 0802eaac .word 0x0802eaac 8019e04: 0802eb80 .word 0x0802eb80 8019e08: 0802eaf4 .word 0x0802eaf4 08019e0c : /* Check if a struct mem is correctly linked. * If not, double-free is a possible reason. */ static int mem_link_valid(struct mem *mem) { 8019e0c: b580 push {r7, lr} 8019e0e: b086 sub sp, #24 8019e10: af00 add r7, sp, #0 8019e12: 6078 str r0, [r7, #4] struct mem *nmem, *pmem; mem_size_t rmem_idx; rmem_idx = mem_to_ptr(mem); 8019e14: 6878 ldr r0, [r7, #4] 8019e16: f7ff fef9 bl 8019c0c 8019e1a: 6178 str r0, [r7, #20] nmem = ptr_to_mem(mem->next); 8019e1c: 687b ldr r3, [r7, #4] 8019e1e: 681b ldr r3, [r3, #0] 8019e20: 4618 mov r0, r3 8019e22: f7ff fee3 bl 8019bec 8019e26: 6138 str r0, [r7, #16] pmem = ptr_to_mem(mem->prev); 8019e28: 687b ldr r3, [r7, #4] 8019e2a: 685b ldr r3, [r3, #4] 8019e2c: 4618 mov r0, r3 8019e2e: f7ff fedd bl 8019bec 8019e32: 60f8 str r0, [r7, #12] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 8019e34: 687b ldr r3, [r7, #4] 8019e36: 681b ldr r3, [r3, #0] 8019e38: 4a11 ldr r2, [pc, #68] @ (8019e80 ) 8019e3a: 4293 cmp r3, r2 8019e3c: d818 bhi.n 8019e70 8019e3e: 687b ldr r3, [r7, #4] 8019e40: 685b ldr r3, [r3, #4] 8019e42: 4a0f ldr r2, [pc, #60] @ (8019e80 ) 8019e44: 4293 cmp r3, r2 8019e46: d813 bhi.n 8019e70 ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8019e48: 687b ldr r3, [r7, #4] 8019e4a: 685b ldr r3, [r3, #4] if ((mem->next > MEM_SIZE_ALIGNED) || (mem->prev > MEM_SIZE_ALIGNED) || 8019e4c: 697a ldr r2, [r7, #20] 8019e4e: 429a cmp r2, r3 8019e50: d004 beq.n 8019e5c ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8019e52: 68fb ldr r3, [r7, #12] 8019e54: 681b ldr r3, [r3, #0] 8019e56: 697a ldr r2, [r7, #20] 8019e58: 429a cmp r2, r3 8019e5a: d109 bne.n 8019e70 ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 8019e5c: 4b09 ldr r3, [pc, #36] @ (8019e84 ) 8019e5e: 681b ldr r3, [r3, #0] ((mem->prev != rmem_idx) && (pmem->next != rmem_idx)) || 8019e60: 693a ldr r2, [r7, #16] 8019e62: 429a cmp r2, r3 8019e64: d006 beq.n 8019e74 ((nmem != ram_end) && (nmem->prev != rmem_idx))) { 8019e66: 693b ldr r3, [r7, #16] 8019e68: 685b ldr r3, [r3, #4] 8019e6a: 697a ldr r2, [r7, #20] 8019e6c: 429a cmp r2, r3 8019e6e: d001 beq.n 8019e74 return 0; 8019e70: 2300 movs r3, #0 8019e72: e000 b.n 8019e76 } return 1; 8019e74: 2301 movs r3, #1 } 8019e76: 4618 mov r0, r3 8019e78: 3718 adds r7, #24 8019e7a: 46bd mov sp, r7 8019e7c: bd80 pop {r7, pc} 8019e7e: bf00 nop 8019e80: 0001ffe8 .word 0x0001ffe8 8019e84: 24024444 .word 0x24024444 08019e88 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 8019e88: b580 push {r7, lr} 8019e8a: b088 sub sp, #32 8019e8c: af00 add r7, sp, #0 8019e8e: 6078 str r0, [r7, #4] struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 8019e90: 687b ldr r3, [r7, #4] 8019e92: 2b00 cmp r3, #0 8019e94: d070 beq.n 8019f78 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) { 8019e96: 687b ldr r3, [r7, #4] 8019e98: f003 0303 and.w r3, r3, #3 8019e9c: 2b00 cmp r3, #0 8019e9e: d00d beq.n 8019ebc LWIP_MEM_ILLEGAL_FREE("mem_free: sanity check alignment"); 8019ea0: 4b37 ldr r3, [pc, #220] @ (8019f80 ) 8019ea2: f240 2273 movw r2, #627 @ 0x273 8019ea6: 4937 ldr r1, [pc, #220] @ (8019f84 ) 8019ea8: 4837 ldr r0, [pc, #220] @ (8019f88 ) 8019eaa: f010 fcf7 bl 802a89c 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); 8019eae: f00d fa5f bl 8027370 8019eb2: 60f8 str r0, [r7, #12] 8019eb4: 68f8 ldr r0, [r7, #12] 8019eb6: f00d fa69 bl 802738c return; 8019eba: e05e b.n 8019f7a } /* 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)); 8019ebc: 687b ldr r3, [r7, #4] 8019ebe: 3b0c subs r3, #12 8019ec0: 61fb str r3, [r7, #28] if ((u8_t *)mem < ram || (u8_t *)rmem + MIN_SIZE_ALIGNED > (u8_t *)ram_end) { 8019ec2: 4b32 ldr r3, [pc, #200] @ (8019f8c ) 8019ec4: 681b ldr r3, [r3, #0] 8019ec6: 69fa ldr r2, [r7, #28] 8019ec8: 429a cmp r2, r3 8019eca: d306 bcc.n 8019eda 8019ecc: 687b ldr r3, [r7, #4] 8019ece: f103 020c add.w r2, r3, #12 8019ed2: 4b2f ldr r3, [pc, #188] @ (8019f90 ) 8019ed4: 681b ldr r3, [r3, #0] 8019ed6: 429a cmp r2, r3 8019ed8: d90d bls.n 8019ef6 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory"); 8019eda: 4b29 ldr r3, [pc, #164] @ (8019f80 ) 8019edc: f240 227f movw r2, #639 @ 0x27f 8019ee0: 492c ldr r1, [pc, #176] @ (8019f94 ) 8019ee2: 4829 ldr r0, [pc, #164] @ (8019f88 ) 8019ee4: f010 fcda bl 802a89c LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); 8019ee8: f00d fa42 bl 8027370 8019eec: 6138 str r0, [r7, #16] 8019eee: 6938 ldr r0, [r7, #16] 8019ef0: f00d fa4c bl 802738c return; 8019ef4: e041 b.n 8019f7a } #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 8019ef6: 4828 ldr r0, [pc, #160] @ (8019f98 ) 8019ef8: f00d f9fe bl 80272f8 /* mem has to be in a used state */ if (!mem->used) { 8019efc: 69fb ldr r3, [r7, #28] 8019efe: 7a1b ldrb r3, [r3, #8] 8019f00: 2b00 cmp r3, #0 8019f02: d110 bne.n 8019f26 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: double free"); 8019f04: 4b1e ldr r3, [pc, #120] @ (8019f80 ) 8019f06: f44f 7223 mov.w r2, #652 @ 0x28c 8019f0a: 4924 ldr r1, [pc, #144] @ (8019f9c ) 8019f0c: 481e ldr r0, [pc, #120] @ (8019f88 ) 8019f0e: f010 fcc5 bl 802a89c LWIP_MEM_FREE_UNPROTECT(); 8019f12: 4821 ldr r0, [pc, #132] @ (8019f98 ) 8019f14: f00d f9ff bl 8027316 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); 8019f18: f00d fa2a bl 8027370 8019f1c: 6178 str r0, [r7, #20] 8019f1e: 6978 ldr r0, [r7, #20] 8019f20: f00d fa34 bl 802738c return; 8019f24: e029 b.n 8019f7a } if (!mem_link_valid(mem)) { 8019f26: 69f8 ldr r0, [r7, #28] 8019f28: f7ff ff70 bl 8019e0c 8019f2c: 4603 mov r3, r0 8019f2e: 2b00 cmp r3, #0 8019f30: d110 bne.n 8019f54 LWIP_MEM_ILLEGAL_FREE("mem_free: illegal memory: non-linked: double free"); 8019f32: 4b13 ldr r3, [pc, #76] @ (8019f80 ) 8019f34: f240 2295 movw r2, #661 @ 0x295 8019f38: 4919 ldr r1, [pc, #100] @ (8019fa0 ) 8019f3a: 4813 ldr r0, [pc, #76] @ (8019f88 ) 8019f3c: f010 fcae bl 802a89c LWIP_MEM_FREE_UNPROTECT(); 8019f40: 4815 ldr r0, [pc, #84] @ (8019f98 ) 8019f42: f00d f9e8 bl 8027316 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); 8019f46: f00d fa13 bl 8027370 8019f4a: 61b8 str r0, [r7, #24] 8019f4c: 69b8 ldr r0, [r7, #24] 8019f4e: f00d fa1d bl 802738c return; 8019f52: e012 b.n 8019f7a } /* mem is now unused. */ mem->used = 0; 8019f54: 69fb ldr r3, [r7, #28] 8019f56: 2200 movs r2, #0 8019f58: 721a strb r2, [r3, #8] if (mem < lfree) { 8019f5a: 4b12 ldr r3, [pc, #72] @ (8019fa4 ) 8019f5c: 681b ldr r3, [r3, #0] 8019f5e: 69fa ldr r2, [r7, #28] 8019f60: 429a cmp r2, r3 8019f62: d202 bcs.n 8019f6a /* the newly freed struct is now the lowest */ lfree = mem; 8019f64: 4a0f ldr r2, [pc, #60] @ (8019fa4 ) 8019f66: 69fb ldr r3, [r7, #28] 8019f68: 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); 8019f6a: 69f8 ldr r0, [r7, #28] 8019f6c: f7ff fe5e bl 8019c2c 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(); 8019f70: 4809 ldr r0, [pc, #36] @ (8019f98 ) 8019f72: f00d f9d0 bl 8027316 8019f76: e000 b.n 8019f7a return; 8019f78: bf00 nop } 8019f7a: 3720 adds r7, #32 8019f7c: 46bd mov sp, r7 8019f7e: bd80 pop {r7, pc} 8019f80: 0802eaac .word 0x0802eaac 8019f84: 0802eb9c .word 0x0802eb9c 8019f88: 0802eaf4 .word 0x0802eaf4 8019f8c: 24024440 .word 0x24024440 8019f90: 24024444 .word 0x24024444 8019f94: 0802ebc0 .word 0x0802ebc0 8019f98: 24024448 .word 0x24024448 8019f9c: 0802ebdc .word 0x0802ebdc 8019fa0: 0802ec04 .word 0x0802ec04 8019fa4: 2402444c .word 0x2402444c 08019fa8 : * 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) { 8019fa8: b580 push {r7, lr} 8019faa: b08a sub sp, #40 @ 0x28 8019fac: af00 add r7, sp, #0 8019fae: 6078 str r0, [r7, #4] 8019fb0: 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); 8019fb2: 683b ldr r3, [r7, #0] 8019fb4: 3303 adds r3, #3 8019fb6: f023 0303 bic.w r3, r3, #3 8019fba: 627b str r3, [r7, #36] @ 0x24 if (newsize < MIN_SIZE_ALIGNED) { 8019fbc: 6a7b ldr r3, [r7, #36] @ 0x24 8019fbe: 2b0b cmp r3, #11 8019fc0: d801 bhi.n 8019fc6 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; 8019fc2: 230c movs r3, #12 8019fc4: 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)) { 8019fc6: 6a7b ldr r3, [r7, #36] @ 0x24 8019fc8: 4a6e ldr r2, [pc, #440] @ (801a184 ) 8019fca: 4293 cmp r3, r2 8019fcc: d803 bhi.n 8019fd6 8019fce: 6a7a ldr r2, [r7, #36] @ 0x24 8019fd0: 683b ldr r3, [r7, #0] 8019fd2: 429a cmp r2, r3 8019fd4: d201 bcs.n 8019fda return NULL; 8019fd6: 2300 movs r3, #0 8019fd8: e0d0 b.n 801a17c } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && 8019fda: 4b6b ldr r3, [pc, #428] @ (801a188 ) 8019fdc: 681b ldr r3, [r3, #0] 8019fde: 687a ldr r2, [r7, #4] 8019fe0: 429a cmp r2, r3 8019fe2: d304 bcc.n 8019fee 8019fe4: 4b69 ldr r3, [pc, #420] @ (801a18c ) 8019fe6: 681b ldr r3, [r3, #0] 8019fe8: 687a ldr r2, [r7, #4] 8019fea: 429a cmp r2, r3 8019fec: d306 bcc.n 8019ffc 8019fee: 4b68 ldr r3, [pc, #416] @ (801a190 ) 8019ff0: f240 22d1 movw r2, #721 @ 0x2d1 8019ff4: 4967 ldr r1, [pc, #412] @ (801a194 ) 8019ff6: 4868 ldr r0, [pc, #416] @ (801a198 ) 8019ff8: f010 fc50 bl 802a89c (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 8019ffc: 4b62 ldr r3, [pc, #392] @ (801a188 ) 8019ffe: 681b ldr r3, [r3, #0] 801a000: 687a ldr r2, [r7, #4] 801a002: 429a cmp r2, r3 801a004: d304 bcc.n 801a010 801a006: 4b61 ldr r3, [pc, #388] @ (801a18c ) 801a008: 681b ldr r3, [r3, #0] 801a00a: 687a ldr r2, [r7, #4] 801a00c: 429a cmp r2, r3 801a00e: d307 bcc.n 801a020 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); /* protect mem stats from concurrent access */ MEM_STATS_INC_LOCKED(illegal); 801a010: f00d f9ae bl 8027370 801a014: 60b8 str r0, [r7, #8] 801a016: 68b8 ldr r0, [r7, #8] 801a018: f00d f9b8 bl 802738c return rmem; 801a01c: 687b ldr r3, [r7, #4] 801a01e: e0ad b.n 801a17c } /* 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)); 801a020: 687b ldr r3, [r7, #4] 801a022: 3b0c subs r3, #12 801a024: 623b str r3, [r7, #32] #if MEM_OVERFLOW_CHECK mem_overflow_check_element(mem); #endif /* ... and its offset pointer */ ptr = mem_to_ptr(mem); 801a026: 6a38 ldr r0, [r7, #32] 801a028: f7ff fdf0 bl 8019c0c 801a02c: 61f8 str r0, [r7, #28] size = (mem_size_t)((mem_size_t)(mem->next - ptr) - (SIZEOF_STRUCT_MEM + MEM_SANITY_OVERHEAD)); 801a02e: 6a3b ldr r3, [r7, #32] 801a030: 681a ldr r2, [r3, #0] 801a032: 69fb ldr r3, [r7, #28] 801a034: 1ad3 subs r3, r2, r3 801a036: 3b0c subs r3, #12 801a038: 61bb str r3, [r7, #24] LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); 801a03a: 6a7a ldr r2, [r7, #36] @ 0x24 801a03c: 69bb ldr r3, [r7, #24] 801a03e: 429a cmp r2, r3 801a040: d906 bls.n 801a050 801a042: 4b53 ldr r3, [pc, #332] @ (801a190 ) 801a044: f44f 7239 mov.w r2, #740 @ 0x2e4 801a048: 4954 ldr r1, [pc, #336] @ (801a19c ) 801a04a: 4853 ldr r0, [pc, #332] @ (801a198 ) 801a04c: f010 fc26 bl 802a89c if (newsize > size) { 801a050: 6a7a ldr r2, [r7, #36] @ 0x24 801a052: 69bb ldr r3, [r7, #24] 801a054: 429a cmp r2, r3 801a056: d901 bls.n 801a05c /* not supported */ return NULL; 801a058: 2300 movs r3, #0 801a05a: e08f b.n 801a17c } if (newsize == size) { 801a05c: 6a7a ldr r2, [r7, #36] @ 0x24 801a05e: 69bb ldr r3, [r7, #24] 801a060: 429a cmp r2, r3 801a062: d101 bne.n 801a068 /* No change in size, simply return */ return rmem; 801a064: 687b ldr r3, [r7, #4] 801a066: e089 b.n 801a17c } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 801a068: 484d ldr r0, [pc, #308] @ (801a1a0 ) 801a06a: f00d f945 bl 80272f8 mem2 = ptr_to_mem(mem->next); 801a06e: 6a3b ldr r3, [r7, #32] 801a070: 681b ldr r3, [r3, #0] 801a072: 4618 mov r0, r3 801a074: f7ff fdba bl 8019bec 801a078: 6178 str r0, [r7, #20] if (mem2->used == 0) { 801a07a: 697b ldr r3, [r7, #20] 801a07c: 7a1b ldrb r3, [r3, #8] 801a07e: 2b00 cmp r3, #0 801a080: d13c bne.n 801a0fc /* 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); 801a082: 6a3b ldr r3, [r7, #32] 801a084: 681b ldr r3, [r3, #0] 801a086: 4a3f ldr r2, [pc, #252] @ (801a184 ) 801a088: 4293 cmp r3, r2 801a08a: d106 bne.n 801a09a 801a08c: 4b40 ldr r3, [pc, #256] @ (801a190 ) 801a08e: f240 22f5 movw r2, #757 @ 0x2f5 801a092: 4944 ldr r1, [pc, #272] @ (801a1a4 ) 801a094: 4840 ldr r0, [pc, #256] @ (801a198 ) 801a096: f010 fc01 bl 802a89c /* remember the old next pointer */ next = mem2->next; 801a09a: 697b ldr r3, [r7, #20] 801a09c: 681b ldr r3, [r3, #0] 801a09e: 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); 801a0a0: 69fa ldr r2, [r7, #28] 801a0a2: 6a7b ldr r3, [r7, #36] @ 0x24 801a0a4: 4413 add r3, r2 801a0a6: 330c adds r3, #12 801a0a8: 613b str r3, [r7, #16] if (lfree == mem2) { 801a0aa: 4b3f ldr r3, [pc, #252] @ (801a1a8 ) 801a0ac: 681b ldr r3, [r3, #0] 801a0ae: 697a ldr r2, [r7, #20] 801a0b0: 429a cmp r2, r3 801a0b2: d105 bne.n 801a0c0 lfree = ptr_to_mem(ptr2); 801a0b4: 6938 ldr r0, [r7, #16] 801a0b6: f7ff fd99 bl 8019bec 801a0ba: 4603 mov r3, r0 801a0bc: 4a3a ldr r2, [pc, #232] @ (801a1a8 ) 801a0be: 6013 str r3, [r2, #0] } mem2 = ptr_to_mem(ptr2); 801a0c0: 6938 ldr r0, [r7, #16] 801a0c2: f7ff fd93 bl 8019bec 801a0c6: 6178 str r0, [r7, #20] mem2->used = 0; 801a0c8: 697b ldr r3, [r7, #20] 801a0ca: 2200 movs r2, #0 801a0cc: 721a strb r2, [r3, #8] /* restore the next pointer */ mem2->next = next; 801a0ce: 697b ldr r3, [r7, #20] 801a0d0: 68fa ldr r2, [r7, #12] 801a0d2: 601a str r2, [r3, #0] /* link it back to mem */ mem2->prev = ptr; 801a0d4: 697b ldr r3, [r7, #20] 801a0d6: 69fa ldr r2, [r7, #28] 801a0d8: 605a str r2, [r3, #4] /* link mem to it */ mem->next = ptr2; 801a0da: 6a3b ldr r3, [r7, #32] 801a0dc: 693a ldr r2, [r7, #16] 801a0de: 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) { 801a0e0: 697b ldr r3, [r7, #20] 801a0e2: 681b ldr r3, [r3, #0] 801a0e4: 4a27 ldr r2, [pc, #156] @ (801a184 ) 801a0e6: 4293 cmp r3, r2 801a0e8: d044 beq.n 801a174 ptr_to_mem(mem2->next)->prev = ptr2; 801a0ea: 697b ldr r3, [r7, #20] 801a0ec: 681b ldr r3, [r3, #0] 801a0ee: 4618 mov r0, r3 801a0f0: f7ff fd7c bl 8019bec 801a0f4: 4602 mov r2, r0 801a0f6: 693b ldr r3, [r7, #16] 801a0f8: 6053 str r3, [r2, #4] 801a0fa: e03b b.n 801a174 } 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) { 801a0fc: 6a7b ldr r3, [r7, #36] @ 0x24 801a0fe: 3318 adds r3, #24 801a100: 69ba ldr r2, [r7, #24] 801a102: 429a cmp r2, r3 801a104: d336 bcc.n 801a174 * 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); 801a106: 69fa ldr r2, [r7, #28] 801a108: 6a7b ldr r3, [r7, #36] @ 0x24 801a10a: 4413 add r3, r2 801a10c: 330c adds r3, #12 801a10e: 613b str r3, [r7, #16] LWIP_ASSERT("invalid next ptr", mem->next != MEM_SIZE_ALIGNED); 801a110: 6a3b ldr r3, [r7, #32] 801a112: 681b ldr r3, [r3, #0] 801a114: 4a1b ldr r2, [pc, #108] @ (801a184 ) 801a116: 4293 cmp r3, r2 801a118: d106 bne.n 801a128 801a11a: 4b1d ldr r3, [pc, #116] @ (801a190 ) 801a11c: f240 3216 movw r2, #790 @ 0x316 801a120: 4920 ldr r1, [pc, #128] @ (801a1a4 ) 801a122: 481d ldr r0, [pc, #116] @ (801a198 ) 801a124: f010 fbba bl 802a89c mem2 = ptr_to_mem(ptr2); 801a128: 6938 ldr r0, [r7, #16] 801a12a: f7ff fd5f bl 8019bec 801a12e: 6178 str r0, [r7, #20] if (mem2 < lfree) { 801a130: 4b1d ldr r3, [pc, #116] @ (801a1a8 ) 801a132: 681b ldr r3, [r3, #0] 801a134: 697a ldr r2, [r7, #20] 801a136: 429a cmp r2, r3 801a138: d202 bcs.n 801a140 lfree = mem2; 801a13a: 4a1b ldr r2, [pc, #108] @ (801a1a8 ) 801a13c: 697b ldr r3, [r7, #20] 801a13e: 6013 str r3, [r2, #0] } mem2->used = 0; 801a140: 697b ldr r3, [r7, #20] 801a142: 2200 movs r2, #0 801a144: 721a strb r2, [r3, #8] mem2->next = mem->next; 801a146: 6a3b ldr r3, [r7, #32] 801a148: 681a ldr r2, [r3, #0] 801a14a: 697b ldr r3, [r7, #20] 801a14c: 601a str r2, [r3, #0] mem2->prev = ptr; 801a14e: 697b ldr r3, [r7, #20] 801a150: 69fa ldr r2, [r7, #28] 801a152: 605a str r2, [r3, #4] mem->next = ptr2; 801a154: 6a3b ldr r3, [r7, #32] 801a156: 693a ldr r2, [r7, #16] 801a158: 601a str r2, [r3, #0] if (mem2->next != MEM_SIZE_ALIGNED) { 801a15a: 697b ldr r3, [r7, #20] 801a15c: 681b ldr r3, [r3, #0] 801a15e: 4a09 ldr r2, [pc, #36] @ (801a184 ) 801a160: 4293 cmp r3, r2 801a162: d007 beq.n 801a174 ptr_to_mem(mem2->next)->prev = ptr2; 801a164: 697b ldr r3, [r7, #20] 801a166: 681b ldr r3, [r3, #0] 801a168: 4618 mov r0, r3 801a16a: f7ff fd3f bl 8019bec 801a16e: 4602 mov r2, r0 801a170: 693b ldr r3, [r7, #16] 801a172: 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(); 801a174: 480a ldr r0, [pc, #40] @ (801a1a0 ) 801a176: f00d f8ce bl 8027316 return rmem; 801a17a: 687b ldr r3, [r7, #4] } 801a17c: 4618 mov r0, r3 801a17e: 3728 adds r7, #40 @ 0x28 801a180: 46bd mov sp, r7 801a182: bd80 pop {r7, pc} 801a184: 0001ffe8 .word 0x0001ffe8 801a188: 24024440 .word 0x24024440 801a18c: 24024444 .word 0x24024444 801a190: 0802eaac .word 0x0802eaac 801a194: 0802ec38 .word 0x0802ec38 801a198: 0802eaf4 .word 0x0802eaf4 801a19c: 0802ec50 .word 0x0802ec50 801a1a0: 24024448 .word 0x24024448 801a1a4: 0802ec70 .word 0x0802ec70 801a1a8: 2402444c .word 0x2402444c 0801a1ac : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size_in) { 801a1ac: b580 push {r7, lr} 801a1ae: b088 sub sp, #32 801a1b0: af00 add r7, sp, #0 801a1b2: 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) { 801a1b4: 687b ldr r3, [r7, #4] 801a1b6: 2b00 cmp r3, #0 801a1b8: d101 bne.n 801a1be return NULL; 801a1ba: 2300 movs r3, #0 801a1bc: e0d9 b.n 801a372 } /* 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); 801a1be: 687b ldr r3, [r7, #4] 801a1c0: 3303 adds r3, #3 801a1c2: f023 0303 bic.w r3, r3, #3 801a1c6: 61bb str r3, [r7, #24] if (size < MIN_SIZE_ALIGNED) { 801a1c8: 69bb ldr r3, [r7, #24] 801a1ca: 2b0b cmp r3, #11 801a1cc: d801 bhi.n 801a1d2 /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; 801a1ce: 230c movs r3, #12 801a1d0: 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)) { 801a1d2: 69bb ldr r3, [r7, #24] 801a1d4: 4a69 ldr r2, [pc, #420] @ (801a37c ) 801a1d6: 4293 cmp r3, r2 801a1d8: d803 bhi.n 801a1e2 801a1da: 69ba ldr r2, [r7, #24] 801a1dc: 687b ldr r3, [r7, #4] 801a1de: 429a cmp r2, r3 801a1e0: d201 bcs.n 801a1e6 return NULL; 801a1e2: 2300 movs r3, #0 801a1e4: e0c5 b.n 801a372 } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 801a1e6: 4866 ldr r0, [pc, #408] @ (801a380 ) 801a1e8: f00d f886 bl 80272f8 #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; 801a1ec: 4b65 ldr r3, [pc, #404] @ (801a384 ) 801a1ee: 681b ldr r3, [r3, #0] 801a1f0: 4618 mov r0, r3 801a1f2: f7ff fd0b bl 8019c0c 801a1f6: 61f8 str r0, [r7, #28] 801a1f8: e0b0 b.n 801a35c ptr = ptr_to_mem(ptr)->next) { mem = ptr_to_mem(ptr); 801a1fa: 69f8 ldr r0, [r7, #28] 801a1fc: f7ff fcf6 bl 8019bec 801a200: 6138 str r0, [r7, #16] local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 801a202: 693b ldr r3, [r7, #16] 801a204: 7a1b ldrb r3, [r3, #8] 801a206: 2b00 cmp r3, #0 801a208: f040 80a2 bne.w 801a350 (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 801a20c: 693b ldr r3, [r7, #16] 801a20e: 681a ldr r2, [r3, #0] 801a210: 69fb ldr r3, [r7, #28] 801a212: 1ad3 subs r3, r2, r3 801a214: 3b0c subs r3, #12 if ((!mem->used) && 801a216: 69ba ldr r2, [r7, #24] 801a218: 429a cmp r2, r3 801a21a: f200 8099 bhi.w 801a350 /* 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)) { 801a21e: 693b ldr r3, [r7, #16] 801a220: 681a ldr r2, [r3, #0] 801a222: 69fb ldr r3, [r7, #28] 801a224: 1ad3 subs r3, r2, r3 801a226: f1a3 020c sub.w r2, r3, #12 801a22a: 69bb ldr r3, [r7, #24] 801a22c: 3318 adds r3, #24 801a22e: 429a cmp r2, r3 801a230: d331 bcc.n 801a296 * 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); 801a232: 69fa ldr r2, [r7, #28] 801a234: 69bb ldr r3, [r7, #24] 801a236: 4413 add r3, r2 801a238: 330c adds r3, #12 801a23a: 60fb str r3, [r7, #12] LWIP_ASSERT("invalid next ptr",ptr2 != MEM_SIZE_ALIGNED); 801a23c: 68fb ldr r3, [r7, #12] 801a23e: 4a4f ldr r2, [pc, #316] @ (801a37c ) 801a240: 4293 cmp r3, r2 801a242: d106 bne.n 801a252 801a244: 4b50 ldr r3, [pc, #320] @ (801a388 ) 801a246: f240 3287 movw r2, #903 @ 0x387 801a24a: 4950 ldr r1, [pc, #320] @ (801a38c ) 801a24c: 4850 ldr r0, [pc, #320] @ (801a390 ) 801a24e: f010 fb25 bl 802a89c /* create mem2 struct */ mem2 = ptr_to_mem(ptr2); 801a252: 68f8 ldr r0, [r7, #12] 801a254: f7ff fcca bl 8019bec 801a258: 60b8 str r0, [r7, #8] mem2->used = 0; 801a25a: 68bb ldr r3, [r7, #8] 801a25c: 2200 movs r2, #0 801a25e: 721a strb r2, [r3, #8] mem2->next = mem->next; 801a260: 693b ldr r3, [r7, #16] 801a262: 681a ldr r2, [r3, #0] 801a264: 68bb ldr r3, [r7, #8] 801a266: 601a str r2, [r3, #0] mem2->prev = ptr; 801a268: 68bb ldr r3, [r7, #8] 801a26a: 69fa ldr r2, [r7, #28] 801a26c: 605a str r2, [r3, #4] /* and insert it between mem and mem->next */ mem->next = ptr2; 801a26e: 693b ldr r3, [r7, #16] 801a270: 68fa ldr r2, [r7, #12] 801a272: 601a str r2, [r3, #0] mem->used = 1; 801a274: 693b ldr r3, [r7, #16] 801a276: 2201 movs r2, #1 801a278: 721a strb r2, [r3, #8] if (mem2->next != MEM_SIZE_ALIGNED) { 801a27a: 68bb ldr r3, [r7, #8] 801a27c: 681b ldr r3, [r3, #0] 801a27e: 4a3f ldr r2, [pc, #252] @ (801a37c ) 801a280: 4293 cmp r3, r2 801a282: d00b beq.n 801a29c ptr_to_mem(mem2->next)->prev = ptr2; 801a284: 68bb ldr r3, [r7, #8] 801a286: 681b ldr r3, [r3, #0] 801a288: 4618 mov r0, r3 801a28a: f7ff fcaf bl 8019bec 801a28e: 4602 mov r2, r0 801a290: 68fb ldr r3, [r7, #12] 801a292: 6053 str r3, [r2, #4] 801a294: e002 b.n 801a29c * 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; 801a296: 693b ldr r3, [r7, #16] 801a298: 2201 movs r2, #1 801a29a: 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) { 801a29c: 4b39 ldr r3, [pc, #228] @ (801a384 ) 801a29e: 681b ldr r3, [r3, #0] 801a2a0: 693a ldr r2, [r7, #16] 801a2a2: 429a cmp r2, r3 801a2a4: d127 bne.n 801a2f6 struct mem *cur = lfree; 801a2a6: 4b37 ldr r3, [pc, #220] @ (801a384 ) 801a2a8: 681b ldr r3, [r3, #0] 801a2aa: 617b str r3, [r7, #20] /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 801a2ac: e005 b.n 801a2ba /* 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); 801a2ae: 697b ldr r3, [r7, #20] 801a2b0: 681b ldr r3, [r3, #0] 801a2b2: 4618 mov r0, r3 801a2b4: f7ff fc9a bl 8019bec 801a2b8: 6178 str r0, [r7, #20] while (cur->used && cur != ram_end) { 801a2ba: 697b ldr r3, [r7, #20] 801a2bc: 7a1b ldrb r3, [r3, #8] 801a2be: 2b00 cmp r3, #0 801a2c0: d004 beq.n 801a2cc 801a2c2: 4b34 ldr r3, [pc, #208] @ (801a394 ) 801a2c4: 681b ldr r3, [r3, #0] 801a2c6: 697a ldr r2, [r7, #20] 801a2c8: 429a cmp r2, r3 801a2ca: d1f0 bne.n 801a2ae } lfree = cur; 801a2cc: 4a2d ldr r2, [pc, #180] @ (801a384 ) 801a2ce: 697b ldr r3, [r7, #20] 801a2d0: 6013 str r3, [r2, #0] LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); 801a2d2: 4b2c ldr r3, [pc, #176] @ (801a384 ) 801a2d4: 681a ldr r2, [r3, #0] 801a2d6: 4b2f ldr r3, [pc, #188] @ (801a394 ) 801a2d8: 681b ldr r3, [r3, #0] 801a2da: 429a cmp r2, r3 801a2dc: d00b beq.n 801a2f6 801a2de: 4b29 ldr r3, [pc, #164] @ (801a384 ) 801a2e0: 681b ldr r3, [r3, #0] 801a2e2: 7a1b ldrb r3, [r3, #8] 801a2e4: 2b00 cmp r3, #0 801a2e6: d006 beq.n 801a2f6 801a2e8: 4b27 ldr r3, [pc, #156] @ (801a388 ) 801a2ea: f240 32b5 movw r2, #949 @ 0x3b5 801a2ee: 492a ldr r1, [pc, #168] @ (801a398 ) 801a2f0: 4827 ldr r0, [pc, #156] @ (801a390 ) 801a2f2: f010 fad3 bl 802a89c } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 801a2f6: 4822 ldr r0, [pc, #136] @ (801a380 ) 801a2f8: f00d f80d bl 8027316 LWIP_ASSERT("mem_malloc: allocated memory not above ram_end.", 801a2fc: 693a ldr r2, [r7, #16] 801a2fe: 69bb ldr r3, [r7, #24] 801a300: 4413 add r3, r2 801a302: 330c adds r3, #12 801a304: 4a23 ldr r2, [pc, #140] @ (801a394 ) 801a306: 6812 ldr r2, [r2, #0] 801a308: 4293 cmp r3, r2 801a30a: d906 bls.n 801a31a 801a30c: 4b1e ldr r3, [pc, #120] @ (801a388 ) 801a30e: f240 32b9 movw r2, #953 @ 0x3b9 801a312: 4922 ldr r1, [pc, #136] @ (801a39c ) 801a314: 481e ldr r0, [pc, #120] @ (801a390 ) 801a316: f010 fac1 bl 802a89c (mem_ptr_t)mem + SIZEOF_STRUCT_MEM + size <= (mem_ptr_t)ram_end); LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", 801a31a: 693b ldr r3, [r7, #16] 801a31c: f003 0303 and.w r3, r3, #3 801a320: 2b00 cmp r3, #0 801a322: d006 beq.n 801a332 801a324: 4b18 ldr r3, [pc, #96] @ (801a388 ) 801a326: f240 32bb movw r2, #955 @ 0x3bb 801a32a: 491d ldr r1, [pc, #116] @ (801a3a0 ) 801a32c: 4818 ldr r0, [pc, #96] @ (801a390 ) 801a32e: f010 fab5 bl 802a89c ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", 801a332: 693b ldr r3, [r7, #16] 801a334: f003 0303 and.w r3, r3, #3 801a338: 2b00 cmp r3, #0 801a33a: d006 beq.n 801a34a 801a33c: 4b12 ldr r3, [pc, #72] @ (801a388 ) 801a33e: f240 32bd movw r2, #957 @ 0x3bd 801a342: 4918 ldr r1, [pc, #96] @ (801a3a4 ) 801a344: 4812 ldr r0, [pc, #72] @ (801a390 ) 801a346: f010 faa9 bl 802a89c #if MEM_OVERFLOW_CHECK mem_overflow_init_element(mem, size_in); #endif MEM_SANITY(); return (u8_t *)mem + SIZEOF_STRUCT_MEM + MEM_SANITY_OFFSET; 801a34a: 693b ldr r3, [r7, #16] 801a34c: 330c adds r3, #12 801a34e: e010 b.n 801a372 ptr = ptr_to_mem(ptr)->next) { 801a350: 69f8 ldr r0, [r7, #28] 801a352: f7ff fc4b bl 8019bec 801a356: 4603 mov r3, r0 801a358: 681b ldr r3, [r3, #0] 801a35a: 61fb str r3, [r7, #28] for (ptr = mem_to_ptr(lfree); ptr < MEM_SIZE_ALIGNED - size; 801a35c: 69ba ldr r2, [r7, #24] 801a35e: 4b07 ldr r3, [pc, #28] @ (801a37c ) 801a360: 1a9b subs r3, r3, r2 801a362: 69fa ldr r2, [r7, #28] 801a364: 429a cmp r2, r3 801a366: f4ff af48 bcc.w 801a1fa /* 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); 801a36a: 4805 ldr r0, [pc, #20] @ (801a380 ) 801a36c: f00c ffd3 bl 8027316 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); return NULL; 801a370: 2300 movs r3, #0 } 801a372: 4618 mov r0, r3 801a374: 3720 adds r7, #32 801a376: 46bd mov sp, r7 801a378: bd80 pop {r7, pc} 801a37a: bf00 nop 801a37c: 0001ffe8 .word 0x0001ffe8 801a380: 24024448 .word 0x24024448 801a384: 2402444c .word 0x2402444c 801a388: 0802eaac .word 0x0802eaac 801a38c: 0802ec70 .word 0x0802ec70 801a390: 0802eaf4 .word 0x0802eaf4 801a394: 24024444 .word 0x24024444 801a398: 0802ec84 .word 0x0802ec84 801a39c: 0802eca0 .word 0x0802eca0 801a3a0: 0802ecd0 .word 0x0802ecd0 801a3a4: 0802ed00 .word 0x0802ed00 0801a3a8 : * * @param desc pool to initialize */ void memp_init_pool(const struct memp_desc *desc) { 801a3a8: b480 push {r7} 801a3aa: b085 sub sp, #20 801a3ac: af00 add r7, sp, #0 801a3ae: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(desc); #else int i; struct memp *memp; *desc->tab = NULL; 801a3b0: 687b ldr r3, [r7, #4] 801a3b2: 68db ldr r3, [r3, #12] 801a3b4: 2200 movs r2, #0 801a3b6: 601a str r2, [r3, #0] memp = (struct memp *)LWIP_MEM_ALIGN(desc->base); 801a3b8: 687b ldr r3, [r7, #4] 801a3ba: 689b ldr r3, [r3, #8] 801a3bc: 3303 adds r3, #3 801a3be: f023 0303 bic.w r3, r3, #3 801a3c2: 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) { 801a3c4: 2300 movs r3, #0 801a3c6: 60fb str r3, [r7, #12] 801a3c8: e011 b.n 801a3ee memp->next = *desc->tab; 801a3ca: 687b ldr r3, [r7, #4] 801a3cc: 68db ldr r3, [r3, #12] 801a3ce: 681a ldr r2, [r3, #0] 801a3d0: 68bb ldr r3, [r7, #8] 801a3d2: 601a str r2, [r3, #0] *desc->tab = memp; 801a3d4: 687b ldr r3, [r7, #4] 801a3d6: 68db ldr r3, [r3, #12] 801a3d8: 68ba ldr r2, [r7, #8] 801a3da: 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 801a3dc: 687b ldr r3, [r7, #4] 801a3de: 889b ldrh r3, [r3, #4] 801a3e0: 461a mov r2, r3 801a3e2: 68bb ldr r3, [r7, #8] 801a3e4: 4413 add r3, r2 801a3e6: 60bb str r3, [r7, #8] for (i = 0; i < desc->num; ++i) { 801a3e8: 68fb ldr r3, [r7, #12] 801a3ea: 3301 adds r3, #1 801a3ec: 60fb str r3, [r7, #12] 801a3ee: 687b ldr r3, [r7, #4] 801a3f0: 88db ldrh r3, [r3, #6] 801a3f2: 461a mov r2, r3 801a3f4: 68fb ldr r3, [r7, #12] 801a3f6: 4293 cmp r3, r2 801a3f8: dbe7 blt.n 801a3ca #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) */ } 801a3fa: bf00 nop 801a3fc: bf00 nop 801a3fe: 3714 adds r7, #20 801a400: 46bd mov sp, r7 801a402: f85d 7b04 ldr.w r7, [sp], #4 801a406: 4770 bx lr 0801a408 : * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 801a408: b580 push {r7, lr} 801a40a: b082 sub sp, #8 801a40c: af00 add r7, sp, #0 u16_t i; /* for every pool: */ for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 801a40e: 2300 movs r3, #0 801a410: 80fb strh r3, [r7, #6] 801a412: e009 b.n 801a428 memp_init_pool(memp_pools[i]); 801a414: 88fb ldrh r3, [r7, #6] 801a416: 4a08 ldr r2, [pc, #32] @ (801a438 ) 801a418: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801a41c: 4618 mov r0, r3 801a41e: f7ff ffc3 bl 801a3a8 for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { 801a422: 88fb ldrh r3, [r7, #6] 801a424: 3301 adds r3, #1 801a426: 80fb strh r3, [r7, #6] 801a428: 88fb ldrh r3, [r7, #6] 801a42a: 2b0c cmp r3, #12 801a42c: d9f2 bls.n 801a414 #if MEMP_OVERFLOW_CHECK >= 2 /* check everything a first time to see if it worked */ memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ } 801a42e: bf00 nop 801a430: bf00 nop 801a432: 3708 adds r7, #8 801a434: 46bd mov sp, r7 801a436: bd80 pop {r7, pc} 801a438: 08031c24 .word 0x08031c24 0801a43c : #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 { 801a43c: b580 push {r7, lr} 801a43e: b084 sub sp, #16 801a440: af00 add r7, sp, #0 801a442: 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); 801a444: f00c ff94 bl 8027370 801a448: 60f8 str r0, [r7, #12] memp = *desc->tab; 801a44a: 687b ldr r3, [r7, #4] 801a44c: 68db ldr r3, [r3, #12] 801a44e: 681b ldr r3, [r3, #0] 801a450: 60bb str r3, [r7, #8] #endif /* MEMP_MEM_MALLOC */ if (memp != NULL) { 801a452: 68bb ldr r3, [r7, #8] 801a454: 2b00 cmp r3, #0 801a456: d015 beq.n 801a484 #if !MEMP_MEM_MALLOC #if MEMP_OVERFLOW_CHECK == 1 memp_overflow_check_element(memp, desc); #endif /* MEMP_OVERFLOW_CHECK */ *desc->tab = memp->next; 801a458: 687b ldr r3, [r7, #4] 801a45a: 68db ldr r3, [r3, #12] 801a45c: 68ba ldr r2, [r7, #8] 801a45e: 6812 ldr r2, [r2, #0] 801a460: 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", 801a462: 68bb ldr r3, [r7, #8] 801a464: f003 0303 and.w r3, r3, #3 801a468: 2b00 cmp r3, #0 801a46a: d006 beq.n 801a47a 801a46c: 4b09 ldr r3, [pc, #36] @ (801a494 ) 801a46e: f44f 728c mov.w r2, #280 @ 0x118 801a472: 4909 ldr r1, [pc, #36] @ (801a498 ) 801a474: 4809 ldr r0, [pc, #36] @ (801a49c ) 801a476: f010 fa11 bl 802a89c desc->stats->used++; if (desc->stats->used > desc->stats->max) { desc->stats->max = desc->stats->used; } #endif SYS_ARCH_UNPROTECT(old_level); 801a47a: 68f8 ldr r0, [r7, #12] 801a47c: f00c ff86 bl 802738c /* cast through u8_t* to get rid of alignment warnings */ return ((u8_t *)memp + MEMP_SIZE); 801a480: 68bb ldr r3, [r7, #8] 801a482: e003 b.n 801a48c } else { #if MEMP_STATS desc->stats->err++; #endif SYS_ARCH_UNPROTECT(old_level); 801a484: 68f8 ldr r0, [r7, #12] 801a486: f00c ff81 bl 802738c LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", desc->desc)); } return NULL; 801a48a: 2300 movs r3, #0 } 801a48c: 4618 mov r0, r3 801a48e: 3710 adds r7, #16 801a490: 46bd mov sp, r7 801a492: bd80 pop {r7, pc} 801a494: 0802edbc .word 0x0802edbc 801a498: 0802edec .word 0x0802edec 801a49c: 0802ee10 .word 0x0802ee10 0801a4a0 : #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 { 801a4a0: b580 push {r7, lr} 801a4a2: b082 sub sp, #8 801a4a4: af00 add r7, sp, #0 801a4a6: 6078 str r0, [r7, #4] LWIP_ASSERT("invalid pool desc", desc != NULL); 801a4a8: 687b ldr r3, [r7, #4] 801a4aa: 2b00 cmp r3, #0 801a4ac: d106 bne.n 801a4bc 801a4ae: 4b0a ldr r3, [pc, #40] @ (801a4d8 ) 801a4b0: f44f 729e mov.w r2, #316 @ 0x13c 801a4b4: 4909 ldr r1, [pc, #36] @ (801a4dc ) 801a4b6: 480a ldr r0, [pc, #40] @ (801a4e0 ) 801a4b8: f010 f9f0 bl 802a89c if (desc == NULL) { 801a4bc: 687b ldr r3, [r7, #4] 801a4be: 2b00 cmp r3, #0 801a4c0: d101 bne.n 801a4c6 return NULL; 801a4c2: 2300 movs r3, #0 801a4c4: e003 b.n 801a4ce } #if !MEMP_OVERFLOW_CHECK return do_memp_malloc_pool(desc); 801a4c6: 6878 ldr r0, [r7, #4] 801a4c8: f7ff ffb8 bl 801a43c 801a4cc: 4603 mov r3, r0 #else return do_memp_malloc_pool_fn(desc, file, line); #endif } 801a4ce: 4618 mov r0, r3 801a4d0: 3708 adds r7, #8 801a4d2: 46bd mov sp, r7 801a4d4: bd80 pop {r7, pc} 801a4d6: bf00 nop 801a4d8: 0802edbc .word 0x0802edbc 801a4dc: 0802ee38 .word 0x0802ee38 801a4e0: 0802ee10 .word 0x0802ee10 0801a4e4 : #if !MEMP_OVERFLOW_CHECK memp_malloc(memp_t type) #else memp_malloc_fn(memp_t type, const char *file, const int line) #endif { 801a4e4: b580 push {r7, lr} 801a4e6: b084 sub sp, #16 801a4e8: af00 add r7, sp, #0 801a4ea: 4603 mov r3, r0 801a4ec: 71fb strb r3, [r7, #7] void *memp; LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 801a4ee: 79fb ldrb r3, [r7, #7] 801a4f0: 2b0c cmp r3, #12 801a4f2: d908 bls.n 801a506 801a4f4: 4b0a ldr r3, [pc, #40] @ (801a520 ) 801a4f6: f240 1257 movw r2, #343 @ 0x157 801a4fa: 490a ldr r1, [pc, #40] @ (801a524 ) 801a4fc: 480a ldr r0, [pc, #40] @ (801a528 ) 801a4fe: f010 f9cd bl 802a89c 801a502: 2300 movs r3, #0 801a504: e008 b.n 801a518 #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]); 801a506: 79fb ldrb r3, [r7, #7] 801a508: 4a08 ldr r2, [pc, #32] @ (801a52c ) 801a50a: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801a50e: 4618 mov r0, r3 801a510: f7ff ff94 bl 801a43c 801a514: 60f8 str r0, [r7, #12] #else memp = do_memp_malloc_pool_fn(memp_pools[type], file, line); #endif return memp; 801a516: 68fb ldr r3, [r7, #12] } 801a518: 4618 mov r0, r3 801a51a: 3710 adds r7, #16 801a51c: 46bd mov sp, r7 801a51e: bd80 pop {r7, pc} 801a520: 0802edbc .word 0x0802edbc 801a524: 0802ee4c .word 0x0802ee4c 801a528: 0802ee10 .word 0x0802ee10 801a52c: 08031c24 .word 0x08031c24 0801a530 : static void do_memp_free_pool(const struct memp_desc *desc, void *mem) { 801a530: b580 push {r7, lr} 801a532: b084 sub sp, #16 801a534: af00 add r7, sp, #0 801a536: 6078 str r0, [r7, #4] 801a538: 6039 str r1, [r7, #0] struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ASSERT("memp_free: mem properly aligned", 801a53a: 683b ldr r3, [r7, #0] 801a53c: f003 0303 and.w r3, r3, #3 801a540: 2b00 cmp r3, #0 801a542: d006 beq.n 801a552 801a544: 4b0d ldr r3, [pc, #52] @ (801a57c ) 801a546: f44f 72b6 mov.w r2, #364 @ 0x16c 801a54a: 490d ldr r1, [pc, #52] @ (801a580 ) 801a54c: 480d ldr r0, [pc, #52] @ (801a584 ) 801a54e: f010 f9a5 bl 802a89c ((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); 801a552: 683b ldr r3, [r7, #0] 801a554: 60fb str r3, [r7, #12] SYS_ARCH_PROTECT(old_level); 801a556: f00c ff0b bl 8027370 801a55a: 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; 801a55c: 687b ldr r3, [r7, #4] 801a55e: 68db ldr r3, [r3, #12] 801a560: 681a ldr r2, [r3, #0] 801a562: 68fb ldr r3, [r7, #12] 801a564: 601a str r2, [r3, #0] *desc->tab = memp; 801a566: 687b ldr r3, [r7, #4] 801a568: 68db ldr r3, [r3, #12] 801a56a: 68fa ldr r2, [r7, #12] 801a56c: 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); 801a56e: 68b8 ldr r0, [r7, #8] 801a570: f00c ff0c bl 802738c #endif /* !MEMP_MEM_MALLOC */ } 801a574: bf00 nop 801a576: 3710 adds r7, #16 801a578: 46bd mov sp, r7 801a57a: bd80 pop {r7, pc} 801a57c: 0802edbc .word 0x0802edbc 801a580: 0802ee6c .word 0x0802ee6c 801a584: 0802ee10 .word 0x0802ee10 0801a588 : * @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) { 801a588: b580 push {r7, lr} 801a58a: b082 sub sp, #8 801a58c: af00 add r7, sp, #0 801a58e: 6078 str r0, [r7, #4] 801a590: 6039 str r1, [r7, #0] LWIP_ASSERT("invalid pool desc", desc != NULL); 801a592: 687b ldr r3, [r7, #4] 801a594: 2b00 cmp r3, #0 801a596: d106 bne.n 801a5a6 801a598: 4b0a ldr r3, [pc, #40] @ (801a5c4 ) 801a59a: f240 1295 movw r2, #405 @ 0x195 801a59e: 490a ldr r1, [pc, #40] @ (801a5c8 ) 801a5a0: 480a ldr r0, [pc, #40] @ (801a5cc ) 801a5a2: f010 f97b bl 802a89c if ((desc == NULL) || (mem == NULL)) { 801a5a6: 687b ldr r3, [r7, #4] 801a5a8: 2b00 cmp r3, #0 801a5aa: d007 beq.n 801a5bc 801a5ac: 683b ldr r3, [r7, #0] 801a5ae: 2b00 cmp r3, #0 801a5b0: d004 beq.n 801a5bc return; } do_memp_free_pool(desc, mem); 801a5b2: 6839 ldr r1, [r7, #0] 801a5b4: 6878 ldr r0, [r7, #4] 801a5b6: f7ff ffbb bl 801a530 801a5ba: e000 b.n 801a5be return; 801a5bc: bf00 nop } 801a5be: 3708 adds r7, #8 801a5c0: 46bd mov sp, r7 801a5c2: bd80 pop {r7, pc} 801a5c4: 0802edbc .word 0x0802edbc 801a5c8: 0802ee38 .word 0x0802ee38 801a5cc: 0802ee10 .word 0x0802ee10 0801a5d0 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 801a5d0: b580 push {r7, lr} 801a5d2: b082 sub sp, #8 801a5d4: af00 add r7, sp, #0 801a5d6: 4603 mov r3, r0 801a5d8: 6039 str r1, [r7, #0] 801a5da: 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;); 801a5dc: 79fb ldrb r3, [r7, #7] 801a5de: 2b0c cmp r3, #12 801a5e0: d907 bls.n 801a5f2 801a5e2: 4b0c ldr r3, [pc, #48] @ (801a614 ) 801a5e4: f44f 72d5 mov.w r2, #426 @ 0x1aa 801a5e8: 490b ldr r1, [pc, #44] @ (801a618 ) 801a5ea: 480c ldr r0, [pc, #48] @ (801a61c ) 801a5ec: f010 f956 bl 802a89c 801a5f0: e00c b.n 801a60c if (mem == NULL) { 801a5f2: 683b ldr r3, [r7, #0] 801a5f4: 2b00 cmp r3, #0 801a5f6: d008 beq.n 801a60a #ifdef LWIP_HOOK_MEMP_AVAILABLE old_first = *memp_pools[type]->tab; #endif do_memp_free_pool(memp_pools[type], mem); 801a5f8: 79fb ldrb r3, [r7, #7] 801a5fa: 4a09 ldr r2, [pc, #36] @ (801a620 ) 801a5fc: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801a600: 6839 ldr r1, [r7, #0] 801a602: 4618 mov r0, r3 801a604: f7ff ff94 bl 801a530 801a608: e000 b.n 801a60c return; 801a60a: bf00 nop #ifdef LWIP_HOOK_MEMP_AVAILABLE if (old_first == NULL) { LWIP_HOOK_MEMP_AVAILABLE(type); } #endif } 801a60c: 3708 adds r7, #8 801a60e: 46bd mov sp, r7 801a610: bd80 pop {r7, pc} 801a612: bf00 nop 801a614: 0802edbc .word 0x0802edbc 801a618: 0802ee8c .word 0x0802ee8c 801a61c: 0802ee10 .word 0x0802ee10 801a620: 08031c24 .word 0x08031c24 0801a624 : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 801a624: b480 push {r7} 801a626: af00 add r7, sp, #0 netif_set_link_up(&loop_netif); netif_set_up(&loop_netif); #endif /* LWIP_HAVE_LOOPIF */ } 801a628: bf00 nop 801a62a: 46bd mov sp, r7 801a62c: f85d 7b04 ldr.w r7, [sp], #4 801a630: 4770 bx lr ... 0801a634 : 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) { 801a634: b580 push {r7, lr} 801a636: b086 sub sp, #24 801a638: af00 add r7, sp, #0 801a63a: 60f8 str r0, [r7, #12] 801a63c: 60b9 str r1, [r7, #8] 801a63e: 607a str r2, [r7, #4] 801a640: 603b str r3, [r7, #0] #if LWIP_IPV6 s8_t i; #endif LWIP_ASSERT_CORE_LOCKED(); 801a642: f7f6 fd01 bl 8011048 LWIP_ASSERT("single netif already set", 0); return NULL; } #endif LWIP_ERROR("netif_add: invalid netif", netif != NULL, return NULL); 801a646: 68fb ldr r3, [r7, #12] 801a648: 2b00 cmp r3, #0 801a64a: d108 bne.n 801a65e 801a64c: 4b5b ldr r3, [pc, #364] @ (801a7bc ) 801a64e: f240 1227 movw r2, #295 @ 0x127 801a652: 495b ldr r1, [pc, #364] @ (801a7c0 ) 801a654: 485b ldr r0, [pc, #364] @ (801a7c4 ) 801a656: f010 f921 bl 802a89c 801a65a: 2300 movs r3, #0 801a65c: e0a9 b.n 801a7b2 LWIP_ERROR("netif_add: No init function given", init != NULL, return NULL); 801a65e: 6a7b ldr r3, [r7, #36] @ 0x24 801a660: 2b00 cmp r3, #0 801a662: d108 bne.n 801a676 801a664: 4b55 ldr r3, [pc, #340] @ (801a7bc ) 801a666: f44f 7294 mov.w r2, #296 @ 0x128 801a66a: 4957 ldr r1, [pc, #348] @ (801a7c8 ) 801a66c: 4855 ldr r0, [pc, #340] @ (801a7c4 ) 801a66e: f010 f915 bl 802a89c 801a672: 2300 movs r3, #0 801a674: e09d b.n 801a7b2 #if LWIP_IPV4 if (ipaddr == NULL) { 801a676: 68bb ldr r3, [r7, #8] 801a678: 2b00 cmp r3, #0 801a67a: d101 bne.n 801a680 ipaddr = ip_2_ip4(IP4_ADDR_ANY); 801a67c: 4b53 ldr r3, [pc, #332] @ (801a7cc ) 801a67e: 60bb str r3, [r7, #8] } if (netmask == NULL) { 801a680: 687b ldr r3, [r7, #4] 801a682: 2b00 cmp r3, #0 801a684: d101 bne.n 801a68a netmask = ip_2_ip4(IP4_ADDR_ANY); 801a686: 4b51 ldr r3, [pc, #324] @ (801a7cc ) 801a688: 607b str r3, [r7, #4] } if (gw == NULL) { 801a68a: 683b ldr r3, [r7, #0] 801a68c: 2b00 cmp r3, #0 801a68e: d101 bne.n 801a694 gw = ip_2_ip4(IP4_ADDR_ANY); 801a690: 4b4e ldr r3, [pc, #312] @ (801a7cc ) 801a692: 603b str r3, [r7, #0] } /* reset new interface configuration state */ ip_addr_set_zero_ip4(&netif->ip_addr); 801a694: 68fb ldr r3, [r7, #12] 801a696: 2200 movs r2, #0 801a698: 605a str r2, [r3, #4] ip_addr_set_zero_ip4(&netif->netmask); 801a69a: 68fb ldr r3, [r7, #12] 801a69c: 2200 movs r2, #0 801a69e: 609a str r2, [r3, #8] ip_addr_set_zero_ip4(&netif->gw); 801a6a0: 68fb ldr r3, [r7, #12] 801a6a2: 2200 movs r2, #0 801a6a4: 60da str r2, [r3, #12] netif->output = netif_null_output_ip4; 801a6a6: 68fb ldr r3, [r7, #12] 801a6a8: 4a49 ldr r2, [pc, #292] @ (801a7d0 ) 801a6aa: 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; 801a6ac: 68fb ldr r3, [r7, #12] 801a6ae: 2200 movs r2, #0 801a6b0: 851a strh r2, [r3, #40] @ 0x28 netif->flags = 0; 801a6b2: 68fb ldr r3, [r7, #12] 801a6b4: 2200 movs r2, #0 801a6b6: f883 2031 strb.w r2, [r3, #49] @ 0x31 #ifdef netif_get_client_data memset(netif->client_data, 0, sizeof(netif->client_data)); 801a6ba: 68fb ldr r3, [r7, #12] 801a6bc: 3324 adds r3, #36 @ 0x24 801a6be: 2204 movs r2, #4 801a6c0: 2100 movs r1, #0 801a6c2: 4618 mov r0, r3 801a6c4: f010 fa7c bl 802abc0 #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; 801a6c8: 68fb ldr r3, [r7, #12] 801a6ca: 2200 movs r2, #0 801a6cc: 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; 801a6ce: 68fb ldr r3, [r7, #12] 801a6d0: 6a3a ldr r2, [r7, #32] 801a6d2: 621a str r2, [r3, #32] netif->num = netif_num; 801a6d4: 4b3f ldr r3, [pc, #252] @ (801a7d4 ) 801a6d6: 781a ldrb r2, [r3, #0] 801a6d8: 68fb ldr r3, [r7, #12] 801a6da: f883 2034 strb.w r2, [r3, #52] @ 0x34 netif->input = input; 801a6de: 68fb ldr r3, [r7, #12] 801a6e0: 6aba ldr r2, [r7, #40] @ 0x28 801a6e2: 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); 801a6e4: 683b ldr r3, [r7, #0] 801a6e6: 687a ldr r2, [r7, #4] 801a6e8: 68b9 ldr r1, [r7, #8] 801a6ea: 68f8 ldr r0, [r7, #12] 801a6ec: f000 f914 bl 801a918 #endif /* LWIP_IPV4 */ /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 801a6f0: 6a7b ldr r3, [r7, #36] @ 0x24 801a6f2: 68f8 ldr r0, [r7, #12] 801a6f4: 4798 blx r3 801a6f6: 4603 mov r3, r0 801a6f8: 2b00 cmp r3, #0 801a6fa: d001 beq.n 801a700 return NULL; 801a6fc: 2300 movs r3, #0 801a6fe: e058 b.n 801a7b2 */ { struct netif *netif2; int num_netifs; do { if (netif->num == 255) { 801a700: 68fb ldr r3, [r7, #12] 801a702: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a706: 2bff cmp r3, #255 @ 0xff 801a708: d103 bne.n 801a712 netif->num = 0; 801a70a: 68fb ldr r3, [r7, #12] 801a70c: 2200 movs r2, #0 801a70e: f883 2034 strb.w r2, [r3, #52] @ 0x34 } num_netifs = 0; 801a712: 2300 movs r3, #0 801a714: 613b str r3, [r7, #16] for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 801a716: 4b30 ldr r3, [pc, #192] @ (801a7d8 ) 801a718: 681b ldr r3, [r3, #0] 801a71a: 617b str r3, [r7, #20] 801a71c: e02b b.n 801a776 LWIP_ASSERT("netif already added", netif2 != netif); 801a71e: 697a ldr r2, [r7, #20] 801a720: 68fb ldr r3, [r7, #12] 801a722: 429a cmp r2, r3 801a724: d106 bne.n 801a734 801a726: 4b25 ldr r3, [pc, #148] @ (801a7bc ) 801a728: f240 128b movw r2, #395 @ 0x18b 801a72c: 492b ldr r1, [pc, #172] @ (801a7dc ) 801a72e: 4825 ldr r0, [pc, #148] @ (801a7c4 ) 801a730: f010 f8b4 bl 802a89c num_netifs++; 801a734: 693b ldr r3, [r7, #16] 801a736: 3301 adds r3, #1 801a738: 613b str r3, [r7, #16] LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255); 801a73a: 693b ldr r3, [r7, #16] 801a73c: 2bff cmp r3, #255 @ 0xff 801a73e: dd06 ble.n 801a74e 801a740: 4b1e ldr r3, [pc, #120] @ (801a7bc ) 801a742: f240 128d movw r2, #397 @ 0x18d 801a746: 4926 ldr r1, [pc, #152] @ (801a7e0 ) 801a748: 481e ldr r0, [pc, #120] @ (801a7c4 ) 801a74a: f010 f8a7 bl 802a89c if (netif2->num == netif->num) { 801a74e: 697b ldr r3, [r7, #20] 801a750: f893 2034 ldrb.w r2, [r3, #52] @ 0x34 801a754: 68fb ldr r3, [r7, #12] 801a756: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a75a: 429a cmp r2, r3 801a75c: d108 bne.n 801a770 netif->num++; 801a75e: 68fb ldr r3, [r7, #12] 801a760: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a764: 3301 adds r3, #1 801a766: b2da uxtb r2, r3 801a768: 68fb ldr r3, [r7, #12] 801a76a: f883 2034 strb.w r2, [r3, #52] @ 0x34 break; 801a76e: e005 b.n 801a77c for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) { 801a770: 697b ldr r3, [r7, #20] 801a772: 681b ldr r3, [r3, #0] 801a774: 617b str r3, [r7, #20] 801a776: 697b ldr r3, [r7, #20] 801a778: 2b00 cmp r3, #0 801a77a: d1d0 bne.n 801a71e } } } while (netif2 != NULL); 801a77c: 697b ldr r3, [r7, #20] 801a77e: 2b00 cmp r3, #0 801a780: d1be bne.n 801a700 } if (netif->num == 254) { 801a782: 68fb ldr r3, [r7, #12] 801a784: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a788: 2bfe cmp r3, #254 @ 0xfe 801a78a: d103 bne.n 801a794 netif_num = 0; 801a78c: 4b11 ldr r3, [pc, #68] @ (801a7d4 ) 801a78e: 2200 movs r2, #0 801a790: 701a strb r2, [r3, #0] 801a792: e006 b.n 801a7a2 } else { netif_num = (u8_t)(netif->num + 1); 801a794: 68fb ldr r3, [r7, #12] 801a796: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801a79a: 3301 adds r3, #1 801a79c: b2da uxtb r2, r3 801a79e: 4b0d ldr r3, [pc, #52] @ (801a7d4 ) 801a7a0: 701a strb r2, [r3, #0] } /* add this netif to the list */ netif->next = netif_list; 801a7a2: 4b0d ldr r3, [pc, #52] @ (801a7d8 ) 801a7a4: 681a ldr r2, [r3, #0] 801a7a6: 68fb ldr r3, [r7, #12] 801a7a8: 601a str r2, [r3, #0] netif_list = netif; 801a7aa: 4a0b ldr r2, [pc, #44] @ (801a7d8 ) 801a7ac: 68fb ldr r3, [r7, #12] 801a7ae: 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; 801a7b0: 68fb ldr r3, [r7, #12] } 801a7b2: 4618 mov r0, r3 801a7b4: 3718 adds r7, #24 801a7b6: 46bd mov sp, r7 801a7b8: bd80 pop {r7, pc} 801a7ba: bf00 nop 801a7bc: 0802eea8 .word 0x0802eea8 801a7c0: 0802ef3c .word 0x0802ef3c 801a7c4: 0802eef8 .word 0x0802eef8 801a7c8: 0802ef58 .word 0x0802ef58 801a7cc: 08031ca8 .word 0x08031ca8 801a7d0: 0801ac0f .word 0x0801ac0f 801a7d4: 2402af74 .word 0x2402af74 801a7d8: 2402af6c .word 0x2402af6c 801a7dc: 0802ef7c .word 0x0802ef7c 801a7e0: 0802ef90 .word 0x0802ef90 0801a7e4 : static void netif_do_ip_addr_changed(const ip_addr_t *old_addr, const ip_addr_t *new_addr) { 801a7e4: b580 push {r7, lr} 801a7e6: b082 sub sp, #8 801a7e8: af00 add r7, sp, #0 801a7ea: 6078 str r0, [r7, #4] 801a7ec: 6039 str r1, [r7, #0] #if LWIP_TCP tcp_netif_ip_addr_changed(old_addr, new_addr); 801a7ee: 6839 ldr r1, [r7, #0] 801a7f0: 6878 ldr r0, [r7, #4] 801a7f2: f002 fe6f bl 801d4d4 #endif /* LWIP_TCP */ #if LWIP_UDP udp_netif_ip_addr_changed(old_addr, new_addr); 801a7f6: 6839 ldr r1, [r7, #0] 801a7f8: 6878 ldr r0, [r7, #4] 801a7fa: f008 f82b bl 8022854 #endif /* LWIP_UDP */ #if LWIP_RAW raw_netif_ip_addr_changed(old_addr, new_addr); #endif /* LWIP_RAW */ } 801a7fe: bf00 nop 801a800: 3708 adds r7, #8 801a802: 46bd mov sp, r7 801a804: bd80 pop {r7, pc} ... 0801a808 : #if LWIP_IPV4 static int netif_do_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr, ip_addr_t *old_addr) { 801a808: b580 push {r7, lr} 801a80a: b086 sub sp, #24 801a80c: af00 add r7, sp, #0 801a80e: 60f8 str r0, [r7, #12] 801a810: 60b9 str r1, [r7, #8] 801a812: 607a str r2, [r7, #4] LWIP_ASSERT("invalid pointer", ipaddr != NULL); 801a814: 68bb ldr r3, [r7, #8] 801a816: 2b00 cmp r3, #0 801a818: d106 bne.n 801a828 801a81a: 4b1d ldr r3, [pc, #116] @ (801a890 ) 801a81c: f240 12cb movw r2, #459 @ 0x1cb 801a820: 491c ldr r1, [pc, #112] @ (801a894 ) 801a822: 481d ldr r0, [pc, #116] @ (801a898 ) 801a824: f010 f83a bl 802a89c LWIP_ASSERT("invalid pointer", old_addr != NULL); 801a828: 687b ldr r3, [r7, #4] 801a82a: 2b00 cmp r3, #0 801a82c: d106 bne.n 801a83c 801a82e: 4b18 ldr r3, [pc, #96] @ (801a890 ) 801a830: f44f 72e6 mov.w r2, #460 @ 0x1cc 801a834: 4917 ldr r1, [pc, #92] @ (801a894 ) 801a836: 4818 ldr r0, [pc, #96] @ (801a898 ) 801a838: f010 f830 bl 802a89c /* address is actually being changed? */ if (ip4_addr_cmp(ipaddr, netif_ip4_addr(netif)) == 0) { 801a83c: 68bb ldr r3, [r7, #8] 801a83e: 681a ldr r2, [r3, #0] 801a840: 68fb ldr r3, [r7, #12] 801a842: 3304 adds r3, #4 801a844: 681b ldr r3, [r3, #0] 801a846: 429a cmp r2, r3 801a848: d01c beq.n 801a884 ip_addr_t new_addr; *ip_2_ip4(&new_addr) = *ipaddr; 801a84a: 68bb ldr r3, [r7, #8] 801a84c: 681b ldr r3, [r3, #0] 801a84e: 617b str r3, [r7, #20] IP_SET_TYPE_VAL(new_addr, IPADDR_TYPE_V4); ip_addr_copy(*old_addr, *netif_ip_addr4(netif)); 801a850: 68fb ldr r3, [r7, #12] 801a852: 3304 adds r3, #4 801a854: 681a ldr r2, [r3, #0] 801a856: 687b ldr r3, [r7, #4] 801a858: 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); 801a85a: f107 0314 add.w r3, r7, #20 801a85e: 4619 mov r1, r3 801a860: 6878 ldr r0, [r7, #4] 801a862: f7ff ffbf bl 801a7e4 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); 801a866: 68bb ldr r3, [r7, #8] 801a868: 2b00 cmp r3, #0 801a86a: d002 beq.n 801a872 801a86c: 68bb ldr r3, [r7, #8] 801a86e: 681b ldr r3, [r3, #0] 801a870: e000 b.n 801a874 801a872: 2300 movs r3, #0 801a874: 68fa ldr r2, [r7, #12] 801a876: 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); 801a878: 2101 movs r1, #1 801a87a: 68f8 ldr r0, [r7, #12] 801a87c: f000 f8d6 bl 801aa2c NETIF_STATUS_CALLBACK(netif); return 1; /* address changed */ 801a880: 2301 movs r3, #1 801a882: e000 b.n 801a886 } return 0; /* address unchanged */ 801a884: 2300 movs r3, #0 } 801a886: 4618 mov r0, r3 801a888: 3718 adds r7, #24 801a88a: 46bd mov sp, r7 801a88c: bd80 pop {r7, pc} 801a88e: bf00 nop 801a890: 0802eea8 .word 0x0802eea8 801a894: 0802efc0 .word 0x0802efc0 801a898: 0802eef8 .word 0x0802eef8 0801a89c : } } static int netif_do_set_netmask(struct netif *netif, const ip4_addr_t *netmask, ip_addr_t *old_nm) { 801a89c: b480 push {r7} 801a89e: b085 sub sp, #20 801a8a0: af00 add r7, sp, #0 801a8a2: 60f8 str r0, [r7, #12] 801a8a4: 60b9 str r1, [r7, #8] 801a8a6: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(netmask, netif_ip4_netmask(netif)) == 0) { 801a8a8: 68bb ldr r3, [r7, #8] 801a8aa: 681a ldr r2, [r3, #0] 801a8ac: 68fb ldr r3, [r7, #12] 801a8ae: 3308 adds r3, #8 801a8b0: 681b ldr r3, [r3, #0] 801a8b2: 429a cmp r2, r3 801a8b4: d00a beq.n 801a8cc #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); 801a8b6: 68bb ldr r3, [r7, #8] 801a8b8: 2b00 cmp r3, #0 801a8ba: d002 beq.n 801a8c2 801a8bc: 68bb ldr r3, [r7, #8] 801a8be: 681b ldr r3, [r3, #0] 801a8c0: e000 b.n 801a8c4 801a8c2: 2300 movs r3, #0 801a8c4: 68fa ldr r2, [r7, #12] 801a8c6: 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 */ 801a8c8: 2301 movs r3, #1 801a8ca: e000 b.n 801a8ce } return 0; /* netmask unchanged */ 801a8cc: 2300 movs r3, #0 } 801a8ce: 4618 mov r0, r3 801a8d0: 3714 adds r7, #20 801a8d2: 46bd mov sp, r7 801a8d4: f85d 7b04 ldr.w r7, [sp], #4 801a8d8: 4770 bx lr 0801a8da : } } static int netif_do_set_gw(struct netif *netif, const ip4_addr_t *gw, ip_addr_t *old_gw) { 801a8da: b480 push {r7} 801a8dc: b085 sub sp, #20 801a8de: af00 add r7, sp, #0 801a8e0: 60f8 str r0, [r7, #12] 801a8e2: 60b9 str r1, [r7, #8] 801a8e4: 607a str r2, [r7, #4] /* address is actually being changed? */ if (ip4_addr_cmp(gw, netif_ip4_gw(netif)) == 0) { 801a8e6: 68bb ldr r3, [r7, #8] 801a8e8: 681a ldr r2, [r3, #0] 801a8ea: 68fb ldr r3, [r7, #12] 801a8ec: 330c adds r3, #12 801a8ee: 681b ldr r3, [r3, #0] 801a8f0: 429a cmp r2, r3 801a8f2: d00a beq.n 801a90a 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); 801a8f4: 68bb ldr r3, [r7, #8] 801a8f6: 2b00 cmp r3, #0 801a8f8: d002 beq.n 801a900 801a8fa: 68bb ldr r3, [r7, #8] 801a8fc: 681b ldr r3, [r3, #0] 801a8fe: e000 b.n 801a902 801a900: 2300 movs r3, #0 801a902: 68fa ldr r2, [r7, #12] 801a904: 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 */ 801a906: 2301 movs r3, #1 801a908: e000 b.n 801a90c } return 0; /* gateway unchanged */ 801a90a: 2300 movs r3, #0 } 801a90c: 4618 mov r0, r3 801a90e: 3714 adds r7, #20 801a910: 46bd mov sp, r7 801a912: f85d 7b04 ldr.w r7, [sp], #4 801a916: 4770 bx lr 0801a918 : * @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) { 801a918: b580 push {r7, lr} 801a91a: b088 sub sp, #32 801a91c: af00 add r7, sp, #0 801a91e: 60f8 str r0, [r7, #12] 801a920: 60b9 str r1, [r7, #8] 801a922: 607a str r2, [r7, #4] 801a924: 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; 801a926: 2300 movs r3, #0 801a928: 61fb str r3, [r7, #28] ip_addr_t *old_gw = NULL; 801a92a: 2300 movs r3, #0 801a92c: 61bb str r3, [r7, #24] #endif ip_addr_t old_addr; int remove; LWIP_ASSERT_CORE_LOCKED(); 801a92e: f7f6 fb8b bl 8011048 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 801a932: 68bb ldr r3, [r7, #8] 801a934: 2b00 cmp r3, #0 801a936: d101 bne.n 801a93c ipaddr = IP4_ADDR_ANY4; 801a938: 4b1c ldr r3, [pc, #112] @ (801a9ac ) 801a93a: 60bb str r3, [r7, #8] } if (netmask == NULL) { 801a93c: 687b ldr r3, [r7, #4] 801a93e: 2b00 cmp r3, #0 801a940: d101 bne.n 801a946 netmask = IP4_ADDR_ANY4; 801a942: 4b1a ldr r3, [pc, #104] @ (801a9ac ) 801a944: 607b str r3, [r7, #4] } if (gw == NULL) { 801a946: 683b ldr r3, [r7, #0] 801a948: 2b00 cmp r3, #0 801a94a: d101 bne.n 801a950 gw = IP4_ADDR_ANY4; 801a94c: 4b17 ldr r3, [pc, #92] @ (801a9ac ) 801a94e: 603b str r3, [r7, #0] } remove = ip4_addr_isany(ipaddr); 801a950: 68bb ldr r3, [r7, #8] 801a952: 2b00 cmp r3, #0 801a954: d003 beq.n 801a95e 801a956: 68bb ldr r3, [r7, #8] 801a958: 681b ldr r3, [r3, #0] 801a95a: 2b00 cmp r3, #0 801a95c: d101 bne.n 801a962 801a95e: 2301 movs r3, #1 801a960: e000 b.n 801a964 801a962: 2300 movs r3, #0 801a964: 617b str r3, [r7, #20] if (remove) { 801a966: 697b ldr r3, [r7, #20] 801a968: 2b00 cmp r3, #0 801a96a: d006 beq.n 801a97a /* 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)) { 801a96c: f107 0310 add.w r3, r7, #16 801a970: 461a mov r2, r3 801a972: 68b9 ldr r1, [r7, #8] 801a974: 68f8 ldr r0, [r7, #12] 801a976: f7ff ff47 bl 801a808 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)) { 801a97a: 69fa ldr r2, [r7, #28] 801a97c: 6879 ldr r1, [r7, #4] 801a97e: 68f8 ldr r0, [r7, #12] 801a980: f7ff ff8c bl 801a89c #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)) { 801a984: 69ba ldr r2, [r7, #24] 801a986: 6839 ldr r1, [r7, #0] 801a988: 68f8 ldr r0, [r7, #12] 801a98a: f7ff ffa6 bl 801a8da #if LWIP_NETIF_EXT_STATUS_CALLBACK change_reason |= LWIP_NSC_IPV4_GATEWAY_CHANGED; cb_args.ipv4_changed.old_gw = old_gw; #endif } if (!remove) { 801a98e: 697b ldr r3, [r7, #20] 801a990: 2b00 cmp r3, #0 801a992: d106 bne.n 801a9a2 /* set ipaddr last to ensure netmask/gw have been set when status callback is called */ if (netif_do_set_ipaddr(netif, ipaddr, &old_addr)) { 801a994: f107 0310 add.w r3, r7, #16 801a998: 461a mov r2, r3 801a99a: 68b9 ldr r1, [r7, #8] 801a99c: 68f8 ldr r0, [r7, #12] 801a99e: f7ff ff33 bl 801a808 if (change_reason != LWIP_NSC_NONE) { change_reason |= LWIP_NSC_IPV4_SETTINGS_CHANGED; netif_invoke_ext_callback(netif, change_reason, &cb_args); } #endif } 801a9a2: bf00 nop 801a9a4: 3720 adds r7, #32 801a9a6: 46bd mov sp, r7 801a9a8: bd80 pop {r7, pc} 801a9aa: bf00 nop 801a9ac: 08031ca8 .word 0x08031ca8 0801a9b0 : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 801a9b0: b580 push {r7, lr} 801a9b2: b082 sub sp, #8 801a9b4: af00 add r7, sp, #0 801a9b6: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801a9b8: f7f6 fb46 bl 8011048 mib2_remove_route_ip4(1, netif); } else { /* install default route */ mib2_add_route_ip4(1, netif); } netif_default = netif; 801a9bc: 4a03 ldr r2, [pc, #12] @ (801a9cc ) 801a9be: 687b ldr r3, [r7, #4] 801a9c0: 6013 str r3, [r2, #0] LWIP_DEBUGF(NETIF_DEBUG, ("netif: setting default interface %c%c\n", netif ? netif->name[0] : '\'', netif ? netif->name[1] : '\'')); } 801a9c2: bf00 nop 801a9c4: 3708 adds r7, #8 801a9c6: 46bd mov sp, r7 801a9c8: bd80 pop {r7, pc} 801a9ca: bf00 nop 801a9cc: 2402af70 .word 0x2402af70 0801a9d0 : * Bring an interface up, available for processing * traffic. */ void netif_set_up(struct netif *netif) { 801a9d0: b580 push {r7, lr} 801a9d2: b082 sub sp, #8 801a9d4: af00 add r7, sp, #0 801a9d6: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801a9d8: f7f6 fb36 bl 8011048 LWIP_ERROR("netif_set_up: invalid netif", netif != NULL, return); 801a9dc: 687b ldr r3, [r7, #4] 801a9de: 2b00 cmp r3, #0 801a9e0: d107 bne.n 801a9f2 801a9e2: 4b0f ldr r3, [pc, #60] @ (801aa20 ) 801a9e4: f44f 7254 mov.w r2, #848 @ 0x350 801a9e8: 490e ldr r1, [pc, #56] @ (801aa24 ) 801a9ea: 480f ldr r0, [pc, #60] @ (801aa28 ) 801a9ec: f00f ff56 bl 802a89c 801a9f0: e013 b.n 801aa1a if (!(netif->flags & NETIF_FLAG_UP)) { 801a9f2: 687b ldr r3, [r7, #4] 801a9f4: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801a9f8: f003 0301 and.w r3, r3, #1 801a9fc: 2b00 cmp r3, #0 801a9fe: d10c bne.n 801aa1a netif_set_flags(netif, NETIF_FLAG_UP); 801aa00: 687b ldr r3, [r7, #4] 801aa02: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aa06: f043 0301 orr.w r3, r3, #1 801aa0a: b2da uxtb r2, r3 801aa0c: 687b ldr r3, [r7, #4] 801aa0e: 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); 801aa12: 2103 movs r1, #3 801aa14: 6878 ldr r0, [r7, #4] 801aa16: f000 f809 bl 801aa2c #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ } } 801aa1a: 3708 adds r7, #8 801aa1c: 46bd mov sp, r7 801aa1e: bd80 pop {r7, pc} 801aa20: 0802eea8 .word 0x0802eea8 801aa24: 0802f030 .word 0x0802f030 801aa28: 0802eef8 .word 0x0802eef8 0801aa2c : /** 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) { 801aa2c: b580 push {r7, lr} 801aa2e: b082 sub sp, #8 801aa30: af00 add r7, sp, #0 801aa32: 6078 str r0, [r7, #4] 801aa34: 460b mov r3, r1 801aa36: 70fb strb r3, [r7, #3] LWIP_ASSERT("netif_issue_reports: invalid netif", netif != NULL); 801aa38: 687b ldr r3, [r7, #4] 801aa3a: 2b00 cmp r3, #0 801aa3c: d106 bne.n 801aa4c 801aa3e: 4b18 ldr r3, [pc, #96] @ (801aaa0 ) 801aa40: f240 326d movw r2, #877 @ 0x36d 801aa44: 4917 ldr r1, [pc, #92] @ (801aaa4 ) 801aa46: 4818 ldr r0, [pc, #96] @ (801aaa8 ) 801aa48: f00f ff28 bl 802a89c /* Only send reports when both link and admin states are up */ if (!(netif->flags & NETIF_FLAG_LINK_UP) || 801aa4c: 687b ldr r3, [r7, #4] 801aa4e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aa52: f003 0304 and.w r3, r3, #4 801aa56: 2b00 cmp r3, #0 801aa58: d01e beq.n 801aa98 !(netif->flags & NETIF_FLAG_UP)) { 801aa5a: 687b ldr r3, [r7, #4] 801aa5c: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aa60: f003 0301 and.w r3, r3, #1 if (!(netif->flags & NETIF_FLAG_LINK_UP) || 801aa64: 2b00 cmp r3, #0 801aa66: d017 beq.n 801aa98 return; } #if LWIP_IPV4 if ((report_type & NETIF_REPORT_TYPE_IPV4) && 801aa68: 78fb ldrb r3, [r7, #3] 801aa6a: f003 0301 and.w r3, r3, #1 801aa6e: 2b00 cmp r3, #0 801aa70: d013 beq.n 801aa9a !ip4_addr_isany_val(*netif_ip4_addr(netif))) { 801aa72: 687b ldr r3, [r7, #4] 801aa74: 3304 adds r3, #4 801aa76: 681b ldr r3, [r3, #0] if ((report_type & NETIF_REPORT_TYPE_IPV4) && 801aa78: 2b00 cmp r3, #0 801aa7a: d00e beq.n 801aa9a #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { 801aa7c: 687b ldr r3, [r7, #4] 801aa7e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aa82: f003 0308 and.w r3, r3, #8 801aa86: 2b00 cmp r3, #0 801aa88: d007 beq.n 801aa9a etharp_gratuitous(netif); 801aa8a: 687b ldr r3, [r7, #4] 801aa8c: 3304 adds r3, #4 801aa8e: 4619 mov r1, r3 801aa90: 6878 ldr r0, [r7, #4] 801aa92: f00a fd2b bl 80254ec 801aa96: e000 b.n 801aa9a return; 801aa98: bf00 nop /* send mld memberships */ mld6_report_groups(netif); #endif /* LWIP_IPV6_MLD */ } #endif /* LWIP_IPV6 */ } 801aa9a: 3708 adds r7, #8 801aa9c: 46bd mov sp, r7 801aa9e: bd80 pop {r7, pc} 801aaa0: 0802eea8 .word 0x0802eea8 801aaa4: 0802f04c .word 0x0802f04c 801aaa8: 0802eef8 .word 0x0802eef8 0801aaac : * @ingroup netif * Bring an interface down, disabling any traffic processing. */ void netif_set_down(struct netif *netif) { 801aaac: b580 push {r7, lr} 801aaae: b082 sub sp, #8 801aab0: af00 add r7, sp, #0 801aab2: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801aab4: f7f6 fac8 bl 8011048 LWIP_ERROR("netif_set_down: invalid netif", netif != NULL, return); 801aab8: 687b ldr r3, [r7, #4] 801aaba: 2b00 cmp r3, #0 801aabc: d107 bne.n 801aace 801aabe: 4b12 ldr r3, [pc, #72] @ (801ab08 ) 801aac0: f240 329b movw r2, #923 @ 0x39b 801aac4: 4911 ldr r1, [pc, #68] @ (801ab0c ) 801aac6: 4812 ldr r0, [pc, #72] @ (801ab10 ) 801aac8: f00f fee8 bl 802a89c 801aacc: e019 b.n 801ab02 if (netif->flags & NETIF_FLAG_UP) { 801aace: 687b ldr r3, [r7, #4] 801aad0: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aad4: f003 0301 and.w r3, r3, #1 801aad8: 2b00 cmp r3, #0 801aada: d012 beq.n 801ab02 args.status_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_STATUS_CHANGED, &args); } #endif netif_clear_flags(netif, NETIF_FLAG_UP); 801aadc: 687b ldr r3, [r7, #4] 801aade: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aae2: f023 0301 bic.w r3, r3, #1 801aae6: b2da uxtb r2, r3 801aae8: 687b ldr r3, [r7, #4] 801aaea: 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) { 801aaee: 687b ldr r3, [r7, #4] 801aaf0: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801aaf4: f003 0308 and.w r3, r3, #8 801aaf8: 2b00 cmp r3, #0 801aafa: d002 beq.n 801ab02 etharp_cleanup_netif(netif); 801aafc: 6878 ldr r0, [r7, #4] 801aafe: f00a f8ab bl 8024c58 nd6_cleanup_netif(netif); #endif /* LWIP_IPV6 */ NETIF_STATUS_CALLBACK(netif); } } 801ab02: 3708 adds r7, #8 801ab04: 46bd mov sp, r7 801ab06: bd80 pop {r7, pc} 801ab08: 0802eea8 .word 0x0802eea8 801ab0c: 0802f070 .word 0x0802f070 801ab10: 0802eef8 .word 0x0802eef8 0801ab14 : * @ingroup netif * Called by a driver when its link goes up */ void netif_set_link_up(struct netif *netif) { 801ab14: b580 push {r7, lr} 801ab16: b082 sub sp, #8 801ab18: af00 add r7, sp, #0 801ab1a: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801ab1c: f7f6 fa94 bl 8011048 LWIP_ERROR("netif_set_link_up: invalid netif", netif != NULL, return); 801ab20: 687b ldr r3, [r7, #4] 801ab22: 2b00 cmp r3, #0 801ab24: d107 bne.n 801ab36 801ab26: 4b15 ldr r3, [pc, #84] @ (801ab7c ) 801ab28: f44f 7278 mov.w r2, #992 @ 0x3e0 801ab2c: 4914 ldr r1, [pc, #80] @ (801ab80 ) 801ab2e: 4815 ldr r0, [pc, #84] @ (801ab84 ) 801ab30: f00f feb4 bl 802a89c 801ab34: e01e b.n 801ab74 if (!(netif->flags & NETIF_FLAG_LINK_UP)) { 801ab36: 687b ldr r3, [r7, #4] 801ab38: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801ab3c: f003 0304 and.w r3, r3, #4 801ab40: 2b00 cmp r3, #0 801ab42: d117 bne.n 801ab74 netif_set_flags(netif, NETIF_FLAG_LINK_UP); 801ab44: 687b ldr r3, [r7, #4] 801ab46: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801ab4a: f043 0304 orr.w r3, r3, #4 801ab4e: b2da uxtb r2, r3 801ab50: 687b ldr r3, [r7, #4] 801ab52: f883 2031 strb.w r2, [r3, #49] @ 0x31 #if LWIP_DHCP dhcp_network_changed(netif); 801ab56: 6878 ldr r0, [r7, #4] 801ab58: f008 faaa bl 80230b0 #if LWIP_AUTOIP autoip_network_changed(netif); #endif /* LWIP_AUTOIP */ netif_issue_reports(netif, NETIF_REPORT_TYPE_IPV4 | NETIF_REPORT_TYPE_IPV6); 801ab5c: 2103 movs r1, #3 801ab5e: 6878 ldr r0, [r7, #4] 801ab60: f7ff ff64 bl 801aa2c #if LWIP_IPV6 nd6_restart_netif(netif); #endif /* LWIP_IPV6 */ NETIF_LINK_CALLBACK(netif); 801ab64: 687b ldr r3, [r7, #4] 801ab66: 69db ldr r3, [r3, #28] 801ab68: 2b00 cmp r3, #0 801ab6a: d003 beq.n 801ab74 801ab6c: 687b ldr r3, [r7, #4] 801ab6e: 69db ldr r3, [r3, #28] 801ab70: 6878 ldr r0, [r7, #4] 801ab72: 4798 blx r3 args.link_changed.state = 1; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 801ab74: 3708 adds r7, #8 801ab76: 46bd mov sp, r7 801ab78: bd80 pop {r7, pc} 801ab7a: bf00 nop 801ab7c: 0802eea8 .word 0x0802eea8 801ab80: 0802f090 .word 0x0802f090 801ab84: 0802eef8 .word 0x0802eef8 0801ab88 : * @ingroup netif * Called by a driver when its link goes down */ void netif_set_link_down(struct netif *netif) { 801ab88: b580 push {r7, lr} 801ab8a: b082 sub sp, #8 801ab8c: af00 add r7, sp, #0 801ab8e: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801ab90: f7f6 fa5a bl 8011048 LWIP_ERROR("netif_set_link_down: invalid netif", netif != NULL, return); 801ab94: 687b ldr r3, [r7, #4] 801ab96: 2b00 cmp r3, #0 801ab98: d107 bne.n 801abaa 801ab9a: 4b11 ldr r3, [pc, #68] @ (801abe0 ) 801ab9c: f240 4206 movw r2, #1030 @ 0x406 801aba0: 4910 ldr r1, [pc, #64] @ (801abe4 ) 801aba2: 4811 ldr r0, [pc, #68] @ (801abe8 ) 801aba4: f00f fe7a bl 802a89c 801aba8: e017 b.n 801abda if (netif->flags & NETIF_FLAG_LINK_UP) { 801abaa: 687b ldr r3, [r7, #4] 801abac: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801abb0: f003 0304 and.w r3, r3, #4 801abb4: 2b00 cmp r3, #0 801abb6: d010 beq.n 801abda netif_clear_flags(netif, NETIF_FLAG_LINK_UP); 801abb8: 687b ldr r3, [r7, #4] 801abba: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 801abbe: f023 0304 bic.w r3, r3, #4 801abc2: b2da uxtb r2, r3 801abc4: 687b ldr r3, [r7, #4] 801abc6: f883 2031 strb.w r2, [r3, #49] @ 0x31 NETIF_LINK_CALLBACK(netif); 801abca: 687b ldr r3, [r7, #4] 801abcc: 69db ldr r3, [r3, #28] 801abce: 2b00 cmp r3, #0 801abd0: d003 beq.n 801abda 801abd2: 687b ldr r3, [r7, #4] 801abd4: 69db ldr r3, [r3, #28] 801abd6: 6878 ldr r0, [r7, #4] 801abd8: 4798 blx r3 args.link_changed.state = 0; netif_invoke_ext_callback(netif, LWIP_NSC_LINK_CHANGED, &args); } #endif } } 801abda: 3708 adds r7, #8 801abdc: 46bd mov sp, r7 801abde: bd80 pop {r7, pc} 801abe0: 0802eea8 .word 0x0802eea8 801abe4: 0802f0b4 .word 0x0802f0b4 801abe8: 0802eef8 .word 0x0802eef8 0801abec : * @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) { 801abec: b580 push {r7, lr} 801abee: b082 sub sp, #8 801abf0: af00 add r7, sp, #0 801abf2: 6078 str r0, [r7, #4] 801abf4: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801abf6: f7f6 fa27 bl 8011048 if (netif) { 801abfa: 687b ldr r3, [r7, #4] 801abfc: 2b00 cmp r3, #0 801abfe: d002 beq.n 801ac06 netif->link_callback = link_callback; 801ac00: 687b ldr r3, [r7, #4] 801ac02: 683a ldr r2, [r7, #0] 801ac04: 61da str r2, [r3, #28] } } 801ac06: bf00 nop 801ac08: 3708 adds r7, #8 801ac0a: 46bd mov sp, r7 801ac0c: bd80 pop {r7, pc} 0801ac0e : #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) { 801ac0e: b480 push {r7} 801ac10: b085 sub sp, #20 801ac12: af00 add r7, sp, #0 801ac14: 60f8 str r0, [r7, #12] 801ac16: 60b9 str r1, [r7, #8] 801ac18: 607a str r2, [r7, #4] LWIP_UNUSED_ARG(netif); LWIP_UNUSED_ARG(p); LWIP_UNUSED_ARG(ipaddr); return ERR_IF; 801ac1a: f06f 030b mvn.w r3, #11 } 801ac1e: 4618 mov r0, r3 801ac20: 3714 adds r7, #20 801ac22: 46bd mov sp, r7 801ac24: f85d 7b04 ldr.w r7, [sp], #4 801ac28: 4770 bx lr ... 0801ac2c : * * @param idx index of netif to find */ struct netif * netif_get_by_index(u8_t idx) { 801ac2c: b580 push {r7, lr} 801ac2e: b084 sub sp, #16 801ac30: af00 add r7, sp, #0 801ac32: 4603 mov r3, r0 801ac34: 71fb strb r3, [r7, #7] struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); 801ac36: f7f6 fa07 bl 8011048 if (idx != NETIF_NO_INDEX) { 801ac3a: 79fb ldrb r3, [r7, #7] 801ac3c: 2b00 cmp r3, #0 801ac3e: d013 beq.n 801ac68 NETIF_FOREACH(netif) { 801ac40: 4b0c ldr r3, [pc, #48] @ (801ac74 ) 801ac42: 681b ldr r3, [r3, #0] 801ac44: 60fb str r3, [r7, #12] 801ac46: e00c b.n 801ac62 if (idx == netif_get_index(netif)) { 801ac48: 68fb ldr r3, [r7, #12] 801ac4a: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801ac4e: 3301 adds r3, #1 801ac50: b2db uxtb r3, r3 801ac52: 79fa ldrb r2, [r7, #7] 801ac54: 429a cmp r2, r3 801ac56: d101 bne.n 801ac5c return netif; /* found! */ 801ac58: 68fb ldr r3, [r7, #12] 801ac5a: e006 b.n 801ac6a NETIF_FOREACH(netif) { 801ac5c: 68fb ldr r3, [r7, #12] 801ac5e: 681b ldr r3, [r3, #0] 801ac60: 60fb str r3, [r7, #12] 801ac62: 68fb ldr r3, [r7, #12] 801ac64: 2b00 cmp r3, #0 801ac66: d1ef bne.n 801ac48 } } } return NULL; 801ac68: 2300 movs r3, #0 } 801ac6a: 4618 mov r0, r3 801ac6c: 3710 adds r7, #16 801ac6e: 46bd mov sp, r7 801ac70: bd80 pop {r7, pc} 801ac72: bf00 nop 801ac74: 2402af6c .word 0x2402af6c 0801ac78 : #if !NO_SYS static #endif /* !NO_SYS */ void pbuf_free_ooseq(void) { 801ac78: b580 push {r7, lr} 801ac7a: b082 sub sp, #8 801ac7c: af00 add r7, sp, #0 struct tcp_pcb *pcb; SYS_ARCH_SET(pbuf_free_ooseq_pending, 0); 801ac7e: f00c fb77 bl 8027370 801ac82: 6038 str r0, [r7, #0] 801ac84: 4b0d ldr r3, [pc, #52] @ (801acbc ) 801ac86: 2200 movs r2, #0 801ac88: 701a strb r2, [r3, #0] 801ac8a: 6838 ldr r0, [r7, #0] 801ac8c: f00c fb7e bl 802738c for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 801ac90: 4b0b ldr r3, [pc, #44] @ (801acc0 ) 801ac92: 681b ldr r3, [r3, #0] 801ac94: 607b str r3, [r7, #4] 801ac96: e00a b.n 801acae if (pcb->ooseq != NULL) { 801ac98: 687b ldr r3, [r7, #4] 801ac9a: 6f5b ldr r3, [r3, #116] @ 0x74 801ac9c: 2b00 cmp r3, #0 801ac9e: d003 beq.n 801aca8 /** 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); 801aca0: 6878 ldr r0, [r7, #4] 801aca2: f002 fc55 bl 801d550 return; 801aca6: e005 b.n 801acb4 for (pcb = tcp_active_pcbs; NULL != pcb; pcb = pcb->next) { 801aca8: 687b ldr r3, [r7, #4] 801acaa: 68db ldr r3, [r3, #12] 801acac: 607b str r3, [r7, #4] 801acae: 687b ldr r3, [r7, #4] 801acb0: 2b00 cmp r3, #0 801acb2: d1f1 bne.n 801ac98 } } } 801acb4: 3708 adds r7, #8 801acb6: 46bd mov sp, r7 801acb8: bd80 pop {r7, pc} 801acba: bf00 nop 801acbc: 2402af75 .word 0x2402af75 801acc0: 2402af84 .word 0x2402af84 0801acc4 : /** * Just a callback function for tcpip_callback() that calls pbuf_free_ooseq(). */ static void pbuf_free_ooseq_callback(void *arg) { 801acc4: b580 push {r7, lr} 801acc6: b082 sub sp, #8 801acc8: af00 add r7, sp, #0 801acca: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(arg); pbuf_free_ooseq(); 801accc: f7ff ffd4 bl 801ac78 } 801acd0: bf00 nop 801acd2: 3708 adds r7, #8 801acd4: 46bd mov sp, r7 801acd6: bd80 pop {r7, pc} 0801acd8 : #endif /* !NO_SYS */ /** Queue a call to pbuf_free_ooseq if not already queued. */ static void pbuf_pool_is_empty(void) { 801acd8: b580 push {r7, lr} 801acda: b082 sub sp, #8 801acdc: 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); 801acde: f00c fb47 bl 8027370 801ace2: 6078 str r0, [r7, #4] queued = pbuf_free_ooseq_pending; 801ace4: 4b0f ldr r3, [pc, #60] @ (801ad24 ) 801ace6: 781b ldrb r3, [r3, #0] 801ace8: 70fb strb r3, [r7, #3] pbuf_free_ooseq_pending = 1; 801acea: 4b0e ldr r3, [pc, #56] @ (801ad24 ) 801acec: 2201 movs r2, #1 801acee: 701a strb r2, [r3, #0] SYS_ARCH_UNPROTECT(old_level); 801acf0: 6878 ldr r0, [r7, #4] 801acf2: f00c fb4b bl 802738c if (!queued) { 801acf6: 78fb ldrb r3, [r7, #3] 801acf8: 2b00 cmp r3, #0 801acfa: d10f bne.n 801ad1c /* queue a call to pbuf_free_ooseq if not already queued */ PBUF_POOL_FREE_OOSEQ_QUEUE_CALL(); 801acfc: 2100 movs r1, #0 801acfe: 480a ldr r0, [pc, #40] @ (801ad28 ) 801ad00: f7fe fdd6 bl 80198b0 801ad04: 4603 mov r3, r0 801ad06: 2b00 cmp r3, #0 801ad08: d008 beq.n 801ad1c 801ad0a: f00c fb31 bl 8027370 801ad0e: 6078 str r0, [r7, #4] 801ad10: 4b04 ldr r3, [pc, #16] @ (801ad24 ) 801ad12: 2200 movs r2, #0 801ad14: 701a strb r2, [r3, #0] 801ad16: 6878 ldr r0, [r7, #4] 801ad18: f00c fb38 bl 802738c } #endif /* PBUF_POOL_FREE_OOSEQ_QUEUE_CALL */ } 801ad1c: bf00 nop 801ad1e: 3708 adds r7, #8 801ad20: 46bd mov sp, r7 801ad22: bd80 pop {r7, pc} 801ad24: 2402af75 .word 0x2402af75 801ad28: 0801acc5 .word 0x0801acc5 0801ad2c : #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) { 801ad2c: b480 push {r7} 801ad2e: b085 sub sp, #20 801ad30: af00 add r7, sp, #0 801ad32: 60f8 str r0, [r7, #12] 801ad34: 60b9 str r1, [r7, #8] 801ad36: 4611 mov r1, r2 801ad38: 461a mov r2, r3 801ad3a: 460b mov r3, r1 801ad3c: 80fb strh r3, [r7, #6] 801ad3e: 4613 mov r3, r2 801ad40: 80bb strh r3, [r7, #4] p->next = NULL; 801ad42: 68fb ldr r3, [r7, #12] 801ad44: 2200 movs r2, #0 801ad46: 601a str r2, [r3, #0] p->payload = payload; 801ad48: 68fb ldr r3, [r7, #12] 801ad4a: 68ba ldr r2, [r7, #8] 801ad4c: 605a str r2, [r3, #4] p->tot_len = tot_len; 801ad4e: 68fb ldr r3, [r7, #12] 801ad50: 88fa ldrh r2, [r7, #6] 801ad52: 811a strh r2, [r3, #8] p->len = len; 801ad54: 68fb ldr r3, [r7, #12] 801ad56: 88ba ldrh r2, [r7, #4] 801ad58: 815a strh r2, [r3, #10] p->type_internal = (u8_t)type; 801ad5a: 8b3b ldrh r3, [r7, #24] 801ad5c: b2da uxtb r2, r3 801ad5e: 68fb ldr r3, [r7, #12] 801ad60: 731a strb r2, [r3, #12] p->flags = flags; 801ad62: 68fb ldr r3, [r7, #12] 801ad64: 7f3a ldrb r2, [r7, #28] 801ad66: 735a strb r2, [r3, #13] p->ref = 1; 801ad68: 68fb ldr r3, [r7, #12] 801ad6a: 2201 movs r2, #1 801ad6c: 739a strb r2, [r3, #14] p->if_idx = NETIF_NO_INDEX; 801ad6e: 68fb ldr r3, [r7, #12] 801ad70: 2200 movs r2, #0 801ad72: 73da strb r2, [r3, #15] } 801ad74: bf00 nop 801ad76: 3714 adds r7, #20 801ad78: 46bd mov sp, r7 801ad7a: f85d 7b04 ldr.w r7, [sp], #4 801ad7e: 4770 bx lr 0801ad80 : * @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) { 801ad80: b580 push {r7, lr} 801ad82: b08c sub sp, #48 @ 0x30 801ad84: af02 add r7, sp, #8 801ad86: 4603 mov r3, r0 801ad88: 71fb strb r3, [r7, #7] 801ad8a: 460b mov r3, r1 801ad8c: 80bb strh r3, [r7, #4] 801ad8e: 4613 mov r3, r2 801ad90: 807b strh r3, [r7, #2] struct pbuf *p; u16_t offset = (u16_t)layer; 801ad92: 79fb ldrb r3, [r7, #7] 801ad94: 847b strh r3, [r7, #34] @ 0x22 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); switch (type) { 801ad96: 887b ldrh r3, [r7, #2] 801ad98: f5b3 7f20 cmp.w r3, #640 @ 0x280 801ad9c: f000 8082 beq.w 801aea4 801ada0: f5b3 7f20 cmp.w r3, #640 @ 0x280 801ada4: f300 80c9 bgt.w 801af3a 801ada8: f5b3 7fc1 cmp.w r3, #386 @ 0x182 801adac: d010 beq.n 801add0 801adae: f5b3 7fc1 cmp.w r3, #386 @ 0x182 801adb2: f300 80c2 bgt.w 801af3a 801adb6: 2b01 cmp r3, #1 801adb8: d002 beq.n 801adc0 801adba: 2b41 cmp r3, #65 @ 0x41 801adbc: f040 80bd bne.w 801af3a case PBUF_REF: /* fall through */ case PBUF_ROM: p = pbuf_alloc_reference(NULL, length, type); 801adc0: 887a ldrh r2, [r7, #2] 801adc2: 88bb ldrh r3, [r7, #4] 801adc4: 4619 mov r1, r3 801adc6: 2000 movs r0, #0 801adc8: f000 f8d2 bl 801af70 801adcc: 6278 str r0, [r7, #36] @ 0x24 break; 801adce: e0be b.n 801af4e case PBUF_POOL: { struct pbuf *q, *last; u16_t rem_len; /* remaining length */ p = NULL; 801add0: 2300 movs r3, #0 801add2: 627b str r3, [r7, #36] @ 0x24 last = NULL; 801add4: 2300 movs r3, #0 801add6: 61fb str r3, [r7, #28] rem_len = length; 801add8: 88bb ldrh r3, [r7, #4] 801adda: 837b strh r3, [r7, #26] do { u16_t qlen; q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 801addc: 200c movs r0, #12 801adde: f7ff fb81 bl 801a4e4 801ade2: 6138 str r0, [r7, #16] if (q == NULL) { 801ade4: 693b ldr r3, [r7, #16] 801ade6: 2b00 cmp r3, #0 801ade8: d109 bne.n 801adfe PBUF_POOL_IS_EMPTY(); 801adea: f7ff ff75 bl 801acd8 /* free chain so far allocated */ if (p) { 801adee: 6a7b ldr r3, [r7, #36] @ 0x24 801adf0: 2b00 cmp r3, #0 801adf2: d002 beq.n 801adfa pbuf_free(p); 801adf4: 6a78 ldr r0, [r7, #36] @ 0x24 801adf6: f000 fad9 bl 801b3ac } /* bail out unsuccessfully */ return NULL; 801adfa: 2300 movs r3, #0 801adfc: e0a8 b.n 801af50 } qlen = LWIP_MIN(rem_len, (u16_t)(PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset))); 801adfe: 8c7b ldrh r3, [r7, #34] @ 0x22 801ae00: 3303 adds r3, #3 801ae02: b29b uxth r3, r3 801ae04: f023 0303 bic.w r3, r3, #3 801ae08: b29a uxth r2, r3 801ae0a: f240 53ec movw r3, #1516 @ 0x5ec 801ae0e: 1a9b subs r3, r3, r2 801ae10: b29b uxth r3, r3 801ae12: 8b7a ldrh r2, [r7, #26] 801ae14: 4293 cmp r3, r2 801ae16: bf28 it cs 801ae18: 4613 movcs r3, r2 801ae1a: 81fb strh r3, [r7, #14] pbuf_init_alloced_pbuf(q, LWIP_MEM_ALIGN((void *)((u8_t *)q + SIZEOF_STRUCT_PBUF + offset)), 801ae1c: 8c7b ldrh r3, [r7, #34] @ 0x22 801ae1e: 3310 adds r3, #16 801ae20: 693a ldr r2, [r7, #16] 801ae22: 4413 add r3, r2 801ae24: 3303 adds r3, #3 801ae26: f023 0303 bic.w r3, r3, #3 801ae2a: 4618 mov r0, r3 801ae2c: 89f9 ldrh r1, [r7, #14] 801ae2e: 8b7a ldrh r2, [r7, #26] 801ae30: 2300 movs r3, #0 801ae32: 9301 str r3, [sp, #4] 801ae34: 887b ldrh r3, [r7, #2] 801ae36: 9300 str r3, [sp, #0] 801ae38: 460b mov r3, r1 801ae3a: 4601 mov r1, r0 801ae3c: 6938 ldr r0, [r7, #16] 801ae3e: f7ff ff75 bl 801ad2c rem_len, qlen, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", 801ae42: 693b ldr r3, [r7, #16] 801ae44: 685b ldr r3, [r3, #4] 801ae46: f003 0303 and.w r3, r3, #3 801ae4a: 2b00 cmp r3, #0 801ae4c: d006 beq.n 801ae5c 801ae4e: 4b42 ldr r3, [pc, #264] @ (801af58 ) 801ae50: f44f 7280 mov.w r2, #256 @ 0x100 801ae54: 4941 ldr r1, [pc, #260] @ (801af5c ) 801ae56: 4842 ldr r0, [pc, #264] @ (801af60 ) 801ae58: f00f fd20 bl 802a89c ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", 801ae5c: 8c7b ldrh r3, [r7, #34] @ 0x22 801ae5e: 3303 adds r3, #3 801ae60: f023 0303 bic.w r3, r3, #3 801ae64: f240 52ec movw r2, #1516 @ 0x5ec 801ae68: 4293 cmp r3, r2 801ae6a: d106 bne.n 801ae7a 801ae6c: 4b3a ldr r3, [pc, #232] @ (801af58 ) 801ae6e: f44f 7281 mov.w r2, #258 @ 0x102 801ae72: 493c ldr r1, [pc, #240] @ (801af64 ) 801ae74: 483a ldr r0, [pc, #232] @ (801af60 ) 801ae76: f00f fd11 bl 802a89c (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); if (p == NULL) { 801ae7a: 6a7b ldr r3, [r7, #36] @ 0x24 801ae7c: 2b00 cmp r3, #0 801ae7e: d102 bne.n 801ae86 /* allocated head of pbuf chain (into p) */ p = q; 801ae80: 693b ldr r3, [r7, #16] 801ae82: 627b str r3, [r7, #36] @ 0x24 801ae84: e002 b.n 801ae8c } else { /* make previous pbuf point to this pbuf */ last->next = q; 801ae86: 69fb ldr r3, [r7, #28] 801ae88: 693a ldr r2, [r7, #16] 801ae8a: 601a str r2, [r3, #0] } last = q; 801ae8c: 693b ldr r3, [r7, #16] 801ae8e: 61fb str r3, [r7, #28] rem_len = (u16_t)(rem_len - qlen); 801ae90: 8b7a ldrh r2, [r7, #26] 801ae92: 89fb ldrh r3, [r7, #14] 801ae94: 1ad3 subs r3, r2, r3 801ae96: 837b strh r3, [r7, #26] offset = 0; 801ae98: 2300 movs r3, #0 801ae9a: 847b strh r3, [r7, #34] @ 0x22 } while (rem_len > 0); 801ae9c: 8b7b ldrh r3, [r7, #26] 801ae9e: 2b00 cmp r3, #0 801aea0: d19c bne.n 801addc break; 801aea2: e054 b.n 801af4e } case PBUF_RAM: { u16_t payload_len = (u16_t)(LWIP_MEM_ALIGN_SIZE(offset) + LWIP_MEM_ALIGN_SIZE(length)); 801aea4: 8c7b ldrh r3, [r7, #34] @ 0x22 801aea6: 3303 adds r3, #3 801aea8: b29b uxth r3, r3 801aeaa: f023 0303 bic.w r3, r3, #3 801aeae: b29a uxth r2, r3 801aeb0: 88bb ldrh r3, [r7, #4] 801aeb2: 3303 adds r3, #3 801aeb4: b29b uxth r3, r3 801aeb6: f023 0303 bic.w r3, r3, #3 801aeba: b29b uxth r3, r3 801aebc: 4413 add r3, r2 801aebe: 833b strh r3, [r7, #24] mem_size_t alloc_len = (mem_size_t)(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF) + payload_len); 801aec0: 8b3b ldrh r3, [r7, #24] 801aec2: 3310 adds r3, #16 801aec4: 617b str r3, [r7, #20] /* bug #50040: Check for integer overflow when calculating alloc_len */ if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 801aec6: 8b3a ldrh r2, [r7, #24] 801aec8: 88bb ldrh r3, [r7, #4] 801aeca: 3303 adds r3, #3 801aecc: f023 0303 bic.w r3, r3, #3 801aed0: 429a cmp r2, r3 801aed2: d306 bcc.n 801aee2 (alloc_len < LWIP_MEM_ALIGN_SIZE(length))) { 801aed4: 88bb ldrh r3, [r7, #4] 801aed6: 3303 adds r3, #3 801aed8: f023 0303 bic.w r3, r3, #3 if ((payload_len < LWIP_MEM_ALIGN_SIZE(length)) || 801aedc: 697a ldr r2, [r7, #20] 801aede: 429a cmp r2, r3 801aee0: d201 bcs.n 801aee6 return NULL; 801aee2: 2300 movs r3, #0 801aee4: e034 b.n 801af50 } /* If pbuf is to be allocated in RAM, allocate memory for it. */ p = (struct pbuf *)mem_malloc(alloc_len); 801aee6: 6978 ldr r0, [r7, #20] 801aee8: f7ff f960 bl 801a1ac 801aeec: 6278 str r0, [r7, #36] @ 0x24 if (p == NULL) { 801aeee: 6a7b ldr r3, [r7, #36] @ 0x24 801aef0: 2b00 cmp r3, #0 801aef2: d101 bne.n 801aef8 return NULL; 801aef4: 2300 movs r3, #0 801aef6: e02b b.n 801af50 } pbuf_init_alloced_pbuf(p, LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)), 801aef8: 8c7b ldrh r3, [r7, #34] @ 0x22 801aefa: 3310 adds r3, #16 801aefc: 6a7a ldr r2, [r7, #36] @ 0x24 801aefe: 4413 add r3, r2 801af00: 3303 adds r3, #3 801af02: f023 0303 bic.w r3, r3, #3 801af06: 4618 mov r0, r3 801af08: 88b9 ldrh r1, [r7, #4] 801af0a: 88ba ldrh r2, [r7, #4] 801af0c: 2300 movs r3, #0 801af0e: 9301 str r3, [sp, #4] 801af10: 887b ldrh r3, [r7, #2] 801af12: 9300 str r3, [sp, #0] 801af14: 460b mov r3, r1 801af16: 4601 mov r1, r0 801af18: 6a78 ldr r0, [r7, #36] @ 0x24 801af1a: f7ff ff07 bl 801ad2c length, length, type, 0); LWIP_ASSERT("pbuf_alloc: pbuf->payload properly aligned", 801af1e: 6a7b ldr r3, [r7, #36] @ 0x24 801af20: 685b ldr r3, [r3, #4] 801af22: f003 0303 and.w r3, r3, #3 801af26: 2b00 cmp r3, #0 801af28: d010 beq.n 801af4c 801af2a: 4b0b ldr r3, [pc, #44] @ (801af58 ) 801af2c: f44f 7291 mov.w r2, #290 @ 0x122 801af30: 490d ldr r1, [pc, #52] @ (801af68 ) 801af32: 480b ldr r0, [pc, #44] @ (801af60 ) 801af34: f00f fcb2 bl 802a89c ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); break; 801af38: e008 b.n 801af4c } default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); 801af3a: 4b07 ldr r3, [pc, #28] @ (801af58 ) 801af3c: f240 1227 movw r2, #295 @ 0x127 801af40: 490a ldr r1, [pc, #40] @ (801af6c ) 801af42: 4807 ldr r0, [pc, #28] @ (801af60 ) 801af44: f00f fcaa bl 802a89c return NULL; 801af48: 2300 movs r3, #0 801af4a: e001 b.n 801af50 break; 801af4c: bf00 nop } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 801af4e: 6a7b ldr r3, [r7, #36] @ 0x24 } 801af50: 4618 mov r0, r3 801af52: 3728 adds r7, #40 @ 0x28 801af54: 46bd mov sp, r7 801af56: bd80 pop {r7, pc} 801af58: 0802f0d8 .word 0x0802f0d8 801af5c: 0802f108 .word 0x0802f108 801af60: 0802f138 .word 0x0802f138 801af64: 0802f160 .word 0x0802f160 801af68: 0802f194 .word 0x0802f194 801af6c: 0802f1c0 .word 0x0802f1c0 0801af70 : * * @return the allocated pbuf. */ struct pbuf * pbuf_alloc_reference(void *payload, u16_t length, pbuf_type type) { 801af70: b580 push {r7, lr} 801af72: b086 sub sp, #24 801af74: af02 add r7, sp, #8 801af76: 6078 str r0, [r7, #4] 801af78: 460b mov r3, r1 801af7a: 807b strh r3, [r7, #2] 801af7c: 4613 mov r3, r2 801af7e: 803b strh r3, [r7, #0] struct pbuf *p; LWIP_ASSERT("invalid pbuf_type", (type == PBUF_REF) || (type == PBUF_ROM)); 801af80: 883b ldrh r3, [r7, #0] 801af82: 2b41 cmp r3, #65 @ 0x41 801af84: d009 beq.n 801af9a 801af86: 883b ldrh r3, [r7, #0] 801af88: 2b01 cmp r3, #1 801af8a: d006 beq.n 801af9a 801af8c: 4b0f ldr r3, [pc, #60] @ (801afcc ) 801af8e: f44f 72a5 mov.w r2, #330 @ 0x14a 801af92: 490f ldr r1, [pc, #60] @ (801afd0 ) 801af94: 480f ldr r0, [pc, #60] @ (801afd4 ) 801af96: f00f fc81 bl 802a89c /* only allocate memory for the pbuf structure */ p = (struct pbuf *)memp_malloc(MEMP_PBUF); 801af9a: 200b movs r0, #11 801af9c: f7ff faa2 bl 801a4e4 801afa0: 60f8 str r0, [r7, #12] if (p == NULL) { 801afa2: 68fb ldr r3, [r7, #12] 801afa4: 2b00 cmp r3, #0 801afa6: d101 bne.n 801afac 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; 801afa8: 2300 movs r3, #0 801afaa: e00b b.n 801afc4 } pbuf_init_alloced_pbuf(p, payload, length, length, type, 0); 801afac: 8879 ldrh r1, [r7, #2] 801afae: 887a ldrh r2, [r7, #2] 801afb0: 2300 movs r3, #0 801afb2: 9301 str r3, [sp, #4] 801afb4: 883b ldrh r3, [r7, #0] 801afb6: 9300 str r3, [sp, #0] 801afb8: 460b mov r3, r1 801afba: 6879 ldr r1, [r7, #4] 801afbc: 68f8 ldr r0, [r7, #12] 801afbe: f7ff feb5 bl 801ad2c return p; 801afc2: 68fb ldr r3, [r7, #12] } 801afc4: 4618 mov r0, r3 801afc6: 3710 adds r7, #16 801afc8: 46bd mov sp, r7 801afca: bd80 pop {r7, pc} 801afcc: 0802f0d8 .word 0x0802f0d8 801afd0: 0802f1dc .word 0x0802f1dc 801afd4: 0802f138 .word 0x0802f138 0801afd8 : * 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) { 801afd8: b580 push {r7, lr} 801afda: b088 sub sp, #32 801afdc: af02 add r7, sp, #8 801afde: 607b str r3, [r7, #4] 801afe0: 4603 mov r3, r0 801afe2: 73fb strb r3, [r7, #15] 801afe4: 460b mov r3, r1 801afe6: 81bb strh r3, [r7, #12] 801afe8: 4613 mov r3, r2 801afea: 817b strh r3, [r7, #10] u16_t offset = (u16_t)l; 801afec: 7bfb ldrb r3, [r7, #15] 801afee: 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) { 801aff0: 8a7b ldrh r3, [r7, #18] 801aff2: 3303 adds r3, #3 801aff4: f023 0203 bic.w r2, r3, #3 801aff8: 89bb ldrh r3, [r7, #12] 801affa: 441a add r2, r3 801affc: 8cbb ldrh r3, [r7, #36] @ 0x24 801affe: 429a cmp r2, r3 801b000: d901 bls.n 801b006 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_WARNING, ("pbuf_alloced_custom(length=%"U16_F") buffer too short\n", length)); return NULL; 801b002: 2300 movs r3, #0 801b004: e018 b.n 801b038 } if (payload_mem != NULL) { 801b006: 6a3b ldr r3, [r7, #32] 801b008: 2b00 cmp r3, #0 801b00a: d007 beq.n 801b01c payload = (u8_t *)payload_mem + LWIP_MEM_ALIGN_SIZE(offset); 801b00c: 8a7b ldrh r3, [r7, #18] 801b00e: 3303 adds r3, #3 801b010: f023 0303 bic.w r3, r3, #3 801b014: 6a3a ldr r2, [r7, #32] 801b016: 4413 add r3, r2 801b018: 617b str r3, [r7, #20] 801b01a: e001 b.n 801b020 } else { payload = NULL; 801b01c: 2300 movs r3, #0 801b01e: 617b str r3, [r7, #20] } pbuf_init_alloced_pbuf(&p->pbuf, payload, length, length, type, PBUF_FLAG_IS_CUSTOM); 801b020: 6878 ldr r0, [r7, #4] 801b022: 89b9 ldrh r1, [r7, #12] 801b024: 89ba ldrh r2, [r7, #12] 801b026: 2302 movs r3, #2 801b028: 9301 str r3, [sp, #4] 801b02a: 897b ldrh r3, [r7, #10] 801b02c: 9300 str r3, [sp, #0] 801b02e: 460b mov r3, r1 801b030: 6979 ldr r1, [r7, #20] 801b032: f7ff fe7b bl 801ad2c return &p->pbuf; 801b036: 687b ldr r3, [r7, #4] } 801b038: 4618 mov r0, r3 801b03a: 3718 adds r7, #24 801b03c: 46bd mov sp, r7 801b03e: bd80 pop {r7, pc} 0801b040 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 801b040: b580 push {r7, lr} 801b042: b084 sub sp, #16 801b044: af00 add r7, sp, #0 801b046: 6078 str r0, [r7, #4] 801b048: 460b mov r3, r1 801b04a: 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); 801b04c: 687b ldr r3, [r7, #4] 801b04e: 2b00 cmp r3, #0 801b050: d106 bne.n 801b060 801b052: 4b39 ldr r3, [pc, #228] @ (801b138 ) 801b054: f44f 72cc mov.w r2, #408 @ 0x198 801b058: 4938 ldr r1, [pc, #224] @ (801b13c ) 801b05a: 4839 ldr r0, [pc, #228] @ (801b140 ) 801b05c: f00f fc1e bl 802a89c /* desired length larger than current length? */ if (new_len >= p->tot_len) { 801b060: 687b ldr r3, [r7, #4] 801b062: 891b ldrh r3, [r3, #8] 801b064: 887a ldrh r2, [r7, #2] 801b066: 429a cmp r2, r3 801b068: d261 bcs.n 801b12e 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); 801b06a: 687b ldr r3, [r7, #4] 801b06c: 891a ldrh r2, [r3, #8] 801b06e: 887b ldrh r3, [r7, #2] 801b070: 1ad3 subs r3, r2, r3 801b072: 813b strh r3, [r7, #8] /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; 801b074: 887b ldrh r3, [r7, #2] 801b076: 817b strh r3, [r7, #10] q = p; 801b078: 687b ldr r3, [r7, #4] 801b07a: 60fb str r3, [r7, #12] /* should this pbuf be kept? */ while (rem_len > q->len) { 801b07c: e018 b.n 801b0b0 /* decrease remaining length by pbuf length */ rem_len = (u16_t)(rem_len - q->len); 801b07e: 68fb ldr r3, [r7, #12] 801b080: 895b ldrh r3, [r3, #10] 801b082: 897a ldrh r2, [r7, #10] 801b084: 1ad3 subs r3, r2, r3 801b086: 817b strh r3, [r7, #10] /* decrease total length indicator */ q->tot_len = (u16_t)(q->tot_len - shrink); 801b088: 68fb ldr r3, [r7, #12] 801b08a: 891a ldrh r2, [r3, #8] 801b08c: 893b ldrh r3, [r7, #8] 801b08e: 1ad3 subs r3, r2, r3 801b090: b29a uxth r2, r3 801b092: 68fb ldr r3, [r7, #12] 801b094: 811a strh r2, [r3, #8] /* proceed to next pbuf in chain */ q = q->next; 801b096: 68fb ldr r3, [r7, #12] 801b098: 681b ldr r3, [r3, #0] 801b09a: 60fb str r3, [r7, #12] LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL); 801b09c: 68fb ldr r3, [r7, #12] 801b09e: 2b00 cmp r3, #0 801b0a0: d106 bne.n 801b0b0 801b0a2: 4b25 ldr r3, [pc, #148] @ (801b138 ) 801b0a4: f240 12af movw r2, #431 @ 0x1af 801b0a8: 4926 ldr r1, [pc, #152] @ (801b144 ) 801b0aa: 4825 ldr r0, [pc, #148] @ (801b140 ) 801b0ac: f00f fbf6 bl 802a89c while (rem_len > q->len) { 801b0b0: 68fb ldr r3, [r7, #12] 801b0b2: 895b ldrh r3, [r3, #10] 801b0b4: 897a ldrh r2, [r7, #10] 801b0b6: 429a cmp r2, r3 801b0b8: d8e1 bhi.n 801b07e /* 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) 801b0ba: 68fb ldr r3, [r7, #12] 801b0bc: 7b1b ldrb r3, [r3, #12] 801b0be: f003 030f and.w r3, r3, #15 801b0c2: 2b00 cmp r3, #0 801b0c4: d11f bne.n 801b106 801b0c6: 68fb ldr r3, [r7, #12] 801b0c8: 895b ldrh r3, [r3, #10] 801b0ca: 897a ldrh r2, [r7, #10] 801b0cc: 429a cmp r2, r3 801b0ce: d01a beq.n 801b106 #if LWIP_SUPPORT_CUSTOM_PBUF && ((q->flags & PBUF_FLAG_IS_CUSTOM) == 0) 801b0d0: 68fb ldr r3, [r7, #12] 801b0d2: 7b5b ldrb r3, [r3, #13] 801b0d4: f003 0302 and.w r3, r3, #2 801b0d8: 2b00 cmp r3, #0 801b0da: d114 bne.n 801b106 #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)); 801b0dc: 68fb ldr r3, [r7, #12] 801b0de: 685a ldr r2, [r3, #4] 801b0e0: 68fb ldr r3, [r7, #12] 801b0e2: 1ad2 subs r2, r2, r3 801b0e4: 897b ldrh r3, [r7, #10] 801b0e6: 4413 add r3, r2 801b0e8: 4619 mov r1, r3 801b0ea: 68f8 ldr r0, [r7, #12] 801b0ec: f7fe ff5c bl 8019fa8 801b0f0: 60f8 str r0, [r7, #12] LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); 801b0f2: 68fb ldr r3, [r7, #12] 801b0f4: 2b00 cmp r3, #0 801b0f6: d106 bne.n 801b106 801b0f8: 4b0f ldr r3, [pc, #60] @ (801b138 ) 801b0fa: f240 12bd movw r2, #445 @ 0x1bd 801b0fe: 4912 ldr r1, [pc, #72] @ (801b148 ) 801b100: 480f ldr r0, [pc, #60] @ (801b140 ) 801b102: f00f fbcb bl 802a89c } /* adjust length fields for new last pbuf */ q->len = rem_len; 801b106: 68fb ldr r3, [r7, #12] 801b108: 897a ldrh r2, [r7, #10] 801b10a: 815a strh r2, [r3, #10] q->tot_len = q->len; 801b10c: 68fb ldr r3, [r7, #12] 801b10e: 895a ldrh r2, [r3, #10] 801b110: 68fb ldr r3, [r7, #12] 801b112: 811a strh r2, [r3, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 801b114: 68fb ldr r3, [r7, #12] 801b116: 681b ldr r3, [r3, #0] 801b118: 2b00 cmp r3, #0 801b11a: d004 beq.n 801b126 /* free remaining pbufs in chain */ pbuf_free(q->next); 801b11c: 68fb ldr r3, [r7, #12] 801b11e: 681b ldr r3, [r3, #0] 801b120: 4618 mov r0, r3 801b122: f000 f943 bl 801b3ac } /* q is last packet in chain */ q->next = NULL; 801b126: 68fb ldr r3, [r7, #12] 801b128: 2200 movs r2, #0 801b12a: 601a str r2, [r3, #0] 801b12c: e000 b.n 801b130 return; 801b12e: bf00 nop } 801b130: 3710 adds r7, #16 801b132: 46bd mov sp, r7 801b134: bd80 pop {r7, pc} 801b136: bf00 nop 801b138: 0802f0d8 .word 0x0802f0d8 801b13c: 0802f1f0 .word 0x0802f1f0 801b140: 0802f138 .word 0x0802f138 801b144: 0802f208 .word 0x0802f208 801b148: 0802f220 .word 0x0802f220 0801b14c : * @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) { 801b14c: b580 push {r7, lr} 801b14e: b086 sub sp, #24 801b150: af00 add r7, sp, #0 801b152: 60f8 str r0, [r7, #12] 801b154: 60b9 str r1, [r7, #8] 801b156: 4613 mov r3, r2 801b158: 71fb strb r3, [r7, #7] u16_t type_internal; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 801b15a: 68fb ldr r3, [r7, #12] 801b15c: 2b00 cmp r3, #0 801b15e: d106 bne.n 801b16e 801b160: 4b2b ldr r3, [pc, #172] @ (801b210 ) 801b162: f240 12df movw r2, #479 @ 0x1df 801b166: 492b ldr r1, [pc, #172] @ (801b214 ) 801b168: 482b ldr r0, [pc, #172] @ (801b218 ) 801b16a: f00f fb97 bl 802a89c if ((p == NULL) || (header_size_increment > 0xFFFF)) { 801b16e: 68fb ldr r3, [r7, #12] 801b170: 2b00 cmp r3, #0 801b172: d003 beq.n 801b17c 801b174: 68bb ldr r3, [r7, #8] 801b176: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801b17a: d301 bcc.n 801b180 return 1; 801b17c: 2301 movs r3, #1 801b17e: e043 b.n 801b208 } if (header_size_increment == 0) { 801b180: 68bb ldr r3, [r7, #8] 801b182: 2b00 cmp r3, #0 801b184: d101 bne.n 801b18a return 0; 801b186: 2300 movs r3, #0 801b188: e03e b.n 801b208 } increment_magnitude = (u16_t)header_size_increment; 801b18a: 68bb ldr r3, [r7, #8] 801b18c: 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) { 801b18e: 68fb ldr r3, [r7, #12] 801b190: 891a ldrh r2, [r3, #8] 801b192: 8a7b ldrh r3, [r7, #18] 801b194: 4413 add r3, r2 801b196: b29b uxth r3, r3 801b198: 8a7a ldrh r2, [r7, #18] 801b19a: 429a cmp r2, r3 801b19c: d901 bls.n 801b1a2 return 1; 801b19e: 2301 movs r3, #1 801b1a0: e032 b.n 801b208 } type_internal = p->type_internal; 801b1a2: 68fb ldr r3, [r7, #12] 801b1a4: 7b1b ldrb r3, [r3, #12] 801b1a6: 823b strh r3, [r7, #16] /* pbuf types containing payloads? */ if (type_internal & PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS) { 801b1a8: 8a3b ldrh r3, [r7, #16] 801b1aa: f003 0380 and.w r3, r3, #128 @ 0x80 801b1ae: 2b00 cmp r3, #0 801b1b0: d00c beq.n 801b1cc /* set new payload pointer */ payload = (u8_t *)p->payload - header_size_increment; 801b1b2: 68fb ldr r3, [r7, #12] 801b1b4: 685a ldr r2, [r3, #4] 801b1b6: 68bb ldr r3, [r7, #8] 801b1b8: 425b negs r3, r3 801b1ba: 4413 add r3, r2 801b1bc: 617b str r3, [r7, #20] /* boundary check fails? */ if ((u8_t *)payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 801b1be: 68fb ldr r3, [r7, #12] 801b1c0: 3310 adds r3, #16 801b1c2: 697a ldr r2, [r7, #20] 801b1c4: 429a cmp r2, r3 801b1c6: d20d bcs.n 801b1e4 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; 801b1c8: 2301 movs r3, #1 801b1ca: e01d b.n 801b208 } /* pbuf types referring to external payloads? */ } else { /* hide a header in the payload? */ if (force) { 801b1cc: 79fb ldrb r3, [r7, #7] 801b1ce: 2b00 cmp r3, #0 801b1d0: d006 beq.n 801b1e0 payload = (u8_t *)p->payload - header_size_increment; 801b1d2: 68fb ldr r3, [r7, #12] 801b1d4: 685a ldr r2, [r3, #4] 801b1d6: 68bb ldr r3, [r7, #8] 801b1d8: 425b negs r3, r3 801b1da: 4413 add r3, r2 801b1dc: 617b str r3, [r7, #20] 801b1de: e001 b.n 801b1e4 } else { /* cannot expand payload to front (yet!) * bail out unsuccessfully */ return 1; 801b1e0: 2301 movs r3, #1 801b1e2: e011 b.n 801b208 } 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; 801b1e4: 68fb ldr r3, [r7, #12] 801b1e6: 697a ldr r2, [r7, #20] 801b1e8: 605a str r2, [r3, #4] p->len = (u16_t)(p->len + increment_magnitude); 801b1ea: 68fb ldr r3, [r7, #12] 801b1ec: 895a ldrh r2, [r3, #10] 801b1ee: 8a7b ldrh r3, [r7, #18] 801b1f0: 4413 add r3, r2 801b1f2: b29a uxth r2, r3 801b1f4: 68fb ldr r3, [r7, #12] 801b1f6: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len + increment_magnitude); 801b1f8: 68fb ldr r3, [r7, #12] 801b1fa: 891a ldrh r2, [r3, #8] 801b1fc: 8a7b ldrh r3, [r7, #18] 801b1fe: 4413 add r3, r2 801b200: b29a uxth r2, r3 801b202: 68fb ldr r3, [r7, #12] 801b204: 811a strh r2, [r3, #8] return 0; 801b206: 2300 movs r3, #0 } 801b208: 4618 mov r0, r3 801b20a: 3718 adds r7, #24 801b20c: 46bd mov sp, r7 801b20e: bd80 pop {r7, pc} 801b210: 0802f0d8 .word 0x0802f0d8 801b214: 0802f23c .word 0x0802f23c 801b218: 0802f138 .word 0x0802f138 0801b21c : * @return non-zero on failure, zero on success. * */ u8_t pbuf_add_header(struct pbuf *p, size_t header_size_increment) { 801b21c: b580 push {r7, lr} 801b21e: b082 sub sp, #8 801b220: af00 add r7, sp, #0 801b222: 6078 str r0, [r7, #4] 801b224: 6039 str r1, [r7, #0] return pbuf_add_header_impl(p, header_size_increment, 0); 801b226: 2200 movs r2, #0 801b228: 6839 ldr r1, [r7, #0] 801b22a: 6878 ldr r0, [r7, #4] 801b22c: f7ff ff8e bl 801b14c 801b230: 4603 mov r3, r0 } 801b232: 4618 mov r0, r3 801b234: 3708 adds r7, #8 801b236: 46bd mov sp, r7 801b238: bd80 pop {r7, pc} ... 0801b23c : * @return non-zero on failure, zero on success. * */ u8_t pbuf_remove_header(struct pbuf *p, size_t header_size_decrement) { 801b23c: b580 push {r7, lr} 801b23e: b084 sub sp, #16 801b240: af00 add r7, sp, #0 801b242: 6078 str r0, [r7, #4] 801b244: 6039 str r1, [r7, #0] void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); 801b246: 687b ldr r3, [r7, #4] 801b248: 2b00 cmp r3, #0 801b24a: d106 bne.n 801b25a 801b24c: 4b20 ldr r3, [pc, #128] @ (801b2d0 ) 801b24e: f240 224b movw r2, #587 @ 0x24b 801b252: 4920 ldr r1, [pc, #128] @ (801b2d4 ) 801b254: 4820 ldr r0, [pc, #128] @ (801b2d8 ) 801b256: f00f fb21 bl 802a89c if ((p == NULL) || (header_size_decrement > 0xFFFF)) { 801b25a: 687b ldr r3, [r7, #4] 801b25c: 2b00 cmp r3, #0 801b25e: d003 beq.n 801b268 801b260: 683b ldr r3, [r7, #0] 801b262: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801b266: d301 bcc.n 801b26c return 1; 801b268: 2301 movs r3, #1 801b26a: e02c b.n 801b2c6 } if (header_size_decrement == 0) { 801b26c: 683b ldr r3, [r7, #0] 801b26e: 2b00 cmp r3, #0 801b270: d101 bne.n 801b276 return 0; 801b272: 2300 movs r3, #0 801b274: e027 b.n 801b2c6 } increment_magnitude = (u16_t)header_size_decrement; 801b276: 683b ldr r3, [r7, #0] 801b278: 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;); 801b27a: 687b ldr r3, [r7, #4] 801b27c: 895b ldrh r3, [r3, #10] 801b27e: 89fa ldrh r2, [r7, #14] 801b280: 429a cmp r2, r3 801b282: d908 bls.n 801b296 801b284: 4b12 ldr r3, [pc, #72] @ (801b2d0 ) 801b286: f240 2255 movw r2, #597 @ 0x255 801b28a: 4914 ldr r1, [pc, #80] @ (801b2dc ) 801b28c: 4812 ldr r0, [pc, #72] @ (801b2d8 ) 801b28e: f00f fb05 bl 802a89c 801b292: 2301 movs r3, #1 801b294: e017 b.n 801b2c6 /* remember current payload pointer */ payload = p->payload; 801b296: 687b ldr r3, [r7, #4] 801b298: 685b ldr r3, [r3, #4] 801b29a: 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; 801b29c: 687b ldr r3, [r7, #4] 801b29e: 685a ldr r2, [r3, #4] 801b2a0: 683b ldr r3, [r7, #0] 801b2a2: 441a add r2, r3 801b2a4: 687b ldr r3, [r7, #4] 801b2a6: 605a str r2, [r3, #4] /* modify pbuf length fields */ p->len = (u16_t)(p->len - increment_magnitude); 801b2a8: 687b ldr r3, [r7, #4] 801b2aa: 895a ldrh r2, [r3, #10] 801b2ac: 89fb ldrh r3, [r7, #14] 801b2ae: 1ad3 subs r3, r2, r3 801b2b0: b29a uxth r2, r3 801b2b2: 687b ldr r3, [r7, #4] 801b2b4: 815a strh r2, [r3, #10] p->tot_len = (u16_t)(p->tot_len - increment_magnitude); 801b2b6: 687b ldr r3, [r7, #4] 801b2b8: 891a ldrh r2, [r3, #8] 801b2ba: 89fb ldrh r3, [r7, #14] 801b2bc: 1ad3 subs r3, r2, r3 801b2be: b29a uxth r2, r3 801b2c0: 687b ldr r3, [r7, #4] 801b2c2: 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; 801b2c4: 2300 movs r3, #0 } 801b2c6: 4618 mov r0, r3 801b2c8: 3710 adds r7, #16 801b2ca: 46bd mov sp, r7 801b2cc: bd80 pop {r7, pc} 801b2ce: bf00 nop 801b2d0: 0802f0d8 .word 0x0802f0d8 801b2d4: 0802f23c .word 0x0802f23c 801b2d8: 0802f138 .word 0x0802f138 801b2dc: 0802f248 .word 0x0802f248 0801b2e0 : static u8_t pbuf_header_impl(struct pbuf *p, s16_t header_size_increment, u8_t force) { 801b2e0: b580 push {r7, lr} 801b2e2: b082 sub sp, #8 801b2e4: af00 add r7, sp, #0 801b2e6: 6078 str r0, [r7, #4] 801b2e8: 460b mov r3, r1 801b2ea: 807b strh r3, [r7, #2] 801b2ec: 4613 mov r3, r2 801b2ee: 707b strb r3, [r7, #1] if (header_size_increment < 0) { 801b2f0: f9b7 3002 ldrsh.w r3, [r7, #2] 801b2f4: 2b00 cmp r3, #0 801b2f6: da08 bge.n 801b30a return pbuf_remove_header(p, (size_t) - header_size_increment); 801b2f8: f9b7 3002 ldrsh.w r3, [r7, #2] 801b2fc: 425b negs r3, r3 801b2fe: 4619 mov r1, r3 801b300: 6878 ldr r0, [r7, #4] 801b302: f7ff ff9b bl 801b23c 801b306: 4603 mov r3, r0 801b308: e007 b.n 801b31a } else { return pbuf_add_header_impl(p, (size_t)header_size_increment, force); 801b30a: f9b7 3002 ldrsh.w r3, [r7, #2] 801b30e: 787a ldrb r2, [r7, #1] 801b310: 4619 mov r1, r3 801b312: 6878 ldr r0, [r7, #4] 801b314: f7ff ff1a bl 801b14c 801b318: 4603 mov r3, r0 } } 801b31a: 4618 mov r0, r3 801b31c: 3708 adds r7, #8 801b31e: 46bd mov sp, r7 801b320: bd80 pop {r7, pc} 0801b322 : * 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) { 801b322: b580 push {r7, lr} 801b324: b082 sub sp, #8 801b326: af00 add r7, sp, #0 801b328: 6078 str r0, [r7, #4] 801b32a: 460b mov r3, r1 801b32c: 807b strh r3, [r7, #2] return pbuf_header_impl(p, header_size_increment, 1); 801b32e: f9b7 3002 ldrsh.w r3, [r7, #2] 801b332: 2201 movs r2, #1 801b334: 4619 mov r1, r3 801b336: 6878 ldr r0, [r7, #4] 801b338: f7ff ffd2 bl 801b2e0 801b33c: 4603 mov r3, r0 } 801b33e: 4618 mov r0, r3 801b340: 3708 adds r7, #8 801b342: 46bd mov sp, r7 801b344: bd80 pop {r7, pc} 0801b346 : * takes an u16_t not s16_t! * @return the new head pbuf */ struct pbuf * pbuf_free_header(struct pbuf *q, u16_t size) { 801b346: b580 push {r7, lr} 801b348: b086 sub sp, #24 801b34a: af00 add r7, sp, #0 801b34c: 6078 str r0, [r7, #4] 801b34e: 460b mov r3, r1 801b350: 807b strh r3, [r7, #2] struct pbuf *p = q; 801b352: 687b ldr r3, [r7, #4] 801b354: 617b str r3, [r7, #20] u16_t free_left = size; 801b356: 887b ldrh r3, [r7, #2] 801b358: 827b strh r3, [r7, #18] while (free_left && p) { 801b35a: e01c b.n 801b396 if (free_left >= p->len) { 801b35c: 697b ldr r3, [r7, #20] 801b35e: 895b ldrh r3, [r3, #10] 801b360: 8a7a ldrh r2, [r7, #18] 801b362: 429a cmp r2, r3 801b364: d310 bcc.n 801b388 struct pbuf *f = p; 801b366: 697b ldr r3, [r7, #20] 801b368: 60fb str r3, [r7, #12] free_left = (u16_t)(free_left - p->len); 801b36a: 697b ldr r3, [r7, #20] 801b36c: 895b ldrh r3, [r3, #10] 801b36e: 8a7a ldrh r2, [r7, #18] 801b370: 1ad3 subs r3, r2, r3 801b372: 827b strh r3, [r7, #18] p = p->next; 801b374: 697b ldr r3, [r7, #20] 801b376: 681b ldr r3, [r3, #0] 801b378: 617b str r3, [r7, #20] f->next = 0; 801b37a: 68fb ldr r3, [r7, #12] 801b37c: 2200 movs r2, #0 801b37e: 601a str r2, [r3, #0] pbuf_free(f); 801b380: 68f8 ldr r0, [r7, #12] 801b382: f000 f813 bl 801b3ac 801b386: e006 b.n 801b396 } else { pbuf_remove_header(p, free_left); 801b388: 8a7b ldrh r3, [r7, #18] 801b38a: 4619 mov r1, r3 801b38c: 6978 ldr r0, [r7, #20] 801b38e: f7ff ff55 bl 801b23c free_left = 0; 801b392: 2300 movs r3, #0 801b394: 827b strh r3, [r7, #18] while (free_left && p) { 801b396: 8a7b ldrh r3, [r7, #18] 801b398: 2b00 cmp r3, #0 801b39a: d002 beq.n 801b3a2 801b39c: 697b ldr r3, [r7, #20] 801b39e: 2b00 cmp r3, #0 801b3a0: d1dc bne.n 801b35c } } return p; 801b3a2: 697b ldr r3, [r7, #20] } 801b3a4: 4618 mov r0, r3 801b3a6: 3718 adds r7, #24 801b3a8: 46bd mov sp, r7 801b3aa: bd80 pop {r7, pc} 0801b3ac : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 801b3ac: b580 push {r7, lr} 801b3ae: b088 sub sp, #32 801b3b0: af00 add r7, sp, #0 801b3b2: 6078 str r0, [r7, #4] u8_t alloc_src; struct pbuf *q; u8_t count; if (p == NULL) { 801b3b4: 687b ldr r3, [r7, #4] 801b3b6: 2b00 cmp r3, #0 801b3b8: d10b bne.n 801b3d2 LWIP_ASSERT("p != NULL", p != NULL); 801b3ba: 687b ldr r3, [r7, #4] 801b3bc: 2b00 cmp r3, #0 801b3be: d106 bne.n 801b3ce 801b3c0: 4b3b ldr r3, [pc, #236] @ (801b4b0 ) 801b3c2: f44f 7237 mov.w r2, #732 @ 0x2dc 801b3c6: 493b ldr r1, [pc, #236] @ (801b4b4 ) 801b3c8: 483b ldr r0, [pc, #236] @ (801b4b8 ) 801b3ca: f00f fa67 bl 802a89c /* 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; 801b3ce: 2300 movs r3, #0 801b3d0: e069 b.n 801b4a6 } LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free(%p)\n", (void *)p)); PERF_START; count = 0; 801b3d2: 2300 movs r3, #0 801b3d4: 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) { 801b3d6: e062 b.n 801b49e 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); 801b3d8: f00b ffca bl 8027370 801b3dc: 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); 801b3de: 687b ldr r3, [r7, #4] 801b3e0: 7b9b ldrb r3, [r3, #14] 801b3e2: 2b00 cmp r3, #0 801b3e4: d106 bne.n 801b3f4 801b3e6: 4b32 ldr r3, [pc, #200] @ (801b4b0 ) 801b3e8: f240 22f1 movw r2, #753 @ 0x2f1 801b3ec: 4933 ldr r1, [pc, #204] @ (801b4bc ) 801b3ee: 4832 ldr r0, [pc, #200] @ (801b4b8 ) 801b3f0: f00f fa54 bl 802a89c /* decrease reference count (number of pointers to pbuf) */ ref = --(p->ref); 801b3f4: 687b ldr r3, [r7, #4] 801b3f6: 7b9b ldrb r3, [r3, #14] 801b3f8: 3b01 subs r3, #1 801b3fa: b2da uxtb r2, r3 801b3fc: 687b ldr r3, [r7, #4] 801b3fe: 739a strb r2, [r3, #14] 801b400: 687b ldr r3, [r7, #4] 801b402: 7b9b ldrb r3, [r3, #14] 801b404: 75fb strb r3, [r7, #23] SYS_ARCH_UNPROTECT(old_level); 801b406: 69b8 ldr r0, [r7, #24] 801b408: f00b ffc0 bl 802738c /* this pbuf is no longer referenced to? */ if (ref == 0) { 801b40c: 7dfb ldrb r3, [r7, #23] 801b40e: 2b00 cmp r3, #0 801b410: d143 bne.n 801b49a /* remember next pbuf in chain for next iteration */ q = p->next; 801b412: 687b ldr r3, [r7, #4] 801b414: 681b ldr r3, [r3, #0] 801b416: 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); 801b418: 687b ldr r3, [r7, #4] 801b41a: 7b1b ldrb r3, [r3, #12] 801b41c: f003 030f and.w r3, r3, #15 801b420: 73fb strb r3, [r7, #15] #if LWIP_SUPPORT_CUSTOM_PBUF /* is this a custom pbuf? */ if ((p->flags & PBUF_FLAG_IS_CUSTOM) != 0) { 801b422: 687b ldr r3, [r7, #4] 801b424: 7b5b ldrb r3, [r3, #13] 801b426: f003 0302 and.w r3, r3, #2 801b42a: 2b00 cmp r3, #0 801b42c: d011 beq.n 801b452 struct pbuf_custom *pc = (struct pbuf_custom *)p; 801b42e: 687b ldr r3, [r7, #4] 801b430: 60bb str r3, [r7, #8] LWIP_ASSERT("pc->custom_free_function != NULL", pc->custom_free_function != NULL); 801b432: 68bb ldr r3, [r7, #8] 801b434: 691b ldr r3, [r3, #16] 801b436: 2b00 cmp r3, #0 801b438: d106 bne.n 801b448 801b43a: 4b1d ldr r3, [pc, #116] @ (801b4b0 ) 801b43c: f240 22ff movw r2, #767 @ 0x2ff 801b440: 491f ldr r1, [pc, #124] @ (801b4c0 ) 801b442: 481d ldr r0, [pc, #116] @ (801b4b8 ) 801b444: f00f fa2a bl 802a89c pc->custom_free_function(p); 801b448: 68bb ldr r3, [r7, #8] 801b44a: 691b ldr r3, [r3, #16] 801b44c: 6878 ldr r0, [r7, #4] 801b44e: 4798 blx r3 801b450: e01d b.n 801b48e } 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) { 801b452: 7bfb ldrb r3, [r7, #15] 801b454: 2b02 cmp r3, #2 801b456: d104 bne.n 801b462 memp_free(MEMP_PBUF_POOL, p); 801b458: 6879 ldr r1, [r7, #4] 801b45a: 200c movs r0, #12 801b45c: f7ff f8b8 bl 801a5d0 801b460: e015 b.n 801b48e /* is this a ROM or RAM referencing pbuf? */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_MEMP_PBUF) { 801b462: 7bfb ldrb r3, [r7, #15] 801b464: 2b01 cmp r3, #1 801b466: d104 bne.n 801b472 memp_free(MEMP_PBUF, p); 801b468: 6879 ldr r1, [r7, #4] 801b46a: 200b movs r0, #11 801b46c: f7ff f8b0 bl 801a5d0 801b470: e00d b.n 801b48e /* type == PBUF_RAM */ } else if (alloc_src == PBUF_TYPE_ALLOC_SRC_MASK_STD_HEAP) { 801b472: 7bfb ldrb r3, [r7, #15] 801b474: 2b00 cmp r3, #0 801b476: d103 bne.n 801b480 mem_free(p); 801b478: 6878 ldr r0, [r7, #4] 801b47a: f7fe fd05 bl 8019e88 801b47e: e006 b.n 801b48e } else { /* @todo: support freeing other types */ LWIP_ASSERT("invalid pbuf type", 0); 801b480: 4b0b ldr r3, [pc, #44] @ (801b4b0 ) 801b482: f240 320f movw r2, #783 @ 0x30f 801b486: 490f ldr r1, [pc, #60] @ (801b4c4 ) 801b488: 480b ldr r0, [pc, #44] @ (801b4b8 ) 801b48a: f00f fa07 bl 802a89c } } count++; 801b48e: 7ffb ldrb r3, [r7, #31] 801b490: 3301 adds r3, #1 801b492: 77fb strb r3, [r7, #31] /* proceed to next pbuf */ p = q; 801b494: 693b ldr r3, [r7, #16] 801b496: 607b str r3, [r7, #4] 801b498: e001 b.n 801b49e /* 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; 801b49a: 2300 movs r3, #0 801b49c: 607b str r3, [r7, #4] while (p != NULL) { 801b49e: 687b ldr r3, [r7, #4] 801b4a0: 2b00 cmp r3, #0 801b4a2: d199 bne.n 801b3d8 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; 801b4a4: 7ffb ldrb r3, [r7, #31] } 801b4a6: 4618 mov r0, r3 801b4a8: 3720 adds r7, #32 801b4aa: 46bd mov sp, r7 801b4ac: bd80 pop {r7, pc} 801b4ae: bf00 nop 801b4b0: 0802f0d8 .word 0x0802f0d8 801b4b4: 0802f23c .word 0x0802f23c 801b4b8: 0802f138 .word 0x0802f138 801b4bc: 0802f268 .word 0x0802f268 801b4c0: 0802f280 .word 0x0802f280 801b4c4: 0802f2a4 .word 0x0802f2a4 0801b4c8 : * @param p first pbuf of chain * @return the number of pbufs in a chain */ u16_t pbuf_clen(const struct pbuf *p) { 801b4c8: b480 push {r7} 801b4ca: b085 sub sp, #20 801b4cc: af00 add r7, sp, #0 801b4ce: 6078 str r0, [r7, #4] u16_t len; len = 0; 801b4d0: 2300 movs r3, #0 801b4d2: 81fb strh r3, [r7, #14] while (p != NULL) { 801b4d4: e005 b.n 801b4e2 ++len; 801b4d6: 89fb ldrh r3, [r7, #14] 801b4d8: 3301 adds r3, #1 801b4da: 81fb strh r3, [r7, #14] p = p->next; 801b4dc: 687b ldr r3, [r7, #4] 801b4de: 681b ldr r3, [r3, #0] 801b4e0: 607b str r3, [r7, #4] while (p != NULL) { 801b4e2: 687b ldr r3, [r7, #4] 801b4e4: 2b00 cmp r3, #0 801b4e6: d1f6 bne.n 801b4d6 } return len; 801b4e8: 89fb ldrh r3, [r7, #14] } 801b4ea: 4618 mov r0, r3 801b4ec: 3714 adds r7, #20 801b4ee: 46bd mov sp, r7 801b4f0: f85d 7b04 ldr.w r7, [sp], #4 801b4f4: 4770 bx lr ... 0801b4f8 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 801b4f8: b580 push {r7, lr} 801b4fa: b084 sub sp, #16 801b4fc: af00 add r7, sp, #0 801b4fe: 6078 str r0, [r7, #4] /* pbuf given? */ if (p != NULL) { 801b500: 687b ldr r3, [r7, #4] 801b502: 2b00 cmp r3, #0 801b504: d016 beq.n 801b534 SYS_ARCH_SET(p->ref, (LWIP_PBUF_REF_T)(p->ref + 1)); 801b506: f00b ff33 bl 8027370 801b50a: 60f8 str r0, [r7, #12] 801b50c: 687b ldr r3, [r7, #4] 801b50e: 7b9b ldrb r3, [r3, #14] 801b510: 3301 adds r3, #1 801b512: b2da uxtb r2, r3 801b514: 687b ldr r3, [r7, #4] 801b516: 739a strb r2, [r3, #14] 801b518: 68f8 ldr r0, [r7, #12] 801b51a: f00b ff37 bl 802738c LWIP_ASSERT("pbuf ref overflow", p->ref > 0); 801b51e: 687b ldr r3, [r7, #4] 801b520: 7b9b ldrb r3, [r3, #14] 801b522: 2b00 cmp r3, #0 801b524: d106 bne.n 801b534 801b526: 4b05 ldr r3, [pc, #20] @ (801b53c ) 801b528: f240 3242 movw r2, #834 @ 0x342 801b52c: 4904 ldr r1, [pc, #16] @ (801b540 ) 801b52e: 4805 ldr r0, [pc, #20] @ (801b544 ) 801b530: f00f f9b4 bl 802a89c } } 801b534: bf00 nop 801b536: 3710 adds r7, #16 801b538: 46bd mov sp, r7 801b53a: bd80 pop {r7, pc} 801b53c: 0802f0d8 .word 0x0802f0d8 801b540: 0802f2b8 .word 0x0802f2b8 801b544: 0802f138 .word 0x0802f138 0801b548 : * * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 801b548: b580 push {r7, lr} 801b54a: b084 sub sp, #16 801b54c: af00 add r7, sp, #0 801b54e: 6078 str r0, [r7, #4] 801b550: 6039 str r1, [r7, #0] struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 801b552: 687b ldr r3, [r7, #4] 801b554: 2b00 cmp r3, #0 801b556: d002 beq.n 801b55e 801b558: 683b ldr r3, [r7, #0] 801b55a: 2b00 cmp r3, #0 801b55c: d107 bne.n 801b56e 801b55e: 4b20 ldr r3, [pc, #128] @ (801b5e0 ) 801b560: f240 3259 movw r2, #857 @ 0x359 801b564: 491f ldr r1, [pc, #124] @ (801b5e4 ) 801b566: 4820 ldr r0, [pc, #128] @ (801b5e8 ) 801b568: f00f f998 bl 802a89c 801b56c: e034 b.n 801b5d8 ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { 801b56e: 687b ldr r3, [r7, #4] 801b570: 60fb str r3, [r7, #12] 801b572: e00a b.n 801b58a /* add total length of second chain to all totals of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 801b574: 68fb ldr r3, [r7, #12] 801b576: 891a ldrh r2, [r3, #8] 801b578: 683b ldr r3, [r7, #0] 801b57a: 891b ldrh r3, [r3, #8] 801b57c: 4413 add r3, r2 801b57e: b29a uxth r2, r3 801b580: 68fb ldr r3, [r7, #12] 801b582: 811a strh r2, [r3, #8] for (p = h; p->next != NULL; p = p->next) { 801b584: 68fb ldr r3, [r7, #12] 801b586: 681b ldr r3, [r3, #0] 801b588: 60fb str r3, [r7, #12] 801b58a: 68fb ldr r3, [r7, #12] 801b58c: 681b ldr r3, [r3, #0] 801b58e: 2b00 cmp r3, #0 801b590: d1f0 bne.n 801b574 } /* { 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); 801b592: 68fb ldr r3, [r7, #12] 801b594: 891a ldrh r2, [r3, #8] 801b596: 68fb ldr r3, [r7, #12] 801b598: 895b ldrh r3, [r3, #10] 801b59a: 429a cmp r2, r3 801b59c: d006 beq.n 801b5ac 801b59e: 4b10 ldr r3, [pc, #64] @ (801b5e0 ) 801b5a0: f240 3262 movw r2, #866 @ 0x362 801b5a4: 4911 ldr r1, [pc, #68] @ (801b5ec ) 801b5a6: 4810 ldr r0, [pc, #64] @ (801b5e8 ) 801b5a8: f00f f978 bl 802a89c LWIP_ASSERT("p->next == NULL", p->next == NULL); 801b5ac: 68fb ldr r3, [r7, #12] 801b5ae: 681b ldr r3, [r3, #0] 801b5b0: 2b00 cmp r3, #0 801b5b2: d006 beq.n 801b5c2 801b5b4: 4b0a ldr r3, [pc, #40] @ (801b5e0 ) 801b5b6: f240 3263 movw r2, #867 @ 0x363 801b5ba: 490d ldr r1, [pc, #52] @ (801b5f0 ) 801b5bc: 480a ldr r0, [pc, #40] @ (801b5e8 ) 801b5be: f00f f96d bl 802a89c /* add total length of second chain to last pbuf total of first chain */ p->tot_len = (u16_t)(p->tot_len + t->tot_len); 801b5c2: 68fb ldr r3, [r7, #12] 801b5c4: 891a ldrh r2, [r3, #8] 801b5c6: 683b ldr r3, [r7, #0] 801b5c8: 891b ldrh r3, [r3, #8] 801b5ca: 4413 add r3, r2 801b5cc: b29a uxth r2, r3 801b5ce: 68fb ldr r3, [r7, #12] 801b5d0: 811a strh r2, [r3, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 801b5d2: 68fb ldr r3, [r7, #12] 801b5d4: 683a ldr r2, [r7, #0] 801b5d6: 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. */ } 801b5d8: 3710 adds r7, #16 801b5da: 46bd mov sp, r7 801b5dc: bd80 pop {r7, pc} 801b5de: bf00 nop 801b5e0: 0802f0d8 .word 0x0802f0d8 801b5e4: 0802f2cc .word 0x0802f2cc 801b5e8: 0802f138 .word 0x0802f138 801b5ec: 0802f304 .word 0x0802f304 801b5f0: 0802f334 .word 0x0802f334 0801b5f4 : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 801b5f4: b580 push {r7, lr} 801b5f6: b082 sub sp, #8 801b5f8: af00 add r7, sp, #0 801b5fa: 6078 str r0, [r7, #4] 801b5fc: 6039 str r1, [r7, #0] pbuf_cat(h, t); 801b5fe: 6839 ldr r1, [r7, #0] 801b600: 6878 ldr r0, [r7, #4] 801b602: f7ff ffa1 bl 801b548 /* t is now referenced by h */ pbuf_ref(t); 801b606: 6838 ldr r0, [r7, #0] 801b608: f7ff ff76 bl 801b4f8 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 801b60c: bf00 nop 801b60e: 3708 adds r7, #8 801b610: 46bd mov sp, r7 801b612: bd80 pop {r7, pc} 0801b614 : * 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) { 801b614: b580 push {r7, lr} 801b616: b086 sub sp, #24 801b618: af00 add r7, sp, #0 801b61a: 6078 str r0, [r7, #4] 801b61c: 6039 str r1, [r7, #0] size_t offset_to = 0, offset_from = 0, len; 801b61e: 2300 movs r3, #0 801b620: 617b str r3, [r7, #20] 801b622: 2300 movs r3, #0 801b624: 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) && 801b626: 687b ldr r3, [r7, #4] 801b628: 2b00 cmp r3, #0 801b62a: d008 beq.n 801b63e 801b62c: 683b ldr r3, [r7, #0] 801b62e: 2b00 cmp r3, #0 801b630: d005 beq.n 801b63e 801b632: 687b ldr r3, [r7, #4] 801b634: 891a ldrh r2, [r3, #8] 801b636: 683b ldr r3, [r7, #0] 801b638: 891b ldrh r3, [r3, #8] 801b63a: 429a cmp r2, r3 801b63c: d209 bcs.n 801b652 801b63e: 4b57 ldr r3, [pc, #348] @ (801b79c ) 801b640: f240 32c9 movw r2, #969 @ 0x3c9 801b644: 4956 ldr r1, [pc, #344] @ (801b7a0 ) 801b646: 4857 ldr r0, [pc, #348] @ (801b7a4 ) 801b648: f00f f928 bl 802a89c 801b64c: f06f 030f mvn.w r3, #15 801b650: e09f b.n 801b792 (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)) { 801b652: 687b ldr r3, [r7, #4] 801b654: 895b ldrh r3, [r3, #10] 801b656: 461a mov r2, r3 801b658: 697b ldr r3, [r7, #20] 801b65a: 1ad2 subs r2, r2, r3 801b65c: 683b ldr r3, [r7, #0] 801b65e: 895b ldrh r3, [r3, #10] 801b660: 4619 mov r1, r3 801b662: 693b ldr r3, [r7, #16] 801b664: 1acb subs r3, r1, r3 801b666: 429a cmp r2, r3 801b668: d306 bcc.n 801b678 /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; 801b66a: 683b ldr r3, [r7, #0] 801b66c: 895b ldrh r3, [r3, #10] 801b66e: 461a mov r2, r3 801b670: 693b ldr r3, [r7, #16] 801b672: 1ad3 subs r3, r2, r3 801b674: 60fb str r3, [r7, #12] 801b676: e005 b.n 801b684 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; 801b678: 687b ldr r3, [r7, #4] 801b67a: 895b ldrh r3, [r3, #10] 801b67c: 461a mov r2, r3 801b67e: 697b ldr r3, [r7, #20] 801b680: 1ad3 subs r3, r2, r3 801b682: 60fb str r3, [r7, #12] } MEMCPY((u8_t *)p_to->payload + offset_to, (u8_t *)p_from->payload + offset_from, len); 801b684: 687b ldr r3, [r7, #4] 801b686: 685a ldr r2, [r3, #4] 801b688: 697b ldr r3, [r7, #20] 801b68a: 18d0 adds r0, r2, r3 801b68c: 683b ldr r3, [r7, #0] 801b68e: 685a ldr r2, [r3, #4] 801b690: 693b ldr r3, [r7, #16] 801b692: 4413 add r3, r2 801b694: 68fa ldr r2, [r7, #12] 801b696: 4619 mov r1, r3 801b698: f00f fb89 bl 802adae offset_to += len; 801b69c: 697a ldr r2, [r7, #20] 801b69e: 68fb ldr r3, [r7, #12] 801b6a0: 4413 add r3, r2 801b6a2: 617b str r3, [r7, #20] offset_from += len; 801b6a4: 693a ldr r2, [r7, #16] 801b6a6: 68fb ldr r3, [r7, #12] 801b6a8: 4413 add r3, r2 801b6aa: 613b str r3, [r7, #16] LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); 801b6ac: 687b ldr r3, [r7, #4] 801b6ae: 895b ldrh r3, [r3, #10] 801b6b0: 461a mov r2, r3 801b6b2: 697b ldr r3, [r7, #20] 801b6b4: 4293 cmp r3, r2 801b6b6: d906 bls.n 801b6c6 801b6b8: 4b38 ldr r3, [pc, #224] @ (801b79c ) 801b6ba: f240 32d9 movw r2, #985 @ 0x3d9 801b6be: 493a ldr r1, [pc, #232] @ (801b7a8 ) 801b6c0: 4838 ldr r0, [pc, #224] @ (801b7a4 ) 801b6c2: f00f f8eb bl 802a89c LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); 801b6c6: 683b ldr r3, [r7, #0] 801b6c8: 895b ldrh r3, [r3, #10] 801b6ca: 461a mov r2, r3 801b6cc: 693b ldr r3, [r7, #16] 801b6ce: 4293 cmp r3, r2 801b6d0: d906 bls.n 801b6e0 801b6d2: 4b32 ldr r3, [pc, #200] @ (801b79c ) 801b6d4: f240 32da movw r2, #986 @ 0x3da 801b6d8: 4934 ldr r1, [pc, #208] @ (801b7ac ) 801b6da: 4832 ldr r0, [pc, #200] @ (801b7a4 ) 801b6dc: f00f f8de bl 802a89c if (offset_from >= p_from->len) { 801b6e0: 683b ldr r3, [r7, #0] 801b6e2: 895b ldrh r3, [r3, #10] 801b6e4: 461a mov r2, r3 801b6e6: 693b ldr r3, [r7, #16] 801b6e8: 4293 cmp r3, r2 801b6ea: d304 bcc.n 801b6f6 /* on to next p_from (if any) */ offset_from = 0; 801b6ec: 2300 movs r3, #0 801b6ee: 613b str r3, [r7, #16] p_from = p_from->next; 801b6f0: 683b ldr r3, [r7, #0] 801b6f2: 681b ldr r3, [r3, #0] 801b6f4: 603b str r3, [r7, #0] } if (offset_to == p_to->len) { 801b6f6: 687b ldr r3, [r7, #4] 801b6f8: 895b ldrh r3, [r3, #10] 801b6fa: 461a mov r2, r3 801b6fc: 697b ldr r3, [r7, #20] 801b6fe: 4293 cmp r3, r2 801b700: d114 bne.n 801b72c /* on to next p_to (if any) */ offset_to = 0; 801b702: 2300 movs r3, #0 801b704: 617b str r3, [r7, #20] p_to = p_to->next; 801b706: 687b ldr r3, [r7, #4] 801b708: 681b ldr r3, [r3, #0] 801b70a: 607b str r3, [r7, #4] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL), return ERR_ARG;); 801b70c: 687b ldr r3, [r7, #4] 801b70e: 2b00 cmp r3, #0 801b710: d10c bne.n 801b72c 801b712: 683b ldr r3, [r7, #0] 801b714: 2b00 cmp r3, #0 801b716: d009 beq.n 801b72c 801b718: 4b20 ldr r3, [pc, #128] @ (801b79c ) 801b71a: f44f 7279 mov.w r2, #996 @ 0x3e4 801b71e: 4924 ldr r1, [pc, #144] @ (801b7b0 ) 801b720: 4820 ldr r0, [pc, #128] @ (801b7a4 ) 801b722: f00f f8bb bl 802a89c 801b726: f06f 030f mvn.w r3, #15 801b72a: e032 b.n 801b792 } if ((p_from != NULL) && (p_from->len == p_from->tot_len)) { 801b72c: 683b ldr r3, [r7, #0] 801b72e: 2b00 cmp r3, #0 801b730: d013 beq.n 801b75a 801b732: 683b ldr r3, [r7, #0] 801b734: 895a ldrh r2, [r3, #10] 801b736: 683b ldr r3, [r7, #0] 801b738: 891b ldrh r3, [r3, #8] 801b73a: 429a cmp r2, r3 801b73c: d10d bne.n 801b75a /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 801b73e: 683b ldr r3, [r7, #0] 801b740: 681b ldr r3, [r3, #0] 801b742: 2b00 cmp r3, #0 801b744: d009 beq.n 801b75a 801b746: 4b15 ldr r3, [pc, #84] @ (801b79c ) 801b748: f240 32e9 movw r2, #1001 @ 0x3e9 801b74c: 4919 ldr r1, [pc, #100] @ (801b7b4 ) 801b74e: 4815 ldr r0, [pc, #84] @ (801b7a4 ) 801b750: f00f f8a4 bl 802a89c 801b754: f06f 0305 mvn.w r3, #5 801b758: e01b b.n 801b792 (p_from->next == NULL), return ERR_VAL;); } if ((p_to != NULL) && (p_to->len == p_to->tot_len)) { 801b75a: 687b ldr r3, [r7, #4] 801b75c: 2b00 cmp r3, #0 801b75e: d013 beq.n 801b788 801b760: 687b ldr r3, [r7, #4] 801b762: 895a ldrh r2, [r3, #10] 801b764: 687b ldr r3, [r7, #4] 801b766: 891b ldrh r3, [r3, #8] 801b768: 429a cmp r2, r3 801b76a: d10d bne.n 801b788 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!", 801b76c: 687b ldr r3, [r7, #4] 801b76e: 681b ldr r3, [r3, #0] 801b770: 2b00 cmp r3, #0 801b772: d009 beq.n 801b788 801b774: 4b09 ldr r3, [pc, #36] @ (801b79c ) 801b776: f240 32ee movw r2, #1006 @ 0x3ee 801b77a: 490e ldr r1, [pc, #56] @ (801b7b4 ) 801b77c: 4809 ldr r0, [pc, #36] @ (801b7a4 ) 801b77e: f00f f88d bl 802a89c 801b782: f06f 0305 mvn.w r3, #5 801b786: e004 b.n 801b792 (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 801b788: 683b ldr r3, [r7, #0] 801b78a: 2b00 cmp r3, #0 801b78c: f47f af61 bne.w 801b652 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 801b790: 2300 movs r3, #0 } 801b792: 4618 mov r0, r3 801b794: 3718 adds r7, #24 801b796: 46bd mov sp, r7 801b798: bd80 pop {r7, pc} 801b79a: bf00 nop 801b79c: 0802f0d8 .word 0x0802f0d8 801b7a0: 0802f380 .word 0x0802f380 801b7a4: 0802f138 .word 0x0802f138 801b7a8: 0802f3b0 .word 0x0802f3b0 801b7ac: 0802f3c8 .word 0x0802f3c8 801b7b0: 0802f3e4 .word 0x0802f3e4 801b7b4: 0802f3f4 .word 0x0802f3f4 0801b7b8 : * @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) { 801b7b8: b580 push {r7, lr} 801b7ba: b088 sub sp, #32 801b7bc: af00 add r7, sp, #0 801b7be: 60f8 str r0, [r7, #12] 801b7c0: 60b9 str r1, [r7, #8] 801b7c2: 4611 mov r1, r2 801b7c4: 461a mov r2, r3 801b7c6: 460b mov r3, r1 801b7c8: 80fb strh r3, [r7, #6] 801b7ca: 4613 mov r3, r2 801b7cc: 80bb strh r3, [r7, #4] const struct pbuf *p; u16_t left = 0; 801b7ce: 2300 movs r3, #0 801b7d0: 837b strh r3, [r7, #26] u16_t buf_copy_len; u16_t copied_total = 0; 801b7d2: 2300 movs r3, #0 801b7d4: 82fb strh r3, [r7, #22] LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 801b7d6: 68fb ldr r3, [r7, #12] 801b7d8: 2b00 cmp r3, #0 801b7da: d108 bne.n 801b7ee 801b7dc: 4b2b ldr r3, [pc, #172] @ (801b88c ) 801b7de: f240 420a movw r2, #1034 @ 0x40a 801b7e2: 492b ldr r1, [pc, #172] @ (801b890 ) 801b7e4: 482b ldr r0, [pc, #172] @ (801b894 ) 801b7e6: f00f f859 bl 802a89c 801b7ea: 2300 movs r3, #0 801b7ec: e04a b.n 801b884 LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 801b7ee: 68bb ldr r3, [r7, #8] 801b7f0: 2b00 cmp r3, #0 801b7f2: d108 bne.n 801b806 801b7f4: 4b25 ldr r3, [pc, #148] @ (801b88c ) 801b7f6: f240 420b movw r2, #1035 @ 0x40b 801b7fa: 4927 ldr r1, [pc, #156] @ (801b898 ) 801b7fc: 4825 ldr r0, [pc, #148] @ (801b894 ) 801b7fe: f00f f84d bl 802a89c 801b802: 2300 movs r3, #0 801b804: e03e b.n 801b884 /* 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) { 801b806: 68fb ldr r3, [r7, #12] 801b808: 61fb str r3, [r7, #28] 801b80a: e034 b.n 801b876 if ((offset != 0) && (offset >= p->len)) { 801b80c: 88bb ldrh r3, [r7, #4] 801b80e: 2b00 cmp r3, #0 801b810: d00a beq.n 801b828 801b812: 69fb ldr r3, [r7, #28] 801b814: 895b ldrh r3, [r3, #10] 801b816: 88ba ldrh r2, [r7, #4] 801b818: 429a cmp r2, r3 801b81a: d305 bcc.n 801b828 /* don't copy from this buffer -> on to the next */ offset = (u16_t)(offset - p->len); 801b81c: 69fb ldr r3, [r7, #28] 801b81e: 895b ldrh r3, [r3, #10] 801b820: 88ba ldrh r2, [r7, #4] 801b822: 1ad3 subs r3, r2, r3 801b824: 80bb strh r3, [r7, #4] 801b826: e023 b.n 801b870 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = (u16_t)(p->len - offset); 801b828: 69fb ldr r3, [r7, #28] 801b82a: 895a ldrh r2, [r3, #10] 801b82c: 88bb ldrh r3, [r7, #4] 801b82e: 1ad3 subs r3, r2, r3 801b830: 833b strh r3, [r7, #24] if (buf_copy_len > len) { 801b832: 8b3a ldrh r2, [r7, #24] 801b834: 88fb ldrh r3, [r7, #6] 801b836: 429a cmp r2, r3 801b838: d901 bls.n 801b83e buf_copy_len = len; 801b83a: 88fb ldrh r3, [r7, #6] 801b83c: 833b strh r3, [r7, #24] } /* copy the necessary parts of the buffer */ MEMCPY(&((char *)dataptr)[left], &((char *)p->payload)[offset], buf_copy_len); 801b83e: 8b7b ldrh r3, [r7, #26] 801b840: 68ba ldr r2, [r7, #8] 801b842: 18d0 adds r0, r2, r3 801b844: 69fb ldr r3, [r7, #28] 801b846: 685a ldr r2, [r3, #4] 801b848: 88bb ldrh r3, [r7, #4] 801b84a: 4413 add r3, r2 801b84c: 8b3a ldrh r2, [r7, #24] 801b84e: 4619 mov r1, r3 801b850: f00f faad bl 802adae copied_total = (u16_t)(copied_total + buf_copy_len); 801b854: 8afa ldrh r2, [r7, #22] 801b856: 8b3b ldrh r3, [r7, #24] 801b858: 4413 add r3, r2 801b85a: 82fb strh r3, [r7, #22] left = (u16_t)(left + buf_copy_len); 801b85c: 8b7a ldrh r2, [r7, #26] 801b85e: 8b3b ldrh r3, [r7, #24] 801b860: 4413 add r3, r2 801b862: 837b strh r3, [r7, #26] len = (u16_t)(len - buf_copy_len); 801b864: 88fa ldrh r2, [r7, #6] 801b866: 8b3b ldrh r3, [r7, #24] 801b868: 1ad3 subs r3, r2, r3 801b86a: 80fb strh r3, [r7, #6] offset = 0; 801b86c: 2300 movs r3, #0 801b86e: 80bb strh r3, [r7, #4] for (p = buf; len != 0 && p != NULL; p = p->next) { 801b870: 69fb ldr r3, [r7, #28] 801b872: 681b ldr r3, [r3, #0] 801b874: 61fb str r3, [r7, #28] 801b876: 88fb ldrh r3, [r7, #6] 801b878: 2b00 cmp r3, #0 801b87a: d002 beq.n 801b882 801b87c: 69fb ldr r3, [r7, #28] 801b87e: 2b00 cmp r3, #0 801b880: d1c4 bne.n 801b80c } } return copied_total; 801b882: 8afb ldrh r3, [r7, #22] } 801b884: 4618 mov r0, r3 801b886: 3720 adds r7, #32 801b888: 46bd mov sp, r7 801b88a: bd80 pop {r7, pc} 801b88c: 0802f0d8 .word 0x0802f0d8 801b890: 0802f420 .word 0x0802f420 801b894: 0802f138 .word 0x0802f138 801b898: 0802f440 .word 0x0802f440 0801b89c : * * @return a new pbuf or NULL if allocation fails */ struct pbuf * pbuf_clone(pbuf_layer layer, pbuf_type type, struct pbuf *p) { 801b89c: b580 push {r7, lr} 801b89e: b084 sub sp, #16 801b8a0: af00 add r7, sp, #0 801b8a2: 4603 mov r3, r0 801b8a4: 603a str r2, [r7, #0] 801b8a6: 71fb strb r3, [r7, #7] 801b8a8: 460b mov r3, r1 801b8aa: 80bb strh r3, [r7, #4] struct pbuf *q; err_t err; q = pbuf_alloc(layer, p->tot_len, type); 801b8ac: 683b ldr r3, [r7, #0] 801b8ae: 8919 ldrh r1, [r3, #8] 801b8b0: 88ba ldrh r2, [r7, #4] 801b8b2: 79fb ldrb r3, [r7, #7] 801b8b4: 4618 mov r0, r3 801b8b6: f7ff fa63 bl 801ad80 801b8ba: 60f8 str r0, [r7, #12] if (q == NULL) { 801b8bc: 68fb ldr r3, [r7, #12] 801b8be: 2b00 cmp r3, #0 801b8c0: d101 bne.n 801b8c6 return NULL; 801b8c2: 2300 movs r3, #0 801b8c4: e011 b.n 801b8ea } err = pbuf_copy(q, p); 801b8c6: 6839 ldr r1, [r7, #0] 801b8c8: 68f8 ldr r0, [r7, #12] 801b8ca: f7ff fea3 bl 801b614 801b8ce: 4603 mov r3, r0 801b8d0: 72fb strb r3, [r7, #11] LWIP_UNUSED_ARG(err); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("pbuf_copy failed", err == ERR_OK); 801b8d2: f997 300b ldrsb.w r3, [r7, #11] 801b8d6: 2b00 cmp r3, #0 801b8d8: d006 beq.n 801b8e8 801b8da: 4b06 ldr r3, [pc, #24] @ (801b8f4 ) 801b8dc: f240 5224 movw r2, #1316 @ 0x524 801b8e0: 4905 ldr r1, [pc, #20] @ (801b8f8 ) 801b8e2: 4806 ldr r0, [pc, #24] @ (801b8fc ) 801b8e4: f00e ffda bl 802a89c return q; 801b8e8: 68fb ldr r3, [r7, #12] } 801b8ea: 4618 mov r0, r3 801b8ec: 3710 adds r7, #16 801b8ee: 46bd mov sp, r7 801b8f0: bd80 pop {r7, pc} 801b8f2: bf00 nop 801b8f4: 0802f0d8 .word 0x0802f0d8 801b8f8: 0802f54c .word 0x0802f54c 801b8fc: 0802f138 .word 0x0802f138 0801b900 : /** * Initialize this module. */ void tcp_init(void) { 801b900: b580 push {r7, lr} 801b902: af00 add r7, sp, #0 #ifdef LWIP_RAND tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 801b904: f00d fca0 bl 8029248 801b908: 4603 mov r3, r0 801b90a: b29b uxth r3, r3 801b90c: f3c3 030d ubfx r3, r3, #0, #14 801b910: b29b uxth r3, r3 801b912: f5a3 4380 sub.w r3, r3, #16384 @ 0x4000 801b916: b29a uxth r2, r3 801b918: 4b01 ldr r3, [pc, #4] @ (801b920 ) 801b91a: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 801b91c: bf00 nop 801b91e: bd80 pop {r7, pc} 801b920: 2400004c .word 0x2400004c 0801b924 : /** Free a tcp pcb */ void tcp_free(struct tcp_pcb *pcb) { 801b924: b580 push {r7, lr} 801b926: b082 sub sp, #8 801b928: af00 add r7, sp, #0 801b92a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); 801b92c: 687b ldr r3, [r7, #4] 801b92e: 7d1b ldrb r3, [r3, #20] 801b930: 2b01 cmp r3, #1 801b932: d105 bne.n 801b940 801b934: 4b06 ldr r3, [pc, #24] @ (801b950 ) 801b936: 22d4 movs r2, #212 @ 0xd4 801b938: 4906 ldr r1, [pc, #24] @ (801b954 ) 801b93a: 4807 ldr r0, [pc, #28] @ (801b958 ) 801b93c: f00e ffae bl 802a89c #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB, pcb); 801b940: 6879 ldr r1, [r7, #4] 801b942: 2001 movs r0, #1 801b944: f7fe fe44 bl 801a5d0 } 801b948: bf00 nop 801b94a: 3708 adds r7, #8 801b94c: 46bd mov sp, r7 801b94e: bd80 pop {r7, pc} 801b950: 0802f5d8 .word 0x0802f5d8 801b954: 0802f608 .word 0x0802f608 801b958: 0802f61c .word 0x0802f61c 0801b95c : /** Free a tcp listen pcb */ static void tcp_free_listen(struct tcp_pcb *pcb) { 801b95c: b580 push {r7, lr} 801b95e: b082 sub sp, #8 801b960: af00 add r7, sp, #0 801b962: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); 801b964: 687b ldr r3, [r7, #4] 801b966: 7d1b ldrb r3, [r3, #20] 801b968: 2b01 cmp r3, #1 801b96a: d105 bne.n 801b978 801b96c: 4b06 ldr r3, [pc, #24] @ (801b988 ) 801b96e: 22df movs r2, #223 @ 0xdf 801b970: 4906 ldr r1, [pc, #24] @ (801b98c ) 801b972: 4807 ldr r0, [pc, #28] @ (801b990 ) 801b974: f00e ff92 bl 802a89c #if LWIP_TCP_PCB_NUM_EXT_ARGS tcp_ext_arg_invoke_callbacks_destroyed(pcb->ext_args); #endif memp_free(MEMP_TCP_PCB_LISTEN, pcb); 801b978: 6879 ldr r1, [r7, #4] 801b97a: 2002 movs r0, #2 801b97c: f7fe fe28 bl 801a5d0 } 801b980: bf00 nop 801b982: 3708 adds r7, #8 801b984: 46bd mov sp, r7 801b986: bd80 pop {r7, pc} 801b988: 0802f5d8 .word 0x0802f5d8 801b98c: 0802f644 .word 0x0802f644 801b990: 0802f61c .word 0x0802f61c 0801b994 : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 801b994: b580 push {r7, lr} 801b996: af00 add r7, sp, #0 /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 801b998: f001 f86a bl 801ca70 if (++tcp_timer & 1) { 801b99c: 4b07 ldr r3, [pc, #28] @ (801b9bc ) 801b99e: 781b ldrb r3, [r3, #0] 801b9a0: 3301 adds r3, #1 801b9a2: b2da uxtb r2, r3 801b9a4: 4b05 ldr r3, [pc, #20] @ (801b9bc ) 801b9a6: 701a strb r2, [r3, #0] 801b9a8: 4b04 ldr r3, [pc, #16] @ (801b9bc ) 801b9aa: 781b ldrb r3, [r3, #0] 801b9ac: f003 0301 and.w r3, r3, #1 801b9b0: 2b00 cmp r3, #0 801b9b2: d001 beq.n 801b9b8 /* Call tcp_slowtmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); 801b9b4: f000 fd1a bl 801c3ec } } 801b9b8: bf00 nop 801b9ba: bd80 pop {r7, pc} 801b9bc: 2402af8d .word 0x2402af8d 0801b9c0 : /** 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) { 801b9c0: b580 push {r7, lr} 801b9c2: b084 sub sp, #16 801b9c4: af00 add r7, sp, #0 801b9c6: 6078 str r0, [r7, #4] 801b9c8: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; LWIP_ASSERT("tcp_remove_listener: invalid listener", lpcb != NULL); 801b9ca: 683b ldr r3, [r7, #0] 801b9cc: 2b00 cmp r3, #0 801b9ce: d105 bne.n 801b9dc 801b9d0: 4b0d ldr r3, [pc, #52] @ (801ba08 ) 801b9d2: 22ff movs r2, #255 @ 0xff 801b9d4: 490d ldr r1, [pc, #52] @ (801ba0c ) 801b9d6: 480e ldr r0, [pc, #56] @ (801ba10 ) 801b9d8: f00e ff60 bl 802a89c for (pcb = list; pcb != NULL; pcb = pcb->next) { 801b9dc: 687b ldr r3, [r7, #4] 801b9de: 60fb str r3, [r7, #12] 801b9e0: e00a b.n 801b9f8 if (pcb->listener == lpcb) { 801b9e2: 68fb ldr r3, [r7, #12] 801b9e4: 6fdb ldr r3, [r3, #124] @ 0x7c 801b9e6: 683a ldr r2, [r7, #0] 801b9e8: 429a cmp r2, r3 801b9ea: d102 bne.n 801b9f2 pcb->listener = NULL; 801b9ec: 68fb ldr r3, [r7, #12] 801b9ee: 2200 movs r2, #0 801b9f0: 67da str r2, [r3, #124] @ 0x7c for (pcb = list; pcb != NULL; pcb = pcb->next) { 801b9f2: 68fb ldr r3, [r7, #12] 801b9f4: 68db ldr r3, [r3, #12] 801b9f6: 60fb str r3, [r7, #12] 801b9f8: 68fb ldr r3, [r7, #12] 801b9fa: 2b00 cmp r3, #0 801b9fc: d1f1 bne.n 801b9e2 } } } 801b9fe: bf00 nop 801ba00: bf00 nop 801ba02: 3710 adds r7, #16 801ba04: 46bd mov sp, r7 801ba06: bd80 pop {r7, pc} 801ba08: 0802f5d8 .word 0x0802f5d8 801ba0c: 0802f660 .word 0x0802f660 801ba10: 0802f61c .word 0x0802f61c 0801ba14 : /** 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) { 801ba14: b580 push {r7, lr} 801ba16: b084 sub sp, #16 801ba18: af00 add r7, sp, #0 801ba1a: 6078 str r0, [r7, #4] #if LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG size_t i; LWIP_ASSERT("pcb != NULL", pcb != NULL); 801ba1c: 687b ldr r3, [r7, #4] 801ba1e: 2b00 cmp r3, #0 801ba20: d106 bne.n 801ba30 801ba22: 4b14 ldr r3, [pc, #80] @ (801ba74 ) 801ba24: f240 1211 movw r2, #273 @ 0x111 801ba28: 4913 ldr r1, [pc, #76] @ (801ba78 ) 801ba2a: 4814 ldr r0, [pc, #80] @ (801ba7c ) 801ba2c: f00e ff36 bl 802a89c LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); 801ba30: 687b ldr r3, [r7, #4] 801ba32: 7d1b ldrb r3, [r3, #20] 801ba34: 2b01 cmp r3, #1 801ba36: d006 beq.n 801ba46 801ba38: 4b0e ldr r3, [pc, #56] @ (801ba74 ) 801ba3a: f44f 7289 mov.w r2, #274 @ 0x112 801ba3e: 4910 ldr r1, [pc, #64] @ (801ba80 ) 801ba40: 480e ldr r0, [pc, #56] @ (801ba7c ) 801ba42: f00e ff2b bl 802a89c for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 801ba46: 2301 movs r3, #1 801ba48: 60fb str r3, [r7, #12] 801ba4a: e00b b.n 801ba64 tcp_remove_listener(*tcp_pcb_lists[i], (struct tcp_pcb_listen *)pcb); 801ba4c: 4a0d ldr r2, [pc, #52] @ (801ba84 ) 801ba4e: 68fb ldr r3, [r7, #12] 801ba50: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801ba54: 681b ldr r3, [r3, #0] 801ba56: 6879 ldr r1, [r7, #4] 801ba58: 4618 mov r0, r3 801ba5a: f7ff ffb1 bl 801b9c0 for (i = 1; i < LWIP_ARRAYSIZE(tcp_pcb_lists); i++) { 801ba5e: 68fb ldr r3, [r7, #12] 801ba60: 3301 adds r3, #1 801ba62: 60fb str r3, [r7, #12] 801ba64: 68fb ldr r3, [r7, #12] 801ba66: 2b03 cmp r3, #3 801ba68: d9f0 bls.n 801ba4c } #endif LWIP_UNUSED_ARG(pcb); } 801ba6a: bf00 nop 801ba6c: bf00 nop 801ba6e: 3710 adds r7, #16 801ba70: 46bd mov sp, r7 801ba72: bd80 pop {r7, pc} 801ba74: 0802f5d8 .word 0x0802f5d8 801ba78: 0802f688 .word 0x0802f688 801ba7c: 0802f61c .word 0x0802f61c 801ba80: 0802f694 .word 0x0802f694 801ba84: 08031c70 .word 0x08031c70 0801ba88 : * @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) { 801ba88: b5b0 push {r4, r5, r7, lr} 801ba8a: b088 sub sp, #32 801ba8c: af04 add r7, sp, #16 801ba8e: 6078 str r0, [r7, #4] 801ba90: 460b mov r3, r1 801ba92: 70fb strb r3, [r7, #3] LWIP_ASSERT("tcp_close_shutdown: invalid pcb", pcb != NULL); 801ba94: 687b ldr r3, [r7, #4] 801ba96: 2b00 cmp r3, #0 801ba98: d106 bne.n 801baa8 801ba9a: 4b63 ldr r3, [pc, #396] @ (801bc28 ) 801ba9c: f44f 72af mov.w r2, #350 @ 0x15e 801baa0: 4962 ldr r1, [pc, #392] @ (801bc2c ) 801baa2: 4863 ldr r0, [pc, #396] @ (801bc30 ) 801baa4: f00e fefa bl 802a89c if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 801baa8: 78fb ldrb r3, [r7, #3] 801baaa: 2b00 cmp r3, #0 801baac: d067 beq.n 801bb7e 801baae: 687b ldr r3, [r7, #4] 801bab0: 7d1b ldrb r3, [r3, #20] 801bab2: 2b04 cmp r3, #4 801bab4: d003 beq.n 801babe 801bab6: 687b ldr r3, [r7, #4] 801bab8: 7d1b ldrb r3, [r3, #20] 801baba: 2b07 cmp r3, #7 801babc: d15f bne.n 801bb7e if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND_MAX(pcb))) { 801babe: 687b ldr r3, [r7, #4] 801bac0: 6f9b ldr r3, [r3, #120] @ 0x78 801bac2: 2b00 cmp r3, #0 801bac4: d105 bne.n 801bad2 801bac6: 687b ldr r3, [r7, #4] 801bac8: 8d1b ldrh r3, [r3, #40] @ 0x28 801baca: f241 62d0 movw r2, #5840 @ 0x16d0 801bace: 4293 cmp r3, r2 801bad0: d055 beq.n 801bb7e /* 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); 801bad2: 687b ldr r3, [r7, #4] 801bad4: 8b5b ldrh r3, [r3, #26] 801bad6: f003 0310 and.w r3, r3, #16 801bada: 2b00 cmp r3, #0 801badc: d106 bne.n 801baec 801bade: 4b52 ldr r3, [pc, #328] @ (801bc28 ) 801bae0: f44f 72b2 mov.w r2, #356 @ 0x164 801bae4: 4953 ldr r1, [pc, #332] @ (801bc34 ) 801bae6: 4852 ldr r0, [pc, #328] @ (801bc30 ) 801bae8: f00e fed8 bl 802a89c /* 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, 801baec: 687b ldr r3, [r7, #4] 801baee: 6d18 ldr r0, [r3, #80] @ 0x50 801baf0: 687b ldr r3, [r7, #4] 801baf2: 6a5c ldr r4, [r3, #36] @ 0x24 801baf4: 687d ldr r5, [r7, #4] 801baf6: 687b ldr r3, [r7, #4] 801baf8: 3304 adds r3, #4 801bafa: 687a ldr r2, [r7, #4] 801bafc: 8ad2 ldrh r2, [r2, #22] 801bafe: 6879 ldr r1, [r7, #4] 801bb00: 8b09 ldrh r1, [r1, #24] 801bb02: 9102 str r1, [sp, #8] 801bb04: 9201 str r2, [sp, #4] 801bb06: 9300 str r3, [sp, #0] 801bb08: 462b mov r3, r5 801bb0a: 4622 mov r2, r4 801bb0c: 4601 mov r1, r0 801bb0e: 6878 ldr r0, [r7, #4] 801bb10: f005 fdfa bl 8021708 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 801bb14: 6878 ldr r0, [r7, #4] 801bb16: f001 fb67 bl 801d1e8 TCP_RMV_ACTIVE(pcb); 801bb1a: 4b47 ldr r3, [pc, #284] @ (801bc38 ) 801bb1c: 681b ldr r3, [r3, #0] 801bb1e: 687a ldr r2, [r7, #4] 801bb20: 429a cmp r2, r3 801bb22: d105 bne.n 801bb30 801bb24: 4b44 ldr r3, [pc, #272] @ (801bc38 ) 801bb26: 681b ldr r3, [r3, #0] 801bb28: 68db ldr r3, [r3, #12] 801bb2a: 4a43 ldr r2, [pc, #268] @ (801bc38 ) 801bb2c: 6013 str r3, [r2, #0] 801bb2e: e013 b.n 801bb58 801bb30: 4b41 ldr r3, [pc, #260] @ (801bc38 ) 801bb32: 681b ldr r3, [r3, #0] 801bb34: 60fb str r3, [r7, #12] 801bb36: e00c b.n 801bb52 801bb38: 68fb ldr r3, [r7, #12] 801bb3a: 68db ldr r3, [r3, #12] 801bb3c: 687a ldr r2, [r7, #4] 801bb3e: 429a cmp r2, r3 801bb40: d104 bne.n 801bb4c 801bb42: 687b ldr r3, [r7, #4] 801bb44: 68da ldr r2, [r3, #12] 801bb46: 68fb ldr r3, [r7, #12] 801bb48: 60da str r2, [r3, #12] 801bb4a: e005 b.n 801bb58 801bb4c: 68fb ldr r3, [r7, #12] 801bb4e: 68db ldr r3, [r3, #12] 801bb50: 60fb str r3, [r7, #12] 801bb52: 68fb ldr r3, [r7, #12] 801bb54: 2b00 cmp r3, #0 801bb56: d1ef bne.n 801bb38 801bb58: 687b ldr r3, [r7, #4] 801bb5a: 2200 movs r2, #0 801bb5c: 60da str r2, [r3, #12] 801bb5e: 4b37 ldr r3, [pc, #220] @ (801bc3c ) 801bb60: 2201 movs r2, #1 801bb62: 701a strb r2, [r3, #0] /* Deallocate the pcb since we already sent a RST for it */ if (tcp_input_pcb == pcb) { 801bb64: 4b36 ldr r3, [pc, #216] @ (801bc40 ) 801bb66: 681b ldr r3, [r3, #0] 801bb68: 687a ldr r2, [r7, #4] 801bb6a: 429a cmp r2, r3 801bb6c: d102 bne.n 801bb74 /* prevent using a deallocated pcb: free it from tcp_input later */ tcp_trigger_input_pcb_close(); 801bb6e: f003 ffff bl 801fb70 801bb72: e002 b.n 801bb7a } else { tcp_free(pcb); 801bb74: 6878 ldr r0, [r7, #4] 801bb76: f7ff fed5 bl 801b924 } return ERR_OK; 801bb7a: 2300 movs r3, #0 801bb7c: e050 b.n 801bc20 } } /* - 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) { 801bb7e: 687b ldr r3, [r7, #4] 801bb80: 7d1b ldrb r3, [r3, #20] 801bb82: 2b02 cmp r3, #2 801bb84: d03b beq.n 801bbfe 801bb86: 2b02 cmp r3, #2 801bb88: dc44 bgt.n 801bc14 801bb8a: 2b00 cmp r3, #0 801bb8c: d002 beq.n 801bb94 801bb8e: 2b01 cmp r3, #1 801bb90: d02a beq.n 801bbe8 801bb92: e03f b.n 801bc14 * 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) { 801bb94: 687b ldr r3, [r7, #4] 801bb96: 8adb ldrh r3, [r3, #22] 801bb98: 2b00 cmp r3, #0 801bb9a: d021 beq.n 801bbe0 TCP_RMV(&tcp_bound_pcbs, pcb); 801bb9c: 4b29 ldr r3, [pc, #164] @ (801bc44 ) 801bb9e: 681b ldr r3, [r3, #0] 801bba0: 687a ldr r2, [r7, #4] 801bba2: 429a cmp r2, r3 801bba4: d105 bne.n 801bbb2 801bba6: 4b27 ldr r3, [pc, #156] @ (801bc44 ) 801bba8: 681b ldr r3, [r3, #0] 801bbaa: 68db ldr r3, [r3, #12] 801bbac: 4a25 ldr r2, [pc, #148] @ (801bc44 ) 801bbae: 6013 str r3, [r2, #0] 801bbb0: e013 b.n 801bbda 801bbb2: 4b24 ldr r3, [pc, #144] @ (801bc44 ) 801bbb4: 681b ldr r3, [r3, #0] 801bbb6: 60bb str r3, [r7, #8] 801bbb8: e00c b.n 801bbd4 801bbba: 68bb ldr r3, [r7, #8] 801bbbc: 68db ldr r3, [r3, #12] 801bbbe: 687a ldr r2, [r7, #4] 801bbc0: 429a cmp r2, r3 801bbc2: d104 bne.n 801bbce 801bbc4: 687b ldr r3, [r7, #4] 801bbc6: 68da ldr r2, [r3, #12] 801bbc8: 68bb ldr r3, [r7, #8] 801bbca: 60da str r2, [r3, #12] 801bbcc: e005 b.n 801bbda 801bbce: 68bb ldr r3, [r7, #8] 801bbd0: 68db ldr r3, [r3, #12] 801bbd2: 60bb str r3, [r7, #8] 801bbd4: 68bb ldr r3, [r7, #8] 801bbd6: 2b00 cmp r3, #0 801bbd8: d1ef bne.n 801bbba 801bbda: 687b ldr r3, [r7, #4] 801bbdc: 2200 movs r2, #0 801bbde: 60da str r2, [r3, #12] } tcp_free(pcb); 801bbe0: 6878 ldr r0, [r7, #4] 801bbe2: f7ff fe9f bl 801b924 break; 801bbe6: e01a b.n 801bc1e case LISTEN: tcp_listen_closed(pcb); 801bbe8: 6878 ldr r0, [r7, #4] 801bbea: f7ff ff13 bl 801ba14 tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 801bbee: 6879 ldr r1, [r7, #4] 801bbf0: 4815 ldr r0, [pc, #84] @ (801bc48 ) 801bbf2: f001 fb49 bl 801d288 tcp_free_listen(pcb); 801bbf6: 6878 ldr r0, [r7, #4] 801bbf8: f7ff feb0 bl 801b95c break; 801bbfc: e00f b.n 801bc1e case SYN_SENT: TCP_PCB_REMOVE_ACTIVE(pcb); 801bbfe: 6879 ldr r1, [r7, #4] 801bc00: 480d ldr r0, [pc, #52] @ (801bc38 ) 801bc02: f001 fb41 bl 801d288 801bc06: 4b0d ldr r3, [pc, #52] @ (801bc3c ) 801bc08: 2201 movs r2, #1 801bc0a: 701a strb r2, [r3, #0] tcp_free(pcb); 801bc0c: 6878 ldr r0, [r7, #4] 801bc0e: f7ff fe89 bl 801b924 MIB2_STATS_INC(mib2.tcpattemptfails); break; 801bc12: e004 b.n 801bc1e default: return tcp_close_shutdown_fin(pcb); 801bc14: 6878 ldr r0, [r7, #4] 801bc16: f000 f819 bl 801bc4c 801bc1a: 4603 mov r3, r0 801bc1c: e000 b.n 801bc20 } return ERR_OK; 801bc1e: 2300 movs r3, #0 } 801bc20: 4618 mov r0, r3 801bc22: 3710 adds r7, #16 801bc24: 46bd mov sp, r7 801bc26: bdb0 pop {r4, r5, r7, pc} 801bc28: 0802f5d8 .word 0x0802f5d8 801bc2c: 0802f6ac .word 0x0802f6ac 801bc30: 0802f61c .word 0x0802f61c 801bc34: 0802f6cc .word 0x0802f6cc 801bc38: 2402af84 .word 0x2402af84 801bc3c: 2402af8c .word 0x2402af8c 801bc40: 2402afc8 .word 0x2402afc8 801bc44: 2402af7c .word 0x2402af7c 801bc48: 2402af80 .word 0x2402af80 0801bc4c : static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb) { 801bc4c: b580 push {r7, lr} 801bc4e: b084 sub sp, #16 801bc50: af00 add r7, sp, #0 801bc52: 6078 str r0, [r7, #4] err_t err; LWIP_ASSERT("pcb != NULL", pcb != NULL); 801bc54: 687b ldr r3, [r7, #4] 801bc56: 2b00 cmp r3, #0 801bc58: d106 bne.n 801bc68 801bc5a: 4b2e ldr r3, [pc, #184] @ (801bd14 ) 801bc5c: f44f 72ce mov.w r2, #412 @ 0x19c 801bc60: 492d ldr r1, [pc, #180] @ (801bd18 ) 801bc62: 482e ldr r0, [pc, #184] @ (801bd1c ) 801bc64: f00e fe1a bl 802a89c switch (pcb->state) { 801bc68: 687b ldr r3, [r7, #4] 801bc6a: 7d1b ldrb r3, [r3, #20] 801bc6c: 2b07 cmp r3, #7 801bc6e: d020 beq.n 801bcb2 801bc70: 2b07 cmp r3, #7 801bc72: dc2b bgt.n 801bccc 801bc74: 2b03 cmp r3, #3 801bc76: d002 beq.n 801bc7e 801bc78: 2b04 cmp r3, #4 801bc7a: d00d beq.n 801bc98 801bc7c: e026 b.n 801bccc case SYN_RCVD: err = tcp_send_fin(pcb); 801bc7e: 6878 ldr r0, [r7, #4] 801bc80: f004 fe42 bl 8020908 801bc84: 4603 mov r3, r0 801bc86: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801bc88: f997 300f ldrsb.w r3, [r7, #15] 801bc8c: 2b00 cmp r3, #0 801bc8e: d11f bne.n 801bcd0 tcp_backlog_accepted(pcb); MIB2_STATS_INC(mib2.tcpattemptfails); pcb->state = FIN_WAIT_1; 801bc90: 687b ldr r3, [r7, #4] 801bc92: 2205 movs r2, #5 801bc94: 751a strb r2, [r3, #20] } break; 801bc96: e01b b.n 801bcd0 case ESTABLISHED: err = tcp_send_fin(pcb); 801bc98: 6878 ldr r0, [r7, #4] 801bc9a: f004 fe35 bl 8020908 801bc9e: 4603 mov r3, r0 801bca0: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801bca2: f997 300f ldrsb.w r3, [r7, #15] 801bca6: 2b00 cmp r3, #0 801bca8: d114 bne.n 801bcd4 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = FIN_WAIT_1; 801bcaa: 687b ldr r3, [r7, #4] 801bcac: 2205 movs r2, #5 801bcae: 751a strb r2, [r3, #20] } break; 801bcb0: e010 b.n 801bcd4 case CLOSE_WAIT: err = tcp_send_fin(pcb); 801bcb2: 6878 ldr r0, [r7, #4] 801bcb4: f004 fe28 bl 8020908 801bcb8: 4603 mov r3, r0 801bcba: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801bcbc: f997 300f ldrsb.w r3, [r7, #15] 801bcc0: 2b00 cmp r3, #0 801bcc2: d109 bne.n 801bcd8 MIB2_STATS_INC(mib2.tcpestabresets); pcb->state = LAST_ACK; 801bcc4: 687b ldr r3, [r7, #4] 801bcc6: 2209 movs r2, #9 801bcc8: 751a strb r2, [r3, #20] } break; 801bcca: e005 b.n 801bcd8 default: /* Has already been closed, do nothing. */ return ERR_OK; 801bccc: 2300 movs r3, #0 801bcce: e01c b.n 801bd0a break; 801bcd0: bf00 nop 801bcd2: e002 b.n 801bcda break; 801bcd4: bf00 nop 801bcd6: e000 b.n 801bcda break; 801bcd8: bf00 nop } if (err == ERR_OK) { 801bcda: f997 300f ldrsb.w r3, [r7, #15] 801bcde: 2b00 cmp r3, #0 801bce0: d103 bne.n 801bcea /* 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); 801bce2: 6878 ldr r0, [r7, #4] 801bce4: f004 ff4e bl 8020b84 801bce8: e00d b.n 801bd06 } else if (err == ERR_MEM) { 801bcea: f997 300f ldrsb.w r3, [r7, #15] 801bcee: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 801bcf2: d108 bne.n 801bd06 /* Mark this pcb for closing. Closing is retried from tcp_tmr. */ tcp_set_flags(pcb, TF_CLOSEPEND); 801bcf4: 687b ldr r3, [r7, #4] 801bcf6: 8b5b ldrh r3, [r3, #26] 801bcf8: f043 0308 orr.w r3, r3, #8 801bcfc: b29a uxth r2, r3 801bcfe: 687b ldr r3, [r7, #4] 801bd00: 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; 801bd02: 2300 movs r3, #0 801bd04: e001 b.n 801bd0a } return err; 801bd06: f997 300f ldrsb.w r3, [r7, #15] } 801bd0a: 4618 mov r0, r3 801bd0c: 3710 adds r7, #16 801bd0e: 46bd mov sp, r7 801bd10: bd80 pop {r7, pc} 801bd12: bf00 nop 801bd14: 0802f5d8 .word 0x0802f5d8 801bd18: 0802f688 .word 0x0802f688 801bd1c: 0802f61c .word 0x0802f61c 0801bd20 : * @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) { 801bd20: b580 push {r7, lr} 801bd22: b082 sub sp, #8 801bd24: af00 add r7, sp, #0 801bd26: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801bd28: f7f5 f98e bl 8011048 LWIP_ERROR("tcp_close: invalid pcb", pcb != NULL, return ERR_ARG); 801bd2c: 687b ldr r3, [r7, #4] 801bd2e: 2b00 cmp r3, #0 801bd30: d109 bne.n 801bd46 801bd32: 4b0f ldr r3, [pc, #60] @ (801bd70 ) 801bd34: f44f 72f4 mov.w r2, #488 @ 0x1e8 801bd38: 490e ldr r1, [pc, #56] @ (801bd74 ) 801bd3a: 480f ldr r0, [pc, #60] @ (801bd78 ) 801bd3c: f00e fdae bl 802a89c 801bd40: f06f 030f mvn.w r3, #15 801bd44: e00f b.n 801bd66 LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); if (pcb->state != LISTEN) { 801bd46: 687b ldr r3, [r7, #4] 801bd48: 7d1b ldrb r3, [r3, #20] 801bd4a: 2b01 cmp r3, #1 801bd4c: d006 beq.n 801bd5c /* Set a flag not to receive any more data... */ tcp_set_flags(pcb, TF_RXCLOSED); 801bd4e: 687b ldr r3, [r7, #4] 801bd50: 8b5b ldrh r3, [r3, #26] 801bd52: f043 0310 orr.w r3, r3, #16 801bd56: b29a uxth r2, r3 801bd58: 687b ldr r3, [r7, #4] 801bd5a: 835a strh r2, [r3, #26] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 801bd5c: 2101 movs r1, #1 801bd5e: 6878 ldr r0, [r7, #4] 801bd60: f7ff fe92 bl 801ba88 801bd64: 4603 mov r3, r0 } 801bd66: 4618 mov r0, r3 801bd68: 3708 adds r7, #8 801bd6a: 46bd mov sp, r7 801bd6c: bd80 pop {r7, pc} 801bd6e: bf00 nop 801bd70: 0802f5d8 .word 0x0802f5d8 801bd74: 0802f6e8 .word 0x0802f6e8 801bd78: 0802f61c .word 0x0802f61c 0801bd7c : * @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) { 801bd7c: b580 push {r7, lr} 801bd7e: b084 sub sp, #16 801bd80: af00 add r7, sp, #0 801bd82: 60f8 str r0, [r7, #12] 801bd84: 60b9 str r1, [r7, #8] 801bd86: 607a str r2, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 801bd88: f7f5 f95e bl 8011048 LWIP_ERROR("tcp_shutdown: invalid pcb", pcb != NULL, return ERR_ARG); 801bd8c: 68fb ldr r3, [r7, #12] 801bd8e: 2b00 cmp r3, #0 801bd90: d109 bne.n 801bda6 801bd92: 4b26 ldr r3, [pc, #152] @ (801be2c ) 801bd94: f240 2207 movw r2, #519 @ 0x207 801bd98: 4925 ldr r1, [pc, #148] @ (801be30 ) 801bd9a: 4826 ldr r0, [pc, #152] @ (801be34 ) 801bd9c: f00e fd7e bl 802a89c 801bda0: f06f 030f mvn.w r3, #15 801bda4: e03d b.n 801be22 if (pcb->state == LISTEN) { 801bda6: 68fb ldr r3, [r7, #12] 801bda8: 7d1b ldrb r3, [r3, #20] 801bdaa: 2b01 cmp r3, #1 801bdac: d102 bne.n 801bdb4 return ERR_CONN; 801bdae: f06f 030a mvn.w r3, #10 801bdb2: e036 b.n 801be22 } if (shut_rx) { 801bdb4: 68bb ldr r3, [r7, #8] 801bdb6: 2b00 cmp r3, #0 801bdb8: d01b beq.n 801bdf2 /* shut down the receive side: set a flag not to receive any more data... */ tcp_set_flags(pcb, TF_RXCLOSED); 801bdba: 68fb ldr r3, [r7, #12] 801bdbc: 8b5b ldrh r3, [r3, #26] 801bdbe: f043 0310 orr.w r3, r3, #16 801bdc2: b29a uxth r2, r3 801bdc4: 68fb ldr r3, [r7, #12] 801bdc6: 835a strh r2, [r3, #26] if (shut_tx) { 801bdc8: 687b ldr r3, [r7, #4] 801bdca: 2b00 cmp r3, #0 801bdcc: d005 beq.n 801bdda /* shutting down the tx AND rx side is the same as closing for the raw API */ return tcp_close_shutdown(pcb, 1); 801bdce: 2101 movs r1, #1 801bdd0: 68f8 ldr r0, [r7, #12] 801bdd2: f7ff fe59 bl 801ba88 801bdd6: 4603 mov r3, r0 801bdd8: e023 b.n 801be22 } /* ... and free buffered data */ if (pcb->refused_data != NULL) { 801bdda: 68fb ldr r3, [r7, #12] 801bddc: 6f9b ldr r3, [r3, #120] @ 0x78 801bdde: 2b00 cmp r3, #0 801bde0: d007 beq.n 801bdf2 pbuf_free(pcb->refused_data); 801bde2: 68fb ldr r3, [r7, #12] 801bde4: 6f9b ldr r3, [r3, #120] @ 0x78 801bde6: 4618 mov r0, r3 801bde8: f7ff fae0 bl 801b3ac pcb->refused_data = NULL; 801bdec: 68fb ldr r3, [r7, #12] 801bdee: 2200 movs r2, #0 801bdf0: 679a str r2, [r3, #120] @ 0x78 } } if (shut_tx) { 801bdf2: 687b ldr r3, [r7, #4] 801bdf4: 2b00 cmp r3, #0 801bdf6: d013 beq.n 801be20 /* 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) { 801bdf8: 68fb ldr r3, [r7, #12] 801bdfa: 7d1b ldrb r3, [r3, #20] 801bdfc: 2b04 cmp r3, #4 801bdfe: dc02 bgt.n 801be06 801be00: 2b03 cmp r3, #3 801be02: da02 bge.n 801be0a 801be04: e009 b.n 801be1a 801be06: 2b07 cmp r3, #7 801be08: d107 bne.n 801be1a case SYN_RCVD: case ESTABLISHED: case CLOSE_WAIT: return tcp_close_shutdown(pcb, (u8_t)shut_rx); 801be0a: 68bb ldr r3, [r7, #8] 801be0c: b2db uxtb r3, r3 801be0e: 4619 mov r1, r3 801be10: 68f8 ldr r0, [r7, #12] 801be12: f7ff fe39 bl 801ba88 801be16: 4603 mov r3, r0 801be18: e003 b.n 801be22 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; 801be1a: f06f 030a mvn.w r3, #10 801be1e: e000 b.n 801be22 } } return ERR_OK; 801be20: 2300 movs r3, #0 } 801be22: 4618 mov r0, r3 801be24: 3710 adds r7, #16 801be26: 46bd mov sp, r7 801be28: bd80 pop {r7, pc} 801be2a: bf00 nop 801be2c: 0802f5d8 .word 0x0802f5d8 801be30: 0802f700 .word 0x0802f700 801be34: 0802f61c .word 0x0802f61c 0801be38 : * @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) { 801be38: b580 push {r7, lr} 801be3a: b08e sub sp, #56 @ 0x38 801be3c: af04 add r7, sp, #16 801be3e: 6078 str r0, [r7, #4] 801be40: 6039 str r1, [r7, #0] #if LWIP_CALLBACK_API tcp_err_fn errf; #endif /* LWIP_CALLBACK_API */ void *errf_arg; LWIP_ASSERT_CORE_LOCKED(); 801be42: f7f5 f901 bl 8011048 LWIP_ERROR("tcp_abandon: invalid pcb", pcb != NULL, return); 801be46: 687b ldr r3, [r7, #4] 801be48: 2b00 cmp r3, #0 801be4a: d107 bne.n 801be5c 801be4c: 4b52 ldr r3, [pc, #328] @ (801bf98 ) 801be4e: f240 223d movw r2, #573 @ 0x23d 801be52: 4952 ldr r1, [pc, #328] @ (801bf9c ) 801be54: 4852 ldr r0, [pc, #328] @ (801bfa0 ) 801be56: f00e fd21 bl 802a89c 801be5a: e099 b.n 801bf90 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", 801be5c: 687b ldr r3, [r7, #4] 801be5e: 7d1b ldrb r3, [r3, #20] 801be60: 2b01 cmp r3, #1 801be62: d106 bne.n 801be72 801be64: 4b4c ldr r3, [pc, #304] @ (801bf98 ) 801be66: f44f 7210 mov.w r2, #576 @ 0x240 801be6a: 494e ldr r1, [pc, #312] @ (801bfa4 ) 801be6c: 484c ldr r0, [pc, #304] @ (801bfa0 ) 801be6e: f00e fd15 bl 802a89c 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) { 801be72: 687b ldr r3, [r7, #4] 801be74: 7d1b ldrb r3, [r3, #20] 801be76: 2b0a cmp r3, #10 801be78: d107 bne.n 801be8a tcp_pcb_remove(&tcp_tw_pcbs, pcb); 801be7a: 6879 ldr r1, [r7, #4] 801be7c: 484a ldr r0, [pc, #296] @ (801bfa8 ) 801be7e: f001 fa03 bl 801d288 tcp_free(pcb); 801be82: 6878 ldr r0, [r7, #4] 801be84: f7ff fd4e bl 801b924 801be88: e082 b.n 801bf90 } else { int send_rst = 0; 801be8a: 2300 movs r3, #0 801be8c: 627b str r3, [r7, #36] @ 0x24 u16_t local_port = 0; 801be8e: 2300 movs r3, #0 801be90: 847b strh r3, [r7, #34] @ 0x22 enum tcp_state last_state; seqno = pcb->snd_nxt; 801be92: 687b ldr r3, [r7, #4] 801be94: 6d1b ldr r3, [r3, #80] @ 0x50 801be96: 61bb str r3, [r7, #24] ackno = pcb->rcv_nxt; 801be98: 687b ldr r3, [r7, #4] 801be9a: 6a5b ldr r3, [r3, #36] @ 0x24 801be9c: 617b str r3, [r7, #20] #if LWIP_CALLBACK_API errf = pcb->errf; 801be9e: 687b ldr r3, [r7, #4] 801bea0: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801bea4: 613b str r3, [r7, #16] #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 801bea6: 687b ldr r3, [r7, #4] 801bea8: 691b ldr r3, [r3, #16] 801beaa: 60fb str r3, [r7, #12] if (pcb->state == CLOSED) { 801beac: 687b ldr r3, [r7, #4] 801beae: 7d1b ldrb r3, [r3, #20] 801beb0: 2b00 cmp r3, #0 801beb2: d126 bne.n 801bf02 if (pcb->local_port != 0) { 801beb4: 687b ldr r3, [r7, #4] 801beb6: 8adb ldrh r3, [r3, #22] 801beb8: 2b00 cmp r3, #0 801beba: d02e beq.n 801bf1a /* bound, not yet opened */ TCP_RMV(&tcp_bound_pcbs, pcb); 801bebc: 4b3b ldr r3, [pc, #236] @ (801bfac ) 801bebe: 681b ldr r3, [r3, #0] 801bec0: 687a ldr r2, [r7, #4] 801bec2: 429a cmp r2, r3 801bec4: d105 bne.n 801bed2 801bec6: 4b39 ldr r3, [pc, #228] @ (801bfac ) 801bec8: 681b ldr r3, [r3, #0] 801beca: 68db ldr r3, [r3, #12] 801becc: 4a37 ldr r2, [pc, #220] @ (801bfac ) 801bece: 6013 str r3, [r2, #0] 801bed0: e013 b.n 801befa 801bed2: 4b36 ldr r3, [pc, #216] @ (801bfac ) 801bed4: 681b ldr r3, [r3, #0] 801bed6: 61fb str r3, [r7, #28] 801bed8: e00c b.n 801bef4 801beda: 69fb ldr r3, [r7, #28] 801bedc: 68db ldr r3, [r3, #12] 801bede: 687a ldr r2, [r7, #4] 801bee0: 429a cmp r2, r3 801bee2: d104 bne.n 801beee 801bee4: 687b ldr r3, [r7, #4] 801bee6: 68da ldr r2, [r3, #12] 801bee8: 69fb ldr r3, [r7, #28] 801beea: 60da str r2, [r3, #12] 801beec: e005 b.n 801befa 801beee: 69fb ldr r3, [r7, #28] 801bef0: 68db ldr r3, [r3, #12] 801bef2: 61fb str r3, [r7, #28] 801bef4: 69fb ldr r3, [r7, #28] 801bef6: 2b00 cmp r3, #0 801bef8: d1ef bne.n 801beda 801befa: 687b ldr r3, [r7, #4] 801befc: 2200 movs r2, #0 801befe: 60da str r2, [r3, #12] 801bf00: e00b b.n 801bf1a } } else { send_rst = reset; 801bf02: 683b ldr r3, [r7, #0] 801bf04: 627b str r3, [r7, #36] @ 0x24 local_port = pcb->local_port; 801bf06: 687b ldr r3, [r7, #4] 801bf08: 8adb ldrh r3, [r3, #22] 801bf0a: 847b strh r3, [r7, #34] @ 0x22 TCP_PCB_REMOVE_ACTIVE(pcb); 801bf0c: 6879 ldr r1, [r7, #4] 801bf0e: 4828 ldr r0, [pc, #160] @ (801bfb0 ) 801bf10: f001 f9ba bl 801d288 801bf14: 4b27 ldr r3, [pc, #156] @ (801bfb4 ) 801bf16: 2201 movs r2, #1 801bf18: 701a strb r2, [r3, #0] } if (pcb->unacked != NULL) { 801bf1a: 687b ldr r3, [r7, #4] 801bf1c: 6f1b ldr r3, [r3, #112] @ 0x70 801bf1e: 2b00 cmp r3, #0 801bf20: d004 beq.n 801bf2c tcp_segs_free(pcb->unacked); 801bf22: 687b ldr r3, [r7, #4] 801bf24: 6f1b ldr r3, [r3, #112] @ 0x70 801bf26: 4618 mov r0, r3 801bf28: f000 fe84 bl 801cc34 } if (pcb->unsent != NULL) { 801bf2c: 687b ldr r3, [r7, #4] 801bf2e: 6edb ldr r3, [r3, #108] @ 0x6c 801bf30: 2b00 cmp r3, #0 801bf32: d004 beq.n 801bf3e tcp_segs_free(pcb->unsent); 801bf34: 687b ldr r3, [r7, #4] 801bf36: 6edb ldr r3, [r3, #108] @ 0x6c 801bf38: 4618 mov r0, r3 801bf3a: f000 fe7b bl 801cc34 } #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { 801bf3e: 687b ldr r3, [r7, #4] 801bf40: 6f5b ldr r3, [r3, #116] @ 0x74 801bf42: 2b00 cmp r3, #0 801bf44: d004 beq.n 801bf50 tcp_segs_free(pcb->ooseq); 801bf46: 687b ldr r3, [r7, #4] 801bf48: 6f5b ldr r3, [r3, #116] @ 0x74 801bf4a: 4618 mov r0, r3 801bf4c: f000 fe72 bl 801cc34 } #endif /* TCP_QUEUE_OOSEQ */ tcp_backlog_accepted(pcb); if (send_rst) { 801bf50: 6a7b ldr r3, [r7, #36] @ 0x24 801bf52: 2b00 cmp r3, #0 801bf54: d00e beq.n 801bf74 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); 801bf56: 6879 ldr r1, [r7, #4] 801bf58: 687b ldr r3, [r7, #4] 801bf5a: 3304 adds r3, #4 801bf5c: 687a ldr r2, [r7, #4] 801bf5e: 8b12 ldrh r2, [r2, #24] 801bf60: 9202 str r2, [sp, #8] 801bf62: 8c7a ldrh r2, [r7, #34] @ 0x22 801bf64: 9201 str r2, [sp, #4] 801bf66: 9300 str r3, [sp, #0] 801bf68: 460b mov r3, r1 801bf6a: 697a ldr r2, [r7, #20] 801bf6c: 69b9 ldr r1, [r7, #24] 801bf6e: 6878 ldr r0, [r7, #4] 801bf70: f005 fbca bl 8021708 } last_state = pcb->state; 801bf74: 687b ldr r3, [r7, #4] 801bf76: 7d1b ldrb r3, [r3, #20] 801bf78: 72fb strb r3, [r7, #11] tcp_free(pcb); 801bf7a: 6878 ldr r0, [r7, #4] 801bf7c: f7ff fcd2 bl 801b924 TCP_EVENT_ERR(last_state, errf, errf_arg, ERR_ABRT); 801bf80: 693b ldr r3, [r7, #16] 801bf82: 2b00 cmp r3, #0 801bf84: d004 beq.n 801bf90 801bf86: 693b ldr r3, [r7, #16] 801bf88: f06f 010c mvn.w r1, #12 801bf8c: 68f8 ldr r0, [r7, #12] 801bf8e: 4798 blx r3 } } 801bf90: 3728 adds r7, #40 @ 0x28 801bf92: 46bd mov sp, r7 801bf94: bd80 pop {r7, pc} 801bf96: bf00 nop 801bf98: 0802f5d8 .word 0x0802f5d8 801bf9c: 0802f71c .word 0x0802f71c 801bfa0: 0802f61c .word 0x0802f61c 801bfa4: 0802f738 .word 0x0802f738 801bfa8: 2402af88 .word 0x2402af88 801bfac: 2402af7c .word 0x2402af7c 801bfb0: 2402af84 .word 0x2402af84 801bfb4: 2402af8c .word 0x2402af8c 0801bfb8 : * * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { 801bfb8: b580 push {r7, lr} 801bfba: b082 sub sp, #8 801bfbc: af00 add r7, sp, #0 801bfbe: 6078 str r0, [r7, #4] tcp_abandon(pcb, 1); 801bfc0: 2101 movs r1, #1 801bfc2: 6878 ldr r0, [r7, #4] 801bfc4: f7ff ff38 bl 801be38 } 801bfc8: bf00 nop 801bfca: 3708 adds r7, #8 801bfcc: 46bd mov sp, r7 801bfce: bd80 pop {r7, pc} 0801bfd0 : * 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) { 801bfd0: b580 push {r7, lr} 801bfd2: b084 sub sp, #16 801bfd4: af00 add r7, sp, #0 801bfd6: 6078 str r0, [r7, #4] u32_t new_right_edge; LWIP_ASSERT("tcp_update_rcv_ann_wnd: invalid pcb", pcb != NULL); 801bfd8: 687b ldr r3, [r7, #4] 801bfda: 2b00 cmp r3, #0 801bfdc: d106 bne.n 801bfec 801bfde: 4b25 ldr r3, [pc, #148] @ (801c074 ) 801bfe0: f240 32a6 movw r2, #934 @ 0x3a6 801bfe4: 4924 ldr r1, [pc, #144] @ (801c078 ) 801bfe6: 4825 ldr r0, [pc, #148] @ (801c07c ) 801bfe8: f00e fc58 bl 802a89c new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 801bfec: 687b ldr r3, [r7, #4] 801bfee: 6a5b ldr r3, [r3, #36] @ 0x24 801bff0: 687a ldr r2, [r7, #4] 801bff2: 8d12 ldrh r2, [r2, #40] @ 0x28 801bff4: 4413 add r3, r2 801bff6: 60fb str r3, [r7, #12] if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 801bff8: 687b ldr r3, [r7, #4] 801bffa: 6adb ldr r3, [r3, #44] @ 0x2c 801bffc: 687a ldr r2, [r7, #4] 801bffe: 8e52 ldrh r2, [r2, #50] @ 0x32 801c000: f640 3168 movw r1, #2920 @ 0xb68 801c004: 428a cmp r2, r1 801c006: bf28 it cs 801c008: 460a movcs r2, r1 801c00a: b292 uxth r2, r2 801c00c: 4413 add r3, r2 801c00e: 68fa ldr r2, [r7, #12] 801c010: 1ad3 subs r3, r2, r3 801c012: 2b00 cmp r3, #0 801c014: db08 blt.n 801c028 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 801c016: 687b ldr r3, [r7, #4] 801c018: 8d1a ldrh r2, [r3, #40] @ 0x28 801c01a: 687b ldr r3, [r7, #4] 801c01c: 855a strh r2, [r3, #42] @ 0x2a return new_right_edge - pcb->rcv_ann_right_edge; 801c01e: 687b ldr r3, [r7, #4] 801c020: 6adb ldr r3, [r3, #44] @ 0x2c 801c022: 68fa ldr r2, [r7, #12] 801c024: 1ad3 subs r3, r2, r3 801c026: e020 b.n 801c06a } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 801c028: 687b ldr r3, [r7, #4] 801c02a: 6a5a ldr r2, [r3, #36] @ 0x24 801c02c: 687b ldr r3, [r7, #4] 801c02e: 6adb ldr r3, [r3, #44] @ 0x2c 801c030: 1ad3 subs r3, r2, r3 801c032: 2b00 cmp r3, #0 801c034: dd03 ble.n 801c03e /* 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; 801c036: 687b ldr r3, [r7, #4] 801c038: 2200 movs r2, #0 801c03a: 855a strh r2, [r3, #42] @ 0x2a 801c03c: e014 b.n 801c068 } else { /* keep the right edge of window constant */ u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; 801c03e: 687b ldr r3, [r7, #4] 801c040: 6ada ldr r2, [r3, #44] @ 0x2c 801c042: 687b ldr r3, [r7, #4] 801c044: 6a5b ldr r3, [r3, #36] @ 0x24 801c046: 1ad3 subs r3, r2, r3 801c048: 60bb str r3, [r7, #8] #if !LWIP_WND_SCALE LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); 801c04a: 68bb ldr r3, [r7, #8] 801c04c: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 801c050: d306 bcc.n 801c060 801c052: 4b08 ldr r3, [pc, #32] @ (801c074 ) 801c054: f240 32b6 movw r2, #950 @ 0x3b6 801c058: 4909 ldr r1, [pc, #36] @ (801c080 ) 801c05a: 4808 ldr r0, [pc, #32] @ (801c07c ) 801c05c: f00e fc1e bl 802a89c #endif pcb->rcv_ann_wnd = (tcpwnd_size_t)new_rcv_ann_wnd; 801c060: 68bb ldr r3, [r7, #8] 801c062: b29a uxth r2, r3 801c064: 687b ldr r3, [r7, #4] 801c066: 855a strh r2, [r3, #42] @ 0x2a } return 0; 801c068: 2300 movs r3, #0 } } 801c06a: 4618 mov r0, r3 801c06c: 3710 adds r7, #16 801c06e: 46bd mov sp, r7 801c070: bd80 pop {r7, pc} 801c072: bf00 nop 801c074: 0802f5d8 .word 0x0802f5d8 801c078: 0802f834 .word 0x0802f834 801c07c: 0802f61c .word 0x0802f61c 801c080: 0802f858 .word 0x0802f858 0801c084 : * @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) { 801c084: b580 push {r7, lr} 801c086: b084 sub sp, #16 801c088: af00 add r7, sp, #0 801c08a: 6078 str r0, [r7, #4] 801c08c: 460b mov r3, r1 801c08e: 807b strh r3, [r7, #2] u32_t wnd_inflation; tcpwnd_size_t rcv_wnd; LWIP_ASSERT_CORE_LOCKED(); 801c090: f7f4 ffda bl 8011048 LWIP_ERROR("tcp_recved: invalid pcb", pcb != NULL, return); 801c094: 687b ldr r3, [r7, #4] 801c096: 2b00 cmp r3, #0 801c098: d107 bne.n 801c0aa 801c09a: 4b20 ldr r3, [pc, #128] @ (801c11c ) 801c09c: f240 32cf movw r2, #975 @ 0x3cf 801c0a0: 491f ldr r1, [pc, #124] @ (801c120 ) 801c0a2: 4820 ldr r0, [pc, #128] @ (801c124 ) 801c0a4: f00e fbfa bl 802a89c 801c0a8: e034 b.n 801c114 /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_recved for listen-pcbs", 801c0aa: 687b ldr r3, [r7, #4] 801c0ac: 7d1b ldrb r3, [r3, #20] 801c0ae: 2b01 cmp r3, #1 801c0b0: d106 bne.n 801c0c0 801c0b2: 4b1a ldr r3, [pc, #104] @ (801c11c ) 801c0b4: f240 32d2 movw r2, #978 @ 0x3d2 801c0b8: 491b ldr r1, [pc, #108] @ (801c128 ) 801c0ba: 481a ldr r0, [pc, #104] @ (801c124 ) 801c0bc: f00e fbee bl 802a89c pcb->state != LISTEN); rcv_wnd = (tcpwnd_size_t)(pcb->rcv_wnd + len); 801c0c0: 687b ldr r3, [r7, #4] 801c0c2: 8d1a ldrh r2, [r3, #40] @ 0x28 801c0c4: 887b ldrh r3, [r7, #2] 801c0c6: 4413 add r3, r2 801c0c8: 81fb strh r3, [r7, #14] if ((rcv_wnd > TCP_WND_MAX(pcb)) || (rcv_wnd < pcb->rcv_wnd)) { 801c0ca: 89fb ldrh r3, [r7, #14] 801c0cc: f241 62d0 movw r2, #5840 @ 0x16d0 801c0d0: 4293 cmp r3, r2 801c0d2: d804 bhi.n 801c0de 801c0d4: 687b ldr r3, [r7, #4] 801c0d6: 8d1b ldrh r3, [r3, #40] @ 0x28 801c0d8: 89fa ldrh r2, [r7, #14] 801c0da: 429a cmp r2, r3 801c0dc: d204 bcs.n 801c0e8 /* 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); 801c0de: 687b ldr r3, [r7, #4] 801c0e0: f241 62d0 movw r2, #5840 @ 0x16d0 801c0e4: 851a strh r2, [r3, #40] @ 0x28 801c0e6: e002 b.n 801c0ee } else { pcb->rcv_wnd = rcv_wnd; 801c0e8: 687b ldr r3, [r7, #4] 801c0ea: 89fa ldrh r2, [r7, #14] 801c0ec: 851a strh r2, [r3, #40] @ 0x28 } wnd_inflation = tcp_update_rcv_ann_wnd(pcb); 801c0ee: 6878 ldr r0, [r7, #4] 801c0f0: f7ff ff6e bl 801bfd0 801c0f4: 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) { 801c0f6: 68bb ldr r3, [r7, #8] 801c0f8: f240 52b3 movw r2, #1459 @ 0x5b3 801c0fc: 4293 cmp r3, r2 801c0fe: d909 bls.n 801c114 tcp_ack_now(pcb); 801c100: 687b ldr r3, [r7, #4] 801c102: 8b5b ldrh r3, [r3, #26] 801c104: f043 0302 orr.w r3, r3, #2 801c108: b29a uxth r2, r3 801c10a: 687b ldr r3, [r7, #4] 801c10c: 835a strh r2, [r3, #26] tcp_output(pcb); 801c10e: 6878 ldr r0, [r7, #4] 801c110: f004 fd38 bl 8020b84 } 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))); } 801c114: 3710 adds r7, #16 801c116: 46bd mov sp, r7 801c118: bd80 pop {r7, pc} 801c11a: bf00 nop 801c11c: 0802f5d8 .word 0x0802f5d8 801c120: 0802f874 .word 0x0802f874 801c124: 0802f61c .word 0x0802f61c 801c128: 0802f88c .word 0x0802f88c 0801c12c : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 801c12c: b480 push {r7} 801c12e: b083 sub sp, #12 801c130: af00 add r7, sp, #0 u8_t i; u16_t n = 0; 801c132: 2300 movs r3, #0 801c134: 80bb strh r3, [r7, #4] struct tcp_pcb *pcb; again: tcp_port++; 801c136: 4b1e ldr r3, [pc, #120] @ (801c1b0 ) 801c138: 881b ldrh r3, [r3, #0] 801c13a: 3301 adds r3, #1 801c13c: b29a uxth r2, r3 801c13e: 4b1c ldr r3, [pc, #112] @ (801c1b0 ) 801c140: 801a strh r2, [r3, #0] if (tcp_port == TCP_LOCAL_PORT_RANGE_END) { 801c142: 4b1b ldr r3, [pc, #108] @ (801c1b0 ) 801c144: 881b ldrh r3, [r3, #0] 801c146: f64f 72ff movw r2, #65535 @ 0xffff 801c14a: 4293 cmp r3, r2 801c14c: d103 bne.n 801c156 tcp_port = TCP_LOCAL_PORT_RANGE_START; 801c14e: 4b18 ldr r3, [pc, #96] @ (801c1b0 ) 801c150: f44f 4240 mov.w r2, #49152 @ 0xc000 801c154: 801a strh r2, [r3, #0] } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 801c156: 2300 movs r3, #0 801c158: 71fb strb r3, [r7, #7] 801c15a: e01e b.n 801c19a for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 801c15c: 79fb ldrb r3, [r7, #7] 801c15e: 4a15 ldr r2, [pc, #84] @ (801c1b4 ) 801c160: f852 3023 ldr.w r3, [r2, r3, lsl #2] 801c164: 681b ldr r3, [r3, #0] 801c166: 603b str r3, [r7, #0] 801c168: e011 b.n 801c18e if (pcb->local_port == tcp_port) { 801c16a: 683b ldr r3, [r7, #0] 801c16c: 8ada ldrh r2, [r3, #22] 801c16e: 4b10 ldr r3, [pc, #64] @ (801c1b0 ) 801c170: 881b ldrh r3, [r3, #0] 801c172: 429a cmp r2, r3 801c174: d108 bne.n 801c188 n++; 801c176: 88bb ldrh r3, [r7, #4] 801c178: 3301 adds r3, #1 801c17a: 80bb strh r3, [r7, #4] if (n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 801c17c: 88bb ldrh r3, [r7, #4] 801c17e: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 801c182: d3d8 bcc.n 801c136 return 0; 801c184: 2300 movs r3, #0 801c186: e00d b.n 801c1a4 for (pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 801c188: 683b ldr r3, [r7, #0] 801c18a: 68db ldr r3, [r3, #12] 801c18c: 603b str r3, [r7, #0] 801c18e: 683b ldr r3, [r7, #0] 801c190: 2b00 cmp r3, #0 801c192: d1ea bne.n 801c16a for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 801c194: 79fb ldrb r3, [r7, #7] 801c196: 3301 adds r3, #1 801c198: 71fb strb r3, [r7, #7] 801c19a: 79fb ldrb r3, [r7, #7] 801c19c: 2b03 cmp r3, #3 801c19e: d9dd bls.n 801c15c } goto again; } } } return tcp_port; 801c1a0: 4b03 ldr r3, [pc, #12] @ (801c1b0 ) 801c1a2: 881b ldrh r3, [r3, #0] } 801c1a4: 4618 mov r0, r3 801c1a6: 370c adds r7, #12 801c1a8: 46bd mov sp, r7 801c1aa: f85d 7b04 ldr.w r7, [sp], #4 801c1ae: 4770 bx lr 801c1b0: 2400004c .word 0x2400004c 801c1b4: 08031c70 .word 0x08031c70 0801c1b8 : * 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) { 801c1b8: b580 push {r7, lr} 801c1ba: b08a sub sp, #40 @ 0x28 801c1bc: af00 add r7, sp, #0 801c1be: 60f8 str r0, [r7, #12] 801c1c0: 60b9 str r1, [r7, #8] 801c1c2: 603b str r3, [r7, #0] 801c1c4: 4613 mov r3, r2 801c1c6: 80fb strh r3, [r7, #6] struct netif *netif = NULL; 801c1c8: 2300 movs r3, #0 801c1ca: 627b str r3, [r7, #36] @ 0x24 err_t ret; u32_t iss; u16_t old_local_port; LWIP_ASSERT_CORE_LOCKED(); 801c1cc: f7f4 ff3c bl 8011048 LWIP_ERROR("tcp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 801c1d0: 68fb ldr r3, [r7, #12] 801c1d2: 2b00 cmp r3, #0 801c1d4: d109 bne.n 801c1ea 801c1d6: 4b7d ldr r3, [pc, #500] @ (801c3cc ) 801c1d8: f240 4235 movw r2, #1077 @ 0x435 801c1dc: 497c ldr r1, [pc, #496] @ (801c3d0 ) 801c1de: 487d ldr r0, [pc, #500] @ (801c3d4 ) 801c1e0: f00e fb5c bl 802a89c 801c1e4: f06f 030f mvn.w r3, #15 801c1e8: e0ec b.n 801c3c4 LWIP_ERROR("tcp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 801c1ea: 68bb ldr r3, [r7, #8] 801c1ec: 2b00 cmp r3, #0 801c1ee: d109 bne.n 801c204 801c1f0: 4b76 ldr r3, [pc, #472] @ (801c3cc ) 801c1f2: f240 4236 movw r2, #1078 @ 0x436 801c1f6: 4978 ldr r1, [pc, #480] @ (801c3d8 ) 801c1f8: 4876 ldr r0, [pc, #472] @ (801c3d4 ) 801c1fa: f00e fb4f bl 802a89c 801c1fe: f06f 030f mvn.w r3, #15 801c202: e0df b.n 801c3c4 LWIP_ERROR("tcp_connect: can only connect from state CLOSED", pcb->state == CLOSED, return ERR_ISCONN); 801c204: 68fb ldr r3, [r7, #12] 801c206: 7d1b ldrb r3, [r3, #20] 801c208: 2b00 cmp r3, #0 801c20a: d009 beq.n 801c220 801c20c: 4b6f ldr r3, [pc, #444] @ (801c3cc ) 801c20e: f44f 6287 mov.w r2, #1080 @ 0x438 801c212: 4972 ldr r1, [pc, #456] @ (801c3dc ) 801c214: 486f ldr r0, [pc, #444] @ (801c3d4 ) 801c216: f00e fb41 bl 802a89c 801c21a: f06f 0309 mvn.w r3, #9 801c21e: e0d1 b.n 801c3c4 LWIP_DEBUGF(TCP_DEBUG, ("tcp_connect to port %"U16_F"\n", port)); ip_addr_set(&pcb->remote_ip, ipaddr); 801c220: 68bb ldr r3, [r7, #8] 801c222: 2b00 cmp r3, #0 801c224: d002 beq.n 801c22c 801c226: 68bb ldr r3, [r7, #8] 801c228: 681b ldr r3, [r3, #0] 801c22a: e000 b.n 801c22e 801c22c: 2300 movs r3, #0 801c22e: 68fa ldr r2, [r7, #12] 801c230: 6053 str r3, [r2, #4] pcb->remote_port = port; 801c232: 68fb ldr r3, [r7, #12] 801c234: 88fa ldrh r2, [r7, #6] 801c236: 831a strh r2, [r3, #24] if (pcb->netif_idx != NETIF_NO_INDEX) { 801c238: 68fb ldr r3, [r7, #12] 801c23a: 7a1b ldrb r3, [r3, #8] 801c23c: 2b00 cmp r3, #0 801c23e: d006 beq.n 801c24e netif = netif_get_by_index(pcb->netif_idx); 801c240: 68fb ldr r3, [r7, #12] 801c242: 7a1b ldrb r3, [r3, #8] 801c244: 4618 mov r0, r3 801c246: f7fe fcf1 bl 801ac2c 801c24a: 6278 str r0, [r7, #36] @ 0x24 801c24c: e005 b.n 801c25a } else { /* check if we have a route to the remote host */ netif = ip_route(&pcb->local_ip, &pcb->remote_ip); 801c24e: 68fb ldr r3, [r7, #12] 801c250: 3304 adds r3, #4 801c252: 4618 mov r0, r3 801c254: f009 fb14 bl 8025880 801c258: 6278 str r0, [r7, #36] @ 0x24 } if (netif == NULL) { 801c25a: 6a7b ldr r3, [r7, #36] @ 0x24 801c25c: 2b00 cmp r3, #0 801c25e: d102 bne.n 801c266 /* Don't even try to send a SYN packet if we have no route since that will fail. */ return ERR_RTE; 801c260: f06f 0303 mvn.w r3, #3 801c264: e0ae b.n 801c3c4 } /* check if local IP has been assigned to pcb, if not, get one */ if (ip_addr_isany(&pcb->local_ip)) { 801c266: 68fb ldr r3, [r7, #12] 801c268: 2b00 cmp r3, #0 801c26a: d003 beq.n 801c274 801c26c: 68fb ldr r3, [r7, #12] 801c26e: 681b ldr r3, [r3, #0] 801c270: 2b00 cmp r3, #0 801c272: d111 bne.n 801c298 const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, ipaddr); 801c274: 6a7b ldr r3, [r7, #36] @ 0x24 801c276: 2b00 cmp r3, #0 801c278: d002 beq.n 801c280 801c27a: 6a7b ldr r3, [r7, #36] @ 0x24 801c27c: 3304 adds r3, #4 801c27e: e000 b.n 801c282 801c280: 2300 movs r3, #0 801c282: 61fb str r3, [r7, #28] if (local_ip == NULL) { 801c284: 69fb ldr r3, [r7, #28] 801c286: 2b00 cmp r3, #0 801c288: d102 bne.n 801c290 return ERR_RTE; 801c28a: f06f 0303 mvn.w r3, #3 801c28e: e099 b.n 801c3c4 } ip_addr_copy(pcb->local_ip, *local_ip); 801c290: 69fb ldr r3, [r7, #28] 801c292: 681a ldr r2, [r3, #0] 801c294: 68fb ldr r3, [r7, #12] 801c296: 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; 801c298: 68fb ldr r3, [r7, #12] 801c29a: 8adb ldrh r3, [r3, #22] 801c29c: 837b strh r3, [r7, #26] if (pcb->local_port == 0) { 801c29e: 68fb ldr r3, [r7, #12] 801c2a0: 8adb ldrh r3, [r3, #22] 801c2a2: 2b00 cmp r3, #0 801c2a4: d10c bne.n 801c2c0 pcb->local_port = tcp_new_port(); 801c2a6: f7ff ff41 bl 801c12c 801c2aa: 4603 mov r3, r0 801c2ac: 461a mov r2, r3 801c2ae: 68fb ldr r3, [r7, #12] 801c2b0: 82da strh r2, [r3, #22] if (pcb->local_port == 0) { 801c2b2: 68fb ldr r3, [r7, #12] 801c2b4: 8adb ldrh r3, [r3, #22] 801c2b6: 2b00 cmp r3, #0 801c2b8: d102 bne.n 801c2c0 return ERR_BUF; 801c2ba: f06f 0301 mvn.w r3, #1 801c2be: e081 b.n 801c3c4 } } #endif /* SO_REUSE */ } iss = tcp_next_iss(pcb); 801c2c0: 68f8 ldr r0, [r7, #12] 801c2c2: f001 f875 bl 801d3b0 801c2c6: 6178 str r0, [r7, #20] pcb->rcv_nxt = 0; 801c2c8: 68fb ldr r3, [r7, #12] 801c2ca: 2200 movs r2, #0 801c2cc: 625a str r2, [r3, #36] @ 0x24 pcb->snd_nxt = iss; 801c2ce: 68fb ldr r3, [r7, #12] 801c2d0: 697a ldr r2, [r7, #20] 801c2d2: 651a str r2, [r3, #80] @ 0x50 pcb->lastack = iss - 1; 801c2d4: 697b ldr r3, [r7, #20] 801c2d6: 1e5a subs r2, r3, #1 801c2d8: 68fb ldr r3, [r7, #12] 801c2da: 645a str r2, [r3, #68] @ 0x44 pcb->snd_wl2 = iss - 1; 801c2dc: 697b ldr r3, [r7, #20] 801c2de: 1e5a subs r2, r3, #1 801c2e0: 68fb ldr r3, [r7, #12] 801c2e2: 659a str r2, [r3, #88] @ 0x58 pcb->snd_lbb = iss - 1; 801c2e4: 697b ldr r3, [r7, #20] 801c2e6: 1e5a subs r2, r3, #1 801c2e8: 68fb ldr r3, [r7, #12] 801c2ea: 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); 801c2ec: 68fb ldr r3, [r7, #12] 801c2ee: f241 62d0 movw r2, #5840 @ 0x16d0 801c2f2: 855a strh r2, [r3, #42] @ 0x2a 801c2f4: 68fb ldr r3, [r7, #12] 801c2f6: 8d5a ldrh r2, [r3, #42] @ 0x2a 801c2f8: 68fb ldr r3, [r7, #12] 801c2fa: 851a strh r2, [r3, #40] @ 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 801c2fc: 68fb ldr r3, [r7, #12] 801c2fe: 6a5a ldr r2, [r3, #36] @ 0x24 801c300: 68fb ldr r3, [r7, #12] 801c302: 62da str r2, [r3, #44] @ 0x2c pcb->snd_wnd = TCP_WND; 801c304: 68fb ldr r3, [r7, #12] 801c306: f241 62d0 movw r2, #5840 @ 0x16d0 801c30a: 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; 801c30e: 68fb ldr r3, [r7, #12] 801c310: f44f 7206 mov.w r2, #536 @ 0x218 801c314: 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); 801c316: 68fb ldr r3, [r7, #12] 801c318: 8e58 ldrh r0, [r3, #50] @ 0x32 801c31a: 68fb ldr r3, [r7, #12] 801c31c: 3304 adds r3, #4 801c31e: 461a mov r2, r3 801c320: 6a79 ldr r1, [r7, #36] @ 0x24 801c322: f001 f86b bl 801d3fc 801c326: 4603 mov r3, r0 801c328: 461a mov r2, r3 801c32a: 68fb ldr r3, [r7, #12] 801c32c: 865a strh r2, [r3, #50] @ 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = 1; 801c32e: 68fb ldr r3, [r7, #12] 801c330: 2201 movs r2, #1 801c332: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 #if LWIP_CALLBACK_API pcb->connected = connected; 801c336: 68fb ldr r3, [r7, #12] 801c338: 683a ldr r2, [r7, #0] 801c33a: 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); 801c33e: 2102 movs r1, #2 801c340: 68f8 ldr r0, [r7, #12] 801c342: f004 fb31 bl 80209a8 801c346: 4603 mov r3, r0 801c348: 74fb strb r3, [r7, #19] if (ret == ERR_OK) { 801c34a: f997 3013 ldrsb.w r3, [r7, #19] 801c34e: 2b00 cmp r3, #0 801c350: d136 bne.n 801c3c0 /* SYN segment was enqueued, changed the pcbs state now */ pcb->state = SYN_SENT; 801c352: 68fb ldr r3, [r7, #12] 801c354: 2202 movs r2, #2 801c356: 751a strb r2, [r3, #20] if (old_local_port != 0) { 801c358: 8b7b ldrh r3, [r7, #26] 801c35a: 2b00 cmp r3, #0 801c35c: d021 beq.n 801c3a2 TCP_RMV(&tcp_bound_pcbs, pcb); 801c35e: 4b20 ldr r3, [pc, #128] @ (801c3e0 ) 801c360: 681b ldr r3, [r3, #0] 801c362: 68fa ldr r2, [r7, #12] 801c364: 429a cmp r2, r3 801c366: d105 bne.n 801c374 801c368: 4b1d ldr r3, [pc, #116] @ (801c3e0 ) 801c36a: 681b ldr r3, [r3, #0] 801c36c: 68db ldr r3, [r3, #12] 801c36e: 4a1c ldr r2, [pc, #112] @ (801c3e0 ) 801c370: 6013 str r3, [r2, #0] 801c372: e013 b.n 801c39c 801c374: 4b1a ldr r3, [pc, #104] @ (801c3e0 ) 801c376: 681b ldr r3, [r3, #0] 801c378: 623b str r3, [r7, #32] 801c37a: e00c b.n 801c396 801c37c: 6a3b ldr r3, [r7, #32] 801c37e: 68db ldr r3, [r3, #12] 801c380: 68fa ldr r2, [r7, #12] 801c382: 429a cmp r2, r3 801c384: d104 bne.n 801c390 801c386: 68fb ldr r3, [r7, #12] 801c388: 68da ldr r2, [r3, #12] 801c38a: 6a3b ldr r3, [r7, #32] 801c38c: 60da str r2, [r3, #12] 801c38e: e005 b.n 801c39c 801c390: 6a3b ldr r3, [r7, #32] 801c392: 68db ldr r3, [r3, #12] 801c394: 623b str r3, [r7, #32] 801c396: 6a3b ldr r3, [r7, #32] 801c398: 2b00 cmp r3, #0 801c39a: d1ef bne.n 801c37c 801c39c: 68fb ldr r3, [r7, #12] 801c39e: 2200 movs r2, #0 801c3a0: 60da str r2, [r3, #12] } TCP_REG_ACTIVE(pcb); 801c3a2: 4b10 ldr r3, [pc, #64] @ (801c3e4 ) 801c3a4: 681a ldr r2, [r3, #0] 801c3a6: 68fb ldr r3, [r7, #12] 801c3a8: 60da str r2, [r3, #12] 801c3aa: 4a0e ldr r2, [pc, #56] @ (801c3e4 ) 801c3ac: 68fb ldr r3, [r7, #12] 801c3ae: 6013 str r3, [r2, #0] 801c3b0: f005 fb6c bl 8021a8c 801c3b4: 4b0c ldr r3, [pc, #48] @ (801c3e8 ) 801c3b6: 2201 movs r2, #1 801c3b8: 701a strb r2, [r3, #0] MIB2_STATS_INC(mib2.tcpactiveopens); tcp_output(pcb); 801c3ba: 68f8 ldr r0, [r7, #12] 801c3bc: f004 fbe2 bl 8020b84 } return ret; 801c3c0: f997 3013 ldrsb.w r3, [r7, #19] } 801c3c4: 4618 mov r0, r3 801c3c6: 3728 adds r7, #40 @ 0x28 801c3c8: 46bd mov sp, r7 801c3ca: bd80 pop {r7, pc} 801c3cc: 0802f5d8 .word 0x0802f5d8 801c3d0: 0802f8b4 .word 0x0802f8b4 801c3d4: 0802f61c .word 0x0802f61c 801c3d8: 0802f8d0 .word 0x0802f8d0 801c3dc: 0802f8ec .word 0x0802f8ec 801c3e0: 2402af7c .word 0x2402af7c 801c3e4: 2402af84 .word 0x2402af84 801c3e8: 2402af8c .word 0x2402af8c 0801c3ec : * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 801c3ec: b5b0 push {r4, r5, r7, lr} 801c3ee: b090 sub sp, #64 @ 0x40 801c3f0: 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; 801c3f2: 2300 movs r3, #0 801c3f4: f887 3025 strb.w r3, [r7, #37] @ 0x25 ++tcp_ticks; 801c3f8: 4b95 ldr r3, [pc, #596] @ (801c650 ) 801c3fa: 681b ldr r3, [r3, #0] 801c3fc: 3301 adds r3, #1 801c3fe: 4a94 ldr r2, [pc, #592] @ (801c650 ) 801c400: 6013 str r3, [r2, #0] ++tcp_timer_ctr; 801c402: 4b94 ldr r3, [pc, #592] @ (801c654 ) 801c404: 781b ldrb r3, [r3, #0] 801c406: 3301 adds r3, #1 801c408: b2da uxtb r2, r3 801c40a: 4b92 ldr r3, [pc, #584] @ (801c654 ) 801c40c: 701a strb r2, [r3, #0] 801c40e: e000 b.n 801c412 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; 801c410: bf00 nop prev = NULL; 801c412: 2300 movs r3, #0 801c414: 62bb str r3, [r7, #40] @ 0x28 pcb = tcp_active_pcbs; 801c416: 4b90 ldr r3, [pc, #576] @ (801c658 ) 801c418: 681b ldr r3, [r3, #0] 801c41a: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801c41c: e29d b.n 801c95a LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); 801c41e: 6afb ldr r3, [r7, #44] @ 0x2c 801c420: 7d1b ldrb r3, [r3, #20] 801c422: 2b00 cmp r3, #0 801c424: d106 bne.n 801c434 801c426: 4b8d ldr r3, [pc, #564] @ (801c65c ) 801c428: f240 42be movw r2, #1214 @ 0x4be 801c42c: 498c ldr r1, [pc, #560] @ (801c660 ) 801c42e: 488d ldr r0, [pc, #564] @ (801c664 ) 801c430: f00e fa34 bl 802a89c LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); 801c434: 6afb ldr r3, [r7, #44] @ 0x2c 801c436: 7d1b ldrb r3, [r3, #20] 801c438: 2b01 cmp r3, #1 801c43a: d106 bne.n 801c44a 801c43c: 4b87 ldr r3, [pc, #540] @ (801c65c ) 801c43e: f240 42bf movw r2, #1215 @ 0x4bf 801c442: 4989 ldr r1, [pc, #548] @ (801c668 ) 801c444: 4887 ldr r0, [pc, #540] @ (801c664 ) 801c446: f00e fa29 bl 802a89c LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); 801c44a: 6afb ldr r3, [r7, #44] @ 0x2c 801c44c: 7d1b ldrb r3, [r3, #20] 801c44e: 2b0a cmp r3, #10 801c450: d106 bne.n 801c460 801c452: 4b82 ldr r3, [pc, #520] @ (801c65c ) 801c454: f44f 6298 mov.w r2, #1216 @ 0x4c0 801c458: 4984 ldr r1, [pc, #528] @ (801c66c ) 801c45a: 4882 ldr r0, [pc, #520] @ (801c664 ) 801c45c: f00e fa1e bl 802a89c if (pcb->last_timer == tcp_timer_ctr) { 801c460: 6afb ldr r3, [r7, #44] @ 0x2c 801c462: 7f9a ldrb r2, [r3, #30] 801c464: 4b7b ldr r3, [pc, #492] @ (801c654 ) 801c466: 781b ldrb r3, [r3, #0] 801c468: 429a cmp r2, r3 801c46a: d105 bne.n 801c478 prev = pcb; 801c46c: 6afb ldr r3, [r7, #44] @ 0x2c 801c46e: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801c470: 6afb ldr r3, [r7, #44] @ 0x2c 801c472: 68db ldr r3, [r3, #12] 801c474: 62fb str r3, [r7, #44] @ 0x2c continue; 801c476: e270 b.n 801c95a pcb->last_timer = tcp_timer_ctr; 801c478: 4b76 ldr r3, [pc, #472] @ (801c654 ) 801c47a: 781a ldrb r2, [r3, #0] 801c47c: 6afb ldr r3, [r7, #44] @ 0x2c 801c47e: 779a strb r2, [r3, #30] pcb_remove = 0; 801c480: 2300 movs r3, #0 801c482: f887 3027 strb.w r3, [r7, #39] @ 0x27 pcb_reset = 0; 801c486: 2300 movs r3, #0 801c488: f887 3026 strb.w r3, [r7, #38] @ 0x26 if (pcb->state == SYN_SENT && pcb->nrtx >= TCP_SYNMAXRTX) { 801c48c: 6afb ldr r3, [r7, #44] @ 0x2c 801c48e: 7d1b ldrb r3, [r3, #20] 801c490: 2b02 cmp r3, #2 801c492: d10a bne.n 801c4aa 801c494: 6afb ldr r3, [r7, #44] @ 0x2c 801c496: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801c49a: 2b05 cmp r3, #5 801c49c: d905 bls.n 801c4aa ++pcb_remove; 801c49e: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c4a2: 3301 adds r3, #1 801c4a4: f887 3027 strb.w r3, [r7, #39] @ 0x27 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); 801c4a8: e11e b.n 801c6e8 } else if (pcb->nrtx >= TCP_MAXRTX) { 801c4aa: 6afb ldr r3, [r7, #44] @ 0x2c 801c4ac: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801c4b0: 2b0b cmp r3, #11 801c4b2: d905 bls.n 801c4c0 ++pcb_remove; 801c4b4: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c4b8: 3301 adds r3, #1 801c4ba: f887 3027 strb.w r3, [r7, #39] @ 0x27 801c4be: e113 b.n 801c6e8 if (pcb->persist_backoff > 0) { 801c4c0: 6afb ldr r3, [r7, #44] @ 0x2c 801c4c2: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c4c6: 2b00 cmp r3, #0 801c4c8: d075 beq.n 801c5b6 LWIP_ASSERT("tcp_slowtimr: persist ticking with in-flight data", pcb->unacked == NULL); 801c4ca: 6afb ldr r3, [r7, #44] @ 0x2c 801c4cc: 6f1b ldr r3, [r3, #112] @ 0x70 801c4ce: 2b00 cmp r3, #0 801c4d0: d006 beq.n 801c4e0 801c4d2: 4b62 ldr r3, [pc, #392] @ (801c65c ) 801c4d4: f240 42d4 movw r2, #1236 @ 0x4d4 801c4d8: 4965 ldr r1, [pc, #404] @ (801c670 ) 801c4da: 4862 ldr r0, [pc, #392] @ (801c664 ) 801c4dc: f00e f9de bl 802a89c LWIP_ASSERT("tcp_slowtimr: persist ticking with empty send buffer", pcb->unsent != NULL); 801c4e0: 6afb ldr r3, [r7, #44] @ 0x2c 801c4e2: 6edb ldr r3, [r3, #108] @ 0x6c 801c4e4: 2b00 cmp r3, #0 801c4e6: d106 bne.n 801c4f6 801c4e8: 4b5c ldr r3, [pc, #368] @ (801c65c ) 801c4ea: f240 42d5 movw r2, #1237 @ 0x4d5 801c4ee: 4961 ldr r1, [pc, #388] @ (801c674 ) 801c4f0: 485c ldr r0, [pc, #368] @ (801c664 ) 801c4f2: f00e f9d3 bl 802a89c if (pcb->persist_probe >= TCP_MAXRTX) { 801c4f6: 6afb ldr r3, [r7, #44] @ 0x2c 801c4f8: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 801c4fc: 2b0b cmp r3, #11 801c4fe: d905 bls.n 801c50c ++pcb_remove; /* max probes reached */ 801c500: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c504: 3301 adds r3, #1 801c506: f887 3027 strb.w r3, [r7, #39] @ 0x27 801c50a: e0ed b.n 801c6e8 u8_t backoff_cnt = tcp_persist_backoff[pcb->persist_backoff - 1]; 801c50c: 6afb ldr r3, [r7, #44] @ 0x2c 801c50e: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c512: 3b01 subs r3, #1 801c514: 4a58 ldr r2, [pc, #352] @ (801c678 ) 801c516: 5cd3 ldrb r3, [r2, r3] 801c518: 747b strb r3, [r7, #17] if (pcb->persist_cnt < backoff_cnt) { 801c51a: 6afb ldr r3, [r7, #44] @ 0x2c 801c51c: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801c520: 7c7a ldrb r2, [r7, #17] 801c522: 429a cmp r2, r3 801c524: d907 bls.n 801c536 pcb->persist_cnt++; 801c526: 6afb ldr r3, [r7, #44] @ 0x2c 801c528: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801c52c: 3301 adds r3, #1 801c52e: b2da uxtb r2, r3 801c530: 6afb ldr r3, [r7, #44] @ 0x2c 801c532: f883 2098 strb.w r2, [r3, #152] @ 0x98 if (pcb->persist_cnt >= backoff_cnt) { 801c536: 6afb ldr r3, [r7, #44] @ 0x2c 801c538: f893 3098 ldrb.w r3, [r3, #152] @ 0x98 801c53c: 7c7a ldrb r2, [r7, #17] 801c53e: 429a cmp r2, r3 801c540: f200 80d2 bhi.w 801c6e8 int next_slot = 1; /* increment timer to next slot */ 801c544: 2301 movs r3, #1 801c546: 623b str r3, [r7, #32] if (pcb->snd_wnd == 0) { 801c548: 6afb ldr r3, [r7, #44] @ 0x2c 801c54a: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801c54e: 2b00 cmp r3, #0 801c550: d108 bne.n 801c564 if (tcp_zero_window_probe(pcb) != ERR_OK) { 801c552: 6af8 ldr r0, [r7, #44] @ 0x2c 801c554: f005 f9cc bl 80218f0 801c558: 4603 mov r3, r0 801c55a: 2b00 cmp r3, #0 801c55c: d014 beq.n 801c588 next_slot = 0; /* try probe again with current slot */ 801c55e: 2300 movs r3, #0 801c560: 623b str r3, [r7, #32] 801c562: e011 b.n 801c588 if (tcp_split_unsent_seg(pcb, (u16_t)pcb->snd_wnd) == ERR_OK) { 801c564: 6afb ldr r3, [r7, #44] @ 0x2c 801c566: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801c56a: 4619 mov r1, r3 801c56c: 6af8 ldr r0, [r7, #44] @ 0x2c 801c56e: f004 f87f bl 8020670 801c572: 4603 mov r3, r0 801c574: 2b00 cmp r3, #0 801c576: d107 bne.n 801c588 if (tcp_output(pcb) == ERR_OK) { 801c578: 6af8 ldr r0, [r7, #44] @ 0x2c 801c57a: f004 fb03 bl 8020b84 801c57e: 4603 mov r3, r0 801c580: 2b00 cmp r3, #0 801c582: d101 bne.n 801c588 next_slot = 0; 801c584: 2300 movs r3, #0 801c586: 623b str r3, [r7, #32] if (next_slot) { 801c588: 6a3b ldr r3, [r7, #32] 801c58a: 2b00 cmp r3, #0 801c58c: f000 80ac beq.w 801c6e8 pcb->persist_cnt = 0; 801c590: 6afb ldr r3, [r7, #44] @ 0x2c 801c592: 2200 movs r2, #0 801c594: f883 2098 strb.w r2, [r3, #152] @ 0x98 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 801c598: 6afb ldr r3, [r7, #44] @ 0x2c 801c59a: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c59e: 2b06 cmp r3, #6 801c5a0: f200 80a2 bhi.w 801c6e8 pcb->persist_backoff++; 801c5a4: 6afb ldr r3, [r7, #44] @ 0x2c 801c5a6: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 801c5aa: 3301 adds r3, #1 801c5ac: b2da uxtb r2, r3 801c5ae: 6afb ldr r3, [r7, #44] @ 0x2c 801c5b0: f883 2099 strb.w r2, [r3, #153] @ 0x99 801c5b4: e098 b.n 801c6e8 if ((pcb->rtime >= 0) && (pcb->rtime < 0x7FFF)) { 801c5b6: 6afb ldr r3, [r7, #44] @ 0x2c 801c5b8: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801c5bc: 2b00 cmp r3, #0 801c5be: db0f blt.n 801c5e0 801c5c0: 6afb ldr r3, [r7, #44] @ 0x2c 801c5c2: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801c5c6: f647 72ff movw r2, #32767 @ 0x7fff 801c5ca: 4293 cmp r3, r2 801c5cc: d008 beq.n 801c5e0 ++pcb->rtime; 801c5ce: 6afb ldr r3, [r7, #44] @ 0x2c 801c5d0: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801c5d4: b29b uxth r3, r3 801c5d6: 3301 adds r3, #1 801c5d8: b29b uxth r3, r3 801c5da: b21a sxth r2, r3 801c5dc: 6afb ldr r3, [r7, #44] @ 0x2c 801c5de: 861a strh r2, [r3, #48] @ 0x30 if (pcb->rtime >= pcb->rto) { 801c5e0: 6afb ldr r3, [r7, #44] @ 0x2c 801c5e2: f9b3 2030 ldrsh.w r2, [r3, #48] @ 0x30 801c5e6: 6afb ldr r3, [r7, #44] @ 0x2c 801c5e8: f9b3 3040 ldrsh.w r3, [r3, #64] @ 0x40 801c5ec: 429a cmp r2, r3 801c5ee: db7b blt.n 801c6e8 if ((tcp_rexmit_rto_prepare(pcb) == ERR_OK) || ((pcb->unacked == NULL) && (pcb->unsent != NULL))) { 801c5f0: 6af8 ldr r0, [r7, #44] @ 0x2c 801c5f2: f004 fdbf bl 8021174 801c5f6: 4603 mov r3, r0 801c5f8: 2b00 cmp r3, #0 801c5fa: d007 beq.n 801c60c 801c5fc: 6afb ldr r3, [r7, #44] @ 0x2c 801c5fe: 6f1b ldr r3, [r3, #112] @ 0x70 801c600: 2b00 cmp r3, #0 801c602: d171 bne.n 801c6e8 801c604: 6afb ldr r3, [r7, #44] @ 0x2c 801c606: 6edb ldr r3, [r3, #108] @ 0x6c 801c608: 2b00 cmp r3, #0 801c60a: d06d beq.n 801c6e8 if (pcb->state != SYN_SENT) { 801c60c: 6afb ldr r3, [r7, #44] @ 0x2c 801c60e: 7d1b ldrb r3, [r3, #20] 801c610: 2b02 cmp r3, #2 801c612: d03a beq.n 801c68a u8_t backoff_idx = LWIP_MIN(pcb->nrtx, sizeof(tcp_backoff) - 1); 801c614: 6afb ldr r3, [r7, #44] @ 0x2c 801c616: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801c61a: 2b0c cmp r3, #12 801c61c: bf28 it cs 801c61e: 230c movcs r3, #12 801c620: 76fb strb r3, [r7, #27] int calc_rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[backoff_idx]; 801c622: 6afb ldr r3, [r7, #44] @ 0x2c 801c624: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801c628: 10db asrs r3, r3, #3 801c62a: b21b sxth r3, r3 801c62c: 461a mov r2, r3 801c62e: 6afb ldr r3, [r7, #44] @ 0x2c 801c630: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801c634: 4413 add r3, r2 801c636: 7efa ldrb r2, [r7, #27] 801c638: 4910 ldr r1, [pc, #64] @ (801c67c ) 801c63a: 5c8a ldrb r2, [r1, r2] 801c63c: 4093 lsls r3, r2 801c63e: 617b str r3, [r7, #20] pcb->rto = (s16_t)LWIP_MIN(calc_rto, 0x7FFF); 801c640: 697b ldr r3, [r7, #20] 801c642: f647 72fe movw r2, #32766 @ 0x7ffe 801c646: 4293 cmp r3, r2 801c648: dc1a bgt.n 801c680 801c64a: 697b ldr r3, [r7, #20] 801c64c: b21a sxth r2, r3 801c64e: e019 b.n 801c684 801c650: 2402af78 .word 0x2402af78 801c654: 2402af8e .word 0x2402af8e 801c658: 2402af84 .word 0x2402af84 801c65c: 0802f5d8 .word 0x0802f5d8 801c660: 0802f91c .word 0x0802f91c 801c664: 0802f61c .word 0x0802f61c 801c668: 0802f948 .word 0x0802f948 801c66c: 0802f974 .word 0x0802f974 801c670: 0802f9a4 .word 0x0802f9a4 801c674: 0802f9d8 .word 0x0802f9d8 801c678: 08031c68 .word 0x08031c68 801c67c: 08031c58 .word 0x08031c58 801c680: f647 72ff movw r2, #32767 @ 0x7fff 801c684: 6afb ldr r3, [r7, #44] @ 0x2c 801c686: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 pcb->rtime = 0; 801c68a: 6afb ldr r3, [r7, #44] @ 0x2c 801c68c: 2200 movs r2, #0 801c68e: 861a strh r2, [r3, #48] @ 0x30 eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 801c690: 6afb ldr r3, [r7, #44] @ 0x2c 801c692: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801c696: 6afb ldr r3, [r7, #44] @ 0x2c 801c698: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801c69c: 4293 cmp r3, r2 801c69e: bf28 it cs 801c6a0: 4613 movcs r3, r2 801c6a2: 827b strh r3, [r7, #18] pcb->ssthresh = eff_wnd >> 1; 801c6a4: 8a7b ldrh r3, [r7, #18] 801c6a6: 085b lsrs r3, r3, #1 801c6a8: b29a uxth r2, r3 801c6aa: 6afb ldr r3, [r7, #44] @ 0x2c 801c6ac: f8a3 204a strh.w r2, [r3, #74] @ 0x4a if (pcb->ssthresh < (tcpwnd_size_t)(pcb->mss << 1)) { 801c6b0: 6afb ldr r3, [r7, #44] @ 0x2c 801c6b2: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 801c6b6: 6afb ldr r3, [r7, #44] @ 0x2c 801c6b8: 8e5b ldrh r3, [r3, #50] @ 0x32 801c6ba: 005b lsls r3, r3, #1 801c6bc: b29b uxth r3, r3 801c6be: 429a cmp r2, r3 801c6c0: d206 bcs.n 801c6d0 pcb->ssthresh = (tcpwnd_size_t)(pcb->mss << 1); 801c6c2: 6afb ldr r3, [r7, #44] @ 0x2c 801c6c4: 8e5b ldrh r3, [r3, #50] @ 0x32 801c6c6: 005b lsls r3, r3, #1 801c6c8: b29a uxth r2, r3 801c6ca: 6afb ldr r3, [r7, #44] @ 0x2c 801c6cc: f8a3 204a strh.w r2, [r3, #74] @ 0x4a pcb->cwnd = pcb->mss; 801c6d0: 6afb ldr r3, [r7, #44] @ 0x2c 801c6d2: 8e5a ldrh r2, [r3, #50] @ 0x32 801c6d4: 6afb ldr r3, [r7, #44] @ 0x2c 801c6d6: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->bytes_acked = 0; 801c6da: 6afb ldr r3, [r7, #44] @ 0x2c 801c6dc: 2200 movs r2, #0 801c6de: f8a3 206a strh.w r2, [r3, #106] @ 0x6a tcp_rexmit_rto_commit(pcb); 801c6e2: 6af8 ldr r0, [r7, #44] @ 0x2c 801c6e4: f004 fdc0 bl 8021268 if (pcb->state == FIN_WAIT_2) { 801c6e8: 6afb ldr r3, [r7, #44] @ 0x2c 801c6ea: 7d1b ldrb r3, [r3, #20] 801c6ec: 2b06 cmp r3, #6 801c6ee: d111 bne.n 801c714 if (pcb->flags & TF_RXCLOSED) { 801c6f0: 6afb ldr r3, [r7, #44] @ 0x2c 801c6f2: 8b5b ldrh r3, [r3, #26] 801c6f4: f003 0310 and.w r3, r3, #16 801c6f8: 2b00 cmp r3, #0 801c6fa: d00b beq.n 801c714 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c6fc: 4b9c ldr r3, [pc, #624] @ (801c970 ) 801c6fe: 681a ldr r2, [r3, #0] 801c700: 6afb ldr r3, [r7, #44] @ 0x2c 801c702: 6a1b ldr r3, [r3, #32] 801c704: 1ad3 subs r3, r2, r3 801c706: 2b28 cmp r3, #40 @ 0x28 801c708: d904 bls.n 801c714 ++pcb_remove; 801c70a: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c70e: 3301 adds r3, #1 801c710: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (ip_get_option(pcb, SOF_KEEPALIVE) && 801c714: 6afb ldr r3, [r7, #44] @ 0x2c 801c716: 7a5b ldrb r3, [r3, #9] 801c718: f003 0308 and.w r3, r3, #8 801c71c: 2b00 cmp r3, #0 801c71e: d04a beq.n 801c7b6 ((pcb->state == ESTABLISHED) || 801c720: 6afb ldr r3, [r7, #44] @ 0x2c 801c722: 7d1b ldrb r3, [r3, #20] if (ip_get_option(pcb, SOF_KEEPALIVE) && 801c724: 2b04 cmp r3, #4 801c726: d003 beq.n 801c730 (pcb->state == CLOSE_WAIT))) { 801c728: 6afb ldr r3, [r7, #44] @ 0x2c 801c72a: 7d1b ldrb r3, [r3, #20] ((pcb->state == ESTABLISHED) || 801c72c: 2b07 cmp r3, #7 801c72e: d142 bne.n 801c7b6 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c730: 4b8f ldr r3, [pc, #572] @ (801c970 ) 801c732: 681a ldr r2, [r3, #0] 801c734: 6afb ldr r3, [r7, #44] @ 0x2c 801c736: 6a1b ldr r3, [r3, #32] 801c738: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) { 801c73a: 6afb ldr r3, [r7, #44] @ 0x2c 801c73c: f8d3 1094 ldr.w r1, [r3, #148] @ 0x94 801c740: 4b8c ldr r3, [pc, #560] @ (801c974 ) 801c742: 440b add r3, r1 801c744: 498c ldr r1, [pc, #560] @ (801c978 ) 801c746: fba1 1303 umull r1, r3, r1, r3 801c74a: 095b lsrs r3, r3, #5 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c74c: 429a cmp r2, r3 801c74e: d90a bls.n 801c766 ++pcb_remove; 801c750: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c754: 3301 adds r3, #1 801c756: f887 3027 strb.w r3, [r7, #39] @ 0x27 ++pcb_reset; 801c75a: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801c75e: 3301 adds r3, #1 801c760: f887 3026 strb.w r3, [r7, #38] @ 0x26 801c764: e027 b.n 801c7b6 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 801c766: 4b82 ldr r3, [pc, #520] @ (801c970 ) 801c768: 681a ldr r2, [r3, #0] 801c76a: 6afb ldr r3, [r7, #44] @ 0x2c 801c76c: 6a1b ldr r3, [r3, #32] 801c76e: 1ad2 subs r2, r2, r3 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 801c770: 6afb ldr r3, [r7, #44] @ 0x2c 801c772: f8d3 1094 ldr.w r1, [r3, #148] @ 0x94 801c776: 6afb ldr r3, [r7, #44] @ 0x2c 801c778: f893 309b ldrb.w r3, [r3, #155] @ 0x9b 801c77c: 4618 mov r0, r3 801c77e: 4b7f ldr r3, [pc, #508] @ (801c97c ) 801c780: fb00 f303 mul.w r3, r0, r3 801c784: 440b add r3, r1 / TCP_SLOW_INTERVAL) { 801c786: 497c ldr r1, [pc, #496] @ (801c978 ) 801c788: fba1 1303 umull r1, r3, r1, r3 801c78c: 095b lsrs r3, r3, #5 } else if ((u32_t)(tcp_ticks - pcb->tmr) > 801c78e: 429a cmp r2, r3 801c790: d911 bls.n 801c7b6 err = tcp_keepalive(pcb); 801c792: 6af8 ldr r0, [r7, #44] @ 0x2c 801c794: f005 f86c bl 8021870 801c798: 4603 mov r3, r0 801c79a: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (err == ERR_OK) { 801c79e: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801c7a2: 2b00 cmp r3, #0 801c7a4: d107 bne.n 801c7b6 pcb->keep_cnt_sent++; 801c7a6: 6afb ldr r3, [r7, #44] @ 0x2c 801c7a8: f893 309b ldrb.w r3, [r3, #155] @ 0x9b 801c7ac: 3301 adds r3, #1 801c7ae: b2da uxtb r2, r3 801c7b0: 6afb ldr r3, [r7, #44] @ 0x2c 801c7b2: f883 209b strb.w r2, [r3, #155] @ 0x9b if (pcb->ooseq != NULL && 801c7b6: 6afb ldr r3, [r7, #44] @ 0x2c 801c7b8: 6f5b ldr r3, [r3, #116] @ 0x74 801c7ba: 2b00 cmp r3, #0 801c7bc: d011 beq.n 801c7e2 (tcp_ticks - pcb->tmr >= (u32_t)pcb->rto * TCP_OOSEQ_TIMEOUT)) { 801c7be: 4b6c ldr r3, [pc, #432] @ (801c970 ) 801c7c0: 681a ldr r2, [r3, #0] 801c7c2: 6afb ldr r3, [r7, #44] @ 0x2c 801c7c4: 6a1b ldr r3, [r3, #32] 801c7c6: 1ad2 subs r2, r2, r3 801c7c8: 6afb ldr r3, [r7, #44] @ 0x2c 801c7ca: f9b3 3040 ldrsh.w r3, [r3, #64] @ 0x40 801c7ce: 4619 mov r1, r3 801c7d0: 460b mov r3, r1 801c7d2: 005b lsls r3, r3, #1 801c7d4: 440b add r3, r1 801c7d6: 005b lsls r3, r3, #1 if (pcb->ooseq != NULL && 801c7d8: 429a cmp r2, r3 801c7da: d302 bcc.n 801c7e2 tcp_free_ooseq(pcb); 801c7dc: 6af8 ldr r0, [r7, #44] @ 0x2c 801c7de: f000 feb7 bl 801d550 if (pcb->state == SYN_RCVD) { 801c7e2: 6afb ldr r3, [r7, #44] @ 0x2c 801c7e4: 7d1b ldrb r3, [r3, #20] 801c7e6: 2b03 cmp r3, #3 801c7e8: d10b bne.n 801c802 if ((u32_t)(tcp_ticks - pcb->tmr) > 801c7ea: 4b61 ldr r3, [pc, #388] @ (801c970 ) 801c7ec: 681a ldr r2, [r3, #0] 801c7ee: 6afb ldr r3, [r7, #44] @ 0x2c 801c7f0: 6a1b ldr r3, [r3, #32] 801c7f2: 1ad3 subs r3, r2, r3 801c7f4: 2b28 cmp r3, #40 @ 0x28 801c7f6: d904 bls.n 801c802 ++pcb_remove; 801c7f8: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c7fc: 3301 adds r3, #1 801c7fe: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (pcb->state == LAST_ACK) { 801c802: 6afb ldr r3, [r7, #44] @ 0x2c 801c804: 7d1b ldrb r3, [r3, #20] 801c806: 2b09 cmp r3, #9 801c808: d10b bne.n 801c822 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 801c80a: 4b59 ldr r3, [pc, #356] @ (801c970 ) 801c80c: 681a ldr r2, [r3, #0] 801c80e: 6afb ldr r3, [r7, #44] @ 0x2c 801c810: 6a1b ldr r3, [r3, #32] 801c812: 1ad3 subs r3, r2, r3 801c814: 2bf0 cmp r3, #240 @ 0xf0 801c816: d904 bls.n 801c822 ++pcb_remove; 801c818: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c81c: 3301 adds r3, #1 801c81e: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (pcb_remove) { 801c822: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c826: 2b00 cmp r3, #0 801c828: d060 beq.n 801c8ec tcp_err_fn err_fn = pcb->errf; 801c82a: 6afb ldr r3, [r7, #44] @ 0x2c 801c82c: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801c830: 60fb str r3, [r7, #12] tcp_pcb_purge(pcb); 801c832: 6af8 ldr r0, [r7, #44] @ 0x2c 801c834: f000 fcd8 bl 801d1e8 if (prev != NULL) { 801c838: 6abb ldr r3, [r7, #40] @ 0x28 801c83a: 2b00 cmp r3, #0 801c83c: d010 beq.n 801c860 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); 801c83e: 4b50 ldr r3, [pc, #320] @ (801c980 ) 801c840: 681b ldr r3, [r3, #0] 801c842: 6afa ldr r2, [r7, #44] @ 0x2c 801c844: 429a cmp r2, r3 801c846: d106 bne.n 801c856 801c848: 4b4e ldr r3, [pc, #312] @ (801c984 ) 801c84a: f240 526d movw r2, #1389 @ 0x56d 801c84e: 494e ldr r1, [pc, #312] @ (801c988 ) 801c850: 484e ldr r0, [pc, #312] @ (801c98c ) 801c852: f00e f823 bl 802a89c prev->next = pcb->next; 801c856: 6afb ldr r3, [r7, #44] @ 0x2c 801c858: 68da ldr r2, [r3, #12] 801c85a: 6abb ldr r3, [r7, #40] @ 0x28 801c85c: 60da str r2, [r3, #12] 801c85e: e00f b.n 801c880 LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); 801c860: 4b47 ldr r3, [pc, #284] @ (801c980 ) 801c862: 681b ldr r3, [r3, #0] 801c864: 6afa ldr r2, [r7, #44] @ 0x2c 801c866: 429a cmp r2, r3 801c868: d006 beq.n 801c878 801c86a: 4b46 ldr r3, [pc, #280] @ (801c984 ) 801c86c: f240 5271 movw r2, #1393 @ 0x571 801c870: 4947 ldr r1, [pc, #284] @ (801c990 ) 801c872: 4846 ldr r0, [pc, #280] @ (801c98c ) 801c874: f00e f812 bl 802a89c tcp_active_pcbs = pcb->next; 801c878: 6afb ldr r3, [r7, #44] @ 0x2c 801c87a: 68db ldr r3, [r3, #12] 801c87c: 4a40 ldr r2, [pc, #256] @ (801c980 ) 801c87e: 6013 str r3, [r2, #0] if (pcb_reset) { 801c880: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 801c884: 2b00 cmp r3, #0 801c886: d013 beq.n 801c8b0 tcp_rst(pcb, pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 801c888: 6afb ldr r3, [r7, #44] @ 0x2c 801c88a: 6d18 ldr r0, [r3, #80] @ 0x50 801c88c: 6afb ldr r3, [r7, #44] @ 0x2c 801c88e: 6a5c ldr r4, [r3, #36] @ 0x24 801c890: 6afd ldr r5, [r7, #44] @ 0x2c 801c892: 6afb ldr r3, [r7, #44] @ 0x2c 801c894: 3304 adds r3, #4 801c896: 6afa ldr r2, [r7, #44] @ 0x2c 801c898: 8ad2 ldrh r2, [r2, #22] 801c89a: 6af9 ldr r1, [r7, #44] @ 0x2c 801c89c: 8b09 ldrh r1, [r1, #24] 801c89e: 9102 str r1, [sp, #8] 801c8a0: 9201 str r2, [sp, #4] 801c8a2: 9300 str r3, [sp, #0] 801c8a4: 462b mov r3, r5 801c8a6: 4622 mov r2, r4 801c8a8: 4601 mov r1, r0 801c8aa: 6af8 ldr r0, [r7, #44] @ 0x2c 801c8ac: f004 ff2c bl 8021708 err_arg = pcb->callback_arg; 801c8b0: 6afb ldr r3, [r7, #44] @ 0x2c 801c8b2: 691b ldr r3, [r3, #16] 801c8b4: 60bb str r3, [r7, #8] last_state = pcb->state; 801c8b6: 6afb ldr r3, [r7, #44] @ 0x2c 801c8b8: 7d1b ldrb r3, [r3, #20] 801c8ba: 71fb strb r3, [r7, #7] pcb2 = pcb; 801c8bc: 6afb ldr r3, [r7, #44] @ 0x2c 801c8be: 603b str r3, [r7, #0] pcb = pcb->next; 801c8c0: 6afb ldr r3, [r7, #44] @ 0x2c 801c8c2: 68db ldr r3, [r3, #12] 801c8c4: 62fb str r3, [r7, #44] @ 0x2c tcp_free(pcb2); 801c8c6: 6838 ldr r0, [r7, #0] 801c8c8: f7ff f82c bl 801b924 tcp_active_pcbs_changed = 0; 801c8cc: 4b31 ldr r3, [pc, #196] @ (801c994 ) 801c8ce: 2200 movs r2, #0 801c8d0: 701a strb r2, [r3, #0] TCP_EVENT_ERR(last_state, err_fn, err_arg, ERR_ABRT); 801c8d2: 68fb ldr r3, [r7, #12] 801c8d4: 2b00 cmp r3, #0 801c8d6: d004 beq.n 801c8e2 801c8d8: 68fb ldr r3, [r7, #12] 801c8da: f06f 010c mvn.w r1, #12 801c8de: 68b8 ldr r0, [r7, #8] 801c8e0: 4798 blx r3 if (tcp_active_pcbs_changed) { 801c8e2: 4b2c ldr r3, [pc, #176] @ (801c994 ) 801c8e4: 781b ldrb r3, [r3, #0] 801c8e6: 2b00 cmp r3, #0 801c8e8: d037 beq.n 801c95a goto tcp_slowtmr_start; 801c8ea: e592 b.n 801c412 prev = pcb; 801c8ec: 6afb ldr r3, [r7, #44] @ 0x2c 801c8ee: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801c8f0: 6afb ldr r3, [r7, #44] @ 0x2c 801c8f2: 68db ldr r3, [r3, #12] 801c8f4: 62fb str r3, [r7, #44] @ 0x2c ++prev->polltmr; 801c8f6: 6abb ldr r3, [r7, #40] @ 0x28 801c8f8: 7f1b ldrb r3, [r3, #28] 801c8fa: 3301 adds r3, #1 801c8fc: b2da uxtb r2, r3 801c8fe: 6abb ldr r3, [r7, #40] @ 0x28 801c900: 771a strb r2, [r3, #28] if (prev->polltmr >= prev->pollinterval) { 801c902: 6abb ldr r3, [r7, #40] @ 0x28 801c904: 7f1a ldrb r2, [r3, #28] 801c906: 6abb ldr r3, [r7, #40] @ 0x28 801c908: 7f5b ldrb r3, [r3, #29] 801c90a: 429a cmp r2, r3 801c90c: d325 bcc.n 801c95a prev->polltmr = 0; 801c90e: 6abb ldr r3, [r7, #40] @ 0x28 801c910: 2200 movs r2, #0 801c912: 771a strb r2, [r3, #28] tcp_active_pcbs_changed = 0; 801c914: 4b1f ldr r3, [pc, #124] @ (801c994 ) 801c916: 2200 movs r2, #0 801c918: 701a strb r2, [r3, #0] TCP_EVENT_POLL(prev, err); 801c91a: 6abb ldr r3, [r7, #40] @ 0x28 801c91c: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 801c920: 2b00 cmp r3, #0 801c922: d00b beq.n 801c93c 801c924: 6abb ldr r3, [r7, #40] @ 0x28 801c926: f8d3 308c ldr.w r3, [r3, #140] @ 0x8c 801c92a: 6aba ldr r2, [r7, #40] @ 0x28 801c92c: 6912 ldr r2, [r2, #16] 801c92e: 6ab9 ldr r1, [r7, #40] @ 0x28 801c930: 4610 mov r0, r2 801c932: 4798 blx r3 801c934: 4603 mov r3, r0 801c936: f887 3025 strb.w r3, [r7, #37] @ 0x25 801c93a: e002 b.n 801c942 801c93c: 2300 movs r3, #0 801c93e: f887 3025 strb.w r3, [r7, #37] @ 0x25 if (tcp_active_pcbs_changed) { 801c942: 4b14 ldr r3, [pc, #80] @ (801c994 ) 801c944: 781b ldrb r3, [r3, #0] 801c946: 2b00 cmp r3, #0 801c948: f47f ad62 bne.w 801c410 } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 801c94c: f997 3025 ldrsb.w r3, [r7, #37] @ 0x25 801c950: 2b00 cmp r3, #0 801c952: d102 bne.n 801c95a tcp_output(prev); 801c954: 6ab8 ldr r0, [r7, #40] @ 0x28 801c956: f004 f915 bl 8020b84 while (pcb != NULL) { 801c95a: 6afb ldr r3, [r7, #44] @ 0x2c 801c95c: 2b00 cmp r3, #0 801c95e: f47f ad5e bne.w 801c41e } } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; 801c962: 2300 movs r3, #0 801c964: 62bb str r3, [r7, #40] @ 0x28 pcb = tcp_tw_pcbs; 801c966: 4b0c ldr r3, [pc, #48] @ (801c998 ) 801c968: 681b ldr r3, [r3, #0] 801c96a: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801c96c: e069 b.n 801ca42 801c96e: bf00 nop 801c970: 2402af78 .word 0x2402af78 801c974: 000a4cb8 .word 0x000a4cb8 801c978: 10624dd3 .word 0x10624dd3 801c97c: 000124f8 .word 0x000124f8 801c980: 2402af84 .word 0x2402af84 801c984: 0802f5d8 .word 0x0802f5d8 801c988: 0802fa10 .word 0x0802fa10 801c98c: 0802f61c .word 0x0802f61c 801c990: 0802fa3c .word 0x0802fa3c 801c994: 2402af8c .word 0x2402af8c 801c998: 2402af88 .word 0x2402af88 LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 801c99c: 6afb ldr r3, [r7, #44] @ 0x2c 801c99e: 7d1b ldrb r3, [r3, #20] 801c9a0: 2b0a cmp r3, #10 801c9a2: d006 beq.n 801c9b2 801c9a4: 4b2b ldr r3, [pc, #172] @ (801ca54 ) 801c9a6: f240 52a1 movw r2, #1441 @ 0x5a1 801c9aa: 492b ldr r1, [pc, #172] @ (801ca58 ) 801c9ac: 482b ldr r0, [pc, #172] @ (801ca5c ) 801c9ae: f00d ff75 bl 802a89c pcb_remove = 0; 801c9b2: 2300 movs r3, #0 801c9b4: 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) { 801c9b8: 4b29 ldr r3, [pc, #164] @ (801ca60 ) 801c9ba: 681a ldr r2, [r3, #0] 801c9bc: 6afb ldr r3, [r7, #44] @ 0x2c 801c9be: 6a1b ldr r3, [r3, #32] 801c9c0: 1ad3 subs r3, r2, r3 801c9c2: 2bf0 cmp r3, #240 @ 0xf0 801c9c4: d904 bls.n 801c9d0 ++pcb_remove; 801c9c6: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c9ca: 3301 adds r3, #1 801c9cc: f887 3027 strb.w r3, [r7, #39] @ 0x27 } /* If the PCB should be removed, do it. */ if (pcb_remove) { 801c9d0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 801c9d4: 2b00 cmp r3, #0 801c9d6: d02f beq.n 801ca38 struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 801c9d8: 6af8 ldr r0, [r7, #44] @ 0x2c 801c9da: f000 fc05 bl 801d1e8 /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 801c9de: 6abb ldr r3, [r7, #40] @ 0x28 801c9e0: 2b00 cmp r3, #0 801c9e2: d010 beq.n 801ca06 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); 801c9e4: 4b1f ldr r3, [pc, #124] @ (801ca64 ) 801c9e6: 681b ldr r3, [r3, #0] 801c9e8: 6afa ldr r2, [r7, #44] @ 0x2c 801c9ea: 429a cmp r2, r3 801c9ec: d106 bne.n 801c9fc 801c9ee: 4b19 ldr r3, [pc, #100] @ (801ca54 ) 801c9f0: f240 52af movw r2, #1455 @ 0x5af 801c9f4: 491c ldr r1, [pc, #112] @ (801ca68 ) 801c9f6: 4819 ldr r0, [pc, #100] @ (801ca5c ) 801c9f8: f00d ff50 bl 802a89c prev->next = pcb->next; 801c9fc: 6afb ldr r3, [r7, #44] @ 0x2c 801c9fe: 68da ldr r2, [r3, #12] 801ca00: 6abb ldr r3, [r7, #40] @ 0x28 801ca02: 60da str r2, [r3, #12] 801ca04: e00f b.n 801ca26 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); 801ca06: 4b17 ldr r3, [pc, #92] @ (801ca64 ) 801ca08: 681b ldr r3, [r3, #0] 801ca0a: 6afa ldr r2, [r7, #44] @ 0x2c 801ca0c: 429a cmp r2, r3 801ca0e: d006 beq.n 801ca1e 801ca10: 4b10 ldr r3, [pc, #64] @ (801ca54 ) 801ca12: f240 52b3 movw r2, #1459 @ 0x5b3 801ca16: 4915 ldr r1, [pc, #84] @ (801ca6c ) 801ca18: 4810 ldr r0, [pc, #64] @ (801ca5c ) 801ca1a: f00d ff3f bl 802a89c tcp_tw_pcbs = pcb->next; 801ca1e: 6afb ldr r3, [r7, #44] @ 0x2c 801ca20: 68db ldr r3, [r3, #12] 801ca22: 4a10 ldr r2, [pc, #64] @ (801ca64 ) 801ca24: 6013 str r3, [r2, #0] } pcb2 = pcb; 801ca26: 6afb ldr r3, [r7, #44] @ 0x2c 801ca28: 61fb str r3, [r7, #28] pcb = pcb->next; 801ca2a: 6afb ldr r3, [r7, #44] @ 0x2c 801ca2c: 68db ldr r3, [r3, #12] 801ca2e: 62fb str r3, [r7, #44] @ 0x2c tcp_free(pcb2); 801ca30: 69f8 ldr r0, [r7, #28] 801ca32: f7fe ff77 bl 801b924 801ca36: e004 b.n 801ca42 } else { prev = pcb; 801ca38: 6afb ldr r3, [r7, #44] @ 0x2c 801ca3a: 62bb str r3, [r7, #40] @ 0x28 pcb = pcb->next; 801ca3c: 6afb ldr r3, [r7, #44] @ 0x2c 801ca3e: 68db ldr r3, [r3, #12] 801ca40: 62fb str r3, [r7, #44] @ 0x2c while (pcb != NULL) { 801ca42: 6afb ldr r3, [r7, #44] @ 0x2c 801ca44: 2b00 cmp r3, #0 801ca46: d1a9 bne.n 801c99c } } } 801ca48: bf00 nop 801ca4a: bf00 nop 801ca4c: 3730 adds r7, #48 @ 0x30 801ca4e: 46bd mov sp, r7 801ca50: bdb0 pop {r4, r5, r7, pc} 801ca52: bf00 nop 801ca54: 0802f5d8 .word 0x0802f5d8 801ca58: 0802fa68 .word 0x0802fa68 801ca5c: 0802f61c .word 0x0802f61c 801ca60: 2402af78 .word 0x2402af78 801ca64: 2402af88 .word 0x2402af88 801ca68: 0802fa98 .word 0x0802fa98 801ca6c: 0802fac0 .word 0x0802fac0 0801ca70 : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 801ca70: b580 push {r7, lr} 801ca72: b082 sub sp, #8 801ca74: af00 add r7, sp, #0 struct tcp_pcb *pcb; ++tcp_timer_ctr; 801ca76: 4b2d ldr r3, [pc, #180] @ (801cb2c ) 801ca78: 781b ldrb r3, [r3, #0] 801ca7a: 3301 adds r3, #1 801ca7c: b2da uxtb r2, r3 801ca7e: 4b2b ldr r3, [pc, #172] @ (801cb2c ) 801ca80: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; 801ca82: 4b2b ldr r3, [pc, #172] @ (801cb30 ) 801ca84: 681b ldr r3, [r3, #0] 801ca86: 607b str r3, [r7, #4] while (pcb != NULL) { 801ca88: e048 b.n 801cb1c if (pcb->last_timer != tcp_timer_ctr) { 801ca8a: 687b ldr r3, [r7, #4] 801ca8c: 7f9a ldrb r2, [r3, #30] 801ca8e: 4b27 ldr r3, [pc, #156] @ (801cb2c ) 801ca90: 781b ldrb r3, [r3, #0] 801ca92: 429a cmp r2, r3 801ca94: d03f beq.n 801cb16 struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 801ca96: 4b25 ldr r3, [pc, #148] @ (801cb2c ) 801ca98: 781a ldrb r2, [r3, #0] 801ca9a: 687b ldr r3, [r7, #4] 801ca9c: 779a strb r2, [r3, #30] /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 801ca9e: 687b ldr r3, [r7, #4] 801caa0: 8b5b ldrh r3, [r3, #26] 801caa2: f003 0301 and.w r3, r3, #1 801caa6: 2b00 cmp r3, #0 801caa8: d010 beq.n 801cacc LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 801caaa: 687b ldr r3, [r7, #4] 801caac: 8b5b ldrh r3, [r3, #26] 801caae: f043 0302 orr.w r3, r3, #2 801cab2: b29a uxth r2, r3 801cab4: 687b ldr r3, [r7, #4] 801cab6: 835a strh r2, [r3, #26] tcp_output(pcb); 801cab8: 6878 ldr r0, [r7, #4] 801caba: f004 f863 bl 8020b84 tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 801cabe: 687b ldr r3, [r7, #4] 801cac0: 8b5b ldrh r3, [r3, #26] 801cac2: f023 0303 bic.w r3, r3, #3 801cac6: b29a uxth r2, r3 801cac8: 687b ldr r3, [r7, #4] 801caca: 835a strh r2, [r3, #26] } /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 801cacc: 687b ldr r3, [r7, #4] 801cace: 8b5b ldrh r3, [r3, #26] 801cad0: f003 0308 and.w r3, r3, #8 801cad4: 2b00 cmp r3, #0 801cad6: d009 beq.n 801caec LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 801cad8: 687b ldr r3, [r7, #4] 801cada: 8b5b ldrh r3, [r3, #26] 801cadc: f023 0308 bic.w r3, r3, #8 801cae0: b29a uxth r2, r3 801cae2: 687b ldr r3, [r7, #4] 801cae4: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 801cae6: 6878 ldr r0, [r7, #4] 801cae8: f7ff f8b0 bl 801bc4c } next = pcb->next; 801caec: 687b ldr r3, [r7, #4] 801caee: 68db ldr r3, [r3, #12] 801caf0: 603b str r3, [r7, #0] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 801caf2: 687b ldr r3, [r7, #4] 801caf4: 6f9b ldr r3, [r3, #120] @ 0x78 801caf6: 2b00 cmp r3, #0 801caf8: d00a beq.n 801cb10 tcp_active_pcbs_changed = 0; 801cafa: 4b0e ldr r3, [pc, #56] @ (801cb34 ) 801cafc: 2200 movs r2, #0 801cafe: 701a strb r2, [r3, #0] tcp_process_refused_data(pcb); 801cb00: 6878 ldr r0, [r7, #4] 801cb02: f000 f819 bl 801cb38 if (tcp_active_pcbs_changed) { 801cb06: 4b0b ldr r3, [pc, #44] @ (801cb34 ) 801cb08: 781b ldrb r3, [r3, #0] 801cb0a: 2b00 cmp r3, #0 801cb0c: d000 beq.n 801cb10 /* application callback has changed the pcb list: restart the loop */ goto tcp_fasttmr_start; 801cb0e: e7b8 b.n 801ca82 } } pcb = next; 801cb10: 683b ldr r3, [r7, #0] 801cb12: 607b str r3, [r7, #4] 801cb14: e002 b.n 801cb1c } else { pcb = pcb->next; 801cb16: 687b ldr r3, [r7, #4] 801cb18: 68db ldr r3, [r3, #12] 801cb1a: 607b str r3, [r7, #4] while (pcb != NULL) { 801cb1c: 687b ldr r3, [r7, #4] 801cb1e: 2b00 cmp r3, #0 801cb20: d1b3 bne.n 801ca8a } } } 801cb22: bf00 nop 801cb24: bf00 nop 801cb26: 3708 adds r7, #8 801cb28: 46bd mov sp, r7 801cb2a: bd80 pop {r7, pc} 801cb2c: 2402af8e .word 0x2402af8e 801cb30: 2402af84 .word 0x2402af84 801cb34: 2402af8c .word 0x2402af8c 0801cb38 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 801cb38: b590 push {r4, r7, lr} 801cb3a: b085 sub sp, #20 801cb3c: af00 add r7, sp, #0 801cb3e: 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); 801cb40: 687b ldr r3, [r7, #4] 801cb42: 2b00 cmp r3, #0 801cb44: d109 bne.n 801cb5a 801cb46: 4b38 ldr r3, [pc, #224] @ (801cc28 ) 801cb48: f240 6209 movw r2, #1545 @ 0x609 801cb4c: 4937 ldr r1, [pc, #220] @ (801cc2c ) 801cb4e: 4838 ldr r0, [pc, #224] @ (801cc30 ) 801cb50: f00d fea4 bl 802a89c 801cb54: f06f 030f mvn.w r3, #15 801cb58: e061 b.n 801cc1e #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; 801cb5a: 687b ldr r3, [r7, #4] 801cb5c: 6f9b ldr r3, [r3, #120] @ 0x78 801cb5e: 7b5b ldrb r3, [r3, #13] 801cb60: 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; 801cb62: 687b ldr r3, [r7, #4] 801cb64: 6f9b ldr r3, [r3, #120] @ 0x78 801cb66: 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; 801cb68: 687b ldr r3, [r7, #4] 801cb6a: 2200 movs r2, #0 801cb6c: 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); 801cb6e: 687b ldr r3, [r7, #4] 801cb70: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801cb74: 2b00 cmp r3, #0 801cb76: d00b beq.n 801cb90 801cb78: 687b ldr r3, [r7, #4] 801cb7a: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801cb7e: 687b ldr r3, [r7, #4] 801cb80: 6918 ldr r0, [r3, #16] 801cb82: 2300 movs r3, #0 801cb84: 68ba ldr r2, [r7, #8] 801cb86: 6879 ldr r1, [r7, #4] 801cb88: 47a0 blx r4 801cb8a: 4603 mov r3, r0 801cb8c: 73fb strb r3, [r7, #15] 801cb8e: e007 b.n 801cba0 801cb90: 2300 movs r3, #0 801cb92: 68ba ldr r2, [r7, #8] 801cb94: 6879 ldr r1, [r7, #4] 801cb96: 2000 movs r0, #0 801cb98: f000 f8a6 bl 801cce8 801cb9c: 4603 mov r3, r0 801cb9e: 73fb strb r3, [r7, #15] if (err == ERR_OK) { 801cba0: f997 300f ldrsb.w r3, [r7, #15] 801cba4: 2b00 cmp r3, #0 801cba6: d12b bne.n 801cc00 /* did refused_data include a FIN? */ if ((refused_flags & PBUF_FLAG_TCP_FIN) 801cba8: 7bbb ldrb r3, [r7, #14] 801cbaa: f003 0320 and.w r3, r3, #32 801cbae: 2b00 cmp r3, #0 801cbb0: d034 beq.n 801cc1c && (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)) { 801cbb2: 687b ldr r3, [r7, #4] 801cbb4: 8d1b ldrh r3, [r3, #40] @ 0x28 801cbb6: f241 62d0 movw r2, #5840 @ 0x16d0 801cbba: 4293 cmp r3, r2 801cbbc: d005 beq.n 801cbca pcb->rcv_wnd++; 801cbbe: 687b ldr r3, [r7, #4] 801cbc0: 8d1b ldrh r3, [r3, #40] @ 0x28 801cbc2: 3301 adds r3, #1 801cbc4: b29a uxth r2, r3 801cbc6: 687b ldr r3, [r7, #4] 801cbc8: 851a strh r2, [r3, #40] @ 0x28 } TCP_EVENT_CLOSED(pcb, err); 801cbca: 687b ldr r3, [r7, #4] 801cbcc: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801cbd0: 2b00 cmp r3, #0 801cbd2: d00b beq.n 801cbec 801cbd4: 687b ldr r3, [r7, #4] 801cbd6: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801cbda: 687b ldr r3, [r7, #4] 801cbdc: 6918 ldr r0, [r3, #16] 801cbde: 2300 movs r3, #0 801cbe0: 2200 movs r2, #0 801cbe2: 6879 ldr r1, [r7, #4] 801cbe4: 47a0 blx r4 801cbe6: 4603 mov r3, r0 801cbe8: 73fb strb r3, [r7, #15] 801cbea: e001 b.n 801cbf0 801cbec: 2300 movs r3, #0 801cbee: 73fb strb r3, [r7, #15] if (err == ERR_ABRT) { 801cbf0: f997 300f ldrsb.w r3, [r7, #15] 801cbf4: f113 0f0d cmn.w r3, #13 801cbf8: d110 bne.n 801cc1c return ERR_ABRT; 801cbfa: f06f 030c mvn.w r3, #12 801cbfe: e00e b.n 801cc1e } } } else if (err == ERR_ABRT) { 801cc00: f997 300f ldrsb.w r3, [r7, #15] 801cc04: f113 0f0d cmn.w r3, #13 801cc08: d102 bne.n 801cc10 /* 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; 801cc0a: f06f 030c mvn.w r3, #12 801cc0e: e006 b.n 801cc1e #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; 801cc10: 687b ldr r3, [r7, #4] 801cc12: 68ba ldr r2, [r7, #8] 801cc14: 679a str r2, [r3, #120] @ 0x78 return ERR_INPROGRESS; 801cc16: f06f 0304 mvn.w r3, #4 801cc1a: e000 b.n 801cc1e } } return ERR_OK; 801cc1c: 2300 movs r3, #0 } 801cc1e: 4618 mov r0, r3 801cc20: 3714 adds r7, #20 801cc22: 46bd mov sp, r7 801cc24: bd90 pop {r4, r7, pc} 801cc26: bf00 nop 801cc28: 0802f5d8 .word 0x0802f5d8 801cc2c: 0802fae8 .word 0x0802fae8 801cc30: 0802f61c .word 0x0802f61c 0801cc34 : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 801cc34: b580 push {r7, lr} 801cc36: b084 sub sp, #16 801cc38: af00 add r7, sp, #0 801cc3a: 6078 str r0, [r7, #4] while (seg != NULL) { 801cc3c: e007 b.n 801cc4e struct tcp_seg *next = seg->next; 801cc3e: 687b ldr r3, [r7, #4] 801cc40: 681b ldr r3, [r3, #0] 801cc42: 60fb str r3, [r7, #12] tcp_seg_free(seg); 801cc44: 6878 ldr r0, [r7, #4] 801cc46: f000 f80a bl 801cc5e seg = next; 801cc4a: 68fb ldr r3, [r7, #12] 801cc4c: 607b str r3, [r7, #4] while (seg != NULL) { 801cc4e: 687b ldr r3, [r7, #4] 801cc50: 2b00 cmp r3, #0 801cc52: d1f4 bne.n 801cc3e } } 801cc54: bf00 nop 801cc56: bf00 nop 801cc58: 3710 adds r7, #16 801cc5a: 46bd mov sp, r7 801cc5c: bd80 pop {r7, pc} 0801cc5e : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 801cc5e: b580 push {r7, lr} 801cc60: b082 sub sp, #8 801cc62: af00 add r7, sp, #0 801cc64: 6078 str r0, [r7, #4] if (seg != NULL) { 801cc66: 687b ldr r3, [r7, #4] 801cc68: 2b00 cmp r3, #0 801cc6a: d00c beq.n 801cc86 if (seg->p != NULL) { 801cc6c: 687b ldr r3, [r7, #4] 801cc6e: 685b ldr r3, [r3, #4] 801cc70: 2b00 cmp r3, #0 801cc72: d004 beq.n 801cc7e pbuf_free(seg->p); 801cc74: 687b ldr r3, [r7, #4] 801cc76: 685b ldr r3, [r3, #4] 801cc78: 4618 mov r0, r3 801cc7a: f7fe fb97 bl 801b3ac #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 801cc7e: 6879 ldr r1, [r7, #4] 801cc80: 2003 movs r0, #3 801cc82: f7fd fca5 bl 801a5d0 } } 801cc86: bf00 nop 801cc88: 3708 adds r7, #8 801cc8a: 46bd mov sp, r7 801cc8c: bd80 pop {r7, pc} ... 0801cc90 : * @param seg the old tcp_seg * @return a copy of seg */ struct tcp_seg * tcp_seg_copy(struct tcp_seg *seg) { 801cc90: b580 push {r7, lr} 801cc92: b084 sub sp, #16 801cc94: af00 add r7, sp, #0 801cc96: 6078 str r0, [r7, #4] struct tcp_seg *cseg; LWIP_ASSERT("tcp_seg_copy: invalid seg", seg != NULL); 801cc98: 687b ldr r3, [r7, #4] 801cc9a: 2b00 cmp r3, #0 801cc9c: d106 bne.n 801ccac 801cc9e: 4b0f ldr r3, [pc, #60] @ (801ccdc ) 801cca0: f240 6282 movw r2, #1666 @ 0x682 801cca4: 490e ldr r1, [pc, #56] @ (801cce0 ) 801cca6: 480f ldr r0, [pc, #60] @ (801cce4 ) 801cca8: f00d fdf8 bl 802a89c cseg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG); 801ccac: 2003 movs r0, #3 801ccae: f7fd fc19 bl 801a4e4 801ccb2: 60f8 str r0, [r7, #12] if (cseg == NULL) { 801ccb4: 68fb ldr r3, [r7, #12] 801ccb6: 2b00 cmp r3, #0 801ccb8: d101 bne.n 801ccbe return NULL; 801ccba: 2300 movs r3, #0 801ccbc: e00a b.n 801ccd4 } SMEMCPY((u8_t *)cseg, (const u8_t *)seg, sizeof(struct tcp_seg)); 801ccbe: 2214 movs r2, #20 801ccc0: 6879 ldr r1, [r7, #4] 801ccc2: 68f8 ldr r0, [r7, #12] 801ccc4: f00e f873 bl 802adae pbuf_ref(cseg->p); 801ccc8: 68fb ldr r3, [r7, #12] 801ccca: 685b ldr r3, [r3, #4] 801cccc: 4618 mov r0, r3 801ccce: f7fe fc13 bl 801b4f8 return cseg; 801ccd2: 68fb ldr r3, [r7, #12] } 801ccd4: 4618 mov r0, r3 801ccd6: 3710 adds r7, #16 801ccd8: 46bd mov sp, r7 801ccda: bd80 pop {r7, pc} 801ccdc: 0802f5d8 .word 0x0802f5d8 801cce0: 0802fb2c .word 0x0802fb2c 801cce4: 0802f61c .word 0x0802f61c 0801cce8 : * 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) { 801cce8: b580 push {r7, lr} 801ccea: b084 sub sp, #16 801ccec: af00 add r7, sp, #0 801ccee: 60f8 str r0, [r7, #12] 801ccf0: 60b9 str r1, [r7, #8] 801ccf2: 607a str r2, [r7, #4] 801ccf4: 70fb strb r3, [r7, #3] LWIP_UNUSED_ARG(arg); LWIP_ERROR("tcp_recv_null: invalid pcb", pcb != NULL, return ERR_ARG); 801ccf6: 68bb ldr r3, [r7, #8] 801ccf8: 2b00 cmp r3, #0 801ccfa: d109 bne.n 801cd10 801ccfc: 4b12 ldr r3, [pc, #72] @ (801cd48 ) 801ccfe: f44f 62d3 mov.w r2, #1688 @ 0x698 801cd02: 4912 ldr r1, [pc, #72] @ (801cd4c ) 801cd04: 4812 ldr r0, [pc, #72] @ (801cd50 ) 801cd06: f00d fdc9 bl 802a89c 801cd0a: f06f 030f mvn.w r3, #15 801cd0e: e016 b.n 801cd3e if (p != NULL) { 801cd10: 687b ldr r3, [r7, #4] 801cd12: 2b00 cmp r3, #0 801cd14: d009 beq.n 801cd2a tcp_recved(pcb, p->tot_len); 801cd16: 687b ldr r3, [r7, #4] 801cd18: 891b ldrh r3, [r3, #8] 801cd1a: 4619 mov r1, r3 801cd1c: 68b8 ldr r0, [r7, #8] 801cd1e: f7ff f9b1 bl 801c084 pbuf_free(p); 801cd22: 6878 ldr r0, [r7, #4] 801cd24: f7fe fb42 bl 801b3ac 801cd28: e008 b.n 801cd3c } else if (err == ERR_OK) { 801cd2a: f997 3003 ldrsb.w r3, [r7, #3] 801cd2e: 2b00 cmp r3, #0 801cd30: d104 bne.n 801cd3c return tcp_close(pcb); 801cd32: 68b8 ldr r0, [r7, #8] 801cd34: f7fe fff4 bl 801bd20 801cd38: 4603 mov r3, r0 801cd3a: e000 b.n 801cd3e } return ERR_OK; 801cd3c: 2300 movs r3, #0 } 801cd3e: 4618 mov r0, r3 801cd40: 3710 adds r7, #16 801cd42: 46bd mov sp, r7 801cd44: bd80 pop {r7, pc} 801cd46: bf00 nop 801cd48: 0802f5d8 .word 0x0802f5d8 801cd4c: 0802fb48 .word 0x0802fb48 801cd50: 0802f61c .word 0x0802f61c 0801cd54 : * * @param prio minimum priority */ static void tcp_kill_prio(u8_t prio) { 801cd54: b580 push {r7, lr} 801cd56: b086 sub sp, #24 801cd58: af00 add r7, sp, #0 801cd5a: 4603 mov r3, r0 801cd5c: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = LWIP_MIN(TCP_PRIO_MAX, prio); 801cd5e: f997 3007 ldrsb.w r3, [r7, #7] 801cd62: 2b00 cmp r3, #0 801cd64: db01 blt.n 801cd6a 801cd66: 79fb ldrb r3, [r7, #7] 801cd68: e000 b.n 801cd6c 801cd6a: 237f movs r3, #127 @ 0x7f 801cd6c: 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) { 801cd6e: 7afb ldrb r3, [r7, #11] 801cd70: 2b00 cmp r3, #0 801cd72: d034 beq.n 801cdde /* 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--; 801cd74: 7afb ldrb r3, [r7, #11] 801cd76: 3b01 subs r3, #1 801cd78: 72fb strb r3, [r7, #11] inactivity = 0; 801cd7a: 2300 movs r3, #0 801cd7c: 60fb str r3, [r7, #12] inactive = NULL; 801cd7e: 2300 movs r3, #0 801cd80: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801cd82: 4b19 ldr r3, [pc, #100] @ (801cde8 ) 801cd84: 681b ldr r3, [r3, #0] 801cd86: 617b str r3, [r7, #20] 801cd88: e01f b.n 801cdca /* lower prio is always a kill candidate */ if ((pcb->prio < mprio) || 801cd8a: 697b ldr r3, [r7, #20] 801cd8c: 7d5b ldrb r3, [r3, #21] 801cd8e: 7afa ldrb r2, [r7, #11] 801cd90: 429a cmp r2, r3 801cd92: d80c bhi.n 801cdae /* longer inactivity is also a kill candidate */ ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 801cd94: 697b ldr r3, [r7, #20] 801cd96: 7d5b ldrb r3, [r3, #21] if ((pcb->prio < mprio) || 801cd98: 7afa ldrb r2, [r7, #11] 801cd9a: 429a cmp r2, r3 801cd9c: d112 bne.n 801cdc4 ((pcb->prio == mprio) && ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity))) { 801cd9e: 4b13 ldr r3, [pc, #76] @ (801cdec ) 801cda0: 681a ldr r2, [r3, #0] 801cda2: 697b ldr r3, [r7, #20] 801cda4: 6a1b ldr r3, [r3, #32] 801cda6: 1ad3 subs r3, r2, r3 801cda8: 68fa ldr r2, [r7, #12] 801cdaa: 429a cmp r2, r3 801cdac: d80a bhi.n 801cdc4 inactivity = tcp_ticks - pcb->tmr; 801cdae: 4b0f ldr r3, [pc, #60] @ (801cdec ) 801cdb0: 681a ldr r2, [r3, #0] 801cdb2: 697b ldr r3, [r7, #20] 801cdb4: 6a1b ldr r3, [r3, #32] 801cdb6: 1ad3 subs r3, r2, r3 801cdb8: 60fb str r3, [r7, #12] inactive = pcb; 801cdba: 697b ldr r3, [r7, #20] 801cdbc: 613b str r3, [r7, #16] mprio = pcb->prio; 801cdbe: 697b ldr r3, [r7, #20] 801cdc0: 7d5b ldrb r3, [r3, #21] 801cdc2: 72fb strb r3, [r7, #11] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801cdc4: 697b ldr r3, [r7, #20] 801cdc6: 68db ldr r3, [r3, #12] 801cdc8: 617b str r3, [r7, #20] 801cdca: 697b ldr r3, [r7, #20] 801cdcc: 2b00 cmp r3, #0 801cdce: d1dc bne.n 801cd8a } } if (inactive != NULL) { 801cdd0: 693b ldr r3, [r7, #16] 801cdd2: 2b00 cmp r3, #0 801cdd4: d004 beq.n 801cde0 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 801cdd6: 6938 ldr r0, [r7, #16] 801cdd8: f7ff f8ee bl 801bfb8 801cddc: e000 b.n 801cde0 return; 801cdde: bf00 nop } } 801cde0: 3718 adds r7, #24 801cde2: 46bd mov sp, r7 801cde4: bd80 pop {r7, pc} 801cde6: bf00 nop 801cde8: 2402af84 .word 0x2402af84 801cdec: 2402af78 .word 0x2402af78 0801cdf0 : * 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) { 801cdf0: b580 push {r7, lr} 801cdf2: b086 sub sp, #24 801cdf4: af00 add r7, sp, #0 801cdf6: 4603 mov r3, r0 801cdf8: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb, *inactive; u32_t inactivity; LWIP_ASSERT("invalid state", (state == CLOSING) || (state == LAST_ACK)); 801cdfa: 79fb ldrb r3, [r7, #7] 801cdfc: 2b08 cmp r3, #8 801cdfe: d009 beq.n 801ce14 801ce00: 79fb ldrb r3, [r7, #7] 801ce02: 2b09 cmp r3, #9 801ce04: d006 beq.n 801ce14 801ce06: 4b1a ldr r3, [pc, #104] @ (801ce70 ) 801ce08: f240 62dd movw r2, #1757 @ 0x6dd 801ce0c: 4919 ldr r1, [pc, #100] @ (801ce74 ) 801ce0e: 481a ldr r0, [pc, #104] @ (801ce78 ) 801ce10: f00d fd44 bl 802a89c inactivity = 0; 801ce14: 2300 movs r3, #0 801ce16: 60fb str r3, [r7, #12] inactive = NULL; 801ce18: 2300 movs r3, #0 801ce1a: 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) { 801ce1c: 4b17 ldr r3, [pc, #92] @ (801ce7c ) 801ce1e: 681b ldr r3, [r3, #0] 801ce20: 617b str r3, [r7, #20] 801ce22: e017 b.n 801ce54 if (pcb->state == state) { 801ce24: 697b ldr r3, [r7, #20] 801ce26: 7d1b ldrb r3, [r3, #20] 801ce28: 79fa ldrb r2, [r7, #7] 801ce2a: 429a cmp r2, r3 801ce2c: d10f bne.n 801ce4e if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 801ce2e: 4b14 ldr r3, [pc, #80] @ (801ce80 ) 801ce30: 681a ldr r2, [r3, #0] 801ce32: 697b ldr r3, [r7, #20] 801ce34: 6a1b ldr r3, [r3, #32] 801ce36: 1ad3 subs r3, r2, r3 801ce38: 68fa ldr r2, [r7, #12] 801ce3a: 429a cmp r2, r3 801ce3c: d807 bhi.n 801ce4e inactivity = tcp_ticks - pcb->tmr; 801ce3e: 4b10 ldr r3, [pc, #64] @ (801ce80 ) 801ce40: 681a ldr r2, [r3, #0] 801ce42: 697b ldr r3, [r7, #20] 801ce44: 6a1b ldr r3, [r3, #32] 801ce46: 1ad3 subs r3, r2, r3 801ce48: 60fb str r3, [r7, #12] inactive = pcb; 801ce4a: 697b ldr r3, [r7, #20] 801ce4c: 613b str r3, [r7, #16] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801ce4e: 697b ldr r3, [r7, #20] 801ce50: 68db ldr r3, [r3, #12] 801ce52: 617b str r3, [r7, #20] 801ce54: 697b ldr r3, [r7, #20] 801ce56: 2b00 cmp r3, #0 801ce58: d1e4 bne.n 801ce24 } } } if (inactive != NULL) { 801ce5a: 693b ldr r3, [r7, #16] 801ce5c: 2b00 cmp r3, #0 801ce5e: d003 beq.n 801ce68 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); 801ce60: 2100 movs r1, #0 801ce62: 6938 ldr r0, [r7, #16] 801ce64: f7fe ffe8 bl 801be38 } } 801ce68: bf00 nop 801ce6a: 3718 adds r7, #24 801ce6c: 46bd mov sp, r7 801ce6e: bd80 pop {r7, pc} 801ce70: 0802f5d8 .word 0x0802f5d8 801ce74: 0802fb64 .word 0x0802fb64 801ce78: 0802f61c .word 0x0802f61c 801ce7c: 2402af84 .word 0x2402af84 801ce80: 2402af78 .word 0x2402af78 0801ce84 : * 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) { 801ce84: b580 push {r7, lr} 801ce86: b084 sub sp, #16 801ce88: af00 add r7, sp, #0 struct tcp_pcb *pcb, *inactive; u32_t inactivity; inactivity = 0; 801ce8a: 2300 movs r3, #0 801ce8c: 607b str r3, [r7, #4] inactive = NULL; 801ce8e: 2300 movs r3, #0 801ce90: 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) { 801ce92: 4b12 ldr r3, [pc, #72] @ (801cedc ) 801ce94: 681b ldr r3, [r3, #0] 801ce96: 60fb str r3, [r7, #12] 801ce98: e012 b.n 801cec0 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 801ce9a: 4b11 ldr r3, [pc, #68] @ (801cee0 ) 801ce9c: 681a ldr r2, [r3, #0] 801ce9e: 68fb ldr r3, [r7, #12] 801cea0: 6a1b ldr r3, [r3, #32] 801cea2: 1ad3 subs r3, r2, r3 801cea4: 687a ldr r2, [r7, #4] 801cea6: 429a cmp r2, r3 801cea8: d807 bhi.n 801ceba inactivity = tcp_ticks - pcb->tmr; 801ceaa: 4b0d ldr r3, [pc, #52] @ (801cee0 ) 801ceac: 681a ldr r2, [r3, #0] 801ceae: 68fb ldr r3, [r7, #12] 801ceb0: 6a1b ldr r3, [r3, #32] 801ceb2: 1ad3 subs r3, r2, r3 801ceb4: 607b str r3, [r7, #4] inactive = pcb; 801ceb6: 68fb ldr r3, [r7, #12] 801ceb8: 60bb str r3, [r7, #8] for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 801ceba: 68fb ldr r3, [r7, #12] 801cebc: 68db ldr r3, [r3, #12] 801cebe: 60fb str r3, [r7, #12] 801cec0: 68fb ldr r3, [r7, #12] 801cec2: 2b00 cmp r3, #0 801cec4: d1e9 bne.n 801ce9a } } if (inactive != NULL) { 801cec6: 68bb ldr r3, [r7, #8] 801cec8: 2b00 cmp r3, #0 801ceca: d002 beq.n 801ced2 LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 801cecc: 68b8 ldr r0, [r7, #8] 801cece: f7ff f873 bl 801bfb8 } } 801ced2: bf00 nop 801ced4: 3710 adds r7, #16 801ced6: 46bd mov sp, r7 801ced8: bd80 pop {r7, pc} 801ceda: bf00 nop 801cedc: 2402af88 .word 0x2402af88 801cee0: 2402af78 .word 0x2402af78 0801cee4 : * 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) { 801cee4: b580 push {r7, lr} 801cee6: b082 sub sp, #8 801cee8: af00 add r7, sp, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 801ceea: 4b10 ldr r3, [pc, #64] @ (801cf2c ) 801ceec: 681b ldr r3, [r3, #0] 801ceee: 607b str r3, [r7, #4] while (pcb != NULL) { 801cef0: e014 b.n 801cf1c struct tcp_pcb *next = pcb->next; 801cef2: 687b ldr r3, [r7, #4] 801cef4: 68db ldr r3, [r3, #12] 801cef6: 603b str r3, [r7, #0] /* send pending FIN */ if (pcb->flags & TF_CLOSEPEND) { 801cef8: 687b ldr r3, [r7, #4] 801cefa: 8b5b ldrh r3, [r3, #26] 801cefc: f003 0308 and.w r3, r3, #8 801cf00: 2b00 cmp r3, #0 801cf02: d009 beq.n 801cf18 LWIP_DEBUGF(TCP_DEBUG, ("tcp_handle_closepend: pending FIN\n")); tcp_clear_flags(pcb, TF_CLOSEPEND); 801cf04: 687b ldr r3, [r7, #4] 801cf06: 8b5b ldrh r3, [r3, #26] 801cf08: f023 0308 bic.w r3, r3, #8 801cf0c: b29a uxth r2, r3 801cf0e: 687b ldr r3, [r7, #4] 801cf10: 835a strh r2, [r3, #26] tcp_close_shutdown_fin(pcb); 801cf12: 6878 ldr r0, [r7, #4] 801cf14: f7fe fe9a bl 801bc4c } pcb = next; 801cf18: 683b ldr r3, [r7, #0] 801cf1a: 607b str r3, [r7, #4] while (pcb != NULL) { 801cf1c: 687b ldr r3, [r7, #4] 801cf1e: 2b00 cmp r3, #0 801cf20: d1e7 bne.n 801cef2 } } 801cf22: bf00 nop 801cf24: bf00 nop 801cf26: 3708 adds r7, #8 801cf28: 46bd mov sp, r7 801cf2a: bd80 pop {r7, pc} 801cf2c: 2402af84 .word 0x2402af84 0801cf30 : * @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) { 801cf30: b580 push {r7, lr} 801cf32: b084 sub sp, #16 801cf34: af00 add r7, sp, #0 801cf36: 4603 mov r3, r0 801cf38: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 801cf3a: f7f4 f885 bl 8011048 pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf3e: 2001 movs r0, #1 801cf40: f7fd fad0 bl 801a4e4 801cf44: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf46: 68fb ldr r3, [r7, #12] 801cf48: 2b00 cmp r3, #0 801cf4a: d126 bne.n 801cf9a /* Try to send FIN for all pcbs stuck in TF_CLOSEPEND first */ tcp_handle_closepend(); 801cf4c: f7ff ffca bl 801cee4 /* Try killing oldest connection in TIME-WAIT. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); tcp_kill_timewait(); 801cf50: f7ff ff98 bl 801ce84 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf54: 2001 movs r0, #1 801cf56: f7fd fac5 bl 801a4e4 801cf5a: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf5c: 68fb ldr r3, [r7, #12] 801cf5e: 2b00 cmp r3, #0 801cf60: d11b bne.n 801cf9a /* 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); 801cf62: 2009 movs r0, #9 801cf64: f7ff ff44 bl 801cdf0 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf68: 2001 movs r0, #1 801cf6a: f7fd fabb bl 801a4e4 801cf6e: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf70: 68fb ldr r3, [r7, #12] 801cf72: 2b00 cmp r3, #0 801cf74: d111 bne.n 801cf9a /* Try killing oldest connection in CLOSING. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest CLOSING connection\n")); tcp_kill_state(CLOSING); 801cf76: 2008 movs r0, #8 801cf78: f7ff ff3a bl 801cdf0 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf7c: 2001 movs r0, #1 801cf7e: f7fd fab1 bl 801a4e4 801cf82: 60f8 str r0, [r7, #12] if (pcb == NULL) { 801cf84: 68fb ldr r3, [r7, #12] 801cf86: 2b00 cmp r3, #0 801cf88: d107 bne.n 801cf9a /* 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); 801cf8a: 79fb ldrb r3, [r7, #7] 801cf8c: 4618 mov r0, r3 801cf8e: f7ff fee1 bl 801cd54 /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 801cf92: 2001 movs r0, #1 801cf94: f7fd faa6 bl 801a4e4 801cf98: 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) { 801cf9a: 68fb ldr r3, [r7, #12] 801cf9c: 2b00 cmp r3, #0 801cf9e: d03f beq.n 801d020 /* zero out the whole pcb, so there is no need to initialize members to zero */ memset(pcb, 0, sizeof(struct tcp_pcb)); 801cfa0: 229c movs r2, #156 @ 0x9c 801cfa2: 2100 movs r1, #0 801cfa4: 68f8 ldr r0, [r7, #12] 801cfa6: f00d fe0b bl 802abc0 pcb->prio = prio; 801cfaa: 68fb ldr r3, [r7, #12] 801cfac: 79fa ldrb r2, [r7, #7] 801cfae: 755a strb r2, [r3, #21] pcb->snd_buf = TCP_SND_BUF; 801cfb0: 68fb ldr r3, [r7, #12] 801cfb2: f241 62d0 movw r2, #5840 @ 0x16d0 801cfb6: 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); 801cfba: 68fb ldr r3, [r7, #12] 801cfbc: f241 62d0 movw r2, #5840 @ 0x16d0 801cfc0: 855a strh r2, [r3, #42] @ 0x2a 801cfc2: 68fb ldr r3, [r7, #12] 801cfc4: 8d5a ldrh r2, [r3, #42] @ 0x2a 801cfc6: 68fb ldr r3, [r7, #12] 801cfc8: 851a strh r2, [r3, #40] @ 0x28 pcb->ttl = TCP_TTL; 801cfca: 68fb ldr r3, [r7, #12] 801cfcc: 22ff movs r2, #255 @ 0xff 801cfce: 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; 801cfd0: 68fb ldr r3, [r7, #12] 801cfd2: f44f 7206 mov.w r2, #536 @ 0x218 801cfd6: 865a strh r2, [r3, #50] @ 0x32 pcb->rto = 3000 / TCP_SLOW_INTERVAL; 801cfd8: 68fb ldr r3, [r7, #12] 801cfda: 2206 movs r2, #6 801cfdc: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 pcb->sv = 3000 / TCP_SLOW_INTERVAL; 801cfe0: 68fb ldr r3, [r7, #12] 801cfe2: 2206 movs r2, #6 801cfe4: 87da strh r2, [r3, #62] @ 0x3e pcb->rtime = -1; 801cfe6: 68fb ldr r3, [r7, #12] 801cfe8: f64f 72ff movw r2, #65535 @ 0xffff 801cfec: 861a strh r2, [r3, #48] @ 0x30 pcb->cwnd = 1; 801cfee: 68fb ldr r3, [r7, #12] 801cff0: 2201 movs r2, #1 801cff2: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->tmr = tcp_ticks; 801cff6: 4b0d ldr r3, [pc, #52] @ (801d02c ) 801cff8: 681a ldr r2, [r3, #0] 801cffa: 68fb ldr r3, [r7, #12] 801cffc: 621a str r2, [r3, #32] pcb->last_timer = tcp_timer_ctr; 801cffe: 4b0c ldr r3, [pc, #48] @ (801d030 ) 801d000: 781a ldrb r2, [r3, #0] 801d002: 68fb ldr r3, [r7, #12] 801d004: 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; 801d006: 68fb ldr r3, [r7, #12] 801d008: f241 62d0 movw r2, #5840 @ 0x16d0 801d00c: f8a3 204a strh.w r2, [r3, #74] @ 0x4a #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 801d010: 68fb ldr r3, [r7, #12] 801d012: 4a08 ldr r2, [pc, #32] @ (801d034 ) 801d014: f8c3 2084 str.w r2, [r3, #132] @ 0x84 #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 801d018: 68fb ldr r3, [r7, #12] 801d01a: 4a07 ldr r2, [pc, #28] @ (801d038 ) 801d01c: 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; 801d020: 68fb ldr r3, [r7, #12] } 801d022: 4618 mov r0, r3 801d024: 3710 adds r7, #16 801d026: 46bd mov sp, r7 801d028: bd80 pop {r7, pc} 801d02a: bf00 nop 801d02c: 2402af78 .word 0x2402af78 801d030: 2402af8e .word 0x2402af8e 801d034: 0801cce9 .word 0x0801cce9 801d038: 006ddd00 .word 0x006ddd00 0801d03c : * 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) { 801d03c: b580 push {r7, lr} 801d03e: b084 sub sp, #16 801d040: af00 add r7, sp, #0 801d042: 4603 mov r3, r0 801d044: 71fb strb r3, [r7, #7] struct tcp_pcb *pcb; pcb = tcp_alloc(TCP_PRIO_NORMAL); 801d046: 2040 movs r0, #64 @ 0x40 801d048: f7ff ff72 bl 801cf30 801d04c: 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; 801d04e: 68fb ldr r3, [r7, #12] } 801d050: 4618 mov r0, r3 801d052: 3710 adds r7, #16 801d054: 46bd mov sp, r7 801d056: bd80 pop {r7, pc} 0801d058 : * @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) { 801d058: b580 push {r7, lr} 801d05a: b082 sub sp, #8 801d05c: af00 add r7, sp, #0 801d05e: 6078 str r0, [r7, #4] 801d060: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d062: f7f3 fff1 bl 8011048 /* This function is allowed to be called for both listen pcbs and connection pcbs. */ if (pcb != NULL) { 801d066: 687b ldr r3, [r7, #4] 801d068: 2b00 cmp r3, #0 801d06a: d002 beq.n 801d072 pcb->callback_arg = arg; 801d06c: 687b ldr r3, [r7, #4] 801d06e: 683a ldr r2, [r7, #0] 801d070: 611a str r2, [r3, #16] } } 801d072: bf00 nop 801d074: 3708 adds r7, #8 801d076: 46bd mov sp, r7 801d078: bd80 pop {r7, pc} ... 0801d07c : * @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) { 801d07c: b580 push {r7, lr} 801d07e: b082 sub sp, #8 801d080: af00 add r7, sp, #0 801d082: 6078 str r0, [r7, #4] 801d084: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d086: f7f3 ffdf bl 8011048 if (pcb != NULL) { 801d08a: 687b ldr r3, [r7, #4] 801d08c: 2b00 cmp r3, #0 801d08e: d00e beq.n 801d0ae LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); 801d090: 687b ldr r3, [r7, #4] 801d092: 7d1b ldrb r3, [r3, #20] 801d094: 2b01 cmp r3, #1 801d096: d106 bne.n 801d0a6 801d098: 4b07 ldr r3, [pc, #28] @ (801d0b8 ) 801d09a: f240 72df movw r2, #2015 @ 0x7df 801d09e: 4907 ldr r1, [pc, #28] @ (801d0bc ) 801d0a0: 4807 ldr r0, [pc, #28] @ (801d0c0 ) 801d0a2: f00d fbfb bl 802a89c pcb->recv = recv; 801d0a6: 687b ldr r3, [r7, #4] 801d0a8: 683a ldr r2, [r7, #0] 801d0aa: f8c3 2084 str.w r2, [r3, #132] @ 0x84 } } 801d0ae: bf00 nop 801d0b0: 3708 adds r7, #8 801d0b2: 46bd mov sp, r7 801d0b4: bd80 pop {r7, pc} 801d0b6: bf00 nop 801d0b8: 0802f5d8 .word 0x0802f5d8 801d0bc: 0802fb74 .word 0x0802fb74 801d0c0: 0802f61c .word 0x0802f61c 0801d0c4 : * @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) { 801d0c4: b580 push {r7, lr} 801d0c6: b082 sub sp, #8 801d0c8: af00 add r7, sp, #0 801d0ca: 6078 str r0, [r7, #4] 801d0cc: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d0ce: f7f3 ffbb bl 8011048 if (pcb != NULL) { 801d0d2: 687b ldr r3, [r7, #4] 801d0d4: 2b00 cmp r3, #0 801d0d6: d00e beq.n 801d0f6 LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); 801d0d8: 687b ldr r3, [r7, #4] 801d0da: 7d1b ldrb r3, [r3, #20] 801d0dc: 2b01 cmp r3, #1 801d0de: d106 bne.n 801d0ee 801d0e0: 4b07 ldr r3, [pc, #28] @ (801d100 ) 801d0e2: f240 72f3 movw r2, #2035 @ 0x7f3 801d0e6: 4907 ldr r1, [pc, #28] @ (801d104 ) 801d0e8: 4807 ldr r0, [pc, #28] @ (801d108 ) 801d0ea: f00d fbd7 bl 802a89c pcb->sent = sent; 801d0ee: 687b ldr r3, [r7, #4] 801d0f0: 683a ldr r2, [r7, #0] 801d0f2: f8c3 2080 str.w r2, [r3, #128] @ 0x80 } } 801d0f6: bf00 nop 801d0f8: 3708 adds r7, #8 801d0fa: 46bd mov sp, r7 801d0fc: bd80 pop {r7, pc} 801d0fe: bf00 nop 801d100: 0802f5d8 .word 0x0802f5d8 801d104: 0802fb9c .word 0x0802fb9c 801d108: 0802f61c .word 0x0802f61c 0801d10c : * @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) { 801d10c: b580 push {r7, lr} 801d10e: b082 sub sp, #8 801d110: af00 add r7, sp, #0 801d112: 6078 str r0, [r7, #4] 801d114: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d116: f7f3 ff97 bl 8011048 if (pcb != NULL) { 801d11a: 687b ldr r3, [r7, #4] 801d11c: 2b00 cmp r3, #0 801d11e: d00e beq.n 801d13e LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); 801d120: 687b ldr r3, [r7, #4] 801d122: 7d1b ldrb r3, [r3, #20] 801d124: 2b01 cmp r3, #1 801d126: d106 bne.n 801d136 801d128: 4b07 ldr r3, [pc, #28] @ (801d148 ) 801d12a: f640 020d movw r2, #2061 @ 0x80d 801d12e: 4907 ldr r1, [pc, #28] @ (801d14c ) 801d130: 4807 ldr r0, [pc, #28] @ (801d150 ) 801d132: f00d fbb3 bl 802a89c pcb->errf = err; 801d136: 687b ldr r3, [r7, #4] 801d138: 683a ldr r2, [r7, #0] 801d13a: f8c3 2090 str.w r2, [r3, #144] @ 0x90 } } 801d13e: bf00 nop 801d140: 3708 adds r7, #8 801d142: 46bd mov sp, r7 801d144: bd80 pop {r7, pc} 801d146: bf00 nop 801d148: 0802f5d8 .word 0x0802f5d8 801d14c: 0802fbc4 .word 0x0802fbc4 801d150: 0802f61c .word 0x0802f61c 0801d154 : * @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) { 801d154: b580 push {r7, lr} 801d156: b084 sub sp, #16 801d158: af00 add r7, sp, #0 801d15a: 6078 str r0, [r7, #4] 801d15c: 6039 str r1, [r7, #0] LWIP_ASSERT_CORE_LOCKED(); 801d15e: f7f3 ff73 bl 8011048 if ((pcb != NULL) && (pcb->state == LISTEN)) { 801d162: 687b ldr r3, [r7, #4] 801d164: 2b00 cmp r3, #0 801d166: d008 beq.n 801d17a 801d168: 687b ldr r3, [r7, #4] 801d16a: 7d1b ldrb r3, [r3, #20] 801d16c: 2b01 cmp r3, #1 801d16e: d104 bne.n 801d17a struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen *)pcb; 801d170: 687b ldr r3, [r7, #4] 801d172: 60fb str r3, [r7, #12] lpcb->accept = accept; 801d174: 68fb ldr r3, [r7, #12] 801d176: 683a ldr r2, [r7, #0] 801d178: 619a str r2, [r3, #24] } } 801d17a: bf00 nop 801d17c: 3710 adds r7, #16 801d17e: 46bd mov sp, r7 801d180: bd80 pop {r7, pc} ... 0801d184 : * 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) { 801d184: b580 push {r7, lr} 801d186: b084 sub sp, #16 801d188: af00 add r7, sp, #0 801d18a: 60f8 str r0, [r7, #12] 801d18c: 60b9 str r1, [r7, #8] 801d18e: 4613 mov r3, r2 801d190: 71fb strb r3, [r7, #7] LWIP_ASSERT_CORE_LOCKED(); 801d192: f7f3 ff59 bl 8011048 LWIP_ERROR("tcp_poll: invalid pcb", pcb != NULL, return); 801d196: 68fb ldr r3, [r7, #12] 801d198: 2b00 cmp r3, #0 801d19a: d107 bne.n 801d1ac 801d19c: 4b0e ldr r3, [pc, #56] @ (801d1d8 ) 801d19e: f640 023d movw r2, #2109 @ 0x83d 801d1a2: 490e ldr r1, [pc, #56] @ (801d1dc ) 801d1a4: 480e ldr r0, [pc, #56] @ (801d1e0 ) 801d1a6: f00d fb79 bl 802a89c 801d1aa: e011 b.n 801d1d0 LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); 801d1ac: 68fb ldr r3, [r7, #12] 801d1ae: 7d1b ldrb r3, [r3, #20] 801d1b0: 2b01 cmp r3, #1 801d1b2: d106 bne.n 801d1c2 801d1b4: 4b08 ldr r3, [pc, #32] @ (801d1d8 ) 801d1b6: f640 023e movw r2, #2110 @ 0x83e 801d1ba: 490a ldr r1, [pc, #40] @ (801d1e4 ) 801d1bc: 4808 ldr r0, [pc, #32] @ (801d1e0 ) 801d1be: f00d fb6d bl 802a89c #if LWIP_CALLBACK_API pcb->poll = poll; 801d1c2: 68fb ldr r3, [r7, #12] 801d1c4: 68ba ldr r2, [r7, #8] 801d1c6: f8c3 208c str.w r2, [r3, #140] @ 0x8c #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 801d1ca: 68fb ldr r3, [r7, #12] 801d1cc: 79fa ldrb r2, [r7, #7] 801d1ce: 775a strb r2, [r3, #29] } 801d1d0: 3710 adds r7, #16 801d1d2: 46bd mov sp, r7 801d1d4: bd80 pop {r7, pc} 801d1d6: bf00 nop 801d1d8: 0802f5d8 .word 0x0802f5d8 801d1dc: 0802fbec .word 0x0802fbec 801d1e0: 0802f61c .word 0x0802f61c 801d1e4: 0802fc04 .word 0x0802fc04 0801d1e8 : * * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { 801d1e8: b580 push {r7, lr} 801d1ea: b082 sub sp, #8 801d1ec: af00 add r7, sp, #0 801d1ee: 6078 str r0, [r7, #4] LWIP_ERROR("tcp_pcb_purge: invalid pcb", pcb != NULL, return); 801d1f0: 687b ldr r3, [r7, #4] 801d1f2: 2b00 cmp r3, #0 801d1f4: d107 bne.n 801d206 801d1f6: 4b21 ldr r3, [pc, #132] @ (801d27c ) 801d1f8: f640 0251 movw r2, #2129 @ 0x851 801d1fc: 4920 ldr r1, [pc, #128] @ (801d280 ) 801d1fe: 4821 ldr r0, [pc, #132] @ (801d284 ) 801d200: f00d fb4c bl 802a89c 801d204: e037 b.n 801d276 if (pcb->state != CLOSED && 801d206: 687b ldr r3, [r7, #4] 801d208: 7d1b ldrb r3, [r3, #20] 801d20a: 2b00 cmp r3, #0 801d20c: d033 beq.n 801d276 pcb->state != TIME_WAIT && 801d20e: 687b ldr r3, [r7, #4] 801d210: 7d1b ldrb r3, [r3, #20] if (pcb->state != CLOSED && 801d212: 2b0a cmp r3, #10 801d214: d02f beq.n 801d276 pcb->state != LISTEN) { 801d216: 687b ldr r3, [r7, #4] 801d218: 7d1b ldrb r3, [r3, #20] pcb->state != TIME_WAIT && 801d21a: 2b01 cmp r3, #1 801d21c: d02b beq.n 801d276 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge\n")); tcp_backlog_accepted(pcb); if (pcb->refused_data != NULL) { 801d21e: 687b ldr r3, [r7, #4] 801d220: 6f9b ldr r3, [r3, #120] @ 0x78 801d222: 2b00 cmp r3, #0 801d224: d007 beq.n 801d236 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 801d226: 687b ldr r3, [r7, #4] 801d228: 6f9b ldr r3, [r3, #120] @ 0x78 801d22a: 4618 mov r0, r3 801d22c: f7fe f8be bl 801b3ac pcb->refused_data = NULL; 801d230: 687b ldr r3, [r7, #4] 801d232: 2200 movs r2, #0 801d234: 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) { 801d236: 687b ldr r3, [r7, #4] 801d238: 6f5b ldr r3, [r3, #116] @ 0x74 801d23a: 2b00 cmp r3, #0 801d23c: d002 beq.n 801d244 LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->ooseq\n")); tcp_free_ooseq(pcb); 801d23e: 6878 ldr r0, [r7, #4] 801d240: f000 f986 bl 801d550 } #endif /* TCP_QUEUE_OOSEQ */ /* Stop the retransmission timer as it will expect data on unacked queue if it fires */ pcb->rtime = -1; 801d244: 687b ldr r3, [r7, #4] 801d246: f64f 72ff movw r2, #65535 @ 0xffff 801d24a: 861a strh r2, [r3, #48] @ 0x30 tcp_segs_free(pcb->unsent); 801d24c: 687b ldr r3, [r7, #4] 801d24e: 6edb ldr r3, [r3, #108] @ 0x6c 801d250: 4618 mov r0, r3 801d252: f7ff fcef bl 801cc34 tcp_segs_free(pcb->unacked); 801d256: 687b ldr r3, [r7, #4] 801d258: 6f1b ldr r3, [r3, #112] @ 0x70 801d25a: 4618 mov r0, r3 801d25c: f7ff fcea bl 801cc34 pcb->unacked = pcb->unsent = NULL; 801d260: 687b ldr r3, [r7, #4] 801d262: 2200 movs r2, #0 801d264: 66da str r2, [r3, #108] @ 0x6c 801d266: 687b ldr r3, [r7, #4] 801d268: 6eda ldr r2, [r3, #108] @ 0x6c 801d26a: 687b ldr r3, [r7, #4] 801d26c: 671a str r2, [r3, #112] @ 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 801d26e: 687b ldr r3, [r7, #4] 801d270: 2200 movs r2, #0 801d272: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 #endif /* TCP_OVERSIZE */ } } 801d276: 3708 adds r7, #8 801d278: 46bd mov sp, r7 801d27a: bd80 pop {r7, pc} 801d27c: 0802f5d8 .word 0x0802f5d8 801d280: 0802fc24 .word 0x0802fc24 801d284: 0802f61c .word 0x0802f61c 0801d288 : * @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) { 801d288: b580 push {r7, lr} 801d28a: b084 sub sp, #16 801d28c: af00 add r7, sp, #0 801d28e: 6078 str r0, [r7, #4] 801d290: 6039 str r1, [r7, #0] LWIP_ASSERT("tcp_pcb_remove: invalid pcb", pcb != NULL); 801d292: 683b ldr r3, [r7, #0] 801d294: 2b00 cmp r3, #0 801d296: d106 bne.n 801d2a6 801d298: 4b3e ldr r3, [pc, #248] @ (801d394 ) 801d29a: f640 0283 movw r2, #2179 @ 0x883 801d29e: 493e ldr r1, [pc, #248] @ (801d398 ) 801d2a0: 483e ldr r0, [pc, #248] @ (801d39c ) 801d2a2: f00d fafb bl 802a89c LWIP_ASSERT("tcp_pcb_remove: invalid pcblist", pcblist != NULL); 801d2a6: 687b ldr r3, [r7, #4] 801d2a8: 2b00 cmp r3, #0 801d2aa: d106 bne.n 801d2ba 801d2ac: 4b39 ldr r3, [pc, #228] @ (801d394 ) 801d2ae: f640 0284 movw r2, #2180 @ 0x884 801d2b2: 493b ldr r1, [pc, #236] @ (801d3a0 ) 801d2b4: 4839 ldr r0, [pc, #228] @ (801d39c ) 801d2b6: f00d faf1 bl 802a89c TCP_RMV(pcblist, pcb); 801d2ba: 687b ldr r3, [r7, #4] 801d2bc: 681b ldr r3, [r3, #0] 801d2be: 683a ldr r2, [r7, #0] 801d2c0: 429a cmp r2, r3 801d2c2: d105 bne.n 801d2d0 801d2c4: 687b ldr r3, [r7, #4] 801d2c6: 681b ldr r3, [r3, #0] 801d2c8: 68da ldr r2, [r3, #12] 801d2ca: 687b ldr r3, [r7, #4] 801d2cc: 601a str r2, [r3, #0] 801d2ce: e013 b.n 801d2f8 801d2d0: 687b ldr r3, [r7, #4] 801d2d2: 681b ldr r3, [r3, #0] 801d2d4: 60fb str r3, [r7, #12] 801d2d6: e00c b.n 801d2f2 801d2d8: 68fb ldr r3, [r7, #12] 801d2da: 68db ldr r3, [r3, #12] 801d2dc: 683a ldr r2, [r7, #0] 801d2de: 429a cmp r2, r3 801d2e0: d104 bne.n 801d2ec 801d2e2: 683b ldr r3, [r7, #0] 801d2e4: 68da ldr r2, [r3, #12] 801d2e6: 68fb ldr r3, [r7, #12] 801d2e8: 60da str r2, [r3, #12] 801d2ea: e005 b.n 801d2f8 801d2ec: 68fb ldr r3, [r7, #12] 801d2ee: 68db ldr r3, [r3, #12] 801d2f0: 60fb str r3, [r7, #12] 801d2f2: 68fb ldr r3, [r7, #12] 801d2f4: 2b00 cmp r3, #0 801d2f6: d1ef bne.n 801d2d8 801d2f8: 683b ldr r3, [r7, #0] 801d2fa: 2200 movs r2, #0 801d2fc: 60da str r2, [r3, #12] tcp_pcb_purge(pcb); 801d2fe: 6838 ldr r0, [r7, #0] 801d300: f7ff ff72 bl 801d1e8 /* if there is an outstanding delayed ACKs, send it */ if ((pcb->state != TIME_WAIT) && 801d304: 683b ldr r3, [r7, #0] 801d306: 7d1b ldrb r3, [r3, #20] 801d308: 2b0a cmp r3, #10 801d30a: d013 beq.n 801d334 (pcb->state != LISTEN) && 801d30c: 683b ldr r3, [r7, #0] 801d30e: 7d1b ldrb r3, [r3, #20] if ((pcb->state != TIME_WAIT) && 801d310: 2b01 cmp r3, #1 801d312: d00f beq.n 801d334 (pcb->flags & TF_ACK_DELAY)) { 801d314: 683b ldr r3, [r7, #0] 801d316: 8b5b ldrh r3, [r3, #26] 801d318: f003 0301 and.w r3, r3, #1 (pcb->state != LISTEN) && 801d31c: 2b00 cmp r3, #0 801d31e: d009 beq.n 801d334 tcp_ack_now(pcb); 801d320: 683b ldr r3, [r7, #0] 801d322: 8b5b ldrh r3, [r3, #26] 801d324: f043 0302 orr.w r3, r3, #2 801d328: b29a uxth r2, r3 801d32a: 683b ldr r3, [r7, #0] 801d32c: 835a strh r2, [r3, #26] tcp_output(pcb); 801d32e: 6838 ldr r0, [r7, #0] 801d330: f003 fc28 bl 8020b84 } if (pcb->state != LISTEN) { 801d334: 683b ldr r3, [r7, #0] 801d336: 7d1b ldrb r3, [r3, #20] 801d338: 2b01 cmp r3, #1 801d33a: d020 beq.n 801d37e LWIP_ASSERT("unsent segments leaking", pcb->unsent == NULL); 801d33c: 683b ldr r3, [r7, #0] 801d33e: 6edb ldr r3, [r3, #108] @ 0x6c 801d340: 2b00 cmp r3, #0 801d342: d006 beq.n 801d352 801d344: 4b13 ldr r3, [pc, #76] @ (801d394 ) 801d346: f640 0293 movw r2, #2195 @ 0x893 801d34a: 4916 ldr r1, [pc, #88] @ (801d3a4 ) 801d34c: 4813 ldr r0, [pc, #76] @ (801d39c ) 801d34e: f00d faa5 bl 802a89c LWIP_ASSERT("unacked segments leaking", pcb->unacked == NULL); 801d352: 683b ldr r3, [r7, #0] 801d354: 6f1b ldr r3, [r3, #112] @ 0x70 801d356: 2b00 cmp r3, #0 801d358: d006 beq.n 801d368 801d35a: 4b0e ldr r3, [pc, #56] @ (801d394 ) 801d35c: f640 0294 movw r2, #2196 @ 0x894 801d360: 4911 ldr r1, [pc, #68] @ (801d3a8 ) 801d362: 480e ldr r0, [pc, #56] @ (801d39c ) 801d364: f00d fa9a bl 802a89c #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); 801d368: 683b ldr r3, [r7, #0] 801d36a: 6f5b ldr r3, [r3, #116] @ 0x74 801d36c: 2b00 cmp r3, #0 801d36e: d006 beq.n 801d37e 801d370: 4b08 ldr r3, [pc, #32] @ (801d394 ) 801d372: f640 0296 movw r2, #2198 @ 0x896 801d376: 490d ldr r1, [pc, #52] @ (801d3ac ) 801d378: 4808 ldr r0, [pc, #32] @ (801d39c ) 801d37a: f00d fa8f bl 802a89c #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 801d37e: 683b ldr r3, [r7, #0] 801d380: 2200 movs r2, #0 801d382: 751a strb r2, [r3, #20] /* reset the local port to prevent the pcb from being 'bound' */ pcb->local_port = 0; 801d384: 683b ldr r3, [r7, #0] 801d386: 2200 movs r2, #0 801d388: 82da strh r2, [r3, #22] LWIP_ASSERT("tcp_pcb_remove: tcp_pcbs_sane()", tcp_pcbs_sane()); } 801d38a: bf00 nop 801d38c: 3710 adds r7, #16 801d38e: 46bd mov sp, r7 801d390: bd80 pop {r7, pc} 801d392: bf00 nop 801d394: 0802f5d8 .word 0x0802f5d8 801d398: 0802fc40 .word 0x0802fc40 801d39c: 0802f61c .word 0x0802f61c 801d3a0: 0802fc5c .word 0x0802fc5c 801d3a4: 0802fc7c .word 0x0802fc7c 801d3a8: 0802fc94 .word 0x0802fc94 801d3ac: 0802fcb0 .word 0x0802fcb0 0801d3b0 : * * @return u32_t pseudo random sequence number */ u32_t tcp_next_iss(struct tcp_pcb *pcb) { 801d3b0: b580 push {r7, lr} 801d3b2: b082 sub sp, #8 801d3b4: af00 add r7, sp, #0 801d3b6: 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); 801d3b8: 687b ldr r3, [r7, #4] 801d3ba: 2b00 cmp r3, #0 801d3bc: d106 bne.n 801d3cc 801d3be: 4b0a ldr r3, [pc, #40] @ (801d3e8 ) 801d3c0: f640 02af movw r2, #2223 @ 0x8af 801d3c4: 4909 ldr r1, [pc, #36] @ (801d3ec ) 801d3c6: 480a ldr r0, [pc, #40] @ (801d3f0 ) 801d3c8: f00d fa68 bl 802a89c LWIP_UNUSED_ARG(pcb); iss += tcp_ticks; /* XXX */ 801d3cc: 4b09 ldr r3, [pc, #36] @ (801d3f4 ) 801d3ce: 681a ldr r2, [r3, #0] 801d3d0: 4b09 ldr r3, [pc, #36] @ (801d3f8 ) 801d3d2: 681b ldr r3, [r3, #0] 801d3d4: 4413 add r3, r2 801d3d6: 4a07 ldr r2, [pc, #28] @ (801d3f4 ) 801d3d8: 6013 str r3, [r2, #0] return iss; 801d3da: 4b06 ldr r3, [pc, #24] @ (801d3f4 ) 801d3dc: 681b ldr r3, [r3, #0] #endif /* LWIP_HOOK_TCP_ISN */ } 801d3de: 4618 mov r0, r3 801d3e0: 3708 adds r7, #8 801d3e2: 46bd mov sp, r7 801d3e4: bd80 pop {r7, pc} 801d3e6: bf00 nop 801d3e8: 0802f5d8 .word 0x0802f5d8 801d3ec: 0802fcc8 .word 0x0802fcc8 801d3f0: 0802f61c .word 0x0802f61c 801d3f4: 24000050 .word 0x24000050 801d3f8: 2402af78 .word 0x2402af78 0801d3fc : * 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) { 801d3fc: b580 push {r7, lr} 801d3fe: b086 sub sp, #24 801d400: af00 add r7, sp, #0 801d402: 4603 mov r3, r0 801d404: 60b9 str r1, [r7, #8] 801d406: 607a str r2, [r7, #4] 801d408: 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); 801d40a: 687b ldr r3, [r7, #4] 801d40c: 2b00 cmp r3, #0 801d40e: d106 bne.n 801d41e 801d410: 4b14 ldr r3, [pc, #80] @ (801d464 ) 801d412: f640 02c5 movw r2, #2245 @ 0x8c5 801d416: 4914 ldr r1, [pc, #80] @ (801d468 ) 801d418: 4814 ldr r0, [pc, #80] @ (801d46c ) 801d41a: f00d fa3f bl 802a89c else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { if (outif == NULL) { 801d41e: 68bb ldr r3, [r7, #8] 801d420: 2b00 cmp r3, #0 801d422: d101 bne.n 801d428 return sendmss; 801d424: 89fb ldrh r3, [r7, #14] 801d426: e019 b.n 801d45c } mtu = outif->mtu; 801d428: 68bb ldr r3, [r7, #8] 801d42a: 8d1b ldrh r3, [r3, #40] @ 0x28 801d42c: 82fb strh r3, [r7, #22] } #endif /* LWIP_IPV4 */ if (mtu != 0) { 801d42e: 8afb ldrh r3, [r7, #22] 801d430: 2b00 cmp r3, #0 801d432: d012 beq.n 801d45a else #endif /* LWIP_IPV4 */ #endif /* LWIP_IPV6 */ #if LWIP_IPV4 { offset = IP_HLEN + TCP_HLEN; 801d434: 2328 movs r3, #40 @ 0x28 801d436: 82bb strh r3, [r7, #20] } #endif /* LWIP_IPV4 */ mss_s = (mtu > offset) ? (u16_t)(mtu - offset) : 0; 801d438: 8afa ldrh r2, [r7, #22] 801d43a: 8abb ldrh r3, [r7, #20] 801d43c: 429a cmp r2, r3 801d43e: d904 bls.n 801d44a 801d440: 8afa ldrh r2, [r7, #22] 801d442: 8abb ldrh r3, [r7, #20] 801d444: 1ad3 subs r3, r2, r3 801d446: b29b uxth r3, r3 801d448: e000 b.n 801d44c 801d44a: 2300 movs r3, #0 801d44c: 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); 801d44e: 8a7a ldrh r2, [r7, #18] 801d450: 89fb ldrh r3, [r7, #14] 801d452: 4293 cmp r3, r2 801d454: bf28 it cs 801d456: 4613 movcs r3, r2 801d458: 81fb strh r3, [r7, #14] } return sendmss; 801d45a: 89fb ldrh r3, [r7, #14] } 801d45c: 4618 mov r0, r3 801d45e: 3718 adds r7, #24 801d460: 46bd mov sp, r7 801d462: bd80 pop {r7, pc} 801d464: 0802f5d8 .word 0x0802f5d8 801d468: 0802fce4 .word 0x0802fce4 801d46c: 0802f61c .word 0x0802f61c 0801d470 : #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) { 801d470: b580 push {r7, lr} 801d472: b084 sub sp, #16 801d474: af00 add r7, sp, #0 801d476: 6078 str r0, [r7, #4] 801d478: 6039 str r1, [r7, #0] struct tcp_pcb *pcb; pcb = pcb_list; 801d47a: 683b ldr r3, [r7, #0] 801d47c: 60fb str r3, [r7, #12] LWIP_ASSERT("tcp_netif_ip_addr_changed_pcblist: invalid old_addr", old_addr != NULL); 801d47e: 687b ldr r3, [r7, #4] 801d480: 2b00 cmp r3, #0 801d482: d119 bne.n 801d4b8 801d484: 4b10 ldr r3, [pc, #64] @ (801d4c8 ) 801d486: f44f 6210 mov.w r2, #2304 @ 0x900 801d48a: 4910 ldr r1, [pc, #64] @ (801d4cc ) 801d48c: 4810 ldr r0, [pc, #64] @ (801d4d0 ) 801d48e: f00d fa05 bl 802a89c while (pcb != NULL) { 801d492: e011 b.n 801d4b8 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&pcb->local_ip, old_addr) 801d494: 68fb ldr r3, [r7, #12] 801d496: 681a ldr r2, [r3, #0] 801d498: 687b ldr r3, [r7, #4] 801d49a: 681b ldr r3, [r3, #0] 801d49c: 429a cmp r2, r3 801d49e: d108 bne.n 801d4b2 /* 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; 801d4a0: 68fb ldr r3, [r7, #12] 801d4a2: 68db ldr r3, [r3, #12] 801d4a4: 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); 801d4a6: 68f8 ldr r0, [r7, #12] 801d4a8: f7fe fd86 bl 801bfb8 pcb = next; 801d4ac: 68bb ldr r3, [r7, #8] 801d4ae: 60fb str r3, [r7, #12] 801d4b0: e002 b.n 801d4b8 } else { pcb = pcb->next; 801d4b2: 68fb ldr r3, [r7, #12] 801d4b4: 68db ldr r3, [r3, #12] 801d4b6: 60fb str r3, [r7, #12] while (pcb != NULL) { 801d4b8: 68fb ldr r3, [r7, #12] 801d4ba: 2b00 cmp r3, #0 801d4bc: d1ea bne.n 801d494 } } } 801d4be: bf00 nop 801d4c0: bf00 nop 801d4c2: 3710 adds r7, #16 801d4c4: 46bd mov sp, r7 801d4c6: bd80 pop {r7, pc} 801d4c8: 0802f5d8 .word 0x0802f5d8 801d4cc: 0802fd0c .word 0x0802fd0c 801d4d0: 0802f61c .word 0x0802f61c 0801d4d4 : * @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) { 801d4d4: b580 push {r7, lr} 801d4d6: b084 sub sp, #16 801d4d8: af00 add r7, sp, #0 801d4da: 6078 str r0, [r7, #4] 801d4dc: 6039 str r1, [r7, #0] struct tcp_pcb_listen *lpcb; if (!ip_addr_isany(old_addr)) { 801d4de: 687b ldr r3, [r7, #4] 801d4e0: 2b00 cmp r3, #0 801d4e2: d02a beq.n 801d53a 801d4e4: 687b ldr r3, [r7, #4] 801d4e6: 681b ldr r3, [r3, #0] 801d4e8: 2b00 cmp r3, #0 801d4ea: d026 beq.n 801d53a tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_active_pcbs); 801d4ec: 4b15 ldr r3, [pc, #84] @ (801d544 ) 801d4ee: 681b ldr r3, [r3, #0] 801d4f0: 4619 mov r1, r3 801d4f2: 6878 ldr r0, [r7, #4] 801d4f4: f7ff ffbc bl 801d470 tcp_netif_ip_addr_changed_pcblist(old_addr, tcp_bound_pcbs); 801d4f8: 4b13 ldr r3, [pc, #76] @ (801d548 ) 801d4fa: 681b ldr r3, [r3, #0] 801d4fc: 4619 mov r1, r3 801d4fe: 6878 ldr r0, [r7, #4] 801d500: f7ff ffb6 bl 801d470 if (!ip_addr_isany(new_addr)) { 801d504: 683b ldr r3, [r7, #0] 801d506: 2b00 cmp r3, #0 801d508: d017 beq.n 801d53a 801d50a: 683b ldr r3, [r7, #0] 801d50c: 681b ldr r3, [r3, #0] 801d50e: 2b00 cmp r3, #0 801d510: d013 beq.n 801d53a /* PCB bound to current local interface address? */ for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d512: 4b0e ldr r3, [pc, #56] @ (801d54c ) 801d514: 681b ldr r3, [r3, #0] 801d516: 60fb str r3, [r7, #12] 801d518: e00c b.n 801d534 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&lpcb->local_ip, old_addr)) { 801d51a: 68fb ldr r3, [r7, #12] 801d51c: 681a ldr r2, [r3, #0] 801d51e: 687b ldr r3, [r7, #4] 801d520: 681b ldr r3, [r3, #0] 801d522: 429a cmp r2, r3 801d524: d103 bne.n 801d52e /* 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); 801d526: 683b ldr r3, [r7, #0] 801d528: 681a ldr r2, [r3, #0] 801d52a: 68fb ldr r3, [r7, #12] 801d52c: 601a str r2, [r3, #0] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d52e: 68fb ldr r3, [r7, #12] 801d530: 68db ldr r3, [r3, #12] 801d532: 60fb str r3, [r7, #12] 801d534: 68fb ldr r3, [r7, #12] 801d536: 2b00 cmp r3, #0 801d538: d1ef bne.n 801d51a } } } } } 801d53a: bf00 nop 801d53c: 3710 adds r7, #16 801d53e: 46bd mov sp, r7 801d540: bd80 pop {r7, pc} 801d542: bf00 nop 801d544: 2402af84 .word 0x2402af84 801d548: 2402af7c .word 0x2402af7c 801d54c: 2402af80 .word 0x2402af80 0801d550 : #if TCP_QUEUE_OOSEQ /* Free all ooseq pbufs (and possibly reset SACK state) */ void tcp_free_ooseq(struct tcp_pcb *pcb) { 801d550: b580 push {r7, lr} 801d552: b082 sub sp, #8 801d554: af00 add r7, sp, #0 801d556: 6078 str r0, [r7, #4] if (pcb->ooseq) { 801d558: 687b ldr r3, [r7, #4] 801d55a: 6f5b ldr r3, [r3, #116] @ 0x74 801d55c: 2b00 cmp r3, #0 801d55e: d007 beq.n 801d570 tcp_segs_free(pcb->ooseq); 801d560: 687b ldr r3, [r7, #4] 801d562: 6f5b ldr r3, [r3, #116] @ 0x74 801d564: 4618 mov r0, r3 801d566: f7ff fb65 bl 801cc34 pcb->ooseq = NULL; 801d56a: 687b ldr r3, [r7, #4] 801d56c: 2200 movs r2, #0 801d56e: 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 */ } } 801d570: bf00 nop 801d572: 3708 adds r7, #8 801d574: 46bd mov sp, r7 801d576: bd80 pop {r7, pc} 0801d578 : * @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) { 801d578: b590 push {r4, r7, lr} 801d57a: b08d sub sp, #52 @ 0x34 801d57c: af04 add r7, sp, #16 801d57e: 6078 str r0, [r7, #4] 801d580: 6039 str r1, [r7, #0] #endif /* SO_REUSE */ u8_t hdrlen_bytes; err_t err; LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); 801d582: f7f3 fd61 bl 8011048 LWIP_ASSERT("tcp_input: invalid pbuf", p != NULL); 801d586: 687b ldr r3, [r7, #4] 801d588: 2b00 cmp r3, #0 801d58a: d105 bne.n 801d598 801d58c: 4b9b ldr r3, [pc, #620] @ (801d7fc ) 801d58e: 2283 movs r2, #131 @ 0x83 801d590: 499b ldr r1, [pc, #620] @ (801d800 ) 801d592: 489c ldr r0, [pc, #624] @ (801d804 ) 801d594: f00d f982 bl 802a89c PERF_START; TCP_STATS_INC(tcp.recv); MIB2_STATS_INC(mib2.tcpinsegs); tcphdr = (struct tcp_hdr *)p->payload; 801d598: 687b ldr r3, [r7, #4] 801d59a: 685b ldr r3, [r3, #4] 801d59c: 4a9a ldr r2, [pc, #616] @ (801d808 ) 801d59e: 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) { 801d5a0: 687b ldr r3, [r7, #4] 801d5a2: 895b ldrh r3, [r3, #10] 801d5a4: 2b13 cmp r3, #19 801d5a6: f240 83d1 bls.w 801dd4c 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()) || 801d5aa: 4b98 ldr r3, [pc, #608] @ (801d80c ) 801d5ac: 695b ldr r3, [r3, #20] 801d5ae: 4a97 ldr r2, [pc, #604] @ (801d80c ) 801d5b0: 6812 ldr r2, [r2, #0] 801d5b2: 4611 mov r1, r2 801d5b4: 4618 mov r0, r3 801d5b6: f008 fc1b bl 8025df0 801d5ba: 4603 mov r3, r0 801d5bc: 2b00 cmp r3, #0 801d5be: f040 83c7 bne.w 801dd50 ip_addr_ismulticast(ip_current_dest_addr())) { 801d5c2: 4b92 ldr r3, [pc, #584] @ (801d80c ) 801d5c4: 695b ldr r3, [r3, #20] 801d5c6: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()) || 801d5ca: 2be0 cmp r3, #224 @ 0xe0 801d5cc: f000 83c0 beq.w 801dd50 } } #endif /* CHECKSUM_CHECK_TCP */ /* sanity-check header length */ hdrlen_bytes = TCPH_HDRLEN_BYTES(tcphdr); 801d5d0: 4b8d ldr r3, [pc, #564] @ (801d808 ) 801d5d2: 681b ldr r3, [r3, #0] 801d5d4: 899b ldrh r3, [r3, #12] 801d5d6: b29b uxth r3, r3 801d5d8: 4618 mov r0, r3 801d5da: f7fc fa05 bl 80199e8 801d5de: 4603 mov r3, r0 801d5e0: 0b1b lsrs r3, r3, #12 801d5e2: b29b uxth r3, r3 801d5e4: b2db uxtb r3, r3 801d5e6: 009b lsls r3, r3, #2 801d5e8: 74bb strb r3, [r7, #18] if ((hdrlen_bytes < TCP_HLEN) || (hdrlen_bytes > p->tot_len)) { 801d5ea: 7cbb ldrb r3, [r7, #18] 801d5ec: 2b13 cmp r3, #19 801d5ee: f240 83b1 bls.w 801dd54 801d5f2: 7cbb ldrb r3, [r7, #18] 801d5f4: b29a uxth r2, r3 801d5f6: 687b ldr r3, [r7, #4] 801d5f8: 891b ldrh r3, [r3, #8] 801d5fa: 429a cmp r2, r3 801d5fc: f200 83aa bhi.w 801dd54 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); 801d600: 7cbb ldrb r3, [r7, #18] 801d602: b29b uxth r3, r3 801d604: 3b14 subs r3, #20 801d606: b29a uxth r2, r3 801d608: 4b81 ldr r3, [pc, #516] @ (801d810 ) 801d60a: 801a strh r2, [r3, #0] tcphdr_opt2 = NULL; 801d60c: 4b81 ldr r3, [pc, #516] @ (801d814 ) 801d60e: 2200 movs r2, #0 801d610: 601a str r2, [r3, #0] if (p->len >= hdrlen_bytes) { 801d612: 687b ldr r3, [r7, #4] 801d614: 895a ldrh r2, [r3, #10] 801d616: 7cbb ldrb r3, [r7, #18] 801d618: b29b uxth r3, r3 801d61a: 429a cmp r2, r3 801d61c: d309 bcc.n 801d632 /* all options are in the first pbuf */ tcphdr_opt1len = tcphdr_optlen; 801d61e: 4b7c ldr r3, [pc, #496] @ (801d810 ) 801d620: 881a ldrh r2, [r3, #0] 801d622: 4b7d ldr r3, [pc, #500] @ (801d818 ) 801d624: 801a strh r2, [r3, #0] pbuf_remove_header(p, hdrlen_bytes); /* cannot fail */ 801d626: 7cbb ldrb r3, [r7, #18] 801d628: 4619 mov r1, r3 801d62a: 6878 ldr r0, [r7, #4] 801d62c: f7fd fe06 bl 801b23c 801d630: e04e b.n 801d6d0 } 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); 801d632: 687b ldr r3, [r7, #4] 801d634: 681b ldr r3, [r3, #0] 801d636: 2b00 cmp r3, #0 801d638: d105 bne.n 801d646 801d63a: 4b70 ldr r3, [pc, #448] @ (801d7fc ) 801d63c: 22c2 movs r2, #194 @ 0xc2 801d63e: 4977 ldr r1, [pc, #476] @ (801d81c ) 801d640: 4870 ldr r0, [pc, #448] @ (801d804 ) 801d642: f00d f92b bl 802a89c /* advance over the TCP header (cannot fail) */ pbuf_remove_header(p, TCP_HLEN); 801d646: 2114 movs r1, #20 801d648: 6878 ldr r0, [r7, #4] 801d64a: f7fd fdf7 bl 801b23c /* determine how long the first and second parts of the options are */ tcphdr_opt1len = p->len; 801d64e: 687b ldr r3, [r7, #4] 801d650: 895a ldrh r2, [r3, #10] 801d652: 4b71 ldr r3, [pc, #452] @ (801d818 ) 801d654: 801a strh r2, [r3, #0] opt2len = (u16_t)(tcphdr_optlen - tcphdr_opt1len); 801d656: 4b6e ldr r3, [pc, #440] @ (801d810 ) 801d658: 881a ldrh r2, [r3, #0] 801d65a: 4b6f ldr r3, [pc, #444] @ (801d818 ) 801d65c: 881b ldrh r3, [r3, #0] 801d65e: 1ad3 subs r3, r2, r3 801d660: 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); 801d662: 4b6d ldr r3, [pc, #436] @ (801d818 ) 801d664: 881b ldrh r3, [r3, #0] 801d666: 4619 mov r1, r3 801d668: 6878 ldr r0, [r7, #4] 801d66a: f7fd fde7 bl 801b23c /* check that the options fit in the second pbuf */ if (opt2len > p->next->len) { 801d66e: 687b ldr r3, [r7, #4] 801d670: 681b ldr r3, [r3, #0] 801d672: 895b ldrh r3, [r3, #10] 801d674: 8a3a ldrh r2, [r7, #16] 801d676: 429a cmp r2, r3 801d678: f200 836e bhi.w 801dd58 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* remember the pointer to the second part of the options */ tcphdr_opt2 = (u8_t *)p->next->payload; 801d67c: 687b ldr r3, [r7, #4] 801d67e: 681b ldr r3, [r3, #0] 801d680: 685b ldr r3, [r3, #4] 801d682: 4a64 ldr r2, [pc, #400] @ (801d814 ) 801d684: 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); 801d686: 687b ldr r3, [r7, #4] 801d688: 681b ldr r3, [r3, #0] 801d68a: 8a3a ldrh r2, [r7, #16] 801d68c: 4611 mov r1, r2 801d68e: 4618 mov r0, r3 801d690: f7fd fdd4 bl 801b23c p->tot_len = (u16_t)(p->tot_len - opt2len); 801d694: 687b ldr r3, [r7, #4] 801d696: 891a ldrh r2, [r3, #8] 801d698: 8a3b ldrh r3, [r7, #16] 801d69a: 1ad3 subs r3, r2, r3 801d69c: b29a uxth r2, r3 801d69e: 687b ldr r3, [r7, #4] 801d6a0: 811a strh r2, [r3, #8] LWIP_ASSERT("p->len == 0", p->len == 0); 801d6a2: 687b ldr r3, [r7, #4] 801d6a4: 895b ldrh r3, [r3, #10] 801d6a6: 2b00 cmp r3, #0 801d6a8: d005 beq.n 801d6b6 801d6aa: 4b54 ldr r3, [pc, #336] @ (801d7fc ) 801d6ac: 22df movs r2, #223 @ 0xdf 801d6ae: 495c ldr r1, [pc, #368] @ (801d820 ) 801d6b0: 4854 ldr r0, [pc, #336] @ (801d804 ) 801d6b2: f00d f8f3 bl 802a89c LWIP_ASSERT("p->tot_len == p->next->tot_len", p->tot_len == p->next->tot_len); 801d6b6: 687b ldr r3, [r7, #4] 801d6b8: 891a ldrh r2, [r3, #8] 801d6ba: 687b ldr r3, [r7, #4] 801d6bc: 681b ldr r3, [r3, #0] 801d6be: 891b ldrh r3, [r3, #8] 801d6c0: 429a cmp r2, r3 801d6c2: d005 beq.n 801d6d0 801d6c4: 4b4d ldr r3, [pc, #308] @ (801d7fc ) 801d6c6: 22e0 movs r2, #224 @ 0xe0 801d6c8: 4956 ldr r1, [pc, #344] @ (801d824 ) 801d6ca: 484e ldr r0, [pc, #312] @ (801d804 ) 801d6cc: f00d f8e6 bl 802a89c } /* Convert fields in TCP header to host byte order. */ tcphdr->src = lwip_ntohs(tcphdr->src); 801d6d0: 4b4d ldr r3, [pc, #308] @ (801d808 ) 801d6d2: 681b ldr r3, [r3, #0] 801d6d4: 881b ldrh r3, [r3, #0] 801d6d6: b29b uxth r3, r3 801d6d8: 4a4b ldr r2, [pc, #300] @ (801d808 ) 801d6da: 6814 ldr r4, [r2, #0] 801d6dc: 4618 mov r0, r3 801d6de: f7fc f983 bl 80199e8 801d6e2: 4603 mov r3, r0 801d6e4: 8023 strh r3, [r4, #0] tcphdr->dest = lwip_ntohs(tcphdr->dest); 801d6e6: 4b48 ldr r3, [pc, #288] @ (801d808 ) 801d6e8: 681b ldr r3, [r3, #0] 801d6ea: 885b ldrh r3, [r3, #2] 801d6ec: b29b uxth r3, r3 801d6ee: 4a46 ldr r2, [pc, #280] @ (801d808 ) 801d6f0: 6814 ldr r4, [r2, #0] 801d6f2: 4618 mov r0, r3 801d6f4: f7fc f978 bl 80199e8 801d6f8: 4603 mov r3, r0 801d6fa: 8063 strh r3, [r4, #2] seqno = tcphdr->seqno = lwip_ntohl(tcphdr->seqno); 801d6fc: 4b42 ldr r3, [pc, #264] @ (801d808 ) 801d6fe: 681b ldr r3, [r3, #0] 801d700: 685b ldr r3, [r3, #4] 801d702: 4a41 ldr r2, [pc, #260] @ (801d808 ) 801d704: 6814 ldr r4, [r2, #0] 801d706: 4618 mov r0, r3 801d708: f7fc f983 bl 8019a12 801d70c: 4603 mov r3, r0 801d70e: 6063 str r3, [r4, #4] 801d710: 6863 ldr r3, [r4, #4] 801d712: 4a45 ldr r2, [pc, #276] @ (801d828 ) 801d714: 6013 str r3, [r2, #0] ackno = tcphdr->ackno = lwip_ntohl(tcphdr->ackno); 801d716: 4b3c ldr r3, [pc, #240] @ (801d808 ) 801d718: 681b ldr r3, [r3, #0] 801d71a: 689b ldr r3, [r3, #8] 801d71c: 4a3a ldr r2, [pc, #232] @ (801d808 ) 801d71e: 6814 ldr r4, [r2, #0] 801d720: 4618 mov r0, r3 801d722: f7fc f976 bl 8019a12 801d726: 4603 mov r3, r0 801d728: 60a3 str r3, [r4, #8] 801d72a: 68a3 ldr r3, [r4, #8] 801d72c: 4a3f ldr r2, [pc, #252] @ (801d82c ) 801d72e: 6013 str r3, [r2, #0] tcphdr->wnd = lwip_ntohs(tcphdr->wnd); 801d730: 4b35 ldr r3, [pc, #212] @ (801d808 ) 801d732: 681b ldr r3, [r3, #0] 801d734: 89db ldrh r3, [r3, #14] 801d736: b29b uxth r3, r3 801d738: 4a33 ldr r2, [pc, #204] @ (801d808 ) 801d73a: 6814 ldr r4, [r2, #0] 801d73c: 4618 mov r0, r3 801d73e: f7fc f953 bl 80199e8 801d742: 4603 mov r3, r0 801d744: 81e3 strh r3, [r4, #14] flags = TCPH_FLAGS(tcphdr); 801d746: 4b30 ldr r3, [pc, #192] @ (801d808 ) 801d748: 681b ldr r3, [r3, #0] 801d74a: 899b ldrh r3, [r3, #12] 801d74c: b29b uxth r3, r3 801d74e: 4618 mov r0, r3 801d750: f7fc f94a bl 80199e8 801d754: 4603 mov r3, r0 801d756: b2db uxtb r3, r3 801d758: f003 033f and.w r3, r3, #63 @ 0x3f 801d75c: b2da uxtb r2, r3 801d75e: 4b34 ldr r3, [pc, #208] @ (801d830 ) 801d760: 701a strb r2, [r3, #0] tcplen = p->tot_len; 801d762: 687b ldr r3, [r7, #4] 801d764: 891a ldrh r2, [r3, #8] 801d766: 4b33 ldr r3, [pc, #204] @ (801d834 ) 801d768: 801a strh r2, [r3, #0] if (flags & (TCP_FIN | TCP_SYN)) { 801d76a: 4b31 ldr r3, [pc, #196] @ (801d830 ) 801d76c: 781b ldrb r3, [r3, #0] 801d76e: f003 0303 and.w r3, r3, #3 801d772: 2b00 cmp r3, #0 801d774: d00c beq.n 801d790 tcplen++; 801d776: 4b2f ldr r3, [pc, #188] @ (801d834 ) 801d778: 881b ldrh r3, [r3, #0] 801d77a: 3301 adds r3, #1 801d77c: b29a uxth r2, r3 801d77e: 4b2d ldr r3, [pc, #180] @ (801d834 ) 801d780: 801a strh r2, [r3, #0] if (tcplen < p->tot_len) { 801d782: 687b ldr r3, [r7, #4] 801d784: 891a ldrh r2, [r3, #8] 801d786: 4b2b ldr r3, [pc, #172] @ (801d834 ) 801d788: 881b ldrh r3, [r3, #0] 801d78a: 429a cmp r2, r3 801d78c: f200 82e6 bhi.w 801dd5c } } /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; 801d790: 2300 movs r3, #0 801d792: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801d794: 4b28 ldr r3, [pc, #160] @ (801d838 ) 801d796: 681b ldr r3, [r3, #0] 801d798: 61bb str r3, [r7, #24] 801d79a: e09d b.n 801d8d8 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); 801d79c: 69bb ldr r3, [r7, #24] 801d79e: 7d1b ldrb r3, [r3, #20] 801d7a0: 2b00 cmp r3, #0 801d7a2: d105 bne.n 801d7b0 801d7a4: 4b15 ldr r3, [pc, #84] @ (801d7fc ) 801d7a6: 22fb movs r2, #251 @ 0xfb 801d7a8: 4924 ldr r1, [pc, #144] @ (801d83c ) 801d7aa: 4816 ldr r0, [pc, #88] @ (801d804 ) 801d7ac: f00d f876 bl 802a89c LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); 801d7b0: 69bb ldr r3, [r7, #24] 801d7b2: 7d1b ldrb r3, [r3, #20] 801d7b4: 2b0a cmp r3, #10 801d7b6: d105 bne.n 801d7c4 801d7b8: 4b10 ldr r3, [pc, #64] @ (801d7fc ) 801d7ba: 22fc movs r2, #252 @ 0xfc 801d7bc: 4920 ldr r1, [pc, #128] @ (801d840 ) 801d7be: 4811 ldr r0, [pc, #68] @ (801d804 ) 801d7c0: f00d f86c bl 802a89c LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); 801d7c4: 69bb ldr r3, [r7, #24] 801d7c6: 7d1b ldrb r3, [r3, #20] 801d7c8: 2b01 cmp r3, #1 801d7ca: d105 bne.n 801d7d8 801d7cc: 4b0b ldr r3, [pc, #44] @ (801d7fc ) 801d7ce: 22fd movs r2, #253 @ 0xfd 801d7d0: 491c ldr r1, [pc, #112] @ (801d844 ) 801d7d2: 480c ldr r0, [pc, #48] @ (801d804 ) 801d7d4: f00d f862 bl 802a89c /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d7d8: 69bb ldr r3, [r7, #24] 801d7da: 7a1b ldrb r3, [r3, #8] 801d7dc: 2b00 cmp r3, #0 801d7de: d033 beq.n 801d848 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801d7e0: 69bb ldr r3, [r7, #24] 801d7e2: 7a1a ldrb r2, [r3, #8] 801d7e4: 4b09 ldr r3, [pc, #36] @ (801d80c ) 801d7e6: 685b ldr r3, [r3, #4] 801d7e8: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801d7ec: 3301 adds r3, #1 801d7ee: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d7f0: 429a cmp r2, r3 801d7f2: d029 beq.n 801d848 prev = pcb; 801d7f4: 69bb ldr r3, [r7, #24] 801d7f6: 61fb str r3, [r7, #28] continue; 801d7f8: e06b b.n 801d8d2 801d7fa: bf00 nop 801d7fc: 0802fd40 .word 0x0802fd40 801d800: 0802fd74 .word 0x0802fd74 801d804: 0802fd8c .word 0x0802fd8c 801d808: 2402afa4 .word 0x2402afa4 801d80c: 24024428 .word 0x24024428 801d810: 2402afa8 .word 0x2402afa8 801d814: 2402afac .word 0x2402afac 801d818: 2402afaa .word 0x2402afaa 801d81c: 0802fdb4 .word 0x0802fdb4 801d820: 0802fdc4 .word 0x0802fdc4 801d824: 0802fdd0 .word 0x0802fdd0 801d828: 2402afb4 .word 0x2402afb4 801d82c: 2402afb8 .word 0x2402afb8 801d830: 2402afc0 .word 0x2402afc0 801d834: 2402afbe .word 0x2402afbe 801d838: 2402af84 .word 0x2402af84 801d83c: 0802fdf0 .word 0x0802fdf0 801d840: 0802fe18 .word 0x0802fe18 801d844: 0802fe44 .word 0x0802fe44 } if (pcb->remote_port == tcphdr->src && 801d848: 69bb ldr r3, [r7, #24] 801d84a: 8b1a ldrh r2, [r3, #24] 801d84c: 4b72 ldr r3, [pc, #456] @ (801da18 ) 801d84e: 681b ldr r3, [r3, #0] 801d850: 881b ldrh r3, [r3, #0] 801d852: b29b uxth r3, r3 801d854: 429a cmp r2, r3 801d856: d13a bne.n 801d8ce pcb->local_port == tcphdr->dest && 801d858: 69bb ldr r3, [r7, #24] 801d85a: 8ada ldrh r2, [r3, #22] 801d85c: 4b6e ldr r3, [pc, #440] @ (801da18 ) 801d85e: 681b ldr r3, [r3, #0] 801d860: 885b ldrh r3, [r3, #2] 801d862: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 801d864: 429a cmp r2, r3 801d866: d132 bne.n 801d8ce ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d868: 69bb ldr r3, [r7, #24] 801d86a: 685a ldr r2, [r3, #4] 801d86c: 4b6b ldr r3, [pc, #428] @ (801da1c ) 801d86e: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 801d870: 429a cmp r2, r3 801d872: d12c bne.n 801d8ce ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 801d874: 69bb ldr r3, [r7, #24] 801d876: 681a ldr r2, [r3, #0] 801d878: 4b68 ldr r3, [pc, #416] @ (801da1c ) 801d87a: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d87c: 429a cmp r2, r3 801d87e: d126 bne.n 801d8ce /* 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); 801d880: 69bb ldr r3, [r7, #24] 801d882: 68db ldr r3, [r3, #12] 801d884: 69ba ldr r2, [r7, #24] 801d886: 429a cmp r2, r3 801d888: d106 bne.n 801d898 801d88a: 4b65 ldr r3, [pc, #404] @ (801da20 ) 801d88c: f240 120d movw r2, #269 @ 0x10d 801d890: 4964 ldr r1, [pc, #400] @ (801da24 ) 801d892: 4865 ldr r0, [pc, #404] @ (801da28 ) 801d894: f00d f802 bl 802a89c if (prev != NULL) { 801d898: 69fb ldr r3, [r7, #28] 801d89a: 2b00 cmp r3, #0 801d89c: d00a beq.n 801d8b4 prev->next = pcb->next; 801d89e: 69bb ldr r3, [r7, #24] 801d8a0: 68da ldr r2, [r3, #12] 801d8a2: 69fb ldr r3, [r7, #28] 801d8a4: 60da str r2, [r3, #12] pcb->next = tcp_active_pcbs; 801d8a6: 4b61 ldr r3, [pc, #388] @ (801da2c ) 801d8a8: 681a ldr r2, [r3, #0] 801d8aa: 69bb ldr r3, [r7, #24] 801d8ac: 60da str r2, [r3, #12] tcp_active_pcbs = pcb; 801d8ae: 4a5f ldr r2, [pc, #380] @ (801da2c ) 801d8b0: 69bb ldr r3, [r7, #24] 801d8b2: 6013 str r3, [r2, #0] } else { TCP_STATS_INC(tcp.cachehit); } LWIP_ASSERT("tcp_input: pcb->next != pcb (after cache)", pcb->next != pcb); 801d8b4: 69bb ldr r3, [r7, #24] 801d8b6: 68db ldr r3, [r3, #12] 801d8b8: 69ba ldr r2, [r7, #24] 801d8ba: 429a cmp r2, r3 801d8bc: d111 bne.n 801d8e2 801d8be: 4b58 ldr r3, [pc, #352] @ (801da20 ) 801d8c0: f240 1215 movw r2, #277 @ 0x115 801d8c4: 495a ldr r1, [pc, #360] @ (801da30 ) 801d8c6: 4858 ldr r0, [pc, #352] @ (801da28 ) 801d8c8: f00c ffe8 bl 802a89c break; 801d8cc: e009 b.n 801d8e2 } prev = pcb; 801d8ce: 69bb ldr r3, [r7, #24] 801d8d0: 61fb str r3, [r7, #28] for (pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 801d8d2: 69bb ldr r3, [r7, #24] 801d8d4: 68db ldr r3, [r3, #12] 801d8d6: 61bb str r3, [r7, #24] 801d8d8: 69bb ldr r3, [r7, #24] 801d8da: 2b00 cmp r3, #0 801d8dc: f47f af5e bne.w 801d79c 801d8e0: e000 b.n 801d8e4 break; 801d8e2: bf00 nop } if (pcb == NULL) { 801d8e4: 69bb ldr r3, [r7, #24] 801d8e6: 2b00 cmp r3, #0 801d8e8: f040 80aa bne.w 801da40 /* 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) { 801d8ec: 4b51 ldr r3, [pc, #324] @ (801da34 ) 801d8ee: 681b ldr r3, [r3, #0] 801d8f0: 61bb str r3, [r7, #24] 801d8f2: e03f b.n 801d974 LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); 801d8f4: 69bb ldr r3, [r7, #24] 801d8f6: 7d1b ldrb r3, [r3, #20] 801d8f8: 2b0a cmp r3, #10 801d8fa: d006 beq.n 801d90a 801d8fc: 4b48 ldr r3, [pc, #288] @ (801da20 ) 801d8fe: f240 121f movw r2, #287 @ 0x11f 801d902: 494d ldr r1, [pc, #308] @ (801da38 ) 801d904: 4848 ldr r0, [pc, #288] @ (801da28 ) 801d906: f00c ffc9 bl 802a89c /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d90a: 69bb ldr r3, [r7, #24] 801d90c: 7a1b ldrb r3, [r3, #8] 801d90e: 2b00 cmp r3, #0 801d910: d009 beq.n 801d926 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801d912: 69bb ldr r3, [r7, #24] 801d914: 7a1a ldrb r2, [r3, #8] 801d916: 4b41 ldr r3, [pc, #260] @ (801da1c ) 801d918: 685b ldr r3, [r3, #4] 801d91a: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801d91e: 3301 adds r3, #1 801d920: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 801d922: 429a cmp r2, r3 801d924: d122 bne.n 801d96c continue; } if (pcb->remote_port == tcphdr->src && 801d926: 69bb ldr r3, [r7, #24] 801d928: 8b1a ldrh r2, [r3, #24] 801d92a: 4b3b ldr r3, [pc, #236] @ (801da18 ) 801d92c: 681b ldr r3, [r3, #0] 801d92e: 881b ldrh r3, [r3, #0] 801d930: b29b uxth r3, r3 801d932: 429a cmp r2, r3 801d934: d11b bne.n 801d96e pcb->local_port == tcphdr->dest && 801d936: 69bb ldr r3, [r7, #24] 801d938: 8ada ldrh r2, [r3, #22] 801d93a: 4b37 ldr r3, [pc, #220] @ (801da18 ) 801d93c: 681b ldr r3, [r3, #0] 801d93e: 885b ldrh r3, [r3, #2] 801d940: b29b uxth r3, r3 if (pcb->remote_port == tcphdr->src && 801d942: 429a cmp r2, r3 801d944: d113 bne.n 801d96e ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d946: 69bb ldr r3, [r7, #24] 801d948: 685a ldr r2, [r3, #4] 801d94a: 4b34 ldr r3, [pc, #208] @ (801da1c ) 801d94c: 691b ldr r3, [r3, #16] pcb->local_port == tcphdr->dest && 801d94e: 429a cmp r2, r3 801d950: d10d bne.n 801d96e ip_addr_cmp(&pcb->local_ip, ip_current_dest_addr())) { 801d952: 69bb ldr r3, [r7, #24] 801d954: 681a ldr r2, [r3, #0] 801d956: 4b31 ldr r3, [pc, #196] @ (801da1c ) 801d958: 695b ldr r3, [r3, #20] ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()) && 801d95a: 429a cmp r2, r3 801d95c: d107 bne.n 801d96e #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); 801d95e: 69b8 ldr r0, [r7, #24] 801d960: f000 fb56 bl 801e010 } pbuf_free(p); 801d964: 6878 ldr r0, [r7, #4] 801d966: f7fd fd21 bl 801b3ac return; 801d96a: e1fd b.n 801dd68 continue; 801d96c: bf00 nop for (pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 801d96e: 69bb ldr r3, [r7, #24] 801d970: 68db ldr r3, [r3, #12] 801d972: 61bb str r3, [r7, #24] 801d974: 69bb ldr r3, [r7, #24] 801d976: 2b00 cmp r3, #0 801d978: d1bc bne.n 801d8f4 } } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; 801d97a: 2300 movs r3, #0 801d97c: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d97e: 4b2f ldr r3, [pc, #188] @ (801da3c ) 801d980: 681b ldr r3, [r3, #0] 801d982: 617b str r3, [r7, #20] 801d984: e02a b.n 801d9dc /* check if PCB is bound to specific netif */ if ((lpcb->netif_idx != NETIF_NO_INDEX) && 801d986: 697b ldr r3, [r7, #20] 801d988: 7a1b ldrb r3, [r3, #8] 801d98a: 2b00 cmp r3, #0 801d98c: d00c beq.n 801d9a8 (lpcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 801d98e: 697b ldr r3, [r7, #20] 801d990: 7a1a ldrb r2, [r3, #8] 801d992: 4b22 ldr r3, [pc, #136] @ (801da1c ) 801d994: 685b ldr r3, [r3, #4] 801d996: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 801d99a: 3301 adds r3, #1 801d99c: b2db uxtb r3, r3 if ((lpcb->netif_idx != NETIF_NO_INDEX) && 801d99e: 429a cmp r2, r3 801d9a0: d002 beq.n 801d9a8 prev = (struct tcp_pcb *)lpcb; 801d9a2: 697b ldr r3, [r7, #20] 801d9a4: 61fb str r3, [r7, #28] continue; 801d9a6: e016 b.n 801d9d6 } if (lpcb->local_port == tcphdr->dest) { 801d9a8: 697b ldr r3, [r7, #20] 801d9aa: 8ada ldrh r2, [r3, #22] 801d9ac: 4b1a ldr r3, [pc, #104] @ (801da18 ) 801d9ae: 681b ldr r3, [r3, #0] 801d9b0: 885b ldrh r3, [r3, #2] 801d9b2: b29b uxth r3, r3 801d9b4: 429a cmp r2, r3 801d9b6: d10c bne.n 801d9d2 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())) { 801d9b8: 697b ldr r3, [r7, #20] 801d9ba: 681a ldr r2, [r3, #0] 801d9bc: 4b17 ldr r3, [pc, #92] @ (801da1c ) 801d9be: 695b ldr r3, [r3, #20] 801d9c0: 429a cmp r2, r3 801d9c2: d00f beq.n 801d9e4 /* found an exact match */ break; } else if (ip_addr_isany(&lpcb->local_ip)) { 801d9c4: 697b ldr r3, [r7, #20] 801d9c6: 2b00 cmp r3, #0 801d9c8: d00d beq.n 801d9e6 801d9ca: 697b ldr r3, [r7, #20] 801d9cc: 681b ldr r3, [r3, #0] 801d9ce: 2b00 cmp r3, #0 801d9d0: d009 beq.n 801d9e6 break; #endif /* SO_REUSE */ } } } prev = (struct tcp_pcb *)lpcb; 801d9d2: 697b ldr r3, [r7, #20] 801d9d4: 61fb str r3, [r7, #28] for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 801d9d6: 697b ldr r3, [r7, #20] 801d9d8: 68db ldr r3, [r3, #12] 801d9da: 617b str r3, [r7, #20] 801d9dc: 697b ldr r3, [r7, #20] 801d9de: 2b00 cmp r3, #0 801d9e0: d1d1 bne.n 801d986 801d9e2: e000 b.n 801d9e6 break; 801d9e4: 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) { 801d9e6: 697b ldr r3, [r7, #20] 801d9e8: 2b00 cmp r3, #0 801d9ea: d029 beq.n 801da40 /* 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) { 801d9ec: 69fb ldr r3, [r7, #28] 801d9ee: 2b00 cmp r3, #0 801d9f0: d00a beq.n 801da08 ((struct tcp_pcb_listen *)prev)->next = lpcb->next; 801d9f2: 697b ldr r3, [r7, #20] 801d9f4: 68da ldr r2, [r3, #12] 801d9f6: 69fb ldr r3, [r7, #28] 801d9f8: 60da str r2, [r3, #12] /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; 801d9fa: 4b10 ldr r3, [pc, #64] @ (801da3c ) 801d9fc: 681a ldr r2, [r3, #0] 801d9fe: 697b ldr r3, [r7, #20] 801da00: 60da str r2, [r3, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 801da02: 4a0e ldr r2, [pc, #56] @ (801da3c ) 801da04: 697b ldr r3, [r7, #20] 801da06: 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); 801da08: 6978 ldr r0, [r7, #20] 801da0a: f000 fa03 bl 801de14 } pbuf_free(p); 801da0e: 6878 ldr r0, [r7, #4] 801da10: f7fd fccc bl 801b3ac return; 801da14: e1a8 b.n 801dd68 801da16: bf00 nop 801da18: 2402afa4 .word 0x2402afa4 801da1c: 24024428 .word 0x24024428 801da20: 0802fd40 .word 0x0802fd40 801da24: 0802fe6c .word 0x0802fe6c 801da28: 0802fd8c .word 0x0802fd8c 801da2c: 2402af84 .word 0x2402af84 801da30: 0802fe98 .word 0x0802fe98 801da34: 2402af88 .word 0x2402af88 801da38: 0802fec4 .word 0x0802fec4 801da3c: 2402af80 .word 0x2402af80 tcphdr_opt1len, tcphdr_opt2, p) != ERR_OK) { pbuf_free(p); return; } #endif if (pcb != NULL) { 801da40: 69bb ldr r3, [r7, #24] 801da42: 2b00 cmp r3, #0 801da44: f000 8158 beq.w 801dcf8 #if TCP_INPUT_DEBUG tcp_debug_print_state(pcb->state); #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 801da48: 4b95 ldr r3, [pc, #596] @ (801dca0 ) 801da4a: 2200 movs r2, #0 801da4c: 601a str r2, [r3, #0] inseg.len = p->tot_len; 801da4e: 687b ldr r3, [r7, #4] 801da50: 891a ldrh r2, [r3, #8] 801da52: 4b93 ldr r3, [pc, #588] @ (801dca0 ) 801da54: 811a strh r2, [r3, #8] inseg.p = p; 801da56: 4a92 ldr r2, [pc, #584] @ (801dca0 ) 801da58: 687b ldr r3, [r7, #4] 801da5a: 6053 str r3, [r2, #4] inseg.tcphdr = tcphdr; 801da5c: 4b91 ldr r3, [pc, #580] @ (801dca4 ) 801da5e: 681b ldr r3, [r3, #0] 801da60: 4a8f ldr r2, [pc, #572] @ (801dca0 ) 801da62: 6113 str r3, [r2, #16] recv_data = NULL; 801da64: 4b90 ldr r3, [pc, #576] @ (801dca8 ) 801da66: 2200 movs r2, #0 801da68: 601a str r2, [r3, #0] recv_flags = 0; 801da6a: 4b90 ldr r3, [pc, #576] @ (801dcac ) 801da6c: 2200 movs r2, #0 801da6e: 701a strb r2, [r3, #0] recv_acked = 0; 801da70: 4b8f ldr r3, [pc, #572] @ (801dcb0 ) 801da72: 2200 movs r2, #0 801da74: 801a strh r2, [r3, #0] if (flags & TCP_PSH) { 801da76: 4b8f ldr r3, [pc, #572] @ (801dcb4 ) 801da78: 781b ldrb r3, [r3, #0] 801da7a: f003 0308 and.w r3, r3, #8 801da7e: 2b00 cmp r3, #0 801da80: d006 beq.n 801da90 p->flags |= PBUF_FLAG_PUSH; 801da82: 687b ldr r3, [r7, #4] 801da84: 7b5b ldrb r3, [r3, #13] 801da86: f043 0301 orr.w r3, r3, #1 801da8a: b2da uxtb r2, r3 801da8c: 687b ldr r3, [r7, #4] 801da8e: 735a strb r2, [r3, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 801da90: 69bb ldr r3, [r7, #24] 801da92: 6f9b ldr r3, [r3, #120] @ 0x78 801da94: 2b00 cmp r3, #0 801da96: d017 beq.n 801dac8 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 801da98: 69b8 ldr r0, [r7, #24] 801da9a: f7ff f84d bl 801cb38 801da9e: 4603 mov r3, r0 801daa0: f113 0f0d cmn.w r3, #13 801daa4: d007 beq.n 801dab6 ((pcb->refused_data != NULL) && (tcplen > 0))) { 801daa6: 69bb ldr r3, [r7, #24] 801daa8: 6f9b ldr r3, [r3, #120] @ 0x78 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 801daaa: 2b00 cmp r3, #0 801daac: d00c beq.n 801dac8 ((pcb->refused_data != NULL) && (tcplen > 0))) { 801daae: 4b82 ldr r3, [pc, #520] @ (801dcb8 ) 801dab0: 881b ldrh r3, [r3, #0] 801dab2: 2b00 cmp r3, #0 801dab4: d008 beq.n 801dac8 /* pcb has been aborted or refused data is still refused and the new segment contains data */ if (pcb->rcv_ann_wnd == 0) { 801dab6: 69bb ldr r3, [r7, #24] 801dab8: 8d5b ldrh r3, [r3, #42] @ 0x2a 801daba: 2b00 cmp r3, #0 801dabc: f040 80e4 bne.w 801dc88 /* this is a zero-window probe, we respond to it with current RCV.NXT and drop the data segment */ tcp_send_empty_ack(pcb); 801dac0: 69b8 ldr r0, [r7, #24] 801dac2: f003 fe73 bl 80217ac } TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); goto aborted; 801dac6: e0df b.n 801dc88 } } tcp_input_pcb = pcb; 801dac8: 4a7c ldr r2, [pc, #496] @ (801dcbc ) 801daca: 69bb ldr r3, [r7, #24] 801dacc: 6013 str r3, [r2, #0] err = tcp_process(pcb); 801dace: 69b8 ldr r0, [r7, #24] 801dad0: f000 fb18 bl 801e104 801dad4: 4603 mov r3, r0 801dad6: 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) { 801dad8: f997 3013 ldrsb.w r3, [r7, #19] 801dadc: f113 0f0d cmn.w r3, #13 801dae0: f000 80d4 beq.w 801dc8c if (recv_flags & TF_RESET) { 801dae4: 4b71 ldr r3, [pc, #452] @ (801dcac ) 801dae6: 781b ldrb r3, [r3, #0] 801dae8: f003 0308 and.w r3, r3, #8 801daec: 2b00 cmp r3, #0 801daee: d015 beq.n 801db1c /* 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); 801daf0: 69bb ldr r3, [r7, #24] 801daf2: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801daf6: 2b00 cmp r3, #0 801daf8: d008 beq.n 801db0c 801dafa: 69bb ldr r3, [r7, #24] 801dafc: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801db00: 69ba ldr r2, [r7, #24] 801db02: 6912 ldr r2, [r2, #16] 801db04: f06f 010d mvn.w r1, #13 801db08: 4610 mov r0, r2 801db0a: 4798 blx r3 tcp_pcb_remove(&tcp_active_pcbs, pcb); 801db0c: 69b9 ldr r1, [r7, #24] 801db0e: 486c ldr r0, [pc, #432] @ (801dcc0 ) 801db10: f7ff fbba bl 801d288 tcp_free(pcb); 801db14: 69b8 ldr r0, [r7, #24] 801db16: f7fd ff05 bl 801b924 801db1a: e0da b.n 801dcd2 } else { err = ERR_OK; 801db1c: 2300 movs r3, #0 801db1e: 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) { 801db20: 4b63 ldr r3, [pc, #396] @ (801dcb0 ) 801db22: 881b ldrh r3, [r3, #0] 801db24: 2b00 cmp r3, #0 801db26: d01d beq.n 801db64 while (acked > 0) { acked16 = (u16_t)LWIP_MIN(acked, 0xffffu); acked -= acked16; #else { acked16 = recv_acked; 801db28: 4b61 ldr r3, [pc, #388] @ (801dcb0 ) 801db2a: 881b ldrh r3, [r3, #0] 801db2c: 81fb strh r3, [r7, #14] #endif TCP_EVENT_SENT(pcb, (u16_t)acked16, err); 801db2e: 69bb ldr r3, [r7, #24] 801db30: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 801db34: 2b00 cmp r3, #0 801db36: d00a beq.n 801db4e 801db38: 69bb ldr r3, [r7, #24] 801db3a: f8d3 3080 ldr.w r3, [r3, #128] @ 0x80 801db3e: 69ba ldr r2, [r7, #24] 801db40: 6910 ldr r0, [r2, #16] 801db42: 89fa ldrh r2, [r7, #14] 801db44: 69b9 ldr r1, [r7, #24] 801db46: 4798 blx r3 801db48: 4603 mov r3, r0 801db4a: 74fb strb r3, [r7, #19] 801db4c: e001 b.n 801db52 801db4e: 2300 movs r3, #0 801db50: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801db52: f997 3013 ldrsb.w r3, [r7, #19] 801db56: f113 0f0d cmn.w r3, #13 801db5a: f000 8099 beq.w 801dc90 goto aborted; } } recv_acked = 0; 801db5e: 4b54 ldr r3, [pc, #336] @ (801dcb0 ) 801db60: 2200 movs r2, #0 801db62: 801a strh r2, [r3, #0] } if (tcp_input_delayed_close(pcb)) { 801db64: 69b8 ldr r0, [r7, #24] 801db66: f000 f915 bl 801dd94 801db6a: 4603 mov r3, r0 801db6c: 2b00 cmp r3, #0 801db6e: f040 8091 bne.w 801dc94 #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) { 801db72: 4b4d ldr r3, [pc, #308] @ (801dca8 ) 801db74: 681b ldr r3, [r3, #0] 801db76: 2b00 cmp r3, #0 801db78: d041 beq.n 801dbfe #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); 801db7a: 69bb ldr r3, [r7, #24] 801db7c: 6f9b ldr r3, [r3, #120] @ 0x78 801db7e: 2b00 cmp r3, #0 801db80: d006 beq.n 801db90 801db82: 4b50 ldr r3, [pc, #320] @ (801dcc4 ) 801db84: f44f 72f3 mov.w r2, #486 @ 0x1e6 801db88: 494f ldr r1, [pc, #316] @ (801dcc8 ) 801db8a: 4850 ldr r0, [pc, #320] @ (801dccc ) 801db8c: f00c fe86 bl 802a89c if (pcb->flags & TF_RXCLOSED) { 801db90: 69bb ldr r3, [r7, #24] 801db92: 8b5b ldrh r3, [r3, #26] 801db94: f003 0310 and.w r3, r3, #16 801db98: 2b00 cmp r3, #0 801db9a: d008 beq.n 801dbae /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 801db9c: 4b42 ldr r3, [pc, #264] @ (801dca8 ) 801db9e: 681b ldr r3, [r3, #0] 801dba0: 4618 mov r0, r3 801dba2: f7fd fc03 bl 801b3ac #if TCP_QUEUE_OOSEQ && LWIP_WND_SCALE if (rest != NULL) { pbuf_free(rest); } #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ tcp_abort(pcb); 801dba6: 69b8 ldr r0, [r7, #24] 801dba8: f7fe fa06 bl 801bfb8 goto aborted; 801dbac: e091 b.n 801dcd2 } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 801dbae: 69bb ldr r3, [r7, #24] 801dbb0: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801dbb4: 2b00 cmp r3, #0 801dbb6: d00c beq.n 801dbd2 801dbb8: 69bb ldr r3, [r7, #24] 801dbba: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801dbbe: 69bb ldr r3, [r7, #24] 801dbc0: 6918 ldr r0, [r3, #16] 801dbc2: 4b39 ldr r3, [pc, #228] @ (801dca8 ) 801dbc4: 681a ldr r2, [r3, #0] 801dbc6: 2300 movs r3, #0 801dbc8: 69b9 ldr r1, [r7, #24] 801dbca: 47a0 blx r4 801dbcc: 4603 mov r3, r0 801dbce: 74fb strb r3, [r7, #19] 801dbd0: e008 b.n 801dbe4 801dbd2: 4b35 ldr r3, [pc, #212] @ (801dca8 ) 801dbd4: 681a ldr r2, [r3, #0] 801dbd6: 2300 movs r3, #0 801dbd8: 69b9 ldr r1, [r7, #24] 801dbda: 2000 movs r0, #0 801dbdc: f7ff f884 bl 801cce8 801dbe0: 4603 mov r3, r0 801dbe2: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801dbe4: f997 3013 ldrsb.w r3, [r7, #19] 801dbe8: f113 0f0d cmn.w r3, #13 801dbec: d054 beq.n 801dc98 #endif /* TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 801dbee: f997 3013 ldrsb.w r3, [r7, #19] 801dbf2: 2b00 cmp r3, #0 801dbf4: d003 beq.n 801dbfe #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; 801dbf6: 4b2c ldr r3, [pc, #176] @ (801dca8 ) 801dbf8: 681a ldr r2, [r3, #0] 801dbfa: 69bb ldr r3, [r7, #24] 801dbfc: 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) { 801dbfe: 4b2b ldr r3, [pc, #172] @ (801dcac ) 801dc00: 781b ldrb r3, [r3, #0] 801dc02: f003 0320 and.w r3, r3, #32 801dc06: 2b00 cmp r3, #0 801dc08: d031 beq.n 801dc6e if (pcb->refused_data != NULL) { 801dc0a: 69bb ldr r3, [r7, #24] 801dc0c: 6f9b ldr r3, [r3, #120] @ 0x78 801dc0e: 2b00 cmp r3, #0 801dc10: d009 beq.n 801dc26 /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 801dc12: 69bb ldr r3, [r7, #24] 801dc14: 6f9b ldr r3, [r3, #120] @ 0x78 801dc16: 7b5a ldrb r2, [r3, #13] 801dc18: 69bb ldr r3, [r7, #24] 801dc1a: 6f9b ldr r3, [r3, #120] @ 0x78 801dc1c: f042 0220 orr.w r2, r2, #32 801dc20: b2d2 uxtb r2, r2 801dc22: 735a strb r2, [r3, #13] 801dc24: e023 b.n 801dc6e } 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)) { 801dc26: 69bb ldr r3, [r7, #24] 801dc28: 8d1b ldrh r3, [r3, #40] @ 0x28 801dc2a: f241 62d0 movw r2, #5840 @ 0x16d0 801dc2e: 4293 cmp r3, r2 801dc30: d005 beq.n 801dc3e pcb->rcv_wnd++; 801dc32: 69bb ldr r3, [r7, #24] 801dc34: 8d1b ldrh r3, [r3, #40] @ 0x28 801dc36: 3301 adds r3, #1 801dc38: b29a uxth r2, r3 801dc3a: 69bb ldr r3, [r7, #24] 801dc3c: 851a strh r2, [r3, #40] @ 0x28 } TCP_EVENT_CLOSED(pcb, err); 801dc3e: 69bb ldr r3, [r7, #24] 801dc40: f8d3 3084 ldr.w r3, [r3, #132] @ 0x84 801dc44: 2b00 cmp r3, #0 801dc46: d00b beq.n 801dc60 801dc48: 69bb ldr r3, [r7, #24] 801dc4a: f8d3 4084 ldr.w r4, [r3, #132] @ 0x84 801dc4e: 69bb ldr r3, [r7, #24] 801dc50: 6918 ldr r0, [r3, #16] 801dc52: 2300 movs r3, #0 801dc54: 2200 movs r2, #0 801dc56: 69b9 ldr r1, [r7, #24] 801dc58: 47a0 blx r4 801dc5a: 4603 mov r3, r0 801dc5c: 74fb strb r3, [r7, #19] 801dc5e: e001 b.n 801dc64 801dc60: 2300 movs r3, #0 801dc62: 74fb strb r3, [r7, #19] if (err == ERR_ABRT) { 801dc64: f997 3013 ldrsb.w r3, [r7, #19] 801dc68: f113 0f0d cmn.w r3, #13 801dc6c: d016 beq.n 801dc9c goto aborted; } } } tcp_input_pcb = NULL; 801dc6e: 4b13 ldr r3, [pc, #76] @ (801dcbc ) 801dc70: 2200 movs r2, #0 801dc72: 601a str r2, [r3, #0] if (tcp_input_delayed_close(pcb)) { 801dc74: 69b8 ldr r0, [r7, #24] 801dc76: f000 f88d bl 801dd94 801dc7a: 4603 mov r3, r0 801dc7c: 2b00 cmp r3, #0 801dc7e: d127 bne.n 801dcd0 goto aborted; } /* Try to send something out. */ tcp_output(pcb); 801dc80: 69b8 ldr r0, [r7, #24] 801dc82: f002 ff7f bl 8020b84 801dc86: e024 b.n 801dcd2 goto aborted; 801dc88: bf00 nop 801dc8a: e022 b.n 801dcd2 #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: 801dc8c: bf00 nop 801dc8e: e020 b.n 801dcd2 goto aborted; 801dc90: bf00 nop 801dc92: e01e b.n 801dcd2 goto aborted; 801dc94: bf00 nop 801dc96: e01c b.n 801dcd2 goto aborted; 801dc98: bf00 nop 801dc9a: e01a b.n 801dcd2 goto aborted; 801dc9c: bf00 nop 801dc9e: e018 b.n 801dcd2 801dca0: 2402af90 .word 0x2402af90 801dca4: 2402afa4 .word 0x2402afa4 801dca8: 2402afc4 .word 0x2402afc4 801dcac: 2402afc1 .word 0x2402afc1 801dcb0: 2402afbc .word 0x2402afbc 801dcb4: 2402afc0 .word 0x2402afc0 801dcb8: 2402afbe .word 0x2402afbe 801dcbc: 2402afc8 .word 0x2402afc8 801dcc0: 2402af84 .word 0x2402af84 801dcc4: 0802fd40 .word 0x0802fd40 801dcc8: 0802fef4 .word 0x0802fef4 801dccc: 0802fd8c .word 0x0802fd8c goto aborted; 801dcd0: bf00 nop tcp_input_pcb = NULL; 801dcd2: 4b27 ldr r3, [pc, #156] @ (801dd70 ) 801dcd4: 2200 movs r2, #0 801dcd6: 601a str r2, [r3, #0] recv_data = NULL; 801dcd8: 4b26 ldr r3, [pc, #152] @ (801dd74 ) 801dcda: 2200 movs r2, #0 801dcdc: 601a str r2, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) { 801dcde: 4b26 ldr r3, [pc, #152] @ (801dd78 ) 801dce0: 685b ldr r3, [r3, #4] 801dce2: 2b00 cmp r3, #0 801dce4: d03f beq.n 801dd66 pbuf_free(inseg.p); 801dce6: 4b24 ldr r3, [pc, #144] @ (801dd78 ) 801dce8: 685b ldr r3, [r3, #4] 801dcea: 4618 mov r0, r3 801dcec: f7fd fb5e bl 801b3ac inseg.p = NULL; 801dcf0: 4b21 ldr r3, [pc, #132] @ (801dd78 ) 801dcf2: 2200 movs r2, #0 801dcf4: 605a str r2, [r3, #4] pbuf_free(p); } LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; 801dcf6: e036 b.n 801dd66 if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { 801dcf8: 4b20 ldr r3, [pc, #128] @ (801dd7c ) 801dcfa: 681b ldr r3, [r3, #0] 801dcfc: 899b ldrh r3, [r3, #12] 801dcfe: b29b uxth r3, r3 801dd00: 4618 mov r0, r3 801dd02: f7fb fe71 bl 80199e8 801dd06: 4603 mov r3, r0 801dd08: b2db uxtb r3, r3 801dd0a: f003 0304 and.w r3, r3, #4 801dd0e: 2b00 cmp r3, #0 801dd10: d118 bne.n 801dd44 tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801dd12: 4b1b ldr r3, [pc, #108] @ (801dd80 ) 801dd14: 6819 ldr r1, [r3, #0] 801dd16: 4b1b ldr r3, [pc, #108] @ (801dd84 ) 801dd18: 881b ldrh r3, [r3, #0] 801dd1a: 461a mov r2, r3 801dd1c: 4b1a ldr r3, [pc, #104] @ (801dd88 ) 801dd1e: 681b ldr r3, [r3, #0] 801dd20: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801dd22: 4b16 ldr r3, [pc, #88] @ (801dd7c ) 801dd24: 681b ldr r3, [r3, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801dd26: 885b ldrh r3, [r3, #2] 801dd28: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801dd2a: 4a14 ldr r2, [pc, #80] @ (801dd7c ) 801dd2c: 6812 ldr r2, [r2, #0] tcp_rst(NULL, ackno, seqno + tcplen, ip_current_dest_addr(), 801dd2e: 8812 ldrh r2, [r2, #0] 801dd30: b292 uxth r2, r2 801dd32: 9202 str r2, [sp, #8] 801dd34: 9301 str r3, [sp, #4] 801dd36: 4b15 ldr r3, [pc, #84] @ (801dd8c ) 801dd38: 9300 str r3, [sp, #0] 801dd3a: 4b15 ldr r3, [pc, #84] @ (801dd90 ) 801dd3c: 4602 mov r2, r0 801dd3e: 2000 movs r0, #0 801dd40: f003 fce2 bl 8021708 pbuf_free(p); 801dd44: 6878 ldr r0, [r7, #4] 801dd46: f7fd fb31 bl 801b3ac return; 801dd4a: e00c b.n 801dd66 goto dropped; 801dd4c: bf00 nop 801dd4e: e006 b.n 801dd5e goto dropped; 801dd50: bf00 nop 801dd52: e004 b.n 801dd5e goto dropped; 801dd54: bf00 nop 801dd56: e002 b.n 801dd5e goto dropped; 801dd58: bf00 nop 801dd5a: e000 b.n 801dd5e goto dropped; 801dd5c: bf00 nop dropped: TCP_STATS_INC(tcp.drop); MIB2_STATS_INC(mib2.tcpinerrs); pbuf_free(p); 801dd5e: 6878 ldr r0, [r7, #4] 801dd60: f7fd fb24 bl 801b3ac 801dd64: e000 b.n 801dd68 return; 801dd66: bf00 nop } 801dd68: 3724 adds r7, #36 @ 0x24 801dd6a: 46bd mov sp, r7 801dd6c: bd90 pop {r4, r7, pc} 801dd6e: bf00 nop 801dd70: 2402afc8 .word 0x2402afc8 801dd74: 2402afc4 .word 0x2402afc4 801dd78: 2402af90 .word 0x2402af90 801dd7c: 2402afa4 .word 0x2402afa4 801dd80: 2402afb8 .word 0x2402afb8 801dd84: 2402afbe .word 0x2402afbe 801dd88: 2402afb4 .word 0x2402afb4 801dd8c: 24024438 .word 0x24024438 801dd90: 2402443c .word 0x2402443c 0801dd94 : * any more. * @returns 1 if the pcb has been closed and deallocated, 0 otherwise */ static int tcp_input_delayed_close(struct tcp_pcb *pcb) { 801dd94: b580 push {r7, lr} 801dd96: b082 sub sp, #8 801dd98: af00 add r7, sp, #0 801dd9a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_input_delayed_close: invalid pcb", pcb != NULL); 801dd9c: 687b ldr r3, [r7, #4] 801dd9e: 2b00 cmp r3, #0 801dda0: d106 bne.n 801ddb0 801dda2: 4b17 ldr r3, [pc, #92] @ (801de00 ) 801dda4: f240 225a movw r2, #602 @ 0x25a 801dda8: 4916 ldr r1, [pc, #88] @ (801de04 ) 801ddaa: 4817 ldr r0, [pc, #92] @ (801de08 ) 801ddac: f00c fd76 bl 802a89c if (recv_flags & TF_CLOSED) { 801ddb0: 4b16 ldr r3, [pc, #88] @ (801de0c ) 801ddb2: 781b ldrb r3, [r3, #0] 801ddb4: f003 0310 and.w r3, r3, #16 801ddb8: 2b00 cmp r3, #0 801ddba: d01c beq.n 801ddf6 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 801ddbc: 687b ldr r3, [r7, #4] 801ddbe: 8b5b ldrh r3, [r3, #26] 801ddc0: f003 0310 and.w r3, r3, #16 801ddc4: 2b00 cmp r3, #0 801ddc6: d10d bne.n 801dde4 /* 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); 801ddc8: 687b ldr r3, [r7, #4] 801ddca: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801ddce: 2b00 cmp r3, #0 801ddd0: d008 beq.n 801dde4 801ddd2: 687b ldr r3, [r7, #4] 801ddd4: f8d3 3090 ldr.w r3, [r3, #144] @ 0x90 801ddd8: 687a ldr r2, [r7, #4] 801ddda: 6912 ldr r2, [r2, #16] 801dddc: f06f 010e mvn.w r1, #14 801dde0: 4610 mov r0, r2 801dde2: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 801dde4: 6879 ldr r1, [r7, #4] 801dde6: 480a ldr r0, [pc, #40] @ (801de10 ) 801dde8: f7ff fa4e bl 801d288 tcp_free(pcb); 801ddec: 6878 ldr r0, [r7, #4] 801ddee: f7fd fd99 bl 801b924 return 1; 801ddf2: 2301 movs r3, #1 801ddf4: e000 b.n 801ddf8 } return 0; 801ddf6: 2300 movs r3, #0 } 801ddf8: 4618 mov r0, r3 801ddfa: 3708 adds r7, #8 801ddfc: 46bd mov sp, r7 801ddfe: bd80 pop {r7, pc} 801de00: 0802fd40 .word 0x0802fd40 801de04: 0802ff10 .word 0x0802ff10 801de08: 0802fd8c .word 0x0802fd8c 801de0c: 2402afc1 .word 0x2402afc1 801de10: 2402af84 .word 0x2402af84 0801de14 : * @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) { 801de14: b590 push {r4, r7, lr} 801de16: b08b sub sp, #44 @ 0x2c 801de18: af04 add r7, sp, #16 801de1a: 6078 str r0, [r7, #4] struct tcp_pcb *npcb; u32_t iss; err_t rc; if (flags & TCP_RST) { 801de1c: 4b6f ldr r3, [pc, #444] @ (801dfdc ) 801de1e: 781b ldrb r3, [r3, #0] 801de20: f003 0304 and.w r3, r3, #4 801de24: 2b00 cmp r3, #0 801de26: f040 80d2 bne.w 801dfce /* An incoming RST should be ignored. Return. */ return; } LWIP_ASSERT("tcp_listen_input: invalid pcb", pcb != NULL); 801de2a: 687b ldr r3, [r7, #4] 801de2c: 2b00 cmp r3, #0 801de2e: d106 bne.n 801de3e 801de30: 4b6b ldr r3, [pc, #428] @ (801dfe0 ) 801de32: f240 2281 movw r2, #641 @ 0x281 801de36: 496b ldr r1, [pc, #428] @ (801dfe4 ) 801de38: 486b ldr r0, [pc, #428] @ (801dfe8 ) 801de3a: f00c fd2f bl 802a89c /* In the LISTEN state, we check for incoming SYN segments, creates a new PCB, and responds with a SYN|ACK. */ if (flags & TCP_ACK) { 801de3e: 4b67 ldr r3, [pc, #412] @ (801dfdc ) 801de40: 781b ldrb r3, [r3, #0] 801de42: f003 0310 and.w r3, r3, #16 801de46: 2b00 cmp r3, #0 801de48: d019 beq.n 801de7e /* 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(), 801de4a: 4b68 ldr r3, [pc, #416] @ (801dfec ) 801de4c: 6819 ldr r1, [r3, #0] 801de4e: 4b68 ldr r3, [pc, #416] @ (801dff0 ) 801de50: 881b ldrh r3, [r3, #0] 801de52: 461a mov r2, r3 801de54: 4b67 ldr r3, [pc, #412] @ (801dff4 ) 801de56: 681b ldr r3, [r3, #0] 801de58: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801de5a: 4b67 ldr r3, [pc, #412] @ (801dff8 ) 801de5c: 681b ldr r3, [r3, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801de5e: 885b ldrh r3, [r3, #2] 801de60: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801de62: 4a65 ldr r2, [pc, #404] @ (801dff8 ) 801de64: 6812 ldr r2, [r2, #0] tcp_rst((const struct tcp_pcb *)pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801de66: 8812 ldrh r2, [r2, #0] 801de68: b292 uxth r2, r2 801de6a: 9202 str r2, [sp, #8] 801de6c: 9301 str r3, [sp, #4] 801de6e: 4b63 ldr r3, [pc, #396] @ (801dffc ) 801de70: 9300 str r3, [sp, #0] 801de72: 4b63 ldr r3, [pc, #396] @ (801e000 ) 801de74: 4602 mov r2, r0 801de76: 6878 ldr r0, [r7, #4] 801de78: f003 fc46 bl 8021708 tcp_abandon(npcb, 0); return; } tcp_output(npcb); } return; 801de7c: e0a9 b.n 801dfd2 } else if (flags & TCP_SYN) { 801de7e: 4b57 ldr r3, [pc, #348] @ (801dfdc ) 801de80: 781b ldrb r3, [r3, #0] 801de82: f003 0302 and.w r3, r3, #2 801de86: 2b00 cmp r3, #0 801de88: f000 80a3 beq.w 801dfd2 npcb = tcp_alloc(pcb->prio); 801de8c: 687b ldr r3, [r7, #4] 801de8e: 7d5b ldrb r3, [r3, #21] 801de90: 4618 mov r0, r3 801de92: f7ff f84d bl 801cf30 801de96: 6178 str r0, [r7, #20] if (npcb == NULL) { 801de98: 697b ldr r3, [r7, #20] 801de9a: 2b00 cmp r3, #0 801de9c: d111 bne.n 801dec2 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 801de9e: 687b ldr r3, [r7, #4] 801dea0: 699b ldr r3, [r3, #24] 801dea2: 2b00 cmp r3, #0 801dea4: d00a beq.n 801debc 801dea6: 687b ldr r3, [r7, #4] 801dea8: 699b ldr r3, [r3, #24] 801deaa: 687a ldr r2, [r7, #4] 801deac: 6910 ldr r0, [r2, #16] 801deae: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 801deb2: 2100 movs r1, #0 801deb4: 4798 blx r3 801deb6: 4603 mov r3, r0 801deb8: 73bb strb r3, [r7, #14] return; 801deba: e08b b.n 801dfd4 TCP_EVENT_ACCEPT(pcb, NULL, pcb->callback_arg, ERR_MEM, err); 801debc: 23f0 movs r3, #240 @ 0xf0 801debe: 73bb strb r3, [r7, #14] return; 801dec0: e088 b.n 801dfd4 ip_addr_copy(npcb->local_ip, *ip_current_dest_addr()); 801dec2: 4b50 ldr r3, [pc, #320] @ (801e004 ) 801dec4: 695a ldr r2, [r3, #20] 801dec6: 697b ldr r3, [r7, #20] 801dec8: 601a str r2, [r3, #0] ip_addr_copy(npcb->remote_ip, *ip_current_src_addr()); 801deca: 4b4e ldr r3, [pc, #312] @ (801e004 ) 801decc: 691a ldr r2, [r3, #16] 801dece: 697b ldr r3, [r7, #20] 801ded0: 605a str r2, [r3, #4] npcb->local_port = pcb->local_port; 801ded2: 687b ldr r3, [r7, #4] 801ded4: 8ada ldrh r2, [r3, #22] 801ded6: 697b ldr r3, [r7, #20] 801ded8: 82da strh r2, [r3, #22] npcb->remote_port = tcphdr->src; 801deda: 4b47 ldr r3, [pc, #284] @ (801dff8 ) 801dedc: 681b ldr r3, [r3, #0] 801dede: 881b ldrh r3, [r3, #0] 801dee0: b29a uxth r2, r3 801dee2: 697b ldr r3, [r7, #20] 801dee4: 831a strh r2, [r3, #24] npcb->state = SYN_RCVD; 801dee6: 697b ldr r3, [r7, #20] 801dee8: 2203 movs r2, #3 801deea: 751a strb r2, [r3, #20] npcb->rcv_nxt = seqno + 1; 801deec: 4b41 ldr r3, [pc, #260] @ (801dff4 ) 801deee: 681b ldr r3, [r3, #0] 801def0: 1c5a adds r2, r3, #1 801def2: 697b ldr r3, [r7, #20] 801def4: 625a str r2, [r3, #36] @ 0x24 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 801def6: 697b ldr r3, [r7, #20] 801def8: 6a5a ldr r2, [r3, #36] @ 0x24 801defa: 697b ldr r3, [r7, #20] 801defc: 62da str r2, [r3, #44] @ 0x2c iss = tcp_next_iss(npcb); 801defe: 6978 ldr r0, [r7, #20] 801df00: f7ff fa56 bl 801d3b0 801df04: 6138 str r0, [r7, #16] npcb->snd_wl2 = iss; 801df06: 697b ldr r3, [r7, #20] 801df08: 693a ldr r2, [r7, #16] 801df0a: 659a str r2, [r3, #88] @ 0x58 npcb->snd_nxt = iss; 801df0c: 697b ldr r3, [r7, #20] 801df0e: 693a ldr r2, [r7, #16] 801df10: 651a str r2, [r3, #80] @ 0x50 npcb->lastack = iss; 801df12: 697b ldr r3, [r7, #20] 801df14: 693a ldr r2, [r7, #16] 801df16: 645a str r2, [r3, #68] @ 0x44 npcb->snd_lbb = iss; 801df18: 697b ldr r3, [r7, #20] 801df1a: 693a ldr r2, [r7, #16] 801df1c: 65da str r2, [r3, #92] @ 0x5c npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ 801df1e: 4b35 ldr r3, [pc, #212] @ (801dff4 ) 801df20: 681b ldr r3, [r3, #0] 801df22: 1e5a subs r2, r3, #1 801df24: 697b ldr r3, [r7, #20] 801df26: 655a str r2, [r3, #84] @ 0x54 npcb->callback_arg = pcb->callback_arg; 801df28: 687b ldr r3, [r7, #4] 801df2a: 691a ldr r2, [r3, #16] 801df2c: 697b ldr r3, [r7, #20] 801df2e: 611a str r2, [r3, #16] npcb->listener = pcb; 801df30: 697b ldr r3, [r7, #20] 801df32: 687a ldr r2, [r7, #4] 801df34: 67da str r2, [r3, #124] @ 0x7c npcb->so_options = pcb->so_options & SOF_INHERITED; 801df36: 687b ldr r3, [r7, #4] 801df38: 7a5b ldrb r3, [r3, #9] 801df3a: f003 030c and.w r3, r3, #12 801df3e: b2da uxtb r2, r3 801df40: 697b ldr r3, [r7, #20] 801df42: 725a strb r2, [r3, #9] npcb->netif_idx = pcb->netif_idx; 801df44: 687b ldr r3, [r7, #4] 801df46: 7a1a ldrb r2, [r3, #8] 801df48: 697b ldr r3, [r7, #20] 801df4a: 721a strb r2, [r3, #8] TCP_REG_ACTIVE(npcb); 801df4c: 4b2e ldr r3, [pc, #184] @ (801e008 ) 801df4e: 681a ldr r2, [r3, #0] 801df50: 697b ldr r3, [r7, #20] 801df52: 60da str r2, [r3, #12] 801df54: 4a2c ldr r2, [pc, #176] @ (801e008 ) 801df56: 697b ldr r3, [r7, #20] 801df58: 6013 str r3, [r2, #0] 801df5a: f003 fd97 bl 8021a8c 801df5e: 4b2b ldr r3, [pc, #172] @ (801e00c ) 801df60: 2201 movs r2, #1 801df62: 701a strb r2, [r3, #0] tcp_parseopt(npcb); 801df64: 6978 ldr r0, [r7, #20] 801df66: f001 fd8b bl 801fa80 npcb->snd_wnd = tcphdr->wnd; 801df6a: 4b23 ldr r3, [pc, #140] @ (801dff8 ) 801df6c: 681b ldr r3, [r3, #0] 801df6e: 89db ldrh r3, [r3, #14] 801df70: b29a uxth r2, r3 801df72: 697b ldr r3, [r7, #20] 801df74: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 npcb->snd_wnd_max = npcb->snd_wnd; 801df78: 697b ldr r3, [r7, #20] 801df7a: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801df7e: 697b ldr r3, [r7, #20] 801df80: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 npcb->mss = tcp_eff_send_mss(npcb->mss, &npcb->local_ip, &npcb->remote_ip); 801df84: 697b ldr r3, [r7, #20] 801df86: 8e5c ldrh r4, [r3, #50] @ 0x32 801df88: 697b ldr r3, [r7, #20] 801df8a: 3304 adds r3, #4 801df8c: 4618 mov r0, r3 801df8e: f007 fc77 bl 8025880 801df92: 4601 mov r1, r0 801df94: 697b ldr r3, [r7, #20] 801df96: 3304 adds r3, #4 801df98: 461a mov r2, r3 801df9a: 4620 mov r0, r4 801df9c: f7ff fa2e bl 801d3fc 801dfa0: 4603 mov r3, r0 801dfa2: 461a mov r2, r3 801dfa4: 697b ldr r3, [r7, #20] 801dfa6: 865a strh r2, [r3, #50] @ 0x32 rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 801dfa8: 2112 movs r1, #18 801dfaa: 6978 ldr r0, [r7, #20] 801dfac: f002 fcfc bl 80209a8 801dfb0: 4603 mov r3, r0 801dfb2: 73fb strb r3, [r7, #15] if (rc != ERR_OK) { 801dfb4: f997 300f ldrsb.w r3, [r7, #15] 801dfb8: 2b00 cmp r3, #0 801dfba: d004 beq.n 801dfc6 tcp_abandon(npcb, 0); 801dfbc: 2100 movs r1, #0 801dfbe: 6978 ldr r0, [r7, #20] 801dfc0: f7fd ff3a bl 801be38 return; 801dfc4: e006 b.n 801dfd4 tcp_output(npcb); 801dfc6: 6978 ldr r0, [r7, #20] 801dfc8: f002 fddc bl 8020b84 return; 801dfcc: e001 b.n 801dfd2 return; 801dfce: bf00 nop 801dfd0: e000 b.n 801dfd4 return; 801dfd2: bf00 nop } 801dfd4: 371c adds r7, #28 801dfd6: 46bd mov sp, r7 801dfd8: bd90 pop {r4, r7, pc} 801dfda: bf00 nop 801dfdc: 2402afc0 .word 0x2402afc0 801dfe0: 0802fd40 .word 0x0802fd40 801dfe4: 0802ff38 .word 0x0802ff38 801dfe8: 0802fd8c .word 0x0802fd8c 801dfec: 2402afb8 .word 0x2402afb8 801dff0: 2402afbe .word 0x2402afbe 801dff4: 2402afb4 .word 0x2402afb4 801dff8: 2402afa4 .word 0x2402afa4 801dffc: 24024438 .word 0x24024438 801e000: 2402443c .word 0x2402443c 801e004: 24024428 .word 0x24024428 801e008: 2402af84 .word 0x2402af84 801e00c: 2402af8c .word 0x2402af8c 0801e010 : * @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) { 801e010: b580 push {r7, lr} 801e012: b086 sub sp, #24 801e014: af04 add r7, sp, #16 801e016: 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) { 801e018: 4b2f ldr r3, [pc, #188] @ (801e0d8 ) 801e01a: 781b ldrb r3, [r3, #0] 801e01c: f003 0304 and.w r3, r3, #4 801e020: 2b00 cmp r3, #0 801e022: d153 bne.n 801e0cc return; } LWIP_ASSERT("tcp_timewait_input: invalid pcb", pcb != NULL); 801e024: 687b ldr r3, [r7, #4] 801e026: 2b00 cmp r3, #0 801e028: d106 bne.n 801e038 801e02a: 4b2c ldr r3, [pc, #176] @ (801e0dc ) 801e02c: f240 22ee movw r2, #750 @ 0x2ee 801e030: 492b ldr r1, [pc, #172] @ (801e0e0 ) 801e032: 482c ldr r0, [pc, #176] @ (801e0e4 ) 801e034: f00c fc32 bl 802a89c /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 801e038: 4b27 ldr r3, [pc, #156] @ (801e0d8 ) 801e03a: 781b ldrb r3, [r3, #0] 801e03c: f003 0302 and.w r3, r3, #2 801e040: 2b00 cmp r3, #0 801e042: d02a beq.n 801e09a /* 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)) { 801e044: 4b28 ldr r3, [pc, #160] @ (801e0e8 ) 801e046: 681a ldr r2, [r3, #0] 801e048: 687b ldr r3, [r7, #4] 801e04a: 6a5b ldr r3, [r3, #36] @ 0x24 801e04c: 1ad3 subs r3, r2, r3 801e04e: 2b00 cmp r3, #0 801e050: db2d blt.n 801e0ae 801e052: 4b25 ldr r3, [pc, #148] @ (801e0e8 ) 801e054: 681a ldr r2, [r3, #0] 801e056: 687b ldr r3, [r7, #4] 801e058: 6a5b ldr r3, [r3, #36] @ 0x24 801e05a: 6879 ldr r1, [r7, #4] 801e05c: 8d09 ldrh r1, [r1, #40] @ 0x28 801e05e: 440b add r3, r1 801e060: 1ad3 subs r3, r2, r3 801e062: 2b00 cmp r3, #0 801e064: dc23 bgt.n 801e0ae /* If the SYN is in the window it is an error, send a reset */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e066: 4b21 ldr r3, [pc, #132] @ (801e0ec ) 801e068: 6819 ldr r1, [r3, #0] 801e06a: 4b21 ldr r3, [pc, #132] @ (801e0f0 ) 801e06c: 881b ldrh r3, [r3, #0] 801e06e: 461a mov r2, r3 801e070: 4b1d ldr r3, [pc, #116] @ (801e0e8 ) 801e072: 681b ldr r3, [r3, #0] 801e074: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e076: 4b1f ldr r3, [pc, #124] @ (801e0f4 ) 801e078: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e07a: 885b ldrh r3, [r3, #2] 801e07c: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e07e: 4a1d ldr r2, [pc, #116] @ (801e0f4 ) 801e080: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e082: 8812 ldrh r2, [r2, #0] 801e084: b292 uxth r2, r2 801e086: 9202 str r2, [sp, #8] 801e088: 9301 str r3, [sp, #4] 801e08a: 4b1b ldr r3, [pc, #108] @ (801e0f8 ) 801e08c: 9300 str r3, [sp, #0] 801e08e: 4b1b ldr r3, [pc, #108] @ (801e0fc ) 801e090: 4602 mov r2, r0 801e092: 6878 ldr r0, [r7, #4] 801e094: f003 fb38 bl 8021708 return; 801e098: e01b b.n 801e0d2 } } else if (flags & TCP_FIN) { 801e09a: 4b0f ldr r3, [pc, #60] @ (801e0d8 ) 801e09c: 781b ldrb r3, [r3, #0] 801e09e: f003 0301 and.w r3, r3, #1 801e0a2: 2b00 cmp r3, #0 801e0a4: d003 beq.n 801e0ae /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 801e0a6: 4b16 ldr r3, [pc, #88] @ (801e100 ) 801e0a8: 681a ldr r2, [r3, #0] 801e0aa: 687b ldr r3, [r7, #4] 801e0ac: 621a str r2, [r3, #32] } if ((tcplen > 0)) { 801e0ae: 4b10 ldr r3, [pc, #64] @ (801e0f0 ) 801e0b0: 881b ldrh r3, [r3, #0] 801e0b2: 2b00 cmp r3, #0 801e0b4: d00c beq.n 801e0d0 /* Acknowledge data, FIN or out-of-window SYN */ tcp_ack_now(pcb); 801e0b6: 687b ldr r3, [r7, #4] 801e0b8: 8b5b ldrh r3, [r3, #26] 801e0ba: f043 0302 orr.w r3, r3, #2 801e0be: b29a uxth r2, r3 801e0c0: 687b ldr r3, [r7, #4] 801e0c2: 835a strh r2, [r3, #26] tcp_output(pcb); 801e0c4: 6878 ldr r0, [r7, #4] 801e0c6: f002 fd5d bl 8020b84 } return; 801e0ca: e001 b.n 801e0d0 return; 801e0cc: bf00 nop 801e0ce: e000 b.n 801e0d2 return; 801e0d0: bf00 nop } 801e0d2: 3708 adds r7, #8 801e0d4: 46bd mov sp, r7 801e0d6: bd80 pop {r7, pc} 801e0d8: 2402afc0 .word 0x2402afc0 801e0dc: 0802fd40 .word 0x0802fd40 801e0e0: 0802ff58 .word 0x0802ff58 801e0e4: 0802fd8c .word 0x0802fd8c 801e0e8: 2402afb4 .word 0x2402afb4 801e0ec: 2402afb8 .word 0x2402afb8 801e0f0: 2402afbe .word 0x2402afbe 801e0f4: 2402afa4 .word 0x2402afa4 801e0f8: 24024438 .word 0x24024438 801e0fc: 2402443c .word 0x2402443c 801e100: 2402af78 .word 0x2402af78 0801e104 : * @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) { 801e104: b590 push {r4, r7, lr} 801e106: b08d sub sp, #52 @ 0x34 801e108: af04 add r7, sp, #16 801e10a: 6078 str r0, [r7, #4] struct tcp_seg *rseg; u8_t acceptable = 0; 801e10c: 2300 movs r3, #0 801e10e: 77fb strb r3, [r7, #31] err_t err; err = ERR_OK; 801e110: 2300 movs r3, #0 801e112: 77bb strb r3, [r7, #30] LWIP_ASSERT("tcp_process: invalid pcb", pcb != NULL); 801e114: 687b ldr r3, [r7, #4] 801e116: 2b00 cmp r3, #0 801e118: d106 bne.n 801e128 801e11a: 4b9d ldr r3, [pc, #628] @ (801e390 ) 801e11c: f44f 7247 mov.w r2, #796 @ 0x31c 801e120: 499c ldr r1, [pc, #624] @ (801e394 ) 801e122: 489d ldr r0, [pc, #628] @ (801e398 ) 801e124: f00c fbba bl 802a89c /* Process incoming RST segments. */ if (flags & TCP_RST) { 801e128: 4b9c ldr r3, [pc, #624] @ (801e39c ) 801e12a: 781b ldrb r3, [r3, #0] 801e12c: f003 0304 and.w r3, r3, #4 801e130: 2b00 cmp r3, #0 801e132: d04e beq.n 801e1d2 /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 801e134: 687b ldr r3, [r7, #4] 801e136: 7d1b ldrb r3, [r3, #20] 801e138: 2b02 cmp r3, #2 801e13a: d108 bne.n 801e14e /* "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) { 801e13c: 687b ldr r3, [r7, #4] 801e13e: 6d1a ldr r2, [r3, #80] @ 0x50 801e140: 4b97 ldr r3, [pc, #604] @ (801e3a0 ) 801e142: 681b ldr r3, [r3, #0] 801e144: 429a cmp r2, r3 801e146: d123 bne.n 801e190 acceptable = 1; 801e148: 2301 movs r3, #1 801e14a: 77fb strb r3, [r7, #31] 801e14c: e020 b.n 801e190 } } else { /* "In all states except SYN-SENT, all reset (RST) segments are validated by checking their SEQ-fields." */ if (seqno == pcb->rcv_nxt) { 801e14e: 687b ldr r3, [r7, #4] 801e150: 6a5a ldr r2, [r3, #36] @ 0x24 801e152: 4b94 ldr r3, [pc, #592] @ (801e3a4 ) 801e154: 681b ldr r3, [r3, #0] 801e156: 429a cmp r2, r3 801e158: d102 bne.n 801e160 acceptable = 1; 801e15a: 2301 movs r3, #1 801e15c: 77fb strb r3, [r7, #31] 801e15e: e017 b.n 801e190 } else if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 801e160: 4b90 ldr r3, [pc, #576] @ (801e3a4 ) 801e162: 681a ldr r2, [r3, #0] 801e164: 687b ldr r3, [r7, #4] 801e166: 6a5b ldr r3, [r3, #36] @ 0x24 801e168: 1ad3 subs r3, r2, r3 801e16a: 2b00 cmp r3, #0 801e16c: db10 blt.n 801e190 801e16e: 4b8d ldr r3, [pc, #564] @ (801e3a4 ) 801e170: 681a ldr r2, [r3, #0] 801e172: 687b ldr r3, [r7, #4] 801e174: 6a5b ldr r3, [r3, #36] @ 0x24 801e176: 6879 ldr r1, [r7, #4] 801e178: 8d09 ldrh r1, [r1, #40] @ 0x28 801e17a: 440b add r3, r1 801e17c: 1ad3 subs r3, r2, r3 801e17e: 2b00 cmp r3, #0 801e180: dc06 bgt.n 801e190 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); 801e182: 687b ldr r3, [r7, #4] 801e184: 8b5b ldrh r3, [r3, #26] 801e186: f043 0302 orr.w r3, r3, #2 801e18a: b29a uxth r2, r3 801e18c: 687b ldr r3, [r7, #4] 801e18e: 835a strh r2, [r3, #26] } } if (acceptable) { 801e190: 7ffb ldrb r3, [r7, #31] 801e192: 2b00 cmp r3, #0 801e194: d01b beq.n 801e1ce LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); 801e196: 687b ldr r3, [r7, #4] 801e198: 7d1b ldrb r3, [r3, #20] 801e19a: 2b00 cmp r3, #0 801e19c: d106 bne.n 801e1ac 801e19e: 4b7c ldr r3, [pc, #496] @ (801e390 ) 801e1a0: f44f 724e mov.w r2, #824 @ 0x338 801e1a4: 4980 ldr r1, [pc, #512] @ (801e3a8 ) 801e1a6: 487c ldr r0, [pc, #496] @ (801e398 ) 801e1a8: f00c fb78 bl 802a89c recv_flags |= TF_RESET; 801e1ac: 4b7f ldr r3, [pc, #508] @ (801e3ac ) 801e1ae: 781b ldrb r3, [r3, #0] 801e1b0: f043 0308 orr.w r3, r3, #8 801e1b4: b2da uxtb r2, r3 801e1b6: 4b7d ldr r3, [pc, #500] @ (801e3ac ) 801e1b8: 701a strb r2, [r3, #0] tcp_clear_flags(pcb, TF_ACK_DELAY); 801e1ba: 687b ldr r3, [r7, #4] 801e1bc: 8b5b ldrh r3, [r3, #26] 801e1be: f023 0301 bic.w r3, r3, #1 801e1c2: b29a uxth r2, r3 801e1c4: 687b ldr r3, [r7, #4] 801e1c6: 835a strh r2, [r3, #26] return ERR_RST; 801e1c8: f06f 030d mvn.w r3, #13 801e1cc: e37a b.n 801e8c4 } 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; 801e1ce: 2300 movs r3, #0 801e1d0: e378 b.n 801e8c4 } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 801e1d2: 4b72 ldr r3, [pc, #456] @ (801e39c ) 801e1d4: 781b ldrb r3, [r3, #0] 801e1d6: f003 0302 and.w r3, r3, #2 801e1da: 2b00 cmp r3, #0 801e1dc: d010 beq.n 801e200 801e1de: 687b ldr r3, [r7, #4] 801e1e0: 7d1b ldrb r3, [r3, #20] 801e1e2: 2b02 cmp r3, #2 801e1e4: d00c beq.n 801e200 801e1e6: 687b ldr r3, [r7, #4] 801e1e8: 7d1b ldrb r3, [r3, #20] 801e1ea: 2b03 cmp r3, #3 801e1ec: d008 beq.n 801e200 /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); 801e1ee: 687b ldr r3, [r7, #4] 801e1f0: 8b5b ldrh r3, [r3, #26] 801e1f2: f043 0302 orr.w r3, r3, #2 801e1f6: b29a uxth r2, r3 801e1f8: 687b ldr r3, [r7, #4] 801e1fa: 835a strh r2, [r3, #26] return ERR_OK; 801e1fc: 2300 movs r3, #0 801e1fe: e361 b.n 801e8c4 } if ((pcb->flags & TF_RXCLOSED) == 0) { 801e200: 687b ldr r3, [r7, #4] 801e202: 8b5b ldrh r3, [r3, #26] 801e204: f003 0310 and.w r3, r3, #16 801e208: 2b00 cmp r3, #0 801e20a: d103 bne.n 801e214 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 801e20c: 4b68 ldr r3, [pc, #416] @ (801e3b0 ) 801e20e: 681a ldr r2, [r3, #0] 801e210: 687b ldr r3, [r7, #4] 801e212: 621a str r2, [r3, #32] } pcb->keep_cnt_sent = 0; 801e214: 687b ldr r3, [r7, #4] 801e216: 2200 movs r2, #0 801e218: f883 209b strb.w r2, [r3, #155] @ 0x9b pcb->persist_probe = 0; 801e21c: 687b ldr r3, [r7, #4] 801e21e: 2200 movs r2, #0 801e220: f883 209a strb.w r2, [r3, #154] @ 0x9a tcp_parseopt(pcb); 801e224: 6878 ldr r0, [r7, #4] 801e226: f001 fc2b bl 801fa80 /* Do different things depending on the TCP state. */ switch (pcb->state) { 801e22a: 687b ldr r3, [r7, #4] 801e22c: 7d1b ldrb r3, [r3, #20] 801e22e: 3b02 subs r3, #2 801e230: 2b07 cmp r3, #7 801e232: f200 8337 bhi.w 801e8a4 801e236: a201 add r2, pc, #4 @ (adr r2, 801e23c ) 801e238: f852 f023 ldr.w pc, [r2, r3, lsl #2] 801e23c: 0801e25d .word 0x0801e25d 801e240: 0801e48d .word 0x0801e48d 801e244: 0801e605 .word 0x0801e605 801e248: 0801e62f .word 0x0801e62f 801e24c: 0801e753 .word 0x0801e753 801e250: 0801e605 .word 0x0801e605 801e254: 0801e7df .word 0x0801e7df 801e258: 0801e86f .word 0x0801e86f 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) 801e25c: 4b4f ldr r3, [pc, #316] @ (801e39c ) 801e25e: 781b ldrb r3, [r3, #0] 801e260: f003 0310 and.w r3, r3, #16 801e264: 2b00 cmp r3, #0 801e266: f000 80e4 beq.w 801e432 801e26a: 4b4c ldr r3, [pc, #304] @ (801e39c ) 801e26c: 781b ldrb r3, [r3, #0] 801e26e: f003 0302 and.w r3, r3, #2 801e272: 2b00 cmp r3, #0 801e274: f000 80dd beq.w 801e432 && (ackno == pcb->lastack + 1)) { 801e278: 687b ldr r3, [r7, #4] 801e27a: 6c5b ldr r3, [r3, #68] @ 0x44 801e27c: 1c5a adds r2, r3, #1 801e27e: 4b48 ldr r3, [pc, #288] @ (801e3a0 ) 801e280: 681b ldr r3, [r3, #0] 801e282: 429a cmp r2, r3 801e284: f040 80d5 bne.w 801e432 pcb->rcv_nxt = seqno + 1; 801e288: 4b46 ldr r3, [pc, #280] @ (801e3a4 ) 801e28a: 681b ldr r3, [r3, #0] 801e28c: 1c5a adds r2, r3, #1 801e28e: 687b ldr r3, [r7, #4] 801e290: 625a str r2, [r3, #36] @ 0x24 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 801e292: 687b ldr r3, [r7, #4] 801e294: 6a5a ldr r2, [r3, #36] @ 0x24 801e296: 687b ldr r3, [r7, #4] 801e298: 62da str r2, [r3, #44] @ 0x2c pcb->lastack = ackno; 801e29a: 4b41 ldr r3, [pc, #260] @ (801e3a0 ) 801e29c: 681a ldr r2, [r3, #0] 801e29e: 687b ldr r3, [r7, #4] 801e2a0: 645a str r2, [r3, #68] @ 0x44 pcb->snd_wnd = tcphdr->wnd; 801e2a2: 4b44 ldr r3, [pc, #272] @ (801e3b4 ) 801e2a4: 681b ldr r3, [r3, #0] 801e2a6: 89db ldrh r3, [r3, #14] 801e2a8: b29a uxth r2, r3 801e2aa: 687b ldr r3, [r7, #4] 801e2ac: f8a3 2060 strh.w r2, [r3, #96] @ 0x60 pcb->snd_wnd_max = pcb->snd_wnd; 801e2b0: 687b ldr r3, [r7, #4] 801e2b2: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801e2b6: 687b ldr r3, [r7, #4] 801e2b8: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 801e2bc: 4b39 ldr r3, [pc, #228] @ (801e3a4 ) 801e2be: 681b ldr r3, [r3, #0] 801e2c0: 1e5a subs r2, r3, #1 801e2c2: 687b ldr r3, [r7, #4] 801e2c4: 655a str r2, [r3, #84] @ 0x54 pcb->state = ESTABLISHED; 801e2c6: 687b ldr r3, [r7, #4] 801e2c8: 2204 movs r2, #4 801e2ca: 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); 801e2cc: 687b ldr r3, [r7, #4] 801e2ce: 8e5c ldrh r4, [r3, #50] @ 0x32 801e2d0: 687b ldr r3, [r7, #4] 801e2d2: 3304 adds r3, #4 801e2d4: 4618 mov r0, r3 801e2d6: f007 fad3 bl 8025880 801e2da: 4601 mov r1, r0 801e2dc: 687b ldr r3, [r7, #4] 801e2de: 3304 adds r3, #4 801e2e0: 461a mov r2, r3 801e2e2: 4620 mov r0, r4 801e2e4: f7ff f88a bl 801d3fc 801e2e8: 4603 mov r3, r0 801e2ea: 461a mov r2, r3 801e2ec: 687b ldr r3, [r7, #4] 801e2ee: 865a strh r2, [r3, #50] @ 0x32 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 801e2f0: 687b ldr r3, [r7, #4] 801e2f2: 8e5b ldrh r3, [r3, #50] @ 0x32 801e2f4: 009a lsls r2, r3, #2 801e2f6: 687b ldr r3, [r7, #4] 801e2f8: 8e5b ldrh r3, [r3, #50] @ 0x32 801e2fa: 005b lsls r3, r3, #1 801e2fc: f241 111c movw r1, #4380 @ 0x111c 801e300: 428b cmp r3, r1 801e302: bf38 it cc 801e304: 460b movcc r3, r1 801e306: 429a cmp r2, r3 801e308: d204 bcs.n 801e314 801e30a: 687b ldr r3, [r7, #4] 801e30c: 8e5b ldrh r3, [r3, #50] @ 0x32 801e30e: 009b lsls r3, r3, #2 801e310: b29b uxth r3, r3 801e312: e00d b.n 801e330 801e314: 687b ldr r3, [r7, #4] 801e316: 8e5b ldrh r3, [r3, #50] @ 0x32 801e318: 005b lsls r3, r3, #1 801e31a: f241 121c movw r2, #4380 @ 0x111c 801e31e: 4293 cmp r3, r2 801e320: d904 bls.n 801e32c 801e322: 687b ldr r3, [r7, #4] 801e324: 8e5b ldrh r3, [r3, #50] @ 0x32 801e326: 005b lsls r3, r3, #1 801e328: b29b uxth r3, r3 801e32a: e001 b.n 801e330 801e32c: f241 131c movw r3, #4380 @ 0x111c 801e330: 687a ldr r2, [r7, #4] 801e332: 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)); 801e336: 687b ldr r3, [r7, #4] 801e338: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801e33c: 2b00 cmp r3, #0 801e33e: d106 bne.n 801e34e 801e340: 4b13 ldr r3, [pc, #76] @ (801e390 ) 801e342: f44f 725b mov.w r2, #876 @ 0x36c 801e346: 491c ldr r1, [pc, #112] @ (801e3b8 ) 801e348: 4813 ldr r0, [pc, #76] @ (801e398 ) 801e34a: f00c faa7 bl 802a89c --pcb->snd_queuelen; 801e34e: 687b ldr r3, [r7, #4] 801e350: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801e354: 3b01 subs r3, #1 801e356: b29a uxth r2, r3 801e358: 687b ldr r3, [r7, #4] 801e35a: 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; 801e35e: 687b ldr r3, [r7, #4] 801e360: 6f1b ldr r3, [r3, #112] @ 0x70 801e362: 617b str r3, [r7, #20] if (rseg == NULL) { 801e364: 697b ldr r3, [r7, #20] 801e366: 2b00 cmp r3, #0 801e368: d12a bne.n 801e3c0 /* might happen if tcp_output fails in tcp_rexmit_rto() in which case the segment is on the unsent list */ rseg = pcb->unsent; 801e36a: 687b ldr r3, [r7, #4] 801e36c: 6edb ldr r3, [r3, #108] @ 0x6c 801e36e: 617b str r3, [r7, #20] LWIP_ASSERT("no segment to free", rseg != NULL); 801e370: 697b ldr r3, [r7, #20] 801e372: 2b00 cmp r3, #0 801e374: d106 bne.n 801e384 801e376: 4b06 ldr r3, [pc, #24] @ (801e390 ) 801e378: f44f 725d mov.w r2, #884 @ 0x374 801e37c: 490f ldr r1, [pc, #60] @ (801e3bc ) 801e37e: 4806 ldr r0, [pc, #24] @ (801e398 ) 801e380: f00c fa8c bl 802a89c pcb->unsent = rseg->next; 801e384: 697b ldr r3, [r7, #20] 801e386: 681a ldr r2, [r3, #0] 801e388: 687b ldr r3, [r7, #4] 801e38a: 66da str r2, [r3, #108] @ 0x6c 801e38c: e01c b.n 801e3c8 801e38e: bf00 nop 801e390: 0802fd40 .word 0x0802fd40 801e394: 0802ff78 .word 0x0802ff78 801e398: 0802fd8c .word 0x0802fd8c 801e39c: 2402afc0 .word 0x2402afc0 801e3a0: 2402afb8 .word 0x2402afb8 801e3a4: 2402afb4 .word 0x2402afb4 801e3a8: 0802ff94 .word 0x0802ff94 801e3ac: 2402afc1 .word 0x2402afc1 801e3b0: 2402af78 .word 0x2402af78 801e3b4: 2402afa4 .word 0x2402afa4 801e3b8: 0802ffb4 .word 0x0802ffb4 801e3bc: 0802ffcc .word 0x0802ffcc } else { pcb->unacked = rseg->next; 801e3c0: 697b ldr r3, [r7, #20] 801e3c2: 681a ldr r2, [r3, #0] 801e3c4: 687b ldr r3, [r7, #4] 801e3c6: 671a str r2, [r3, #112] @ 0x70 } tcp_seg_free(rseg); 801e3c8: 6978 ldr r0, [r7, #20] 801e3ca: f7fe fc48 bl 801cc5e /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if (pcb->unacked == NULL) { 801e3ce: 687b ldr r3, [r7, #4] 801e3d0: 6f1b ldr r3, [r3, #112] @ 0x70 801e3d2: 2b00 cmp r3, #0 801e3d4: d104 bne.n 801e3e0 pcb->rtime = -1; 801e3d6: 687b ldr r3, [r7, #4] 801e3d8: f64f 72ff movw r2, #65535 @ 0xffff 801e3dc: 861a strh r2, [r3, #48] @ 0x30 801e3de: e006 b.n 801e3ee } else { pcb->rtime = 0; 801e3e0: 687b ldr r3, [r7, #4] 801e3e2: 2200 movs r2, #0 801e3e4: 861a strh r2, [r3, #48] @ 0x30 pcb->nrtx = 0; 801e3e6: 687b ldr r3, [r7, #4] 801e3e8: 2200 movs r2, #0 801e3ea: 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); 801e3ee: 687b ldr r3, [r7, #4] 801e3f0: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 801e3f4: 2b00 cmp r3, #0 801e3f6: d00a beq.n 801e40e 801e3f8: 687b ldr r3, [r7, #4] 801e3fa: f8d3 3088 ldr.w r3, [r3, #136] @ 0x88 801e3fe: 687a ldr r2, [r7, #4] 801e400: 6910 ldr r0, [r2, #16] 801e402: 2200 movs r2, #0 801e404: 6879 ldr r1, [r7, #4] 801e406: 4798 blx r3 801e408: 4603 mov r3, r0 801e40a: 77bb strb r3, [r7, #30] 801e40c: e001 b.n 801e412 801e40e: 2300 movs r3, #0 801e410: 77bb strb r3, [r7, #30] if (err == ERR_ABRT) { 801e412: f997 301e ldrsb.w r3, [r7, #30] 801e416: f113 0f0d cmn.w r3, #13 801e41a: d102 bne.n 801e422 return ERR_ABRT; 801e41c: f06f 030c mvn.w r3, #12 801e420: e250 b.n 801e8c4 } tcp_ack_now(pcb); 801e422: 687b ldr r3, [r7, #4] 801e424: 8b5b ldrh r3, [r3, #26] 801e426: f043 0302 orr.w r3, r3, #2 801e42a: b29a uxth r2, r3 801e42c: 687b ldr r3, [r7, #4] 801e42e: 835a strh r2, [r3, #26] if (pcb->nrtx < TCP_SYNMAXRTX) { pcb->rtime = 0; tcp_rexmit_rto(pcb); } } break; 801e430: e23a b.n 801e8a8 else if (flags & TCP_ACK) { 801e432: 4b98 ldr r3, [pc, #608] @ (801e694 ) 801e434: 781b ldrb r3, [r3, #0] 801e436: f003 0310 and.w r3, r3, #16 801e43a: 2b00 cmp r3, #0 801e43c: f000 8234 beq.w 801e8a8 tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e440: 4b95 ldr r3, [pc, #596] @ (801e698 ) 801e442: 6819 ldr r1, [r3, #0] 801e444: 4b95 ldr r3, [pc, #596] @ (801e69c ) 801e446: 881b ldrh r3, [r3, #0] 801e448: 461a mov r2, r3 801e44a: 4b95 ldr r3, [pc, #596] @ (801e6a0 ) 801e44c: 681b ldr r3, [r3, #0] 801e44e: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e450: 4b94 ldr r3, [pc, #592] @ (801e6a4 ) 801e452: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e454: 885b ldrh r3, [r3, #2] 801e456: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e458: 4a92 ldr r2, [pc, #584] @ (801e6a4 ) 801e45a: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e45c: 8812 ldrh r2, [r2, #0] 801e45e: b292 uxth r2, r2 801e460: 9202 str r2, [sp, #8] 801e462: 9301 str r3, [sp, #4] 801e464: 4b90 ldr r3, [pc, #576] @ (801e6a8 ) 801e466: 9300 str r3, [sp, #0] 801e468: 4b90 ldr r3, [pc, #576] @ (801e6ac ) 801e46a: 4602 mov r2, r0 801e46c: 6878 ldr r0, [r7, #4] 801e46e: f003 f94b bl 8021708 if (pcb->nrtx < TCP_SYNMAXRTX) { 801e472: 687b ldr r3, [r7, #4] 801e474: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 801e478: 2b05 cmp r3, #5 801e47a: f200 8215 bhi.w 801e8a8 pcb->rtime = 0; 801e47e: 687b ldr r3, [r7, #4] 801e480: 2200 movs r2, #0 801e482: 861a strh r2, [r3, #48] @ 0x30 tcp_rexmit_rto(pcb); 801e484: 6878 ldr r0, [r7, #4] 801e486: f002 ff17 bl 80212b8 break; 801e48a: e20d b.n 801e8a8 case SYN_RCVD: if (flags & TCP_ACK) { 801e48c: 4b81 ldr r3, [pc, #516] @ (801e694 ) 801e48e: 781b ldrb r3, [r3, #0] 801e490: f003 0310 and.w r3, r3, #16 801e494: 2b00 cmp r3, #0 801e496: f000 80a1 beq.w 801e5dc /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801e49a: 4b7f ldr r3, [pc, #508] @ (801e698 ) 801e49c: 681a ldr r2, [r3, #0] 801e49e: 687b ldr r3, [r7, #4] 801e4a0: 6c5b ldr r3, [r3, #68] @ 0x44 801e4a2: 1ad3 subs r3, r2, r3 801e4a4: 3b01 subs r3, #1 801e4a6: 2b00 cmp r3, #0 801e4a8: db7e blt.n 801e5a8 801e4aa: 4b7b ldr r3, [pc, #492] @ (801e698 ) 801e4ac: 681a ldr r2, [r3, #0] 801e4ae: 687b ldr r3, [r7, #4] 801e4b0: 6d1b ldr r3, [r3, #80] @ 0x50 801e4b2: 1ad3 subs r3, r2, r3 801e4b4: 2b00 cmp r3, #0 801e4b6: dc77 bgt.n 801e5a8 pcb->state = ESTABLISHED; 801e4b8: 687b ldr r3, [r7, #4] 801e4ba: 2204 movs r2, #4 801e4bc: 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) { 801e4be: 687b ldr r3, [r7, #4] 801e4c0: 6fdb ldr r3, [r3, #124] @ 0x7c 801e4c2: 2b00 cmp r3, #0 801e4c4: d102 bne.n 801e4cc /* listen pcb might be closed by now */ err = ERR_VAL; 801e4c6: 23fa movs r3, #250 @ 0xfa 801e4c8: 77bb strb r3, [r7, #30] 801e4ca: e01d b.n 801e508 } else #endif /* LWIP_CALLBACK_API || TCP_LISTEN_BACKLOG */ { #if LWIP_CALLBACK_API LWIP_ASSERT("pcb->listener->accept != NULL", pcb->listener->accept != NULL); 801e4cc: 687b ldr r3, [r7, #4] 801e4ce: 6fdb ldr r3, [r3, #124] @ 0x7c 801e4d0: 699b ldr r3, [r3, #24] 801e4d2: 2b00 cmp r3, #0 801e4d4: d106 bne.n 801e4e4 801e4d6: 4b76 ldr r3, [pc, #472] @ (801e6b0 ) 801e4d8: f44f 726a mov.w r2, #936 @ 0x3a8 801e4dc: 4975 ldr r1, [pc, #468] @ (801e6b4 ) 801e4de: 4876 ldr r0, [pc, #472] @ (801e6b8 ) 801e4e0: f00c f9dc bl 802a89c #endif tcp_backlog_accepted(pcb); /* Call the accept function. */ TCP_EVENT_ACCEPT(pcb->listener, pcb, pcb->callback_arg, ERR_OK, err); 801e4e4: 687b ldr r3, [r7, #4] 801e4e6: 6fdb ldr r3, [r3, #124] @ 0x7c 801e4e8: 699b ldr r3, [r3, #24] 801e4ea: 2b00 cmp r3, #0 801e4ec: d00a beq.n 801e504 801e4ee: 687b ldr r3, [r7, #4] 801e4f0: 6fdb ldr r3, [r3, #124] @ 0x7c 801e4f2: 699b ldr r3, [r3, #24] 801e4f4: 687a ldr r2, [r7, #4] 801e4f6: 6910 ldr r0, [r2, #16] 801e4f8: 2200 movs r2, #0 801e4fa: 6879 ldr r1, [r7, #4] 801e4fc: 4798 blx r3 801e4fe: 4603 mov r3, r0 801e500: 77bb strb r3, [r7, #30] 801e502: e001 b.n 801e508 801e504: 23f0 movs r3, #240 @ 0xf0 801e506: 77bb strb r3, [r7, #30] } if (err != ERR_OK) { 801e508: f997 301e ldrsb.w r3, [r7, #30] 801e50c: 2b00 cmp r3, #0 801e50e: d00a beq.n 801e526 /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 801e510: f997 301e ldrsb.w r3, [r7, #30] 801e514: f113 0f0d cmn.w r3, #13 801e518: d002 beq.n 801e520 tcp_abort(pcb); 801e51a: 6878 ldr r0, [r7, #4] 801e51c: f7fd fd4c bl 801bfb8 } return ERR_ABRT; 801e520: f06f 030c mvn.w r3, #12 801e524: e1ce b.n 801e8c4 } /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 801e526: 6878 ldr r0, [r7, #4] 801e528: f000 fae0 bl 801eaec /* Prevent ACK for SYN to generate a sent event */ if (recv_acked != 0) { 801e52c: 4b63 ldr r3, [pc, #396] @ (801e6bc ) 801e52e: 881b ldrh r3, [r3, #0] 801e530: 2b00 cmp r3, #0 801e532: d005 beq.n 801e540 recv_acked--; 801e534: 4b61 ldr r3, [pc, #388] @ (801e6bc ) 801e536: 881b ldrh r3, [r3, #0] 801e538: 3b01 subs r3, #1 801e53a: b29a uxth r2, r3 801e53c: 4b5f ldr r3, [pc, #380] @ (801e6bc ) 801e53e: 801a strh r2, [r3, #0] } pcb->cwnd = LWIP_TCP_CALC_INITIAL_CWND(pcb->mss); 801e540: 687b ldr r3, [r7, #4] 801e542: 8e5b ldrh r3, [r3, #50] @ 0x32 801e544: 009a lsls r2, r3, #2 801e546: 687b ldr r3, [r7, #4] 801e548: 8e5b ldrh r3, [r3, #50] @ 0x32 801e54a: 005b lsls r3, r3, #1 801e54c: f241 111c movw r1, #4380 @ 0x111c 801e550: 428b cmp r3, r1 801e552: bf38 it cc 801e554: 460b movcc r3, r1 801e556: 429a cmp r2, r3 801e558: d204 bcs.n 801e564 801e55a: 687b ldr r3, [r7, #4] 801e55c: 8e5b ldrh r3, [r3, #50] @ 0x32 801e55e: 009b lsls r3, r3, #2 801e560: b29b uxth r3, r3 801e562: e00d b.n 801e580 801e564: 687b ldr r3, [r7, #4] 801e566: 8e5b ldrh r3, [r3, #50] @ 0x32 801e568: 005b lsls r3, r3, #1 801e56a: f241 121c movw r2, #4380 @ 0x111c 801e56e: 4293 cmp r3, r2 801e570: d904 bls.n 801e57c 801e572: 687b ldr r3, [r7, #4] 801e574: 8e5b ldrh r3, [r3, #50] @ 0x32 801e576: 005b lsls r3, r3, #1 801e578: b29b uxth r3, r3 801e57a: e001 b.n 801e580 801e57c: f241 131c movw r3, #4380 @ 0x111c 801e580: 687a ldr r2, [r7, #4] 801e582: 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) { 801e586: 4b4e ldr r3, [pc, #312] @ (801e6c0 ) 801e588: 781b ldrb r3, [r3, #0] 801e58a: f003 0320 and.w r3, r3, #32 801e58e: 2b00 cmp r3, #0 801e590: d037 beq.n 801e602 tcp_ack_now(pcb); 801e592: 687b ldr r3, [r7, #4] 801e594: 8b5b ldrh r3, [r3, #26] 801e596: f043 0302 orr.w r3, r3, #2 801e59a: b29a uxth r2, r3 801e59c: 687b ldr r3, [r7, #4] 801e59e: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 801e5a0: 687b ldr r3, [r7, #4] 801e5a2: 2207 movs r2, #7 801e5a4: 751a strb r2, [r3, #20] if (recv_flags & TF_GOT_FIN) { 801e5a6: e02c b.n 801e602 } } else { /* incorrect ACK number, send RST */ tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e5a8: 4b3b ldr r3, [pc, #236] @ (801e698 ) 801e5aa: 6819 ldr r1, [r3, #0] 801e5ac: 4b3b ldr r3, [pc, #236] @ (801e69c ) 801e5ae: 881b ldrh r3, [r3, #0] 801e5b0: 461a mov r2, r3 801e5b2: 4b3b ldr r3, [pc, #236] @ (801e6a0 ) 801e5b4: 681b ldr r3, [r3, #0] 801e5b6: 18d0 adds r0, r2, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e5b8: 4b3a ldr r3, [pc, #232] @ (801e6a4 ) 801e5ba: 681b ldr r3, [r3, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e5bc: 885b ldrh r3, [r3, #2] 801e5be: b29b uxth r3, r3 ip_current_src_addr(), tcphdr->dest, tcphdr->src); 801e5c0: 4a38 ldr r2, [pc, #224] @ (801e6a4 ) 801e5c2: 6812 ldr r2, [r2, #0] tcp_rst(pcb, ackno, seqno + tcplen, ip_current_dest_addr(), 801e5c4: 8812 ldrh r2, [r2, #0] 801e5c6: b292 uxth r2, r2 801e5c8: 9202 str r2, [sp, #8] 801e5ca: 9301 str r3, [sp, #4] 801e5cc: 4b36 ldr r3, [pc, #216] @ (801e6a8 ) 801e5ce: 9300 str r3, [sp, #0] 801e5d0: 4b36 ldr r3, [pc, #216] @ (801e6ac ) 801e5d2: 4602 mov r2, r0 801e5d4: 6878 ldr r0, [r7, #4] 801e5d6: f003 f897 bl 8021708 } } 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; 801e5da: e167 b.n 801e8ac } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 801e5dc: 4b2d ldr r3, [pc, #180] @ (801e694 ) 801e5de: 781b ldrb r3, [r3, #0] 801e5e0: f003 0302 and.w r3, r3, #2 801e5e4: 2b00 cmp r3, #0 801e5e6: f000 8161 beq.w 801e8ac 801e5ea: 687b ldr r3, [r7, #4] 801e5ec: 6a5b ldr r3, [r3, #36] @ 0x24 801e5ee: 1e5a subs r2, r3, #1 801e5f0: 4b2b ldr r3, [pc, #172] @ (801e6a0 ) 801e5f2: 681b ldr r3, [r3, #0] 801e5f4: 429a cmp r2, r3 801e5f6: f040 8159 bne.w 801e8ac tcp_rexmit(pcb); 801e5fa: 6878 ldr r0, [r7, #4] 801e5fc: f002 fe7e bl 80212fc break; 801e600: e154 b.n 801e8ac 801e602: e153 b.n 801e8ac case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 801e604: 6878 ldr r0, [r7, #4] 801e606: f000 fa71 bl 801eaec if (recv_flags & TF_GOT_FIN) { /* passive close */ 801e60a: 4b2d ldr r3, [pc, #180] @ (801e6c0 ) 801e60c: 781b ldrb r3, [r3, #0] 801e60e: f003 0320 and.w r3, r3, #32 801e612: 2b00 cmp r3, #0 801e614: f000 814c beq.w 801e8b0 tcp_ack_now(pcb); 801e618: 687b ldr r3, [r7, #4] 801e61a: 8b5b ldrh r3, [r3, #26] 801e61c: f043 0302 orr.w r3, r3, #2 801e620: b29a uxth r2, r3 801e622: 687b ldr r3, [r7, #4] 801e624: 835a strh r2, [r3, #26] pcb->state = CLOSE_WAIT; 801e626: 687b ldr r3, [r7, #4] 801e628: 2207 movs r2, #7 801e62a: 751a strb r2, [r3, #20] } break; 801e62c: e140 b.n 801e8b0 case FIN_WAIT_1: tcp_receive(pcb); 801e62e: 6878 ldr r0, [r7, #4] 801e630: f000 fa5c bl 801eaec if (recv_flags & TF_GOT_FIN) { 801e634: 4b22 ldr r3, [pc, #136] @ (801e6c0 ) 801e636: 781b ldrb r3, [r3, #0] 801e638: f003 0320 and.w r3, r3, #32 801e63c: 2b00 cmp r3, #0 801e63e: d071 beq.n 801e724 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e640: 4b14 ldr r3, [pc, #80] @ (801e694 ) 801e642: 781b ldrb r3, [r3, #0] 801e644: f003 0310 and.w r3, r3, #16 801e648: 2b00 cmp r3, #0 801e64a: d060 beq.n 801e70e 801e64c: 687b ldr r3, [r7, #4] 801e64e: 6d1a ldr r2, [r3, #80] @ 0x50 801e650: 4b11 ldr r3, [pc, #68] @ (801e698 ) 801e652: 681b ldr r3, [r3, #0] 801e654: 429a cmp r2, r3 801e656: d15a bne.n 801e70e pcb->unsent == NULL) { 801e658: 687b ldr r3, [r7, #4] 801e65a: 6edb ldr r3, [r3, #108] @ 0x6c if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e65c: 2b00 cmp r3, #0 801e65e: d156 bne.n 801e70e 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); 801e660: 687b ldr r3, [r7, #4] 801e662: 8b5b ldrh r3, [r3, #26] 801e664: f043 0302 orr.w r3, r3, #2 801e668: b29a uxth r2, r3 801e66a: 687b ldr r3, [r7, #4] 801e66c: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 801e66e: 6878 ldr r0, [r7, #4] 801e670: f7fe fdba bl 801d1e8 TCP_RMV_ACTIVE(pcb); 801e674: 4b13 ldr r3, [pc, #76] @ (801e6c4 ) 801e676: 681b ldr r3, [r3, #0] 801e678: 687a ldr r2, [r7, #4] 801e67a: 429a cmp r2, r3 801e67c: d105 bne.n 801e68a 801e67e: 4b11 ldr r3, [pc, #68] @ (801e6c4 ) 801e680: 681b ldr r3, [r3, #0] 801e682: 68db ldr r3, [r3, #12] 801e684: 4a0f ldr r2, [pc, #60] @ (801e6c4 ) 801e686: 6013 str r3, [r2, #0] 801e688: e02e b.n 801e6e8 801e68a: 4b0e ldr r3, [pc, #56] @ (801e6c4 ) 801e68c: 681b ldr r3, [r3, #0] 801e68e: 613b str r3, [r7, #16] 801e690: e027 b.n 801e6e2 801e692: bf00 nop 801e694: 2402afc0 .word 0x2402afc0 801e698: 2402afb8 .word 0x2402afb8 801e69c: 2402afbe .word 0x2402afbe 801e6a0: 2402afb4 .word 0x2402afb4 801e6a4: 2402afa4 .word 0x2402afa4 801e6a8: 24024438 .word 0x24024438 801e6ac: 2402443c .word 0x2402443c 801e6b0: 0802fd40 .word 0x0802fd40 801e6b4: 0802ffe0 .word 0x0802ffe0 801e6b8: 0802fd8c .word 0x0802fd8c 801e6bc: 2402afbc .word 0x2402afbc 801e6c0: 2402afc1 .word 0x2402afc1 801e6c4: 2402af84 .word 0x2402af84 801e6c8: 693b ldr r3, [r7, #16] 801e6ca: 68db ldr r3, [r3, #12] 801e6cc: 687a ldr r2, [r7, #4] 801e6ce: 429a cmp r2, r3 801e6d0: d104 bne.n 801e6dc 801e6d2: 687b ldr r3, [r7, #4] 801e6d4: 68da ldr r2, [r3, #12] 801e6d6: 693b ldr r3, [r7, #16] 801e6d8: 60da str r2, [r3, #12] 801e6da: e005 b.n 801e6e8 801e6dc: 693b ldr r3, [r7, #16] 801e6de: 68db ldr r3, [r3, #12] 801e6e0: 613b str r3, [r7, #16] 801e6e2: 693b ldr r3, [r7, #16] 801e6e4: 2b00 cmp r3, #0 801e6e6: d1ef bne.n 801e6c8 801e6e8: 687b ldr r3, [r7, #4] 801e6ea: 2200 movs r2, #0 801e6ec: 60da str r2, [r3, #12] 801e6ee: 4b77 ldr r3, [pc, #476] @ (801e8cc ) 801e6f0: 2201 movs r2, #1 801e6f2: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801e6f4: 687b ldr r3, [r7, #4] 801e6f6: 220a movs r2, #10 801e6f8: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801e6fa: 4b75 ldr r3, [pc, #468] @ (801e8d0 ) 801e6fc: 681a ldr r2, [r3, #0] 801e6fe: 687b ldr r3, [r7, #4] 801e700: 60da str r2, [r3, #12] 801e702: 4a73 ldr r2, [pc, #460] @ (801e8d0 ) 801e704: 687b ldr r3, [r7, #4] 801e706: 6013 str r3, [r2, #0] 801e708: f003 f9c0 bl 8021a8c } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && pcb->unsent == NULL) { pcb->state = FIN_WAIT_2; } break; 801e70c: e0d2 b.n 801e8b4 tcp_ack_now(pcb); 801e70e: 687b ldr r3, [r7, #4] 801e710: 8b5b ldrh r3, [r3, #26] 801e712: f043 0302 orr.w r3, r3, #2 801e716: b29a uxth r2, r3 801e718: 687b ldr r3, [r7, #4] 801e71a: 835a strh r2, [r3, #26] pcb->state = CLOSING; 801e71c: 687b ldr r3, [r7, #4] 801e71e: 2208 movs r2, #8 801e720: 751a strb r2, [r3, #20] break; 801e722: e0c7 b.n 801e8b4 } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e724: 4b6b ldr r3, [pc, #428] @ (801e8d4 ) 801e726: 781b ldrb r3, [r3, #0] 801e728: f003 0310 and.w r3, r3, #16 801e72c: 2b00 cmp r3, #0 801e72e: f000 80c1 beq.w 801e8b4 801e732: 687b ldr r3, [r7, #4] 801e734: 6d1a ldr r2, [r3, #80] @ 0x50 801e736: 4b68 ldr r3, [pc, #416] @ (801e8d8 ) 801e738: 681b ldr r3, [r3, #0] 801e73a: 429a cmp r2, r3 801e73c: f040 80ba bne.w 801e8b4 pcb->unsent == NULL) { 801e740: 687b ldr r3, [r7, #4] 801e742: 6edb ldr r3, [r3, #108] @ 0x6c } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) && 801e744: 2b00 cmp r3, #0 801e746: f040 80b5 bne.w 801e8b4 pcb->state = FIN_WAIT_2; 801e74a: 687b ldr r3, [r7, #4] 801e74c: 2206 movs r2, #6 801e74e: 751a strb r2, [r3, #20] break; 801e750: e0b0 b.n 801e8b4 case FIN_WAIT_2: tcp_receive(pcb); 801e752: 6878 ldr r0, [r7, #4] 801e754: f000 f9ca bl 801eaec if (recv_flags & TF_GOT_FIN) { 801e758: 4b60 ldr r3, [pc, #384] @ (801e8dc ) 801e75a: 781b ldrb r3, [r3, #0] 801e75c: f003 0320 and.w r3, r3, #32 801e760: 2b00 cmp r3, #0 801e762: f000 80a9 beq.w 801e8b8 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); 801e766: 687b ldr r3, [r7, #4] 801e768: 8b5b ldrh r3, [r3, #26] 801e76a: f043 0302 orr.w r3, r3, #2 801e76e: b29a uxth r2, r3 801e770: 687b ldr r3, [r7, #4] 801e772: 835a strh r2, [r3, #26] tcp_pcb_purge(pcb); 801e774: 6878 ldr r0, [r7, #4] 801e776: f7fe fd37 bl 801d1e8 TCP_RMV_ACTIVE(pcb); 801e77a: 4b59 ldr r3, [pc, #356] @ (801e8e0 ) 801e77c: 681b ldr r3, [r3, #0] 801e77e: 687a ldr r2, [r7, #4] 801e780: 429a cmp r2, r3 801e782: d105 bne.n 801e790 801e784: 4b56 ldr r3, [pc, #344] @ (801e8e0 ) 801e786: 681b ldr r3, [r3, #0] 801e788: 68db ldr r3, [r3, #12] 801e78a: 4a55 ldr r2, [pc, #340] @ (801e8e0 ) 801e78c: 6013 str r3, [r2, #0] 801e78e: e013 b.n 801e7b8 801e790: 4b53 ldr r3, [pc, #332] @ (801e8e0 ) 801e792: 681b ldr r3, [r3, #0] 801e794: 60fb str r3, [r7, #12] 801e796: e00c b.n 801e7b2 801e798: 68fb ldr r3, [r7, #12] 801e79a: 68db ldr r3, [r3, #12] 801e79c: 687a ldr r2, [r7, #4] 801e79e: 429a cmp r2, r3 801e7a0: d104 bne.n 801e7ac 801e7a2: 687b ldr r3, [r7, #4] 801e7a4: 68da ldr r2, [r3, #12] 801e7a6: 68fb ldr r3, [r7, #12] 801e7a8: 60da str r2, [r3, #12] 801e7aa: e005 b.n 801e7b8 801e7ac: 68fb ldr r3, [r7, #12] 801e7ae: 68db ldr r3, [r3, #12] 801e7b0: 60fb str r3, [r7, #12] 801e7b2: 68fb ldr r3, [r7, #12] 801e7b4: 2b00 cmp r3, #0 801e7b6: d1ef bne.n 801e798 801e7b8: 687b ldr r3, [r7, #4] 801e7ba: 2200 movs r2, #0 801e7bc: 60da str r2, [r3, #12] 801e7be: 4b43 ldr r3, [pc, #268] @ (801e8cc ) 801e7c0: 2201 movs r2, #1 801e7c2: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801e7c4: 687b ldr r3, [r7, #4] 801e7c6: 220a movs r2, #10 801e7c8: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801e7ca: 4b41 ldr r3, [pc, #260] @ (801e8d0 ) 801e7cc: 681a ldr r2, [r3, #0] 801e7ce: 687b ldr r3, [r7, #4] 801e7d0: 60da str r2, [r3, #12] 801e7d2: 4a3f ldr r2, [pc, #252] @ (801e8d0 ) 801e7d4: 687b ldr r3, [r7, #4] 801e7d6: 6013 str r3, [r2, #0] 801e7d8: f003 f958 bl 8021a8c } break; 801e7dc: e06c b.n 801e8b8 case CLOSING: tcp_receive(pcb); 801e7de: 6878 ldr r0, [r7, #4] 801e7e0: f000 f984 bl 801eaec if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 801e7e4: 4b3b ldr r3, [pc, #236] @ (801e8d4 ) 801e7e6: 781b ldrb r3, [r3, #0] 801e7e8: f003 0310 and.w r3, r3, #16 801e7ec: 2b00 cmp r3, #0 801e7ee: d065 beq.n 801e8bc 801e7f0: 687b ldr r3, [r7, #4] 801e7f2: 6d1a ldr r2, [r3, #80] @ 0x50 801e7f4: 4b38 ldr r3, [pc, #224] @ (801e8d8 ) 801e7f6: 681b ldr r3, [r3, #0] 801e7f8: 429a cmp r2, r3 801e7fa: d15f bne.n 801e8bc 801e7fc: 687b ldr r3, [r7, #4] 801e7fe: 6edb ldr r3, [r3, #108] @ 0x6c 801e800: 2b00 cmp r3, #0 801e802: d15b bne.n 801e8bc LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 801e804: 6878 ldr r0, [r7, #4] 801e806: f7fe fcef bl 801d1e8 TCP_RMV_ACTIVE(pcb); 801e80a: 4b35 ldr r3, [pc, #212] @ (801e8e0 ) 801e80c: 681b ldr r3, [r3, #0] 801e80e: 687a ldr r2, [r7, #4] 801e810: 429a cmp r2, r3 801e812: d105 bne.n 801e820 801e814: 4b32 ldr r3, [pc, #200] @ (801e8e0 ) 801e816: 681b ldr r3, [r3, #0] 801e818: 68db ldr r3, [r3, #12] 801e81a: 4a31 ldr r2, [pc, #196] @ (801e8e0 ) 801e81c: 6013 str r3, [r2, #0] 801e81e: e013 b.n 801e848 801e820: 4b2f ldr r3, [pc, #188] @ (801e8e0 ) 801e822: 681b ldr r3, [r3, #0] 801e824: 61bb str r3, [r7, #24] 801e826: e00c b.n 801e842 801e828: 69bb ldr r3, [r7, #24] 801e82a: 68db ldr r3, [r3, #12] 801e82c: 687a ldr r2, [r7, #4] 801e82e: 429a cmp r2, r3 801e830: d104 bne.n 801e83c 801e832: 687b ldr r3, [r7, #4] 801e834: 68da ldr r2, [r3, #12] 801e836: 69bb ldr r3, [r7, #24] 801e838: 60da str r2, [r3, #12] 801e83a: e005 b.n 801e848 801e83c: 69bb ldr r3, [r7, #24] 801e83e: 68db ldr r3, [r3, #12] 801e840: 61bb str r3, [r7, #24] 801e842: 69bb ldr r3, [r7, #24] 801e844: 2b00 cmp r3, #0 801e846: d1ef bne.n 801e828 801e848: 687b ldr r3, [r7, #4] 801e84a: 2200 movs r2, #0 801e84c: 60da str r2, [r3, #12] 801e84e: 4b1f ldr r3, [pc, #124] @ (801e8cc ) 801e850: 2201 movs r2, #1 801e852: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 801e854: 687b ldr r3, [r7, #4] 801e856: 220a movs r2, #10 801e858: 751a strb r2, [r3, #20] TCP_REG(&tcp_tw_pcbs, pcb); 801e85a: 4b1d ldr r3, [pc, #116] @ (801e8d0 ) 801e85c: 681a ldr r2, [r3, #0] 801e85e: 687b ldr r3, [r7, #4] 801e860: 60da str r2, [r3, #12] 801e862: 4a1b ldr r2, [pc, #108] @ (801e8d0 ) 801e864: 687b ldr r3, [r7, #4] 801e866: 6013 str r3, [r2, #0] 801e868: f003 f910 bl 8021a8c } break; 801e86c: e026 b.n 801e8bc case LAST_ACK: tcp_receive(pcb); 801e86e: 6878 ldr r0, [r7, #4] 801e870: f000 f93c bl 801eaec if ((flags & TCP_ACK) && ackno == pcb->snd_nxt && pcb->unsent == NULL) { 801e874: 4b17 ldr r3, [pc, #92] @ (801e8d4 ) 801e876: 781b ldrb r3, [r3, #0] 801e878: f003 0310 and.w r3, r3, #16 801e87c: 2b00 cmp r3, #0 801e87e: d01f beq.n 801e8c0 801e880: 687b ldr r3, [r7, #4] 801e882: 6d1a ldr r2, [r3, #80] @ 0x50 801e884: 4b14 ldr r3, [pc, #80] @ (801e8d8 ) 801e886: 681b ldr r3, [r3, #0] 801e888: 429a cmp r2, r3 801e88a: d119 bne.n 801e8c0 801e88c: 687b ldr r3, [r7, #4] 801e88e: 6edb ldr r3, [r3, #108] @ 0x6c 801e890: 2b00 cmp r3, #0 801e892: d115 bne.n 801e8c0 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; 801e894: 4b11 ldr r3, [pc, #68] @ (801e8dc ) 801e896: 781b ldrb r3, [r3, #0] 801e898: f043 0310 orr.w r3, r3, #16 801e89c: b2da uxtb r2, r3 801e89e: 4b0f ldr r3, [pc, #60] @ (801e8dc ) 801e8a0: 701a strb r2, [r3, #0] } break; 801e8a2: e00d b.n 801e8c0 default: break; 801e8a4: bf00 nop 801e8a6: e00c b.n 801e8c2 break; 801e8a8: bf00 nop 801e8aa: e00a b.n 801e8c2 break; 801e8ac: bf00 nop 801e8ae: e008 b.n 801e8c2 break; 801e8b0: bf00 nop 801e8b2: e006 b.n 801e8c2 break; 801e8b4: bf00 nop 801e8b6: e004 b.n 801e8c2 break; 801e8b8: bf00 nop 801e8ba: e002 b.n 801e8c2 break; 801e8bc: bf00 nop 801e8be: e000 b.n 801e8c2 break; 801e8c0: bf00 nop } return ERR_OK; 801e8c2: 2300 movs r3, #0 } 801e8c4: 4618 mov r0, r3 801e8c6: 3724 adds r7, #36 @ 0x24 801e8c8: 46bd mov sp, r7 801e8ca: bd90 pop {r4, r7, pc} 801e8cc: 2402af8c .word 0x2402af8c 801e8d0: 2402af88 .word 0x2402af88 801e8d4: 2402afc0 .word 0x2402afc0 801e8d8: 2402afb8 .word 0x2402afb8 801e8dc: 2402afc1 .word 0x2402afc1 801e8e0: 2402af84 .word 0x2402af84 0801e8e4 : * * Called from tcp_receive() */ static void tcp_oos_insert_segment(struct tcp_seg *cseg, struct tcp_seg *next) { 801e8e4: b590 push {r4, r7, lr} 801e8e6: b085 sub sp, #20 801e8e8: af00 add r7, sp, #0 801e8ea: 6078 str r0, [r7, #4] 801e8ec: 6039 str r1, [r7, #0] struct tcp_seg *old_seg; LWIP_ASSERT("tcp_oos_insert_segment: invalid cseg", cseg != NULL); 801e8ee: 687b ldr r3, [r7, #4] 801e8f0: 2b00 cmp r3, #0 801e8f2: d106 bne.n 801e902 801e8f4: 4b3b ldr r3, [pc, #236] @ (801e9e4 ) 801e8f6: f240 421f movw r2, #1055 @ 0x41f 801e8fa: 493b ldr r1, [pc, #236] @ (801e9e8 ) 801e8fc: 483b ldr r0, [pc, #236] @ (801e9ec ) 801e8fe: f00b ffcd bl 802a89c if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 801e902: 687b ldr r3, [r7, #4] 801e904: 691b ldr r3, [r3, #16] 801e906: 899b ldrh r3, [r3, #12] 801e908: b29b uxth r3, r3 801e90a: 4618 mov r0, r3 801e90c: f7fb f86c bl 80199e8 801e910: 4603 mov r3, r0 801e912: b2db uxtb r3, r3 801e914: f003 0301 and.w r3, r3, #1 801e918: 2b00 cmp r3, #0 801e91a: d028 beq.n 801e96e /* received segment overlaps all following segments */ tcp_segs_free(next); 801e91c: 6838 ldr r0, [r7, #0] 801e91e: f7fe f989 bl 801cc34 next = NULL; 801e922: 2300 movs r3, #0 801e924: 603b str r3, [r7, #0] 801e926: e056 b.n 801e9d6 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) { 801e928: 683b ldr r3, [r7, #0] 801e92a: 691b ldr r3, [r3, #16] 801e92c: 899b ldrh r3, [r3, #12] 801e92e: b29b uxth r3, r3 801e930: 4618 mov r0, r3 801e932: f7fb f859 bl 80199e8 801e936: 4603 mov r3, r0 801e938: b2db uxtb r3, r3 801e93a: f003 0301 and.w r3, r3, #1 801e93e: 2b00 cmp r3, #0 801e940: d00d beq.n 801e95e TCPH_SET_FLAG(cseg->tcphdr, TCP_FIN); 801e942: 687b ldr r3, [r7, #4] 801e944: 691b ldr r3, [r3, #16] 801e946: 899b ldrh r3, [r3, #12] 801e948: b29c uxth r4, r3 801e94a: 2001 movs r0, #1 801e94c: f7fb f84c bl 80199e8 801e950: 4603 mov r3, r0 801e952: 461a mov r2, r3 801e954: 687b ldr r3, [r7, #4] 801e956: 691b ldr r3, [r3, #16] 801e958: 4322 orrs r2, r4 801e95a: b292 uxth r2, r2 801e95c: 819a strh r2, [r3, #12] } old_seg = next; 801e95e: 683b ldr r3, [r7, #0] 801e960: 60fb str r3, [r7, #12] next = next->next; 801e962: 683b ldr r3, [r7, #0] 801e964: 681b ldr r3, [r3, #0] 801e966: 603b str r3, [r7, #0] tcp_seg_free(old_seg); 801e968: 68f8 ldr r0, [r7, #12] 801e96a: f7fe f978 bl 801cc5e while (next && 801e96e: 683b ldr r3, [r7, #0] 801e970: 2b00 cmp r3, #0 801e972: d00e beq.n 801e992 TCP_SEQ_GEQ((seqno + cseg->len), 801e974: 687b ldr r3, [r7, #4] 801e976: 891b ldrh r3, [r3, #8] 801e978: 461a mov r2, r3 801e97a: 4b1d ldr r3, [pc, #116] @ (801e9f0 ) 801e97c: 681b ldr r3, [r3, #0] 801e97e: 441a add r2, r3 801e980: 683b ldr r3, [r7, #0] 801e982: 691b ldr r3, [r3, #16] 801e984: 685b ldr r3, [r3, #4] 801e986: 6839 ldr r1, [r7, #0] 801e988: 8909 ldrh r1, [r1, #8] 801e98a: 440b add r3, r1 801e98c: 1ad3 subs r3, r2, r3 while (next && 801e98e: 2b00 cmp r3, #0 801e990: daca bge.n 801e928 } if (next && 801e992: 683b ldr r3, [r7, #0] 801e994: 2b00 cmp r3, #0 801e996: d01e beq.n 801e9d6 TCP_SEQ_GT(seqno + cseg->len, next->tcphdr->seqno)) { 801e998: 687b ldr r3, [r7, #4] 801e99a: 891b ldrh r3, [r3, #8] 801e99c: 461a mov r2, r3 801e99e: 4b14 ldr r3, [pc, #80] @ (801e9f0 ) 801e9a0: 681b ldr r3, [r3, #0] 801e9a2: 441a add r2, r3 801e9a4: 683b ldr r3, [r7, #0] 801e9a6: 691b ldr r3, [r3, #16] 801e9a8: 685b ldr r3, [r3, #4] 801e9aa: 1ad3 subs r3, r2, r3 if (next && 801e9ac: 2b00 cmp r3, #0 801e9ae: dd12 ble.n 801e9d6 /* We need to trim the incoming segment. */ cseg->len = (u16_t)(next->tcphdr->seqno - seqno); 801e9b0: 683b ldr r3, [r7, #0] 801e9b2: 691b ldr r3, [r3, #16] 801e9b4: 685b ldr r3, [r3, #4] 801e9b6: b29a uxth r2, r3 801e9b8: 4b0d ldr r3, [pc, #52] @ (801e9f0 ) 801e9ba: 681b ldr r3, [r3, #0] 801e9bc: b29b uxth r3, r3 801e9be: 1ad3 subs r3, r2, r3 801e9c0: b29a uxth r2, r3 801e9c2: 687b ldr r3, [r7, #4] 801e9c4: 811a strh r2, [r3, #8] pbuf_realloc(cseg->p, cseg->len); 801e9c6: 687b ldr r3, [r7, #4] 801e9c8: 685a ldr r2, [r3, #4] 801e9ca: 687b ldr r3, [r7, #4] 801e9cc: 891b ldrh r3, [r3, #8] 801e9ce: 4619 mov r1, r3 801e9d0: 4610 mov r0, r2 801e9d2: f7fc fb35 bl 801b040 } } cseg->next = next; 801e9d6: 687b ldr r3, [r7, #4] 801e9d8: 683a ldr r2, [r7, #0] 801e9da: 601a str r2, [r3, #0] } 801e9dc: bf00 nop 801e9de: 3714 adds r7, #20 801e9e0: 46bd mov sp, r7 801e9e2: bd90 pop {r4, r7, pc} 801e9e4: 0802fd40 .word 0x0802fd40 801e9e8: 08030000 .word 0x08030000 801e9ec: 0802fd8c .word 0x0802fd8c 801e9f0: 2402afb4 .word 0x2402afb4 0801e9f4 : /** 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) { 801e9f4: b5b0 push {r4, r5, r7, lr} 801e9f6: b086 sub sp, #24 801e9f8: af00 add r7, sp, #0 801e9fa: 60f8 str r0, [r7, #12] 801e9fc: 60b9 str r1, [r7, #8] 801e9fe: 607a str r2, [r7, #4] 801ea00: 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 && 801ea02: e03e b.n 801ea82 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; 801ea04: 68bb ldr r3, [r7, #8] 801ea06: 617b str r3, [r7, #20] seg_list = seg_list->next; 801ea08: 68bb ldr r3, [r7, #8] 801ea0a: 681b ldr r3, [r3, #0] 801ea0c: 60bb str r3, [r7, #8] clen = pbuf_clen(next->p); 801ea0e: 697b ldr r3, [r7, #20] 801ea10: 685b ldr r3, [r3, #4] 801ea12: 4618 mov r0, r3 801ea14: f7fc fd58 bl 801b4c8 801ea18: 4603 mov r3, r0 801ea1a: 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)); 801ea1c: 68fb ldr r3, [r7, #12] 801ea1e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801ea22: 8a7a ldrh r2, [r7, #18] 801ea24: 429a cmp r2, r3 801ea26: d906 bls.n 801ea36 801ea28: 4b2a ldr r3, [pc, #168] @ (801ead4 ) 801ea2a: f240 4257 movw r2, #1111 @ 0x457 801ea2e: 492a ldr r1, [pc, #168] @ (801ead8 ) 801ea30: 482a ldr r0, [pc, #168] @ (801eadc ) 801ea32: f00b ff33 bl 802a89c pcb->snd_queuelen = (u16_t)(pcb->snd_queuelen - clen); 801ea36: 68fb ldr r3, [r7, #12] 801ea38: f8b3 2066 ldrh.w r2, [r3, #102] @ 0x66 801ea3c: 8a7b ldrh r3, [r7, #18] 801ea3e: 1ad3 subs r3, r2, r3 801ea40: b29a uxth r2, r3 801ea42: 68fb ldr r3, [r7, #12] 801ea44: f8a3 2066 strh.w r2, [r3, #102] @ 0x66 recv_acked = (tcpwnd_size_t)(recv_acked + next->len); 801ea48: 697b ldr r3, [r7, #20] 801ea4a: 891a ldrh r2, [r3, #8] 801ea4c: 4b24 ldr r3, [pc, #144] @ (801eae0 ) 801ea4e: 881b ldrh r3, [r3, #0] 801ea50: 4413 add r3, r2 801ea52: b29a uxth r2, r3 801ea54: 4b22 ldr r3, [pc, #136] @ (801eae0 ) 801ea56: 801a strh r2, [r3, #0] tcp_seg_free(next); 801ea58: 6978 ldr r0, [r7, #20] 801ea5a: f7fe f900 bl 801cc5e 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) { 801ea5e: 68fb ldr r3, [r7, #12] 801ea60: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801ea64: 2b00 cmp r3, #0 801ea66: d00c beq.n 801ea82 LWIP_ASSERT("tcp_receive: valid queue length", 801ea68: 68bb ldr r3, [r7, #8] 801ea6a: 2b00 cmp r3, #0 801ea6c: d109 bne.n 801ea82 801ea6e: 683b ldr r3, [r7, #0] 801ea70: 2b00 cmp r3, #0 801ea72: d106 bne.n 801ea82 801ea74: 4b17 ldr r3, [pc, #92] @ (801ead4 ) 801ea76: f240 4261 movw r2, #1121 @ 0x461 801ea7a: 491a ldr r1, [pc, #104] @ (801eae4 ) 801ea7c: 4817 ldr r0, [pc, #92] @ (801eadc ) 801ea7e: f00b ff0d bl 802a89c while (seg_list != NULL && 801ea82: 68bb ldr r3, [r7, #8] 801ea84: 2b00 cmp r3, #0 801ea86: d020 beq.n 801eaca TCP_SEQ_LEQ(lwip_ntohl(seg_list->tcphdr->seqno) + 801ea88: 68bb ldr r3, [r7, #8] 801ea8a: 691b ldr r3, [r3, #16] 801ea8c: 685b ldr r3, [r3, #4] 801ea8e: 4618 mov r0, r3 801ea90: f7fa ffbf bl 8019a12 801ea94: 4604 mov r4, r0 801ea96: 68bb ldr r3, [r7, #8] 801ea98: 891b ldrh r3, [r3, #8] 801ea9a: 461d mov r5, r3 801ea9c: 68bb ldr r3, [r7, #8] 801ea9e: 691b ldr r3, [r3, #16] 801eaa0: 899b ldrh r3, [r3, #12] 801eaa2: b29b uxth r3, r3 801eaa4: 4618 mov r0, r3 801eaa6: f7fa ff9f bl 80199e8 801eaaa: 4603 mov r3, r0 801eaac: b2db uxtb r3, r3 801eaae: f003 0303 and.w r3, r3, #3 801eab2: 2b00 cmp r3, #0 801eab4: d001 beq.n 801eaba 801eab6: 2301 movs r3, #1 801eab8: e000 b.n 801eabc 801eaba: 2300 movs r3, #0 801eabc: 442b add r3, r5 801eabe: 18e2 adds r2, r4, r3 801eac0: 4b09 ldr r3, [pc, #36] @ (801eae8 ) 801eac2: 681b ldr r3, [r3, #0] 801eac4: 1ad3 subs r3, r2, r3 while (seg_list != NULL && 801eac6: 2b00 cmp r3, #0 801eac8: dd9c ble.n 801ea04 seg_list != NULL || dbg_other_seg_list != NULL); } } return seg_list; 801eaca: 68bb ldr r3, [r7, #8] } 801eacc: 4618 mov r0, r3 801eace: 3718 adds r7, #24 801ead0: 46bd mov sp, r7 801ead2: bdb0 pop {r4, r5, r7, pc} 801ead4: 0802fd40 .word 0x0802fd40 801ead8: 08030028 .word 0x08030028 801eadc: 0802fd8c .word 0x0802fd8c 801eae0: 2402afbc .word 0x2402afbc 801eae4: 08030050 .word 0x08030050 801eae8: 2402afb8 .word 0x2402afb8 0801eaec : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 801eaec: b5b0 push {r4, r5, r7, lr} 801eaee: b094 sub sp, #80 @ 0x50 801eaf0: af00 add r7, sp, #0 801eaf2: 6078 str r0, [r7, #4] s16_t m; u32_t right_wnd_edge; int found_dupack = 0; 801eaf4: 2300 movs r3, #0 801eaf6: 64bb str r3, [r7, #72] @ 0x48 LWIP_ASSERT("tcp_receive: invalid pcb", pcb != NULL); 801eaf8: 687b ldr r3, [r7, #4] 801eafa: 2b00 cmp r3, #0 801eafc: d106 bne.n 801eb0c 801eafe: 4b91 ldr r3, [pc, #580] @ (801ed44 ) 801eb00: f240 427b movw r2, #1147 @ 0x47b 801eb04: 4990 ldr r1, [pc, #576] @ (801ed48 ) 801eb06: 4891 ldr r0, [pc, #580] @ (801ed4c ) 801eb08: f00b fec8 bl 802a89c LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); 801eb0c: 687b ldr r3, [r7, #4] 801eb0e: 7d1b ldrb r3, [r3, #20] 801eb10: 2b03 cmp r3, #3 801eb12: d806 bhi.n 801eb22 801eb14: 4b8b ldr r3, [pc, #556] @ (801ed44 ) 801eb16: f240 427c movw r2, #1148 @ 0x47c 801eb1a: 498d ldr r1, [pc, #564] @ (801ed50 ) 801eb1c: 488b ldr r0, [pc, #556] @ (801ed4c ) 801eb1e: f00b febd bl 802a89c if (flags & TCP_ACK) { 801eb22: 4b8c ldr r3, [pc, #560] @ (801ed54 ) 801eb24: 781b ldrb r3, [r3, #0] 801eb26: f003 0310 and.w r3, r3, #16 801eb2a: 2b00 cmp r3, #0 801eb2c: f000 8264 beq.w 801eff8 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 801eb30: 687b ldr r3, [r7, #4] 801eb32: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801eb36: 461a mov r2, r3 801eb38: 687b ldr r3, [r7, #4] 801eb3a: 6d9b ldr r3, [r3, #88] @ 0x58 801eb3c: 4413 add r3, r2 801eb3e: 633b str r3, [r7, #48] @ 0x30 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 801eb40: 687b ldr r3, [r7, #4] 801eb42: 6d5a ldr r2, [r3, #84] @ 0x54 801eb44: 4b84 ldr r3, [pc, #528] @ (801ed58 ) 801eb46: 681b ldr r3, [r3, #0] 801eb48: 1ad3 subs r3, r2, r3 801eb4a: 2b00 cmp r3, #0 801eb4c: db1b blt.n 801eb86 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801eb4e: 687b ldr r3, [r7, #4] 801eb50: 6d5a ldr r2, [r3, #84] @ 0x54 801eb52: 4b81 ldr r3, [pc, #516] @ (801ed58 ) 801eb54: 681b ldr r3, [r3, #0] if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 801eb56: 429a cmp r2, r3 801eb58: d106 bne.n 801eb68 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801eb5a: 687b ldr r3, [r7, #4] 801eb5c: 6d9a ldr r2, [r3, #88] @ 0x58 801eb5e: 4b7f ldr r3, [pc, #508] @ (801ed5c ) 801eb60: 681b ldr r3, [r3, #0] 801eb62: 1ad3 subs r3, r2, r3 801eb64: 2b00 cmp r3, #0 801eb66: db0e blt.n 801eb86 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 801eb68: 687b ldr r3, [r7, #4] 801eb6a: 6d9a ldr r2, [r3, #88] @ 0x58 801eb6c: 4b7b ldr r3, [pc, #492] @ (801ed5c ) 801eb6e: 681b ldr r3, [r3, #0] (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 801eb70: 429a cmp r2, r3 801eb72: d125 bne.n 801ebc0 (pcb->snd_wl2 == ackno && (u32_t)SND_WND_SCALE(pcb, tcphdr->wnd) > pcb->snd_wnd)) { 801eb74: 4b7a ldr r3, [pc, #488] @ (801ed60 ) 801eb76: 681b ldr r3, [r3, #0] 801eb78: 89db ldrh r3, [r3, #14] 801eb7a: b29a uxth r2, r3 801eb7c: 687b ldr r3, [r7, #4] 801eb7e: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801eb82: 429a cmp r2, r3 801eb84: d91c bls.n 801ebc0 pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd); 801eb86: 4b76 ldr r3, [pc, #472] @ (801ed60 ) 801eb88: 681b ldr r3, [r3, #0] 801eb8a: 89db ldrh r3, [r3, #14] 801eb8c: b29a uxth r2, r3 801eb8e: 687b ldr r3, [r7, #4] 801eb90: 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) { 801eb94: 687b ldr r3, [r7, #4] 801eb96: f8b3 2062 ldrh.w r2, [r3, #98] @ 0x62 801eb9a: 687b ldr r3, [r7, #4] 801eb9c: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 801eba0: 429a cmp r2, r3 801eba2: d205 bcs.n 801ebb0 pcb->snd_wnd_max = pcb->snd_wnd; 801eba4: 687b ldr r3, [r7, #4] 801eba6: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 801ebaa: 687b ldr r3, [r7, #4] 801ebac: f8a3 2062 strh.w r2, [r3, #98] @ 0x62 } pcb->snd_wl1 = seqno; 801ebb0: 4b69 ldr r3, [pc, #420] @ (801ed58 ) 801ebb2: 681a ldr r2, [r3, #0] 801ebb4: 687b ldr r3, [r7, #4] 801ebb6: 655a str r2, [r3, #84] @ 0x54 pcb->snd_wl2 = ackno; 801ebb8: 4b68 ldr r3, [pc, #416] @ (801ed5c ) 801ebba: 681a ldr r2, [r3, #0] 801ebbc: 687b ldr r3, [r7, #4] 801ebbe: 659a str r2, [r3, #88] @ 0x58 * If it only passes 1, should reset dupack counter * */ /* Clause 1 */ if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { 801ebc0: 4b66 ldr r3, [pc, #408] @ (801ed5c ) 801ebc2: 681a ldr r2, [r3, #0] 801ebc4: 687b ldr r3, [r7, #4] 801ebc6: 6c5b ldr r3, [r3, #68] @ 0x44 801ebc8: 1ad3 subs r3, r2, r3 801ebca: 2b00 cmp r3, #0 801ebcc: dc58 bgt.n 801ec80 /* Clause 2 */ if (tcplen == 0) { 801ebce: 4b65 ldr r3, [pc, #404] @ (801ed64 ) 801ebd0: 881b ldrh r3, [r3, #0] 801ebd2: 2b00 cmp r3, #0 801ebd4: d14b bne.n 801ec6e /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge) { 801ebd6: 687b ldr r3, [r7, #4] 801ebd8: 6d9b ldr r3, [r3, #88] @ 0x58 801ebda: 687a ldr r2, [r7, #4] 801ebdc: f8b2 2060 ldrh.w r2, [r2, #96] @ 0x60 801ebe0: 4413 add r3, r2 801ebe2: 6b3a ldr r2, [r7, #48] @ 0x30 801ebe4: 429a cmp r2, r3 801ebe6: d142 bne.n 801ec6e /* Clause 4 */ if (pcb->rtime >= 0) { 801ebe8: 687b ldr r3, [r7, #4] 801ebea: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 801ebee: 2b00 cmp r3, #0 801ebf0: db3d blt.n 801ec6e /* Clause 5 */ if (pcb->lastack == ackno) { 801ebf2: 687b ldr r3, [r7, #4] 801ebf4: 6c5a ldr r2, [r3, #68] @ 0x44 801ebf6: 4b59 ldr r3, [pc, #356] @ (801ed5c ) 801ebf8: 681b ldr r3, [r3, #0] 801ebfa: 429a cmp r2, r3 801ebfc: d137 bne.n 801ec6e found_dupack = 1; 801ebfe: 2301 movs r3, #1 801ec00: 64bb str r3, [r7, #72] @ 0x48 if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 801ec02: 687b ldr r3, [r7, #4] 801ec04: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ec08: 2bff cmp r3, #255 @ 0xff 801ec0a: d007 beq.n 801ec1c ++pcb->dupacks; 801ec0c: 687b ldr r3, [r7, #4] 801ec0e: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ec12: 3301 adds r3, #1 801ec14: b2da uxtb r2, r3 801ec16: 687b ldr r3, [r7, #4] 801ec18: f883 2043 strb.w r2, [r3, #67] @ 0x43 } if (pcb->dupacks > 3) { 801ec1c: 687b ldr r3, [r7, #4] 801ec1e: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ec22: 2b03 cmp r3, #3 801ec24: d91b bls.n 801ec5e /* Inflate the congestion window */ TCP_WND_INC(pcb->cwnd, pcb->mss); 801ec26: 687b ldr r3, [r7, #4] 801ec28: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ec2c: 687b ldr r3, [r7, #4] 801ec2e: 8e5b ldrh r3, [r3, #50] @ 0x32 801ec30: 4413 add r3, r2 801ec32: b29a uxth r2, r3 801ec34: 687b ldr r3, [r7, #4] 801ec36: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801ec3a: 429a cmp r2, r3 801ec3c: d30a bcc.n 801ec54 801ec3e: 687b ldr r3, [r7, #4] 801ec40: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ec44: 687b ldr r3, [r7, #4] 801ec46: 8e5b ldrh r3, [r3, #50] @ 0x32 801ec48: 4413 add r3, r2 801ec4a: b29a uxth r2, r3 801ec4c: 687b ldr r3, [r7, #4] 801ec4e: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801ec52: e004 b.n 801ec5e 801ec54: 687b ldr r3, [r7, #4] 801ec56: f64f 72ff movw r2, #65535 @ 0xffff 801ec5a: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 } if (pcb->dupacks >= 3) { 801ec5e: 687b ldr r3, [r7, #4] 801ec60: f893 3043 ldrb.w r3, [r3, #67] @ 0x43 801ec64: 2b02 cmp r3, #2 801ec66: d902 bls.n 801ec6e /* Do fast retransmit (checked via TF_INFR, not via dupacks count) */ tcp_rexmit_fast(pcb); 801ec68: 6878 ldr r0, [r7, #4] 801ec6a: f002 fbb3 bl 80213d4 } } } /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { 801ec6e: 6cbb ldr r3, [r7, #72] @ 0x48 801ec70: 2b00 cmp r3, #0 801ec72: f040 8161 bne.w 801ef38 pcb->dupacks = 0; 801ec76: 687b ldr r3, [r7, #4] 801ec78: 2200 movs r2, #0 801ec7a: f883 2043 strb.w r2, [r3, #67] @ 0x43 801ec7e: e15b b.n 801ef38 } } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801ec80: 4b36 ldr r3, [pc, #216] @ (801ed5c ) 801ec82: 681a ldr r2, [r3, #0] 801ec84: 687b ldr r3, [r7, #4] 801ec86: 6c5b ldr r3, [r3, #68] @ 0x44 801ec88: 1ad3 subs r3, r2, r3 801ec8a: 3b01 subs r3, #1 801ec8c: 2b00 cmp r3, #0 801ec8e: f2c0 814e blt.w 801ef2e 801ec92: 4b32 ldr r3, [pc, #200] @ (801ed5c ) 801ec94: 681a ldr r2, [r3, #0] 801ec96: 687b ldr r3, [r7, #4] 801ec98: 6d1b ldr r3, [r3, #80] @ 0x50 801ec9a: 1ad3 subs r3, r2, r3 801ec9c: 2b00 cmp r3, #0 801ec9e: f300 8146 bgt.w 801ef2e 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) { 801eca2: 687b ldr r3, [r7, #4] 801eca4: 8b5b ldrh r3, [r3, #26] 801eca6: f003 0304 and.w r3, r3, #4 801ecaa: 2b00 cmp r3, #0 801ecac: d010 beq.n 801ecd0 tcp_clear_flags(pcb, TF_INFR); 801ecae: 687b ldr r3, [r7, #4] 801ecb0: 8b5b ldrh r3, [r3, #26] 801ecb2: f023 0304 bic.w r3, r3, #4 801ecb6: b29a uxth r2, r3 801ecb8: 687b ldr r3, [r7, #4] 801ecba: 835a strh r2, [r3, #26] pcb->cwnd = pcb->ssthresh; 801ecbc: 687b ldr r3, [r7, #4] 801ecbe: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 801ecc2: 687b ldr r3, [r7, #4] 801ecc4: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 pcb->bytes_acked = 0; 801ecc8: 687b ldr r3, [r7, #4] 801ecca: 2200 movs r2, #0 801eccc: f8a3 206a strh.w r2, [r3, #106] @ 0x6a } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 801ecd0: 687b ldr r3, [r7, #4] 801ecd2: 2200 movs r2, #0 801ecd4: f883 2042 strb.w r2, [r3, #66] @ 0x42 /* Reset the retransmission time-out. */ pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 801ecd8: 687b ldr r3, [r7, #4] 801ecda: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801ecde: 10db asrs r3, r3, #3 801ece0: b21b sxth r3, r3 801ece2: b29a uxth r2, r3 801ece4: 687b ldr r3, [r7, #4] 801ece6: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801ecea: b29b uxth r3, r3 801ecec: 4413 add r3, r2 801ecee: b29b uxth r3, r3 801ecf0: b21a sxth r2, r3 801ecf2: 687b ldr r3, [r7, #4] 801ecf4: f8a3 2040 strh.w r2, [r3, #64] @ 0x40 /* Record how much data this ACK acks */ acked = (tcpwnd_size_t)(ackno - pcb->lastack); 801ecf8: 4b18 ldr r3, [pc, #96] @ (801ed5c ) 801ecfa: 681b ldr r3, [r3, #0] 801ecfc: b29a uxth r2, r3 801ecfe: 687b ldr r3, [r7, #4] 801ed00: 6c5b ldr r3, [r3, #68] @ 0x44 801ed02: b29b uxth r3, r3 801ed04: 1ad3 subs r3, r2, r3 801ed06: 85fb strh r3, [r7, #46] @ 0x2e /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 801ed08: 687b ldr r3, [r7, #4] 801ed0a: 2200 movs r2, #0 801ed0c: f883 2043 strb.w r2, [r3, #67] @ 0x43 pcb->lastack = ackno; 801ed10: 4b12 ldr r3, [pc, #72] @ (801ed5c ) 801ed12: 681a ldr r2, [r3, #0] 801ed14: 687b ldr r3, [r7, #4] 801ed16: 645a str r2, [r3, #68] @ 0x44 /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 801ed18: 687b ldr r3, [r7, #4] 801ed1a: 7d1b ldrb r3, [r3, #20] 801ed1c: 2b03 cmp r3, #3 801ed1e: f240 8097 bls.w 801ee50 if (pcb->cwnd < pcb->ssthresh) { 801ed22: 687b ldr r3, [r7, #4] 801ed24: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ed28: 687b ldr r3, [r7, #4] 801ed2a: f8b3 304a ldrh.w r3, [r3, #74] @ 0x4a 801ed2e: 429a cmp r2, r3 801ed30: d245 bcs.n 801edbe tcpwnd_size_t increase; /* limit to 1 SMSS segment during period following RTO */ u8_t num_seg = (pcb->flags & TF_RTO) ? 1 : 2; 801ed32: 687b ldr r3, [r7, #4] 801ed34: 8b5b ldrh r3, [r3, #26] 801ed36: f403 6300 and.w r3, r3, #2048 @ 0x800 801ed3a: 2b00 cmp r3, #0 801ed3c: d014 beq.n 801ed68 801ed3e: 2301 movs r3, #1 801ed40: e013 b.n 801ed6a 801ed42: bf00 nop 801ed44: 0802fd40 .word 0x0802fd40 801ed48: 08030070 .word 0x08030070 801ed4c: 0802fd8c .word 0x0802fd8c 801ed50: 0803008c .word 0x0803008c 801ed54: 2402afc0 .word 0x2402afc0 801ed58: 2402afb4 .word 0x2402afb4 801ed5c: 2402afb8 .word 0x2402afb8 801ed60: 2402afa4 .word 0x2402afa4 801ed64: 2402afbe .word 0x2402afbe 801ed68: 2302 movs r3, #2 801ed6a: 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)); 801ed6e: f897 302d ldrb.w r3, [r7, #45] @ 0x2d 801ed72: b29a uxth r2, r3 801ed74: 687b ldr r3, [r7, #4] 801ed76: 8e5b ldrh r3, [r3, #50] @ 0x32 801ed78: fb12 f303 smulbb r3, r2, r3 801ed7c: b29b uxth r3, r3 801ed7e: 8dfa ldrh r2, [r7, #46] @ 0x2e 801ed80: 4293 cmp r3, r2 801ed82: bf28 it cs 801ed84: 4613 movcs r3, r2 801ed86: 857b strh r3, [r7, #42] @ 0x2a TCP_WND_INC(pcb->cwnd, increase); 801ed88: 687b ldr r3, [r7, #4] 801ed8a: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ed8e: 8d7b ldrh r3, [r7, #42] @ 0x2a 801ed90: 4413 add r3, r2 801ed92: b29a uxth r2, r3 801ed94: 687b ldr r3, [r7, #4] 801ed96: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801ed9a: 429a cmp r2, r3 801ed9c: d309 bcc.n 801edb2 801ed9e: 687b ldr r3, [r7, #4] 801eda0: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801eda4: 8d7b ldrh r3, [r7, #42] @ 0x2a 801eda6: 4413 add r3, r2 801eda8: b29a uxth r2, r3 801edaa: 687b ldr r3, [r7, #4] 801edac: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801edb0: e04e b.n 801ee50 801edb2: 687b ldr r3, [r7, #4] 801edb4: f64f 72ff movw r2, #65535 @ 0xffff 801edb8: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801edbc: e048 b.n 801ee50 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); 801edbe: 687b ldr r3, [r7, #4] 801edc0: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801edc4: 8dfb ldrh r3, [r7, #46] @ 0x2e 801edc6: 4413 add r3, r2 801edc8: b29a uxth r2, r3 801edca: 687b ldr r3, [r7, #4] 801edcc: f8b3 306a ldrh.w r3, [r3, #106] @ 0x6a 801edd0: 429a cmp r2, r3 801edd2: d309 bcc.n 801ede8 801edd4: 687b ldr r3, [r7, #4] 801edd6: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801edda: 8dfb ldrh r3, [r7, #46] @ 0x2e 801eddc: 4413 add r3, r2 801edde: b29a uxth r2, r3 801ede0: 687b ldr r3, [r7, #4] 801ede2: f8a3 206a strh.w r2, [r3, #106] @ 0x6a 801ede6: e004 b.n 801edf2 801ede8: 687b ldr r3, [r7, #4] 801edea: f64f 72ff movw r2, #65535 @ 0xffff 801edee: f8a3 206a strh.w r2, [r3, #106] @ 0x6a if (pcb->bytes_acked >= pcb->cwnd) { 801edf2: 687b ldr r3, [r7, #4] 801edf4: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801edf8: 687b ldr r3, [r7, #4] 801edfa: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801edfe: 429a cmp r2, r3 801ee00: d326 bcc.n 801ee50 pcb->bytes_acked = (tcpwnd_size_t)(pcb->bytes_acked - pcb->cwnd); 801ee02: 687b ldr r3, [r7, #4] 801ee04: f8b3 206a ldrh.w r2, [r3, #106] @ 0x6a 801ee08: 687b ldr r3, [r7, #4] 801ee0a: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801ee0e: 1ad3 subs r3, r2, r3 801ee10: b29a uxth r2, r3 801ee12: 687b ldr r3, [r7, #4] 801ee14: f8a3 206a strh.w r2, [r3, #106] @ 0x6a TCP_WND_INC(pcb->cwnd, pcb->mss); 801ee18: 687b ldr r3, [r7, #4] 801ee1a: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ee1e: 687b ldr r3, [r7, #4] 801ee20: 8e5b ldrh r3, [r3, #50] @ 0x32 801ee22: 4413 add r3, r2 801ee24: b29a uxth r2, r3 801ee26: 687b ldr r3, [r7, #4] 801ee28: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 801ee2c: 429a cmp r2, r3 801ee2e: d30a bcc.n 801ee46 801ee30: 687b ldr r3, [r7, #4] 801ee32: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 801ee36: 687b ldr r3, [r7, #4] 801ee38: 8e5b ldrh r3, [r3, #50] @ 0x32 801ee3a: 4413 add r3, r2 801ee3c: b29a uxth r2, r3 801ee3e: 687b ldr r3, [r7, #4] 801ee40: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 801ee44: e004 b.n 801ee50 801ee46: 687b ldr r3, [r7, #4] 801ee48: f64f 72ff movw r2, #65535 @ 0xffff 801ee4c: 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); 801ee50: 687b ldr r3, [r7, #4] 801ee52: 6f19 ldr r1, [r3, #112] @ 0x70 801ee54: 687b ldr r3, [r7, #4] 801ee56: 6edb ldr r3, [r3, #108] @ 0x6c 801ee58: 4a98 ldr r2, [pc, #608] @ (801f0bc ) 801ee5a: 6878 ldr r0, [r7, #4] 801ee5c: f7ff fdca bl 801e9f4 801ee60: 4602 mov r2, r0 801ee62: 687b ldr r3, [r7, #4] 801ee64: 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); 801ee66: 687b ldr r3, [r7, #4] 801ee68: 6ed9 ldr r1, [r3, #108] @ 0x6c 801ee6a: 687b ldr r3, [r7, #4] 801ee6c: 6f1b ldr r3, [r3, #112] @ 0x70 801ee6e: 4a94 ldr r2, [pc, #592] @ (801f0c0 ) 801ee70: 6878 ldr r0, [r7, #4] 801ee72: f7ff fdbf bl 801e9f4 801ee76: 4602 mov r2, r0 801ee78: 687b ldr r3, [r7, #4] 801ee7a: 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) { 801ee7c: 687b ldr r3, [r7, #4] 801ee7e: 6f1b ldr r3, [r3, #112] @ 0x70 801ee80: 2b00 cmp r3, #0 801ee82: d104 bne.n 801ee8e pcb->rtime = -1; 801ee84: 687b ldr r3, [r7, #4] 801ee86: f64f 72ff movw r2, #65535 @ 0xffff 801ee8a: 861a strh r2, [r3, #48] @ 0x30 801ee8c: e002 b.n 801ee94 } else { pcb->rtime = 0; 801ee8e: 687b ldr r3, [r7, #4] 801ee90: 2200 movs r2, #0 801ee92: 861a strh r2, [r3, #48] @ 0x30 } pcb->polltmr = 0; 801ee94: 687b ldr r3, [r7, #4] 801ee96: 2200 movs r2, #0 801ee98: 771a strb r2, [r3, #28] #if TCP_OVERSIZE if (pcb->unsent == NULL) { 801ee9a: 687b ldr r3, [r7, #4] 801ee9c: 6edb ldr r3, [r3, #108] @ 0x6c 801ee9e: 2b00 cmp r3, #0 801eea0: d103 bne.n 801eeaa pcb->unsent_oversize = 0; 801eea2: 687b ldr r3, [r7, #4] 801eea4: 2200 movs r2, #0 801eea6: 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); 801eeaa: 687b ldr r3, [r7, #4] 801eeac: f8b3 2064 ldrh.w r2, [r3, #100] @ 0x64 801eeb0: 4b84 ldr r3, [pc, #528] @ (801f0c4 ) 801eeb2: 881b ldrh r3, [r3, #0] 801eeb4: 4413 add r3, r2 801eeb6: b29a uxth r2, r3 801eeb8: 687b ldr r3, [r7, #4] 801eeba: f8a3 2064 strh.w r2, [r3, #100] @ 0x64 /* check if this ACK ends our retransmission of in-flight data */ if (pcb->flags & TF_RTO) { 801eebe: 687b ldr r3, [r7, #4] 801eec0: 8b5b ldrh r3, [r3, #26] 801eec2: f403 6300 and.w r3, r3, #2048 @ 0x800 801eec6: 2b00 cmp r3, #0 801eec8: d035 beq.n 801ef36 /* 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) { 801eeca: 687b ldr r3, [r7, #4] 801eecc: 6f1b ldr r3, [r3, #112] @ 0x70 801eece: 2b00 cmp r3, #0 801eed0: d118 bne.n 801ef04 if ((pcb->unsent == NULL) || 801eed2: 687b ldr r3, [r7, #4] 801eed4: 6edb ldr r3, [r3, #108] @ 0x6c 801eed6: 2b00 cmp r3, #0 801eed8: d00c beq.n 801eef4 (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unsent->tcphdr->seqno)))) { 801eeda: 687b ldr r3, [r7, #4] 801eedc: 6cdc ldr r4, [r3, #76] @ 0x4c 801eede: 687b ldr r3, [r7, #4] 801eee0: 6edb ldr r3, [r3, #108] @ 0x6c 801eee2: 691b ldr r3, [r3, #16] 801eee4: 685b ldr r3, [r3, #4] 801eee6: 4618 mov r0, r3 801eee8: f7fa fd93 bl 8019a12 801eeec: 4603 mov r3, r0 801eeee: 1ae3 subs r3, r4, r3 if ((pcb->unsent == NULL) || 801eef0: 2b00 cmp r3, #0 801eef2: dc20 bgt.n 801ef36 tcp_clear_flags(pcb, TF_RTO); 801eef4: 687b ldr r3, [r7, #4] 801eef6: 8b5b ldrh r3, [r3, #26] 801eef8: f423 6300 bic.w r3, r3, #2048 @ 0x800 801eefc: b29a uxth r2, r3 801eefe: 687b ldr r3, [r7, #4] 801ef00: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801ef02: e018 b.n 801ef36 } } else if (TCP_SEQ_LEQ(pcb->rto_end, lwip_ntohl(pcb->unacked->tcphdr->seqno))) { 801ef04: 687b ldr r3, [r7, #4] 801ef06: 6cdc ldr r4, [r3, #76] @ 0x4c 801ef08: 687b ldr r3, [r7, #4] 801ef0a: 6f1b ldr r3, [r3, #112] @ 0x70 801ef0c: 691b ldr r3, [r3, #16] 801ef0e: 685b ldr r3, [r3, #4] 801ef10: 4618 mov r0, r3 801ef12: f7fa fd7e bl 8019a12 801ef16: 4603 mov r3, r0 801ef18: 1ae3 subs r3, r4, r3 801ef1a: 2b00 cmp r3, #0 801ef1c: dc0b bgt.n 801ef36 tcp_clear_flags(pcb, TF_RTO); 801ef1e: 687b ldr r3, [r7, #4] 801ef20: 8b5b ldrh r3, [r3, #26] 801ef22: f423 6300 bic.w r3, r3, #2048 @ 0x800 801ef26: b29a uxth r2, r3 801ef28: 687b ldr r3, [r7, #4] 801ef2a: 835a strh r2, [r3, #26] } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801ef2c: e003 b.n 801ef36 } } /* End of ACK for new data processing. */ } else { /* Out of sequence ACK, didn't really ack anything */ tcp_send_empty_ack(pcb); 801ef2e: 6878 ldr r0, [r7, #4] 801ef30: f002 fc3c bl 80217ac 801ef34: e000 b.n 801ef38 } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack + 1, pcb->snd_nxt)) { 801ef36: 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)) { 801ef38: 687b ldr r3, [r7, #4] 801ef3a: 6b5b ldr r3, [r3, #52] @ 0x34 801ef3c: 2b00 cmp r3, #0 801ef3e: d05b beq.n 801eff8 801ef40: 687b ldr r3, [r7, #4] 801ef42: 6b9a ldr r2, [r3, #56] @ 0x38 801ef44: 4b60 ldr r3, [pc, #384] @ (801f0c8 ) 801ef46: 681b ldr r3, [r3, #0] 801ef48: 1ad3 subs r3, r2, r3 801ef4a: 2b00 cmp r3, #0 801ef4c: da54 bge.n 801eff8 /* 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); 801ef4e: 4b5f ldr r3, [pc, #380] @ (801f0cc ) 801ef50: 681b ldr r3, [r3, #0] 801ef52: b29a uxth r2, r3 801ef54: 687b ldr r3, [r7, #4] 801ef56: 6b5b ldr r3, [r3, #52] @ 0x34 801ef58: b29b uxth r3, r3 801ef5a: 1ad3 subs r3, r2, r3 801ef5c: b29b uxth r3, r3 801ef5e: 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)); 801ef62: f8b7 204e ldrh.w r2, [r7, #78] @ 0x4e 801ef66: 687b ldr r3, [r7, #4] 801ef68: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801ef6c: 10db asrs r3, r3, #3 801ef6e: b21b sxth r3, r3 801ef70: b29b uxth r3, r3 801ef72: 1ad3 subs r3, r2, r3 801ef74: b29b uxth r3, r3 801ef76: f8a7 304e strh.w r3, [r7, #78] @ 0x4e pcb->sa = (s16_t)(pcb->sa + m); 801ef7a: 687b ldr r3, [r7, #4] 801ef7c: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801ef80: b29a uxth r2, r3 801ef82: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801ef86: 4413 add r3, r2 801ef88: b29b uxth r3, r3 801ef8a: b21a sxth r2, r3 801ef8c: 687b ldr r3, [r7, #4] 801ef8e: 879a strh r2, [r3, #60] @ 0x3c if (m < 0) { 801ef90: f9b7 304e ldrsh.w r3, [r7, #78] @ 0x4e 801ef94: 2b00 cmp r3, #0 801ef96: da05 bge.n 801efa4 m = (s16_t) - m; 801ef98: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801ef9c: 425b negs r3, r3 801ef9e: b29b uxth r3, r3 801efa0: f8a7 304e strh.w r3, [r7, #78] @ 0x4e } m = (s16_t)(m - (pcb->sv >> 2)); 801efa4: f8b7 204e ldrh.w r2, [r7, #78] @ 0x4e 801efa8: 687b ldr r3, [r7, #4] 801efaa: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801efae: 109b asrs r3, r3, #2 801efb0: b21b sxth r3, r3 801efb2: b29b uxth r3, r3 801efb4: 1ad3 subs r3, r2, r3 801efb6: b29b uxth r3, r3 801efb8: f8a7 304e strh.w r3, [r7, #78] @ 0x4e pcb->sv = (s16_t)(pcb->sv + m); 801efbc: 687b ldr r3, [r7, #4] 801efbe: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801efc2: b29a uxth r2, r3 801efc4: f8b7 304e ldrh.w r3, [r7, #78] @ 0x4e 801efc8: 4413 add r3, r2 801efca: b29b uxth r3, r3 801efcc: b21a sxth r2, r3 801efce: 687b ldr r3, [r7, #4] 801efd0: 87da strh r2, [r3, #62] @ 0x3e pcb->rto = (s16_t)((pcb->sa >> 3) + pcb->sv); 801efd2: 687b ldr r3, [r7, #4] 801efd4: f9b3 303c ldrsh.w r3, [r3, #60] @ 0x3c 801efd8: 10db asrs r3, r3, #3 801efda: b21b sxth r3, r3 801efdc: b29a uxth r2, r3 801efde: 687b ldr r3, [r7, #4] 801efe0: f9b3 303e ldrsh.w r3, [r3, #62] @ 0x3e 801efe4: b29b uxth r3, r3 801efe6: 4413 add r3, r2 801efe8: b29b uxth r3, r3 801efea: b21a sxth r2, r3 801efec: 687b ldr r3, [r7, #4] 801efee: 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; 801eff2: 687b ldr r3, [r7, #4] 801eff4: 2200 movs r2, #0 801eff6: 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)) { 801eff8: 4b35 ldr r3, [pc, #212] @ (801f0d0 ) 801effa: 881b ldrh r3, [r3, #0] 801effc: 2b00 cmp r3, #0 801effe: f000 84df beq.w 801f9c0 801f002: 687b ldr r3, [r7, #4] 801f004: 7d1b ldrb r3, [r3, #20] 801f006: 2b06 cmp r3, #6 801f008: f200 84da bhi.w 801f9c0 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)) { 801f00c: 687b ldr r3, [r7, #4] 801f00e: 6a5a ldr r2, [r3, #36] @ 0x24 801f010: 4b30 ldr r3, [pc, #192] @ (801f0d4 ) 801f012: 681b ldr r3, [r3, #0] 801f014: 1ad3 subs r3, r2, r3 801f016: 3b01 subs r3, #1 801f018: 2b00 cmp r3, #0 801f01a: f2c0 808f blt.w 801f13c 801f01e: 687b ldr r3, [r7, #4] 801f020: 6a5a ldr r2, [r3, #36] @ 0x24 801f022: 4b2b ldr r3, [pc, #172] @ (801f0d0 ) 801f024: 881b ldrh r3, [r3, #0] 801f026: 4619 mov r1, r3 801f028: 4b2a ldr r3, [pc, #168] @ (801f0d4 ) 801f02a: 681b ldr r3, [r3, #0] 801f02c: 440b add r3, r1 801f02e: 1ad3 subs r3, r2, r3 801f030: 3301 adds r3, #1 801f032: 2b00 cmp r3, #0 801f034: f300 8082 bgt.w 801f13c 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; 801f038: 4b27 ldr r3, [pc, #156] @ (801f0d8 ) 801f03a: 685b ldr r3, [r3, #4] 801f03c: 647b str r3, [r7, #68] @ 0x44 u32_t off32 = pcb->rcv_nxt - seqno; 801f03e: 687b ldr r3, [r7, #4] 801f040: 6a5a ldr r2, [r3, #36] @ 0x24 801f042: 4b24 ldr r3, [pc, #144] @ (801f0d4 ) 801f044: 681b ldr r3, [r3, #0] 801f046: 1ad3 subs r3, r2, r3 801f048: 627b str r3, [r7, #36] @ 0x24 u16_t new_tot_len, off; LWIP_ASSERT("inseg.p != NULL", inseg.p); 801f04a: 4b23 ldr r3, [pc, #140] @ (801f0d8 ) 801f04c: 685b ldr r3, [r3, #4] 801f04e: 2b00 cmp r3, #0 801f050: d106 bne.n 801f060 801f052: 4b22 ldr r3, [pc, #136] @ (801f0dc ) 801f054: f240 5294 movw r2, #1428 @ 0x594 801f058: 4921 ldr r1, [pc, #132] @ (801f0e0 ) 801f05a: 4822 ldr r0, [pc, #136] @ (801f0e4 ) 801f05c: f00b fc1e bl 802a89c LWIP_ASSERT("insane offset!", (off32 < 0xffff)); 801f060: 6a7b ldr r3, [r7, #36] @ 0x24 801f062: f64f 72fe movw r2, #65534 @ 0xfffe 801f066: 4293 cmp r3, r2 801f068: d906 bls.n 801f078 801f06a: 4b1c ldr r3, [pc, #112] @ (801f0dc ) 801f06c: f240 5295 movw r2, #1429 @ 0x595 801f070: 491d ldr r1, [pc, #116] @ (801f0e8 ) 801f072: 481c ldr r0, [pc, #112] @ (801f0e4 ) 801f074: f00b fc12 bl 802a89c off = (u16_t)off32; 801f078: 6a7b ldr r3, [r7, #36] @ 0x24 801f07a: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); 801f07e: 4b16 ldr r3, [pc, #88] @ (801f0d8 ) 801f080: 685b ldr r3, [r3, #4] 801f082: 891b ldrh r3, [r3, #8] 801f084: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801f088: 429a cmp r2, r3 801f08a: d906 bls.n 801f09a 801f08c: 4b13 ldr r3, [pc, #76] @ (801f0dc ) 801f08e: f240 5297 movw r2, #1431 @ 0x597 801f092: 4916 ldr r1, [pc, #88] @ (801f0ec ) 801f094: 4813 ldr r0, [pc, #76] @ (801f0e4 ) 801f096: f00b fc01 bl 802a89c inseg.len -= off; 801f09a: 4b0f ldr r3, [pc, #60] @ (801f0d8 ) 801f09c: 891a ldrh r2, [r3, #8] 801f09e: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801f0a2: 1ad3 subs r3, r2, r3 801f0a4: b29a uxth r2, r3 801f0a6: 4b0c ldr r3, [pc, #48] @ (801f0d8 ) 801f0a8: 811a strh r2, [r3, #8] new_tot_len = (u16_t)(inseg.p->tot_len - off); 801f0aa: 4b0b ldr r3, [pc, #44] @ (801f0d8 ) 801f0ac: 685b ldr r3, [r3, #4] 801f0ae: 891a ldrh r2, [r3, #8] 801f0b0: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801f0b4: 1ad3 subs r3, r2, r3 801f0b6: 847b strh r3, [r7, #34] @ 0x22 while (p->len < off) { 801f0b8: e02a b.n 801f110 801f0ba: bf00 nop 801f0bc: 080300a8 .word 0x080300a8 801f0c0: 080300b0 .word 0x080300b0 801f0c4: 2402afbc .word 0x2402afbc 801f0c8: 2402afb8 .word 0x2402afb8 801f0cc: 2402af78 .word 0x2402af78 801f0d0: 2402afbe .word 0x2402afbe 801f0d4: 2402afb4 .word 0x2402afb4 801f0d8: 2402af90 .word 0x2402af90 801f0dc: 0802fd40 .word 0x0802fd40 801f0e0: 080300b8 .word 0x080300b8 801f0e4: 0802fd8c .word 0x0802fd8c 801f0e8: 080300c8 .word 0x080300c8 801f0ec: 080300d8 .word 0x080300d8 off -= p->len; 801f0f0: 6c7b ldr r3, [r7, #68] @ 0x44 801f0f2: 895b ldrh r3, [r3, #10] 801f0f4: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801f0f8: 1ad3 subs r3, r2, r3 801f0fa: 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; 801f0fe: 6c7b ldr r3, [r7, #68] @ 0x44 801f100: 8c7a ldrh r2, [r7, #34] @ 0x22 801f102: 811a strh r2, [r3, #8] p->len = 0; 801f104: 6c7b ldr r3, [r7, #68] @ 0x44 801f106: 2200 movs r2, #0 801f108: 815a strh r2, [r3, #10] p = p->next; 801f10a: 6c7b ldr r3, [r7, #68] @ 0x44 801f10c: 681b ldr r3, [r3, #0] 801f10e: 647b str r3, [r7, #68] @ 0x44 while (p->len < off) { 801f110: 6c7b ldr r3, [r7, #68] @ 0x44 801f112: 895b ldrh r3, [r3, #10] 801f114: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 801f118: 429a cmp r2, r3 801f11a: d8e9 bhi.n 801f0f0 } /* cannot fail... */ pbuf_remove_header(p, off); 801f11c: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 801f120: 4619 mov r1, r3 801f122: 6c78 ldr r0, [r7, #68] @ 0x44 801f124: f7fc f88a bl 801b23c inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 801f128: 687b ldr r3, [r7, #4] 801f12a: 6a5b ldr r3, [r3, #36] @ 0x24 801f12c: 4a90 ldr r2, [pc, #576] @ (801f370 ) 801f12e: 6013 str r3, [r2, #0] 801f130: 4b90 ldr r3, [pc, #576] @ (801f374 ) 801f132: 691b ldr r3, [r3, #16] 801f134: 4a8e ldr r2, [pc, #568] @ (801f370 ) 801f136: 6812 ldr r2, [r2, #0] 801f138: 605a str r2, [r3, #4] if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)) { 801f13a: e00d b.n 801f158 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)) { 801f13c: 4b8c ldr r3, [pc, #560] @ (801f370 ) 801f13e: 681a ldr r2, [r3, #0] 801f140: 687b ldr r3, [r7, #4] 801f142: 6a5b ldr r3, [r3, #36] @ 0x24 801f144: 1ad3 subs r3, r2, r3 801f146: 2b00 cmp r3, #0 801f148: da06 bge.n 801f158 /* 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); 801f14a: 687b ldr r3, [r7, #4] 801f14c: 8b5b ldrh r3, [r3, #26] 801f14e: f043 0302 orr.w r3, r3, #2 801f152: b29a uxth r2, r3 801f154: 687b ldr r3, [r7, #4] 801f156: 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, 801f158: 4b85 ldr r3, [pc, #532] @ (801f370 ) 801f15a: 681a ldr r2, [r3, #0] 801f15c: 687b ldr r3, [r7, #4] 801f15e: 6a5b ldr r3, [r3, #36] @ 0x24 801f160: 1ad3 subs r3, r2, r3 801f162: 2b00 cmp r3, #0 801f164: f2c0 8427 blt.w 801f9b6 801f168: 4b81 ldr r3, [pc, #516] @ (801f370 ) 801f16a: 681a ldr r2, [r3, #0] 801f16c: 687b ldr r3, [r7, #4] 801f16e: 6a5b ldr r3, [r3, #36] @ 0x24 801f170: 6879 ldr r1, [r7, #4] 801f172: 8d09 ldrh r1, [r1, #40] @ 0x28 801f174: 440b add r3, r1 801f176: 1ad3 subs r3, r2, r3 801f178: 3301 adds r3, #1 801f17a: 2b00 cmp r3, #0 801f17c: f300 841b bgt.w 801f9b6 pcb->rcv_nxt + pcb->rcv_wnd - 1)) { if (pcb->rcv_nxt == seqno) { 801f180: 687b ldr r3, [r7, #4] 801f182: 6a5a ldr r2, [r3, #36] @ 0x24 801f184: 4b7a ldr r3, [pc, #488] @ (801f370 ) 801f186: 681b ldr r3, [r3, #0] 801f188: 429a cmp r2, r3 801f18a: f040 8298 bne.w 801f6be /* 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); 801f18e: 4b79 ldr r3, [pc, #484] @ (801f374 ) 801f190: 891c ldrh r4, [r3, #8] 801f192: 4b78 ldr r3, [pc, #480] @ (801f374 ) 801f194: 691b ldr r3, [r3, #16] 801f196: 899b ldrh r3, [r3, #12] 801f198: b29b uxth r3, r3 801f19a: 4618 mov r0, r3 801f19c: f7fa fc24 bl 80199e8 801f1a0: 4603 mov r3, r0 801f1a2: b2db uxtb r3, r3 801f1a4: f003 0303 and.w r3, r3, #3 801f1a8: 2b00 cmp r3, #0 801f1aa: d001 beq.n 801f1b0 801f1ac: 2301 movs r3, #1 801f1ae: e000 b.n 801f1b2 801f1b0: 2300 movs r3, #0 801f1b2: 4423 add r3, r4 801f1b4: b29a uxth r2, r3 801f1b6: 4b70 ldr r3, [pc, #448] @ (801f378 ) 801f1b8: 801a strh r2, [r3, #0] if (tcplen > pcb->rcv_wnd) { 801f1ba: 687b ldr r3, [r7, #4] 801f1bc: 8d1a ldrh r2, [r3, #40] @ 0x28 801f1be: 4b6e ldr r3, [pc, #440] @ (801f378 ) 801f1c0: 881b ldrh r3, [r3, #0] 801f1c2: 429a cmp r2, r3 801f1c4: d274 bcs.n 801f2b0 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) { 801f1c6: 4b6b ldr r3, [pc, #428] @ (801f374 ) 801f1c8: 691b ldr r3, [r3, #16] 801f1ca: 899b ldrh r3, [r3, #12] 801f1cc: b29b uxth r3, r3 801f1ce: 4618 mov r0, r3 801f1d0: f7fa fc0a bl 80199e8 801f1d4: 4603 mov r3, r0 801f1d6: b2db uxtb r3, r3 801f1d8: f003 0301 and.w r3, r3, #1 801f1dc: 2b00 cmp r3, #0 801f1de: d01e beq.n 801f21e /* 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); 801f1e0: 4b64 ldr r3, [pc, #400] @ (801f374 ) 801f1e2: 691b ldr r3, [r3, #16] 801f1e4: 899b ldrh r3, [r3, #12] 801f1e6: b29b uxth r3, r3 801f1e8: b21b sxth r3, r3 801f1ea: f423 537c bic.w r3, r3, #16128 @ 0x3f00 801f1ee: b21c sxth r4, r3 801f1f0: 4b60 ldr r3, [pc, #384] @ (801f374 ) 801f1f2: 691b ldr r3, [r3, #16] 801f1f4: 899b ldrh r3, [r3, #12] 801f1f6: b29b uxth r3, r3 801f1f8: 4618 mov r0, r3 801f1fa: f7fa fbf5 bl 80199e8 801f1fe: 4603 mov r3, r0 801f200: b2db uxtb r3, r3 801f202: f003 033e and.w r3, r3, #62 @ 0x3e 801f206: b29b uxth r3, r3 801f208: 4618 mov r0, r3 801f20a: f7fa fbed bl 80199e8 801f20e: 4603 mov r3, r0 801f210: b21b sxth r3, r3 801f212: 4323 orrs r3, r4 801f214: b21a sxth r2, r3 801f216: 4b57 ldr r3, [pc, #348] @ (801f374 ) 801f218: 691b ldr r3, [r3, #16] 801f21a: b292 uxth r2, r2 801f21c: 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; 801f21e: 687b ldr r3, [r7, #4] 801f220: 8d1a ldrh r2, [r3, #40] @ 0x28 801f222: 4b54 ldr r3, [pc, #336] @ (801f374 ) 801f224: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 801f226: 4b53 ldr r3, [pc, #332] @ (801f374 ) 801f228: 691b ldr r3, [r3, #16] 801f22a: 899b ldrh r3, [r3, #12] 801f22c: b29b uxth r3, r3 801f22e: 4618 mov r0, r3 801f230: f7fa fbda bl 80199e8 801f234: 4603 mov r3, r0 801f236: b2db uxtb r3, r3 801f238: f003 0302 and.w r3, r3, #2 801f23c: 2b00 cmp r3, #0 801f23e: d005 beq.n 801f24c inseg.len -= 1; 801f240: 4b4c ldr r3, [pc, #304] @ (801f374 ) 801f242: 891b ldrh r3, [r3, #8] 801f244: 3b01 subs r3, #1 801f246: b29a uxth r2, r3 801f248: 4b4a ldr r3, [pc, #296] @ (801f374 ) 801f24a: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 801f24c: 4b49 ldr r3, [pc, #292] @ (801f374 ) 801f24e: 685b ldr r3, [r3, #4] 801f250: 4a48 ldr r2, [pc, #288] @ (801f374 ) 801f252: 8912 ldrh r2, [r2, #8] 801f254: 4611 mov r1, r2 801f256: 4618 mov r0, r3 801f258: f7fb fef2 bl 801b040 tcplen = TCP_TCPLEN(&inseg); 801f25c: 4b45 ldr r3, [pc, #276] @ (801f374 ) 801f25e: 891c ldrh r4, [r3, #8] 801f260: 4b44 ldr r3, [pc, #272] @ (801f374 ) 801f262: 691b ldr r3, [r3, #16] 801f264: 899b ldrh r3, [r3, #12] 801f266: b29b uxth r3, r3 801f268: 4618 mov r0, r3 801f26a: f7fa fbbd bl 80199e8 801f26e: 4603 mov r3, r0 801f270: b2db uxtb r3, r3 801f272: f003 0303 and.w r3, r3, #3 801f276: 2b00 cmp r3, #0 801f278: d001 beq.n 801f27e 801f27a: 2301 movs r3, #1 801f27c: e000 b.n 801f280 801f27e: 2300 movs r3, #0 801f280: 4423 add r3, r4 801f282: b29a uxth r2, r3 801f284: 4b3c ldr r3, [pc, #240] @ (801f378 ) 801f286: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 801f288: 4b3b ldr r3, [pc, #236] @ (801f378 ) 801f28a: 881b ldrh r3, [r3, #0] 801f28c: 461a mov r2, r3 801f28e: 4b38 ldr r3, [pc, #224] @ (801f370 ) 801f290: 681b ldr r3, [r3, #0] 801f292: 441a add r2, r3 801f294: 687b ldr r3, [r7, #4] 801f296: 6a5b ldr r3, [r3, #36] @ 0x24 801f298: 6879 ldr r1, [r7, #4] 801f29a: 8d09 ldrh r1, [r1, #40] @ 0x28 801f29c: 440b add r3, r1 801f29e: 429a cmp r2, r3 801f2a0: d006 beq.n 801f2b0 801f2a2: 4b36 ldr r3, [pc, #216] @ (801f37c ) 801f2a4: f240 52cb movw r2, #1483 @ 0x5cb 801f2a8: 4935 ldr r1, [pc, #212] @ (801f380 ) 801f2aa: 4836 ldr r0, [pc, #216] @ (801f384 ) 801f2ac: f00b faf6 bl 802a89c } #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) { 801f2b0: 687b ldr r3, [r7, #4] 801f2b2: 6f5b ldr r3, [r3, #116] @ 0x74 801f2b4: 2b00 cmp r3, #0 801f2b6: f000 80e6 beq.w 801f486 if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 801f2ba: 4b2e ldr r3, [pc, #184] @ (801f374 ) 801f2bc: 691b ldr r3, [r3, #16] 801f2be: 899b ldrh r3, [r3, #12] 801f2c0: b29b uxth r3, r3 801f2c2: 4618 mov r0, r3 801f2c4: f7fa fb90 bl 80199e8 801f2c8: 4603 mov r3, r0 801f2ca: b2db uxtb r3, r3 801f2cc: f003 0301 and.w r3, r3, #1 801f2d0: 2b00 cmp r3, #0 801f2d2: d010 beq.n 801f2f6 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) { 801f2d4: e00a b.n 801f2ec struct tcp_seg *old_ooseq = pcb->ooseq; 801f2d6: 687b ldr r3, [r7, #4] 801f2d8: 6f5b ldr r3, [r3, #116] @ 0x74 801f2da: 60fb str r3, [r7, #12] pcb->ooseq = pcb->ooseq->next; 801f2dc: 687b ldr r3, [r7, #4] 801f2de: 6f5b ldr r3, [r3, #116] @ 0x74 801f2e0: 681a ldr r2, [r3, #0] 801f2e2: 687b ldr r3, [r7, #4] 801f2e4: 675a str r2, [r3, #116] @ 0x74 tcp_seg_free(old_ooseq); 801f2e6: 68f8 ldr r0, [r7, #12] 801f2e8: f7fd fcb9 bl 801cc5e while (pcb->ooseq != NULL) { 801f2ec: 687b ldr r3, [r7, #4] 801f2ee: 6f5b ldr r3, [r3, #116] @ 0x74 801f2f0: 2b00 cmp r3, #0 801f2f2: d1f0 bne.n 801f2d6 801f2f4: e0c7 b.n 801f486 } } else { struct tcp_seg *next = pcb->ooseq; 801f2f6: 687b ldr r3, [r7, #4] 801f2f8: 6f5b ldr r3, [r3, #116] @ 0x74 801f2fa: 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 && 801f2fc: e051 b.n 801f3a2 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 && 801f2fe: 6bfb ldr r3, [r7, #60] @ 0x3c 801f300: 691b ldr r3, [r3, #16] 801f302: 899b ldrh r3, [r3, #12] 801f304: b29b uxth r3, r3 801f306: 4618 mov r0, r3 801f308: f7fa fb6e bl 80199e8 801f30c: 4603 mov r3, r0 801f30e: b2db uxtb r3, r3 801f310: f003 0301 and.w r3, r3, #1 801f314: 2b00 cmp r3, #0 801f316: d03c beq.n 801f392 (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) == 0) { 801f318: 4b16 ldr r3, [pc, #88] @ (801f374 ) 801f31a: 691b ldr r3, [r3, #16] 801f31c: 899b ldrh r3, [r3, #12] 801f31e: b29b uxth r3, r3 801f320: 4618 mov r0, r3 801f322: f7fa fb61 bl 80199e8 801f326: 4603 mov r3, r0 801f328: b2db uxtb r3, r3 801f32a: f003 0302 and.w r3, r3, #2 if ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0 && 801f32e: 2b00 cmp r3, #0 801f330: d12f bne.n 801f392 TCPH_SET_FLAG(inseg.tcphdr, TCP_FIN); 801f332: 4b10 ldr r3, [pc, #64] @ (801f374 ) 801f334: 691b ldr r3, [r3, #16] 801f336: 899b ldrh r3, [r3, #12] 801f338: b29c uxth r4, r3 801f33a: 2001 movs r0, #1 801f33c: f7fa fb54 bl 80199e8 801f340: 4603 mov r3, r0 801f342: 461a mov r2, r3 801f344: 4b0b ldr r3, [pc, #44] @ (801f374 ) 801f346: 691b ldr r3, [r3, #16] 801f348: 4322 orrs r2, r4 801f34a: b292 uxth r2, r2 801f34c: 819a strh r2, [r3, #12] tcplen = TCP_TCPLEN(&inseg); 801f34e: 4b09 ldr r3, [pc, #36] @ (801f374 ) 801f350: 891c ldrh r4, [r3, #8] 801f352: 4b08 ldr r3, [pc, #32] @ (801f374 ) 801f354: 691b ldr r3, [r3, #16] 801f356: 899b ldrh r3, [r3, #12] 801f358: b29b uxth r3, r3 801f35a: 4618 mov r0, r3 801f35c: f7fa fb44 bl 80199e8 801f360: 4603 mov r3, r0 801f362: b2db uxtb r3, r3 801f364: f003 0303 and.w r3, r3, #3 801f368: 2b00 cmp r3, #0 801f36a: d00d beq.n 801f388 801f36c: 2301 movs r3, #1 801f36e: e00c b.n 801f38a 801f370: 2402afb4 .word 0x2402afb4 801f374: 2402af90 .word 0x2402af90 801f378: 2402afbe .word 0x2402afbe 801f37c: 0802fd40 .word 0x0802fd40 801f380: 080300e8 .word 0x080300e8 801f384: 0802fd8c .word 0x0802fd8c 801f388: 2300 movs r3, #0 801f38a: 4423 add r3, r4 801f38c: b29a uxth r2, r3 801f38e: 4b98 ldr r3, [pc, #608] @ (801f5f0 ) 801f390: 801a strh r2, [r3, #0] } tmp = next; 801f392: 6bfb ldr r3, [r7, #60] @ 0x3c 801f394: 613b str r3, [r7, #16] next = next->next; 801f396: 6bfb ldr r3, [r7, #60] @ 0x3c 801f398: 681b ldr r3, [r3, #0] 801f39a: 63fb str r3, [r7, #60] @ 0x3c tcp_seg_free(tmp); 801f39c: 6938 ldr r0, [r7, #16] 801f39e: f7fd fc5e bl 801cc5e while (next && 801f3a2: 6bfb ldr r3, [r7, #60] @ 0x3c 801f3a4: 2b00 cmp r3, #0 801f3a6: d00e beq.n 801f3c6 TCP_SEQ_GEQ(seqno + tcplen, 801f3a8: 4b91 ldr r3, [pc, #580] @ (801f5f0 ) 801f3aa: 881b ldrh r3, [r3, #0] 801f3ac: 461a mov r2, r3 801f3ae: 4b91 ldr r3, [pc, #580] @ (801f5f4 ) 801f3b0: 681b ldr r3, [r3, #0] 801f3b2: 441a add r2, r3 801f3b4: 6bfb ldr r3, [r7, #60] @ 0x3c 801f3b6: 691b ldr r3, [r3, #16] 801f3b8: 685b ldr r3, [r3, #4] 801f3ba: 6bf9 ldr r1, [r7, #60] @ 0x3c 801f3bc: 8909 ldrh r1, [r1, #8] 801f3be: 440b add r3, r1 801f3c0: 1ad3 subs r3, r2, r3 while (next && 801f3c2: 2b00 cmp r3, #0 801f3c4: da9b bge.n 801f2fe } /* Now trim right side of inseg if it overlaps with the first * segment on ooseq */ if (next && 801f3c6: 6bfb ldr r3, [r7, #60] @ 0x3c 801f3c8: 2b00 cmp r3, #0 801f3ca: d059 beq.n 801f480 TCP_SEQ_GT(seqno + tcplen, 801f3cc: 4b88 ldr r3, [pc, #544] @ (801f5f0 ) 801f3ce: 881b ldrh r3, [r3, #0] 801f3d0: 461a mov r2, r3 801f3d2: 4b88 ldr r3, [pc, #544] @ (801f5f4 ) 801f3d4: 681b ldr r3, [r3, #0] 801f3d6: 441a add r2, r3 801f3d8: 6bfb ldr r3, [r7, #60] @ 0x3c 801f3da: 691b ldr r3, [r3, #16] 801f3dc: 685b ldr r3, [r3, #4] 801f3de: 1ad3 subs r3, r2, r3 if (next && 801f3e0: 2b00 cmp r3, #0 801f3e2: dd4d ble.n 801f480 next->tcphdr->seqno)) { /* inseg cannot have FIN here (already processed above) */ inseg.len = (u16_t)(next->tcphdr->seqno - seqno); 801f3e4: 6bfb ldr r3, [r7, #60] @ 0x3c 801f3e6: 691b ldr r3, [r3, #16] 801f3e8: 685b ldr r3, [r3, #4] 801f3ea: b29a uxth r2, r3 801f3ec: 4b81 ldr r3, [pc, #516] @ (801f5f4 ) 801f3ee: 681b ldr r3, [r3, #0] 801f3f0: b29b uxth r3, r3 801f3f2: 1ad3 subs r3, r2, r3 801f3f4: b29a uxth r2, r3 801f3f6: 4b80 ldr r3, [pc, #512] @ (801f5f8 ) 801f3f8: 811a strh r2, [r3, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 801f3fa: 4b7f ldr r3, [pc, #508] @ (801f5f8 ) 801f3fc: 691b ldr r3, [r3, #16] 801f3fe: 899b ldrh r3, [r3, #12] 801f400: b29b uxth r3, r3 801f402: 4618 mov r0, r3 801f404: f7fa faf0 bl 80199e8 801f408: 4603 mov r3, r0 801f40a: b2db uxtb r3, r3 801f40c: f003 0302 and.w r3, r3, #2 801f410: 2b00 cmp r3, #0 801f412: d005 beq.n 801f420 inseg.len -= 1; 801f414: 4b78 ldr r3, [pc, #480] @ (801f5f8 ) 801f416: 891b ldrh r3, [r3, #8] 801f418: 3b01 subs r3, #1 801f41a: b29a uxth r2, r3 801f41c: 4b76 ldr r3, [pc, #472] @ (801f5f8 ) 801f41e: 811a strh r2, [r3, #8] } pbuf_realloc(inseg.p, inseg.len); 801f420: 4b75 ldr r3, [pc, #468] @ (801f5f8 ) 801f422: 685b ldr r3, [r3, #4] 801f424: 4a74 ldr r2, [pc, #464] @ (801f5f8 ) 801f426: 8912 ldrh r2, [r2, #8] 801f428: 4611 mov r1, r2 801f42a: 4618 mov r0, r3 801f42c: f7fb fe08 bl 801b040 tcplen = TCP_TCPLEN(&inseg); 801f430: 4b71 ldr r3, [pc, #452] @ (801f5f8 ) 801f432: 891c ldrh r4, [r3, #8] 801f434: 4b70 ldr r3, [pc, #448] @ (801f5f8 ) 801f436: 691b ldr r3, [r3, #16] 801f438: 899b ldrh r3, [r3, #12] 801f43a: b29b uxth r3, r3 801f43c: 4618 mov r0, r3 801f43e: f7fa fad3 bl 80199e8 801f442: 4603 mov r3, r0 801f444: b2db uxtb r3, r3 801f446: f003 0303 and.w r3, r3, #3 801f44a: 2b00 cmp r3, #0 801f44c: d001 beq.n 801f452 801f44e: 2301 movs r3, #1 801f450: e000 b.n 801f454 801f452: 2300 movs r3, #0 801f454: 4423 add r3, r4 801f456: b29a uxth r2, r3 801f458: 4b65 ldr r3, [pc, #404] @ (801f5f0 ) 801f45a: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to ooseq queue\n", 801f45c: 4b64 ldr r3, [pc, #400] @ (801f5f0 ) 801f45e: 881b ldrh r3, [r3, #0] 801f460: 461a mov r2, r3 801f462: 4b64 ldr r3, [pc, #400] @ (801f5f4 ) 801f464: 681b ldr r3, [r3, #0] 801f466: 441a add r2, r3 801f468: 6bfb ldr r3, [r7, #60] @ 0x3c 801f46a: 691b ldr r3, [r3, #16] 801f46c: 685b ldr r3, [r3, #4] 801f46e: 429a cmp r2, r3 801f470: d006 beq.n 801f480 801f472: 4b62 ldr r3, [pc, #392] @ (801f5fc ) 801f474: f240 52fc movw r2, #1532 @ 0x5fc 801f478: 4961 ldr r1, [pc, #388] @ (801f600 ) 801f47a: 4862 ldr r0, [pc, #392] @ (801f604 ) 801f47c: f00b fa0e bl 802a89c (seqno + tcplen) == next->tcphdr->seqno); } pcb->ooseq = next; 801f480: 687b ldr r3, [r7, #4] 801f482: 6bfa ldr r2, [r7, #60] @ 0x3c 801f484: 675a str r2, [r3, #116] @ 0x74 } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 801f486: 4b5a ldr r3, [pc, #360] @ (801f5f0 ) 801f488: 881b ldrh r3, [r3, #0] 801f48a: 461a mov r2, r3 801f48c: 4b59 ldr r3, [pc, #356] @ (801f5f4 ) 801f48e: 681b ldr r3, [r3, #0] 801f490: 441a add r2, r3 801f492: 687b ldr r3, [r7, #4] 801f494: 625a str r2, [r3, #36] @ 0x24 /* Update the receiver's (our) window. */ LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); 801f496: 687b ldr r3, [r7, #4] 801f498: 8d1a ldrh r2, [r3, #40] @ 0x28 801f49a: 4b55 ldr r3, [pc, #340] @ (801f5f0 ) 801f49c: 881b ldrh r3, [r3, #0] 801f49e: 429a cmp r2, r3 801f4a0: d206 bcs.n 801f4b0 801f4a2: 4b56 ldr r3, [pc, #344] @ (801f5fc ) 801f4a4: f240 6207 movw r2, #1543 @ 0x607 801f4a8: 4957 ldr r1, [pc, #348] @ (801f608 ) 801f4aa: 4856 ldr r0, [pc, #344] @ (801f604 ) 801f4ac: f00b f9f6 bl 802a89c pcb->rcv_wnd -= tcplen; 801f4b0: 687b ldr r3, [r7, #4] 801f4b2: 8d1a ldrh r2, [r3, #40] @ 0x28 801f4b4: 4b4e ldr r3, [pc, #312] @ (801f5f0 ) 801f4b6: 881b ldrh r3, [r3, #0] 801f4b8: 1ad3 subs r3, r2, r3 801f4ba: b29a uxth r2, r3 801f4bc: 687b ldr r3, [r7, #4] 801f4be: 851a strh r2, [r3, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 801f4c0: 6878 ldr r0, [r7, #4] 801f4c2: f7fc fd85 bl 801bfd0 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) { 801f4c6: 4b4c ldr r3, [pc, #304] @ (801f5f8 ) 801f4c8: 685b ldr r3, [r3, #4] 801f4ca: 891b ldrh r3, [r3, #8] 801f4cc: 2b00 cmp r3, #0 801f4ce: d006 beq.n 801f4de recv_data = inseg.p; 801f4d0: 4b49 ldr r3, [pc, #292] @ (801f5f8 ) 801f4d2: 685b ldr r3, [r3, #4] 801f4d4: 4a4d ldr r2, [pc, #308] @ (801f60c ) 801f4d6: 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; 801f4d8: 4b47 ldr r3, [pc, #284] @ (801f5f8 ) 801f4da: 2200 movs r2, #0 801f4dc: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 801f4de: 4b46 ldr r3, [pc, #280] @ (801f5f8 ) 801f4e0: 691b ldr r3, [r3, #16] 801f4e2: 899b ldrh r3, [r3, #12] 801f4e4: b29b uxth r3, r3 801f4e6: 4618 mov r0, r3 801f4e8: f7fa fa7e bl 80199e8 801f4ec: 4603 mov r3, r0 801f4ee: b2db uxtb r3, r3 801f4f0: f003 0301 and.w r3, r3, #1 801f4f4: 2b00 cmp r3, #0 801f4f6: f000 80b8 beq.w 801f66a LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 801f4fa: 4b45 ldr r3, [pc, #276] @ (801f610 ) 801f4fc: 781b ldrb r3, [r3, #0] 801f4fe: f043 0320 orr.w r3, r3, #32 801f502: b2da uxtb r2, r3 801f504: 4b42 ldr r3, [pc, #264] @ (801f610 ) 801f506: 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 && 801f508: e0af b.n 801f66a pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { struct tcp_seg *cseg = pcb->ooseq; 801f50a: 687b ldr r3, [r7, #4] 801f50c: 6f5b ldr r3, [r3, #116] @ 0x74 801f50e: 60bb str r3, [r7, #8] seqno = pcb->ooseq->tcphdr->seqno; 801f510: 687b ldr r3, [r7, #4] 801f512: 6f5b ldr r3, [r3, #116] @ 0x74 801f514: 691b ldr r3, [r3, #16] 801f516: 685b ldr r3, [r3, #4] 801f518: 4a36 ldr r2, [pc, #216] @ (801f5f4 ) 801f51a: 6013 str r3, [r2, #0] pcb->rcv_nxt += TCP_TCPLEN(cseg); 801f51c: 68bb ldr r3, [r7, #8] 801f51e: 891b ldrh r3, [r3, #8] 801f520: 461c mov r4, r3 801f522: 68bb ldr r3, [r7, #8] 801f524: 691b ldr r3, [r3, #16] 801f526: 899b ldrh r3, [r3, #12] 801f528: b29b uxth r3, r3 801f52a: 4618 mov r0, r3 801f52c: f7fa fa5c bl 80199e8 801f530: 4603 mov r3, r0 801f532: b2db uxtb r3, r3 801f534: f003 0303 and.w r3, r3, #3 801f538: 2b00 cmp r3, #0 801f53a: d001 beq.n 801f540 801f53c: 2301 movs r3, #1 801f53e: e000 b.n 801f542 801f540: 2300 movs r3, #0 801f542: 191a adds r2, r3, r4 801f544: 687b ldr r3, [r7, #4] 801f546: 6a5b ldr r3, [r3, #36] @ 0x24 801f548: 441a add r2, r3 801f54a: 687b ldr r3, [r7, #4] 801f54c: 625a str r2, [r3, #36] @ 0x24 LWIP_ASSERT("tcp_receive: ooseq tcplen > rcv_wnd\n", 801f54e: 687b ldr r3, [r7, #4] 801f550: 8d1b ldrh r3, [r3, #40] @ 0x28 801f552: 461c mov r4, r3 801f554: 68bb ldr r3, [r7, #8] 801f556: 891b ldrh r3, [r3, #8] 801f558: 461d mov r5, r3 801f55a: 68bb ldr r3, [r7, #8] 801f55c: 691b ldr r3, [r3, #16] 801f55e: 899b ldrh r3, [r3, #12] 801f560: b29b uxth r3, r3 801f562: 4618 mov r0, r3 801f564: f7fa fa40 bl 80199e8 801f568: 4603 mov r3, r0 801f56a: b2db uxtb r3, r3 801f56c: f003 0303 and.w r3, r3, #3 801f570: 2b00 cmp r3, #0 801f572: d001 beq.n 801f578 801f574: 2301 movs r3, #1 801f576: e000 b.n 801f57a 801f578: 2300 movs r3, #0 801f57a: 442b add r3, r5 801f57c: 429c cmp r4, r3 801f57e: d206 bcs.n 801f58e 801f580: 4b1e ldr r3, [pc, #120] @ (801f5fc ) 801f582: f240 622b movw r2, #1579 @ 0x62b 801f586: 4923 ldr r1, [pc, #140] @ (801f614 ) 801f588: 481e ldr r0, [pc, #120] @ (801f604 ) 801f58a: f00b f987 bl 802a89c pcb->rcv_wnd >= TCP_TCPLEN(cseg)); pcb->rcv_wnd -= TCP_TCPLEN(cseg); 801f58e: 68bb ldr r3, [r7, #8] 801f590: 891b ldrh r3, [r3, #8] 801f592: 461c mov r4, r3 801f594: 68bb ldr r3, [r7, #8] 801f596: 691b ldr r3, [r3, #16] 801f598: 899b ldrh r3, [r3, #12] 801f59a: b29b uxth r3, r3 801f59c: 4618 mov r0, r3 801f59e: f7fa fa23 bl 80199e8 801f5a2: 4603 mov r3, r0 801f5a4: b2db uxtb r3, r3 801f5a6: f003 0303 and.w r3, r3, #3 801f5aa: 2b00 cmp r3, #0 801f5ac: d001 beq.n 801f5b2 801f5ae: 2301 movs r3, #1 801f5b0: e000 b.n 801f5b4 801f5b2: 2300 movs r3, #0 801f5b4: 1919 adds r1, r3, r4 801f5b6: 687b ldr r3, [r7, #4] 801f5b8: 8d1a ldrh r2, [r3, #40] @ 0x28 801f5ba: b28b uxth r3, r1 801f5bc: 1ad3 subs r3, r2, r3 801f5be: b29a uxth r2, r3 801f5c0: 687b ldr r3, [r7, #4] 801f5c2: 851a strh r2, [r3, #40] @ 0x28 tcp_update_rcv_ann_wnd(pcb); 801f5c4: 6878 ldr r0, [r7, #4] 801f5c6: f7fc fd03 bl 801bfd0 if (cseg->p->tot_len > 0) { 801f5ca: 68bb ldr r3, [r7, #8] 801f5cc: 685b ldr r3, [r3, #4] 801f5ce: 891b ldrh r3, [r3, #8] 801f5d0: 2b00 cmp r3, #0 801f5d2: d028 beq.n 801f626 /* 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) { 801f5d4: 4b0d ldr r3, [pc, #52] @ (801f60c ) 801f5d6: 681b ldr r3, [r3, #0] 801f5d8: 2b00 cmp r3, #0 801f5da: d01d beq.n 801f618 pbuf_cat(recv_data, cseg->p); 801f5dc: 4b0b ldr r3, [pc, #44] @ (801f60c ) 801f5de: 681a ldr r2, [r3, #0] 801f5e0: 68bb ldr r3, [r7, #8] 801f5e2: 685b ldr r3, [r3, #4] 801f5e4: 4619 mov r1, r3 801f5e6: 4610 mov r0, r2 801f5e8: f7fb ffae bl 801b548 801f5ec: e018 b.n 801f620 801f5ee: bf00 nop 801f5f0: 2402afbe .word 0x2402afbe 801f5f4: 2402afb4 .word 0x2402afb4 801f5f8: 2402af90 .word 0x2402af90 801f5fc: 0802fd40 .word 0x0802fd40 801f600: 08030120 .word 0x08030120 801f604: 0802fd8c .word 0x0802fd8c 801f608: 0803015c .word 0x0803015c 801f60c: 2402afc4 .word 0x2402afc4 801f610: 2402afc1 .word 0x2402afc1 801f614: 0803017c .word 0x0803017c } else { recv_data = cseg->p; 801f618: 68bb ldr r3, [r7, #8] 801f61a: 685b ldr r3, [r3, #4] 801f61c: 4a70 ldr r2, [pc, #448] @ (801f7e0 ) 801f61e: 6013 str r3, [r2, #0] } cseg->p = NULL; 801f620: 68bb ldr r3, [r7, #8] 801f622: 2200 movs r2, #0 801f624: 605a str r2, [r3, #4] } if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) { 801f626: 68bb ldr r3, [r7, #8] 801f628: 691b ldr r3, [r3, #16] 801f62a: 899b ldrh r3, [r3, #12] 801f62c: b29b uxth r3, r3 801f62e: 4618 mov r0, r3 801f630: f7fa f9da bl 80199e8 801f634: 4603 mov r3, r0 801f636: b2db uxtb r3, r3 801f638: f003 0301 and.w r3, r3, #1 801f63c: 2b00 cmp r3, #0 801f63e: d00d beq.n 801f65c LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: dequeued FIN.\n")); recv_flags |= TF_GOT_FIN; 801f640: 4b68 ldr r3, [pc, #416] @ (801f7e4 ) 801f642: 781b ldrb r3, [r3, #0] 801f644: f043 0320 orr.w r3, r3, #32 801f648: b2da uxtb r2, r3 801f64a: 4b66 ldr r3, [pc, #408] @ (801f7e4 ) 801f64c: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { /* force passive close or we can move to active close */ 801f64e: 687b ldr r3, [r7, #4] 801f650: 7d1b ldrb r3, [r3, #20] 801f652: 2b04 cmp r3, #4 801f654: d102 bne.n 801f65c pcb->state = CLOSE_WAIT; 801f656: 687b ldr r3, [r7, #4] 801f658: 2207 movs r2, #7 801f65a: 751a strb r2, [r3, #20] } } pcb->ooseq = cseg->next; 801f65c: 68bb ldr r3, [r7, #8] 801f65e: 681a ldr r2, [r3, #0] 801f660: 687b ldr r3, [r7, #4] 801f662: 675a str r2, [r3, #116] @ 0x74 tcp_seg_free(cseg); 801f664: 68b8 ldr r0, [r7, #8] 801f666: f7fd fafa bl 801cc5e while (pcb->ooseq != NULL && 801f66a: 687b ldr r3, [r7, #4] 801f66c: 6f5b ldr r3, [r3, #116] @ 0x74 801f66e: 2b00 cmp r3, #0 801f670: d008 beq.n 801f684 pcb->ooseq->tcphdr->seqno == pcb->rcv_nxt) { 801f672: 687b ldr r3, [r7, #4] 801f674: 6f5b ldr r3, [r3, #116] @ 0x74 801f676: 691b ldr r3, [r3, #16] 801f678: 685a ldr r2, [r3, #4] 801f67a: 687b ldr r3, [r7, #4] 801f67c: 6a5b ldr r3, [r3, #36] @ 0x24 while (pcb->ooseq != NULL && 801f67e: 429a cmp r2, r3 801f680: f43f af43 beq.w 801f50a #endif /* LWIP_TCP_SACK_OUT */ #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 801f684: 687b ldr r3, [r7, #4] 801f686: 8b5b ldrh r3, [r3, #26] 801f688: f003 0301 and.w r3, r3, #1 801f68c: 2b00 cmp r3, #0 801f68e: d00e beq.n 801f6ae 801f690: 687b ldr r3, [r7, #4] 801f692: 8b5b ldrh r3, [r3, #26] 801f694: f023 0301 bic.w r3, r3, #1 801f698: b29a uxth r2, r3 801f69a: 687b ldr r3, [r7, #4] 801f69c: 835a strh r2, [r3, #26] 801f69e: 687b ldr r3, [r7, #4] 801f6a0: 8b5b ldrh r3, [r3, #26] 801f6a2: f043 0302 orr.w r3, r3, #2 801f6a6: b29a uxth r2, r3 801f6a8: 687b ldr r3, [r7, #4] 801f6aa: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 801f6ac: e187 b.n 801f9be tcp_ack(pcb); 801f6ae: 687b ldr r3, [r7, #4] 801f6b0: 8b5b ldrh r3, [r3, #26] 801f6b2: f043 0301 orr.w r3, r3, #1 801f6b6: b29a uxth r2, r3 801f6b8: 687b ldr r3, [r7, #4] 801f6ba: 835a strh r2, [r3, #26] if (pcb->rcv_nxt == seqno) { 801f6bc: e17f b.n 801f9be } 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) { 801f6be: 687b ldr r3, [r7, #4] 801f6c0: 6f5b ldr r3, [r3, #116] @ 0x74 801f6c2: 2b00 cmp r3, #0 801f6c4: d106 bne.n 801f6d4 pcb->ooseq = tcp_seg_copy(&inseg); 801f6c6: 4848 ldr r0, [pc, #288] @ (801f7e8 ) 801f6c8: f7fd fae2 bl 801cc90 801f6cc: 4602 mov r2, r0 801f6ce: 687b ldr r3, [r7, #4] 801f6d0: 675a str r2, [r3, #116] @ 0x74 801f6d2: e16c b.n 801f9ae #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; 801f6d4: 2300 movs r3, #0 801f6d6: 637b str r3, [r7, #52] @ 0x34 for (next = pcb->ooseq; next != NULL; next = next->next) { 801f6d8: 687b ldr r3, [r7, #4] 801f6da: 6f5b ldr r3, [r3, #116] @ 0x74 801f6dc: 63bb str r3, [r7, #56] @ 0x38 801f6de: e156 b.n 801f98e if (seqno == next->tcphdr->seqno) { 801f6e0: 6bbb ldr r3, [r7, #56] @ 0x38 801f6e2: 691b ldr r3, [r3, #16] 801f6e4: 685a ldr r2, [r3, #4] 801f6e6: 4b41 ldr r3, [pc, #260] @ (801f7ec ) 801f6e8: 681b ldr r3, [r3, #0] 801f6ea: 429a cmp r2, r3 801f6ec: d11d bne.n 801f72a /* 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) { 801f6ee: 4b3e ldr r3, [pc, #248] @ (801f7e8 ) 801f6f0: 891a ldrh r2, [r3, #8] 801f6f2: 6bbb ldr r3, [r7, #56] @ 0x38 801f6f4: 891b ldrh r3, [r3, #8] 801f6f6: 429a cmp r2, r3 801f6f8: f240 814e bls.w 801f998 /* 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); 801f6fc: 483a ldr r0, [pc, #232] @ (801f7e8 ) 801f6fe: f7fd fac7 bl 801cc90 801f702: 6178 str r0, [r7, #20] if (cseg != NULL) { 801f704: 697b ldr r3, [r7, #20] 801f706: 2b00 cmp r3, #0 801f708: f000 8148 beq.w 801f99c if (prev != NULL) { 801f70c: 6b7b ldr r3, [r7, #52] @ 0x34 801f70e: 2b00 cmp r3, #0 801f710: d003 beq.n 801f71a prev->next = cseg; 801f712: 6b7b ldr r3, [r7, #52] @ 0x34 801f714: 697a ldr r2, [r7, #20] 801f716: 601a str r2, [r3, #0] 801f718: e002 b.n 801f720 } else { pcb->ooseq = cseg; 801f71a: 687b ldr r3, [r7, #4] 801f71c: 697a ldr r2, [r7, #20] 801f71e: 675a str r2, [r3, #116] @ 0x74 } tcp_oos_insert_segment(cseg, next); 801f720: 6bb9 ldr r1, [r7, #56] @ 0x38 801f722: 6978 ldr r0, [r7, #20] 801f724: f7ff f8de bl 801e8e4 } break; 801f728: e138 b.n 801f99c segment was smaller than the old one; in either case, we ditch the incoming segment. */ break; } } else { if (prev == NULL) { 801f72a: 6b7b ldr r3, [r7, #52] @ 0x34 801f72c: 2b00 cmp r3, #0 801f72e: d117 bne.n 801f760 if (TCP_SEQ_LT(seqno, next->tcphdr->seqno)) { 801f730: 4b2e ldr r3, [pc, #184] @ (801f7ec ) 801f732: 681a ldr r2, [r3, #0] 801f734: 6bbb ldr r3, [r7, #56] @ 0x38 801f736: 691b ldr r3, [r3, #16] 801f738: 685b ldr r3, [r3, #4] 801f73a: 1ad3 subs r3, r2, r3 801f73c: 2b00 cmp r3, #0 801f73e: da57 bge.n 801f7f0 /* 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); 801f740: 4829 ldr r0, [pc, #164] @ (801f7e8 ) 801f742: f7fd faa5 bl 801cc90 801f746: 61b8 str r0, [r7, #24] if (cseg != NULL) { 801f748: 69bb ldr r3, [r7, #24] 801f74a: 2b00 cmp r3, #0 801f74c: f000 8128 beq.w 801f9a0 pcb->ooseq = cseg; 801f750: 687b ldr r3, [r7, #4] 801f752: 69ba ldr r2, [r7, #24] 801f754: 675a str r2, [r3, #116] @ 0x74 tcp_oos_insert_segment(cseg, next); 801f756: 6bb9 ldr r1, [r7, #56] @ 0x38 801f758: 69b8 ldr r0, [r7, #24] 801f75a: f7ff f8c3 bl 801e8e4 } break; 801f75e: e11f b.n 801f9a0 } } 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)) { 801f760: 4b22 ldr r3, [pc, #136] @ (801f7ec ) 801f762: 681a ldr r2, [r3, #0] 801f764: 6b7b ldr r3, [r7, #52] @ 0x34 801f766: 691b ldr r3, [r3, #16] 801f768: 685b ldr r3, [r3, #4] 801f76a: 1ad3 subs r3, r2, r3 801f76c: 3b01 subs r3, #1 801f76e: 2b00 cmp r3, #0 801f770: db3e blt.n 801f7f0 801f772: 4b1e ldr r3, [pc, #120] @ (801f7ec ) 801f774: 681a ldr r2, [r3, #0] 801f776: 6bbb ldr r3, [r7, #56] @ 0x38 801f778: 691b ldr r3, [r3, #16] 801f77a: 685b ldr r3, [r3, #4] 801f77c: 1ad3 subs r3, r2, r3 801f77e: 3301 adds r3, #1 801f780: 2b00 cmp r3, #0 801f782: dc35 bgt.n 801f7f0 /* 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); 801f784: 4818 ldr r0, [pc, #96] @ (801f7e8 ) 801f786: f7fd fa83 bl 801cc90 801f78a: 61f8 str r0, [r7, #28] if (cseg != NULL) { 801f78c: 69fb ldr r3, [r7, #28] 801f78e: 2b00 cmp r3, #0 801f790: f000 8108 beq.w 801f9a4 if (TCP_SEQ_GT(prev->tcphdr->seqno + prev->len, seqno)) { 801f794: 6b7b ldr r3, [r7, #52] @ 0x34 801f796: 691b ldr r3, [r3, #16] 801f798: 685b ldr r3, [r3, #4] 801f79a: 6b7a ldr r2, [r7, #52] @ 0x34 801f79c: 8912 ldrh r2, [r2, #8] 801f79e: 441a add r2, r3 801f7a0: 4b12 ldr r3, [pc, #72] @ (801f7ec ) 801f7a2: 681b ldr r3, [r3, #0] 801f7a4: 1ad3 subs r3, r2, r3 801f7a6: 2b00 cmp r3, #0 801f7a8: dd12 ble.n 801f7d0 /* We need to trim the prev segment. */ prev->len = (u16_t)(seqno - prev->tcphdr->seqno); 801f7aa: 4b10 ldr r3, [pc, #64] @ (801f7ec ) 801f7ac: 681b ldr r3, [r3, #0] 801f7ae: b29a uxth r2, r3 801f7b0: 6b7b ldr r3, [r7, #52] @ 0x34 801f7b2: 691b ldr r3, [r3, #16] 801f7b4: 685b ldr r3, [r3, #4] 801f7b6: b29b uxth r3, r3 801f7b8: 1ad3 subs r3, r2, r3 801f7ba: b29a uxth r2, r3 801f7bc: 6b7b ldr r3, [r7, #52] @ 0x34 801f7be: 811a strh r2, [r3, #8] pbuf_realloc(prev->p, prev->len); 801f7c0: 6b7b ldr r3, [r7, #52] @ 0x34 801f7c2: 685a ldr r2, [r3, #4] 801f7c4: 6b7b ldr r3, [r7, #52] @ 0x34 801f7c6: 891b ldrh r3, [r3, #8] 801f7c8: 4619 mov r1, r3 801f7ca: 4610 mov r0, r2 801f7cc: f7fb fc38 bl 801b040 } prev->next = cseg; 801f7d0: 6b7b ldr r3, [r7, #52] @ 0x34 801f7d2: 69fa ldr r2, [r7, #28] 801f7d4: 601a str r2, [r3, #0] tcp_oos_insert_segment(cseg, next); 801f7d6: 6bb9 ldr r1, [r7, #56] @ 0x38 801f7d8: 69f8 ldr r0, [r7, #28] 801f7da: f7ff f883 bl 801e8e4 } break; 801f7de: e0e1 b.n 801f9a4 801f7e0: 2402afc4 .word 0x2402afc4 801f7e4: 2402afc1 .word 0x2402afc1 801f7e8: 2402af90 .word 0x2402af90 801f7ec: 2402afb4 .word 0x2402afb4 #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; 801f7f0: 6bbb ldr r3, [r7, #56] @ 0x38 801f7f2: 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 && 801f7f4: 6bbb ldr r3, [r7, #56] @ 0x38 801f7f6: 681b ldr r3, [r3, #0] 801f7f8: 2b00 cmp r3, #0 801f7fa: f040 80c5 bne.w 801f988 TCP_SEQ_GT(seqno, next->tcphdr->seqno)) { 801f7fe: 4b7f ldr r3, [pc, #508] @ (801f9fc ) 801f800: 681a ldr r2, [r3, #0] 801f802: 6bbb ldr r3, [r7, #56] @ 0x38 801f804: 691b ldr r3, [r3, #16] 801f806: 685b ldr r3, [r3, #4] 801f808: 1ad3 subs r3, r2, r3 if (next->next == NULL && 801f80a: 2b00 cmp r3, #0 801f80c: f340 80bc ble.w 801f988 if (TCPH_FLAGS(next->tcphdr) & TCP_FIN) { 801f810: 6bbb ldr r3, [r7, #56] @ 0x38 801f812: 691b ldr r3, [r3, #16] 801f814: 899b ldrh r3, [r3, #12] 801f816: b29b uxth r3, r3 801f818: 4618 mov r0, r3 801f81a: f7fa f8e5 bl 80199e8 801f81e: 4603 mov r3, r0 801f820: b2db uxtb r3, r3 801f822: f003 0301 and.w r3, r3, #1 801f826: 2b00 cmp r3, #0 801f828: f040 80be bne.w 801f9a8 /* segment "next" already contains all data */ break; } next->next = tcp_seg_copy(&inseg); 801f82c: 4874 ldr r0, [pc, #464] @ (801fa00 ) 801f82e: f7fd fa2f bl 801cc90 801f832: 4602 mov r2, r0 801f834: 6bbb ldr r3, [r7, #56] @ 0x38 801f836: 601a str r2, [r3, #0] if (next->next != NULL) { 801f838: 6bbb ldr r3, [r7, #56] @ 0x38 801f83a: 681b ldr r3, [r3, #0] 801f83c: 2b00 cmp r3, #0 801f83e: f000 80b5 beq.w 801f9ac if (TCP_SEQ_GT(next->tcphdr->seqno + next->len, seqno)) { 801f842: 6bbb ldr r3, [r7, #56] @ 0x38 801f844: 691b ldr r3, [r3, #16] 801f846: 685b ldr r3, [r3, #4] 801f848: 6bba ldr r2, [r7, #56] @ 0x38 801f84a: 8912 ldrh r2, [r2, #8] 801f84c: 441a add r2, r3 801f84e: 4b6b ldr r3, [pc, #428] @ (801f9fc ) 801f850: 681b ldr r3, [r3, #0] 801f852: 1ad3 subs r3, r2, r3 801f854: 2b00 cmp r3, #0 801f856: dd12 ble.n 801f87e /* We need to trim the last segment. */ next->len = (u16_t)(seqno - next->tcphdr->seqno); 801f858: 4b68 ldr r3, [pc, #416] @ (801f9fc ) 801f85a: 681b ldr r3, [r3, #0] 801f85c: b29a uxth r2, r3 801f85e: 6bbb ldr r3, [r7, #56] @ 0x38 801f860: 691b ldr r3, [r3, #16] 801f862: 685b ldr r3, [r3, #4] 801f864: b29b uxth r3, r3 801f866: 1ad3 subs r3, r2, r3 801f868: b29a uxth r2, r3 801f86a: 6bbb ldr r3, [r7, #56] @ 0x38 801f86c: 811a strh r2, [r3, #8] pbuf_realloc(next->p, next->len); 801f86e: 6bbb ldr r3, [r7, #56] @ 0x38 801f870: 685a ldr r2, [r3, #4] 801f872: 6bbb ldr r3, [r7, #56] @ 0x38 801f874: 891b ldrh r3, [r3, #8] 801f876: 4619 mov r1, r3 801f878: 4610 mov r0, r2 801f87a: f7fb fbe1 bl 801b040 } /* 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)) { 801f87e: 4b61 ldr r3, [pc, #388] @ (801fa04 ) 801f880: 881b ldrh r3, [r3, #0] 801f882: 461a mov r2, r3 801f884: 4b5d ldr r3, [pc, #372] @ (801f9fc ) 801f886: 681b ldr r3, [r3, #0] 801f888: 441a add r2, r3 801f88a: 687b ldr r3, [r7, #4] 801f88c: 6a5b ldr r3, [r3, #36] @ 0x24 801f88e: 6879 ldr r1, [r7, #4] 801f890: 8d09 ldrh r1, [r1, #40] @ 0x28 801f892: 440b add r3, r1 801f894: 1ad3 subs r3, r2, r3 801f896: 2b00 cmp r3, #0 801f898: f340 8088 ble.w 801f9ac 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) { 801f89c: 6bbb ldr r3, [r7, #56] @ 0x38 801f89e: 681b ldr r3, [r3, #0] 801f8a0: 691b ldr r3, [r3, #16] 801f8a2: 899b ldrh r3, [r3, #12] 801f8a4: b29b uxth r3, r3 801f8a6: 4618 mov r0, r3 801f8a8: f7fa f89e bl 80199e8 801f8ac: 4603 mov r3, r0 801f8ae: b2db uxtb r3, r3 801f8b0: f003 0301 and.w r3, r3, #1 801f8b4: 2b00 cmp r3, #0 801f8b6: d021 beq.n 801f8fc /* 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); 801f8b8: 6bbb ldr r3, [r7, #56] @ 0x38 801f8ba: 681b ldr r3, [r3, #0] 801f8bc: 691b ldr r3, [r3, #16] 801f8be: 899b ldrh r3, [r3, #12] 801f8c0: b29b uxth r3, r3 801f8c2: b21b sxth r3, r3 801f8c4: f423 537c bic.w r3, r3, #16128 @ 0x3f00 801f8c8: b21c sxth r4, r3 801f8ca: 6bbb ldr r3, [r7, #56] @ 0x38 801f8cc: 681b ldr r3, [r3, #0] 801f8ce: 691b ldr r3, [r3, #16] 801f8d0: 899b ldrh r3, [r3, #12] 801f8d2: b29b uxth r3, r3 801f8d4: 4618 mov r0, r3 801f8d6: f7fa f887 bl 80199e8 801f8da: 4603 mov r3, r0 801f8dc: b2db uxtb r3, r3 801f8de: f003 033e and.w r3, r3, #62 @ 0x3e 801f8e2: b29b uxth r3, r3 801f8e4: 4618 mov r0, r3 801f8e6: f7fa f87f bl 80199e8 801f8ea: 4603 mov r3, r0 801f8ec: b21b sxth r3, r3 801f8ee: 4323 orrs r3, r4 801f8f0: b21a sxth r2, r3 801f8f2: 6bbb ldr r3, [r7, #56] @ 0x38 801f8f4: 681b ldr r3, [r3, #0] 801f8f6: 691b ldr r3, [r3, #16] 801f8f8: b292 uxth r2, r2 801f8fa: 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); 801f8fc: 687b ldr r3, [r7, #4] 801f8fe: 6a5b ldr r3, [r3, #36] @ 0x24 801f900: b29a uxth r2, r3 801f902: 687b ldr r3, [r7, #4] 801f904: 8d1b ldrh r3, [r3, #40] @ 0x28 801f906: 4413 add r3, r2 801f908: b299 uxth r1, r3 801f90a: 4b3c ldr r3, [pc, #240] @ (801f9fc ) 801f90c: 681b ldr r3, [r3, #0] 801f90e: b29a uxth r2, r3 801f910: 6bbb ldr r3, [r7, #56] @ 0x38 801f912: 681b ldr r3, [r3, #0] 801f914: 1a8a subs r2, r1, r2 801f916: b292 uxth r2, r2 801f918: 811a strh r2, [r3, #8] pbuf_realloc(next->next->p, next->next->len); 801f91a: 6bbb ldr r3, [r7, #56] @ 0x38 801f91c: 681b ldr r3, [r3, #0] 801f91e: 685a ldr r2, [r3, #4] 801f920: 6bbb ldr r3, [r7, #56] @ 0x38 801f922: 681b ldr r3, [r3, #0] 801f924: 891b ldrh r3, [r3, #8] 801f926: 4619 mov r1, r3 801f928: 4610 mov r0, r2 801f92a: f7fb fb89 bl 801b040 tcplen = TCP_TCPLEN(next->next); 801f92e: 6bbb ldr r3, [r7, #56] @ 0x38 801f930: 681b ldr r3, [r3, #0] 801f932: 891c ldrh r4, [r3, #8] 801f934: 6bbb ldr r3, [r7, #56] @ 0x38 801f936: 681b ldr r3, [r3, #0] 801f938: 691b ldr r3, [r3, #16] 801f93a: 899b ldrh r3, [r3, #12] 801f93c: b29b uxth r3, r3 801f93e: 4618 mov r0, r3 801f940: f7fa f852 bl 80199e8 801f944: 4603 mov r3, r0 801f946: b2db uxtb r3, r3 801f948: f003 0303 and.w r3, r3, #3 801f94c: 2b00 cmp r3, #0 801f94e: d001 beq.n 801f954 801f950: 2301 movs r3, #1 801f952: e000 b.n 801f956 801f954: 2300 movs r3, #0 801f956: 4423 add r3, r4 801f958: b29a uxth r2, r3 801f95a: 4b2a ldr r3, [pc, #168] @ (801fa04 ) 801f95c: 801a strh r2, [r3, #0] LWIP_ASSERT("tcp_receive: segment not trimmed correctly to rcv_wnd\n", 801f95e: 4b29 ldr r3, [pc, #164] @ (801fa04 ) 801f960: 881b ldrh r3, [r3, #0] 801f962: 461a mov r2, r3 801f964: 4b25 ldr r3, [pc, #148] @ (801f9fc ) 801f966: 681b ldr r3, [r3, #0] 801f968: 441a add r2, r3 801f96a: 687b ldr r3, [r7, #4] 801f96c: 6a5b ldr r3, [r3, #36] @ 0x24 801f96e: 6879 ldr r1, [r7, #4] 801f970: 8d09 ldrh r1, [r1, #40] @ 0x28 801f972: 440b add r3, r1 801f974: 429a cmp r2, r3 801f976: d019 beq.n 801f9ac 801f978: 4b23 ldr r3, [pc, #140] @ (801fa08 ) 801f97a: f44f 62df mov.w r2, #1784 @ 0x6f8 801f97e: 4923 ldr r1, [pc, #140] @ (801fa0c ) 801f980: 4823 ldr r0, [pc, #140] @ (801fa10 ) 801f982: f00a ff8b bl 802a89c (seqno + tcplen) == (pcb->rcv_nxt + pcb->rcv_wnd)); } } break; 801f986: e011 b.n 801f9ac for (next = pcb->ooseq; next != NULL; next = next->next) { 801f988: 6bbb ldr r3, [r7, #56] @ 0x38 801f98a: 681b ldr r3, [r3, #0] 801f98c: 63bb str r3, [r7, #56] @ 0x38 801f98e: 6bbb ldr r3, [r7, #56] @ 0x38 801f990: 2b00 cmp r3, #0 801f992: f47f aea5 bne.w 801f6e0 801f996: e00a b.n 801f9ae break; 801f998: bf00 nop 801f99a: e008 b.n 801f9ae break; 801f99c: bf00 nop 801f99e: e006 b.n 801f9ae break; 801f9a0: bf00 nop 801f9a2: e004 b.n 801f9ae break; 801f9a4: bf00 nop 801f9a6: e002 b.n 801f9ae break; 801f9a8: bf00 nop 801f9aa: e000 b.n 801f9ae break; 801f9ac: 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); 801f9ae: 6878 ldr r0, [r7, #4] 801f9b0: f001 fefc bl 80217ac if (pcb->rcv_nxt == seqno) { 801f9b4: e003 b.n 801f9be } } else { /* The incoming segment is not within the window. */ tcp_send_empty_ack(pcb); 801f9b6: 6878 ldr r0, [r7, #4] 801f9b8: f001 fef8 bl 80217ac if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 801f9bc: e01a b.n 801f9f4 801f9be: e019 b.n 801f9f4 } } 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)) { 801f9c0: 4b0e ldr r3, [pc, #56] @ (801f9fc ) 801f9c2: 681a ldr r2, [r3, #0] 801f9c4: 687b ldr r3, [r7, #4] 801f9c6: 6a5b ldr r3, [r3, #36] @ 0x24 801f9c8: 1ad3 subs r3, r2, r3 801f9ca: 2b00 cmp r3, #0 801f9cc: db0a blt.n 801f9e4 801f9ce: 4b0b ldr r3, [pc, #44] @ (801f9fc ) 801f9d0: 681a ldr r2, [r3, #0] 801f9d2: 687b ldr r3, [r7, #4] 801f9d4: 6a5b ldr r3, [r3, #36] @ 0x24 801f9d6: 6879 ldr r1, [r7, #4] 801f9d8: 8d09 ldrh r1, [r1, #40] @ 0x28 801f9da: 440b add r3, r1 801f9dc: 1ad3 subs r3, r2, r3 801f9de: 3301 adds r3, #1 801f9e0: 2b00 cmp r3, #0 801f9e2: dd07 ble.n 801f9f4 tcp_ack_now(pcb); 801f9e4: 687b ldr r3, [r7, #4] 801f9e6: 8b5b ldrh r3, [r3, #26] 801f9e8: f043 0302 orr.w r3, r3, #2 801f9ec: b29a uxth r2, r3 801f9ee: 687b ldr r3, [r7, #4] 801f9f0: 835a strh r2, [r3, #26] } } } 801f9f2: e7ff b.n 801f9f4 801f9f4: bf00 nop 801f9f6: 3750 adds r7, #80 @ 0x50 801f9f8: 46bd mov sp, r7 801f9fa: bdb0 pop {r4, r5, r7, pc} 801f9fc: 2402afb4 .word 0x2402afb4 801fa00: 2402af90 .word 0x2402af90 801fa04: 2402afbe .word 0x2402afbe 801fa08: 0802fd40 .word 0x0802fd40 801fa0c: 080300e8 .word 0x080300e8 801fa10: 0802fd8c .word 0x0802fd8c 0801fa14 : static u8_t tcp_get_next_optbyte(void) { 801fa14: b480 push {r7} 801fa16: b083 sub sp, #12 801fa18: af00 add r7, sp, #0 u16_t optidx = tcp_optidx++; 801fa1a: 4b15 ldr r3, [pc, #84] @ (801fa70 ) 801fa1c: 881b ldrh r3, [r3, #0] 801fa1e: 1c5a adds r2, r3, #1 801fa20: b291 uxth r1, r2 801fa22: 4a13 ldr r2, [pc, #76] @ (801fa70 ) 801fa24: 8011 strh r1, [r2, #0] 801fa26: 80fb strh r3, [r7, #6] if ((tcphdr_opt2 == NULL) || (optidx < tcphdr_opt1len)) { 801fa28: 4b12 ldr r3, [pc, #72] @ (801fa74 ) 801fa2a: 681b ldr r3, [r3, #0] 801fa2c: 2b00 cmp r3, #0 801fa2e: d004 beq.n 801fa3a 801fa30: 4b11 ldr r3, [pc, #68] @ (801fa78 ) 801fa32: 881b ldrh r3, [r3, #0] 801fa34: 88fa ldrh r2, [r7, #6] 801fa36: 429a cmp r2, r3 801fa38: d208 bcs.n 801fa4c u8_t *opts = (u8_t *)tcphdr + TCP_HLEN; 801fa3a: 4b10 ldr r3, [pc, #64] @ (801fa7c ) 801fa3c: 681b ldr r3, [r3, #0] 801fa3e: 3314 adds r3, #20 801fa40: 603b str r3, [r7, #0] return opts[optidx]; 801fa42: 88fb ldrh r3, [r7, #6] 801fa44: 683a ldr r2, [r7, #0] 801fa46: 4413 add r3, r2 801fa48: 781b ldrb r3, [r3, #0] 801fa4a: e00b b.n 801fa64 } else { u8_t idx = (u8_t)(optidx - tcphdr_opt1len); 801fa4c: 88fb ldrh r3, [r7, #6] 801fa4e: b2da uxtb r2, r3 801fa50: 4b09 ldr r3, [pc, #36] @ (801fa78 ) 801fa52: 881b ldrh r3, [r3, #0] 801fa54: b2db uxtb r3, r3 801fa56: 1ad3 subs r3, r2, r3 801fa58: 717b strb r3, [r7, #5] return tcphdr_opt2[idx]; 801fa5a: 4b06 ldr r3, [pc, #24] @ (801fa74 ) 801fa5c: 681a ldr r2, [r3, #0] 801fa5e: 797b ldrb r3, [r7, #5] 801fa60: 4413 add r3, r2 801fa62: 781b ldrb r3, [r3, #0] } } 801fa64: 4618 mov r0, r3 801fa66: 370c adds r7, #12 801fa68: 46bd mov sp, r7 801fa6a: f85d 7b04 ldr.w r7, [sp], #4 801fa6e: 4770 bx lr 801fa70: 2402afb0 .word 0x2402afb0 801fa74: 2402afac .word 0x2402afac 801fa78: 2402afaa .word 0x2402afaa 801fa7c: 2402afa4 .word 0x2402afa4 0801fa80 : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 801fa80: b580 push {r7, lr} 801fa82: b084 sub sp, #16 801fa84: af00 add r7, sp, #0 801fa86: 6078 str r0, [r7, #4] u16_t mss; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif LWIP_ASSERT("tcp_parseopt: invalid pcb", pcb != NULL); 801fa88: 687b ldr r3, [r7, #4] 801fa8a: 2b00 cmp r3, #0 801fa8c: d106 bne.n 801fa9c 801fa8e: 4b33 ldr r3, [pc, #204] @ (801fb5c ) 801fa90: f240 727d movw r2, #1917 @ 0x77d 801fa94: 4932 ldr r1, [pc, #200] @ (801fb60 ) 801fa96: 4833 ldr r0, [pc, #204] @ (801fb64 ) 801fa98: f00a ff00 bl 802a89c /* Parse the TCP MSS option, if present. */ if (tcphdr_optlen != 0) { 801fa9c: 4b32 ldr r3, [pc, #200] @ (801fb68 ) 801fa9e: 881b ldrh r3, [r3, #0] 801faa0: 2b00 cmp r3, #0 801faa2: d057 beq.n 801fb54 for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 801faa4: 4b31 ldr r3, [pc, #196] @ (801fb6c ) 801faa6: 2200 movs r2, #0 801faa8: 801a strh r2, [r3, #0] 801faaa: e047 b.n 801fb3c u8_t opt = tcp_get_next_optbyte(); 801faac: f7ff ffb2 bl 801fa14 801fab0: 4603 mov r3, r0 801fab2: 73fb strb r3, [r7, #15] switch (opt) { 801fab4: 7bfb ldrb r3, [r7, #15] 801fab6: 2b02 cmp r3, #2 801fab8: d006 beq.n 801fac8 801faba: 2b02 cmp r3, #2 801fabc: dc2b bgt.n 801fb16 801fabe: 2b00 cmp r3, #0 801fac0: d043 beq.n 801fb4a 801fac2: 2b01 cmp r3, #1 801fac4: d039 beq.n 801fb3a 801fac6: e026 b.n 801fb16 /* 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) { 801fac8: f7ff ffa4 bl 801fa14 801facc: 4603 mov r3, r0 801face: 2b04 cmp r3, #4 801fad0: d13d bne.n 801fb4e 801fad2: 4b26 ldr r3, [pc, #152] @ (801fb6c ) 801fad4: 881b ldrh r3, [r3, #0] 801fad6: 3301 adds r3, #1 801fad8: 4a23 ldr r2, [pc, #140] @ (801fb68 ) 801fada: 8812 ldrh r2, [r2, #0] 801fadc: 4293 cmp r3, r2 801fade: da36 bge.n 801fb4e /* 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); 801fae0: f7ff ff98 bl 801fa14 801fae4: 4603 mov r3, r0 801fae6: 021b lsls r3, r3, #8 801fae8: 81bb strh r3, [r7, #12] mss |= tcp_get_next_optbyte(); 801faea: f7ff ff93 bl 801fa14 801faee: 4603 mov r3, r0 801faf0: 461a mov r2, r3 801faf2: 89bb ldrh r3, [r7, #12] 801faf4: 4313 orrs r3, r2 801faf6: 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; 801faf8: 89bb ldrh r3, [r7, #12] 801fafa: f240 52b4 movw r2, #1460 @ 0x5b4 801fafe: 4293 cmp r3, r2 801fb00: d804 bhi.n 801fb0c 801fb02: 89bb ldrh r3, [r7, #12] 801fb04: 2b00 cmp r3, #0 801fb06: d001 beq.n 801fb0c 801fb08: 89ba ldrh r2, [r7, #12] 801fb0a: e001 b.n 801fb10 801fb0c: f240 52b4 movw r2, #1460 @ 0x5b4 801fb10: 687b ldr r3, [r7, #4] 801fb12: 865a strh r2, [r3, #50] @ 0x32 break; 801fb14: e012 b.n 801fb3c } break; #endif /* LWIP_TCP_SACK_OUT */ default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); data = tcp_get_next_optbyte(); 801fb16: f7ff ff7d bl 801fa14 801fb1a: 4603 mov r3, r0 801fb1c: 72fb strb r3, [r7, #11] if (data < 2) { 801fb1e: 7afb ldrb r3, [r7, #11] 801fb20: 2b01 cmp r3, #1 801fb22: d916 bls.n 801fb52 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; 801fb24: 7afb ldrb r3, [r7, #11] 801fb26: b29a uxth r2, r3 801fb28: 4b10 ldr r3, [pc, #64] @ (801fb6c ) 801fb2a: 881b ldrh r3, [r3, #0] 801fb2c: 4413 add r3, r2 801fb2e: b29b uxth r3, r3 801fb30: 3b02 subs r3, #2 801fb32: b29a uxth r2, r3 801fb34: 4b0d ldr r3, [pc, #52] @ (801fb6c ) 801fb36: 801a strh r2, [r3, #0] 801fb38: e000 b.n 801fb3c break; 801fb3a: bf00 nop for (tcp_optidx = 0; tcp_optidx < tcphdr_optlen; ) { 801fb3c: 4b0b ldr r3, [pc, #44] @ (801fb6c ) 801fb3e: 881a ldrh r2, [r3, #0] 801fb40: 4b09 ldr r3, [pc, #36] @ (801fb68 ) 801fb42: 881b ldrh r3, [r3, #0] 801fb44: 429a cmp r2, r3 801fb46: d3b1 bcc.n 801faac 801fb48: e004 b.n 801fb54 return; 801fb4a: bf00 nop 801fb4c: e002 b.n 801fb54 return; 801fb4e: bf00 nop 801fb50: e000 b.n 801fb54 return; 801fb52: bf00 nop } } } } 801fb54: 3710 adds r7, #16 801fb56: 46bd mov sp, r7 801fb58: bd80 pop {r7, pc} 801fb5a: bf00 nop 801fb5c: 0802fd40 .word 0x0802fd40 801fb60: 080301a4 .word 0x080301a4 801fb64: 0802fd8c .word 0x0802fd8c 801fb68: 2402afa8 .word 0x2402afa8 801fb6c: 2402afb0 .word 0x2402afb0 0801fb70 : void tcp_trigger_input_pcb_close(void) { 801fb70: b480 push {r7} 801fb72: af00 add r7, sp, #0 recv_flags |= TF_CLOSED; 801fb74: 4b05 ldr r3, [pc, #20] @ (801fb8c ) 801fb76: 781b ldrb r3, [r3, #0] 801fb78: f043 0310 orr.w r3, r3, #16 801fb7c: b2da uxtb r2, r3 801fb7e: 4b03 ldr r3, [pc, #12] @ (801fb8c ) 801fb80: 701a strb r2, [r3, #0] } 801fb82: bf00 nop 801fb84: 46bd mov sp, r7 801fb86: f85d 7b04 ldr.w r7, [sp], #4 801fb8a: 4770 bx lr 801fb8c: 2402afc1 .word 0x2402afc1 0801fb90 : 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) { 801fb90: b580 push {r7, lr} 801fb92: b084 sub sp, #16 801fb94: af00 add r7, sp, #0 801fb96: 60f8 str r0, [r7, #12] 801fb98: 60b9 str r1, [r7, #8] 801fb9a: 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)) { 801fb9c: 68fb ldr r3, [r7, #12] 801fb9e: 2b00 cmp r3, #0 801fba0: d00a beq.n 801fbb8 801fba2: 68fb ldr r3, [r7, #12] 801fba4: 7a1b ldrb r3, [r3, #8] 801fba6: 2b00 cmp r3, #0 801fba8: d006 beq.n 801fbb8 return netif_get_by_index(pcb->netif_idx); 801fbaa: 68fb ldr r3, [r7, #12] 801fbac: 7a1b ldrb r3, [r3, #8] 801fbae: 4618 mov r0, r3 801fbb0: f7fb f83c bl 801ac2c 801fbb4: 4603 mov r3, r0 801fbb6: e003 b.n 801fbc0 } else { return ip_route(src, dst); 801fbb8: 6878 ldr r0, [r7, #4] 801fbba: f005 fe61 bl 8025880 801fbbe: 4603 mov r3, r0 } } 801fbc0: 4618 mov r0, r3 801fbc2: 3710 adds r7, #16 801fbc4: 46bd mov sp, r7 801fbc6: bd80 pop {r7, pc} 0801fbc8 : * 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) { 801fbc8: b590 push {r4, r7, lr} 801fbca: b087 sub sp, #28 801fbcc: af00 add r7, sp, #0 801fbce: 60f8 str r0, [r7, #12] 801fbd0: 60b9 str r1, [r7, #8] 801fbd2: 603b str r3, [r7, #0] 801fbd4: 4613 mov r3, r2 801fbd6: 71fb strb r3, [r7, #7] struct tcp_seg *seg; u8_t optlen; LWIP_ASSERT("tcp_create_segment: invalid pcb", pcb != NULL); 801fbd8: 68fb ldr r3, [r7, #12] 801fbda: 2b00 cmp r3, #0 801fbdc: d105 bne.n 801fbea 801fbde: 4b45 ldr r3, [pc, #276] @ (801fcf4 ) 801fbe0: 22a3 movs r2, #163 @ 0xa3 801fbe2: 4945 ldr r1, [pc, #276] @ (801fcf8 ) 801fbe4: 4845 ldr r0, [pc, #276] @ (801fcfc ) 801fbe6: f00a fe59 bl 802a89c LWIP_ASSERT("tcp_create_segment: invalid pbuf", p != NULL); 801fbea: 68bb ldr r3, [r7, #8] 801fbec: 2b00 cmp r3, #0 801fbee: d105 bne.n 801fbfc 801fbf0: 4b40 ldr r3, [pc, #256] @ (801fcf4 ) 801fbf2: 22a4 movs r2, #164 @ 0xa4 801fbf4: 4942 ldr r1, [pc, #264] @ (801fd00 ) 801fbf6: 4841 ldr r0, [pc, #260] @ (801fcfc ) 801fbf8: f00a fe50 bl 802a89c optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 801fbfc: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 801fc00: 009b lsls r3, r3, #2 801fc02: b2db uxtb r3, r3 801fc04: f003 0304 and.w r3, r3, #4 801fc08: 75fb strb r3, [r7, #23] if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 801fc0a: 2003 movs r0, #3 801fc0c: f7fa fc6a bl 801a4e4 801fc10: 6138 str r0, [r7, #16] 801fc12: 693b ldr r3, [r7, #16] 801fc14: 2b00 cmp r3, #0 801fc16: d104 bne.n 801fc22 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 801fc18: 68b8 ldr r0, [r7, #8] 801fc1a: f7fb fbc7 bl 801b3ac return NULL; 801fc1e: 2300 movs r3, #0 801fc20: e063 b.n 801fcea } seg->flags = optflags; 801fc22: 693b ldr r3, [r7, #16] 801fc24: f897 2028 ldrb.w r2, [r7, #40] @ 0x28 801fc28: 731a strb r2, [r3, #12] seg->next = NULL; 801fc2a: 693b ldr r3, [r7, #16] 801fc2c: 2200 movs r2, #0 801fc2e: 601a str r2, [r3, #0] seg->p = p; 801fc30: 693b ldr r3, [r7, #16] 801fc32: 68ba ldr r2, [r7, #8] 801fc34: 605a str r2, [r3, #4] LWIP_ASSERT("p->tot_len >= optlen", p->tot_len >= optlen); 801fc36: 68bb ldr r3, [r7, #8] 801fc38: 891a ldrh r2, [r3, #8] 801fc3a: 7dfb ldrb r3, [r7, #23] 801fc3c: b29b uxth r3, r3 801fc3e: 429a cmp r2, r3 801fc40: d205 bcs.n 801fc4e 801fc42: 4b2c ldr r3, [pc, #176] @ (801fcf4 ) 801fc44: 22b0 movs r2, #176 @ 0xb0 801fc46: 492f ldr r1, [pc, #188] @ (801fd04 ) 801fc48: 482c ldr r0, [pc, #176] @ (801fcfc ) 801fc4a: f00a fe27 bl 802a89c seg->len = p->tot_len - optlen; 801fc4e: 68bb ldr r3, [r7, #8] 801fc50: 891a ldrh r2, [r3, #8] 801fc52: 7dfb ldrb r3, [r7, #23] 801fc54: b29b uxth r3, r3 801fc56: 1ad3 subs r3, r2, r3 801fc58: b29a uxth r2, r3 801fc5a: 693b ldr r3, [r7, #16] 801fc5c: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 801fc5e: 693b ldr r3, [r7, #16] 801fc60: 2200 movs r2, #0 801fc62: 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)) { 801fc64: 2114 movs r1, #20 801fc66: 68b8 ldr r0, [r7, #8] 801fc68: f7fb fad8 bl 801b21c 801fc6c: 4603 mov r3, r0 801fc6e: 2b00 cmp r3, #0 801fc70: d004 beq.n 801fc7c 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); 801fc72: 6938 ldr r0, [r7, #16] 801fc74: f7fc fff3 bl 801cc5e return NULL; 801fc78: 2300 movs r3, #0 801fc7a: e036 b.n 801fcea } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 801fc7c: 693b ldr r3, [r7, #16] 801fc7e: 685b ldr r3, [r3, #4] 801fc80: 685a ldr r2, [r3, #4] 801fc82: 693b ldr r3, [r7, #16] 801fc84: 611a str r2, [r3, #16] seg->tcphdr->src = lwip_htons(pcb->local_port); 801fc86: 68fb ldr r3, [r7, #12] 801fc88: 8ada ldrh r2, [r3, #22] 801fc8a: 693b ldr r3, [r7, #16] 801fc8c: 691c ldr r4, [r3, #16] 801fc8e: 4610 mov r0, r2 801fc90: f7f9 feaa bl 80199e8 801fc94: 4603 mov r3, r0 801fc96: 8023 strh r3, [r4, #0] seg->tcphdr->dest = lwip_htons(pcb->remote_port); 801fc98: 68fb ldr r3, [r7, #12] 801fc9a: 8b1a ldrh r2, [r3, #24] 801fc9c: 693b ldr r3, [r7, #16] 801fc9e: 691c ldr r4, [r3, #16] 801fca0: 4610 mov r0, r2 801fca2: f7f9 fea1 bl 80199e8 801fca6: 4603 mov r3, r0 801fca8: 8063 strh r3, [r4, #2] seg->tcphdr->seqno = lwip_htonl(seqno); 801fcaa: 693b ldr r3, [r7, #16] 801fcac: 691c ldr r4, [r3, #16] 801fcae: 6838 ldr r0, [r7, #0] 801fcb0: f7f9 feaf bl 8019a12 801fcb4: 4603 mov r3, r0 801fcb6: 6063 str r3, [r4, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), hdrflags); 801fcb8: 7dfb ldrb r3, [r7, #23] 801fcba: 089b lsrs r3, r3, #2 801fcbc: b2db uxtb r3, r3 801fcbe: 3305 adds r3, #5 801fcc0: b29b uxth r3, r3 801fcc2: 031b lsls r3, r3, #12 801fcc4: b29a uxth r2, r3 801fcc6: 79fb ldrb r3, [r7, #7] 801fcc8: b29b uxth r3, r3 801fcca: 4313 orrs r3, r2 801fccc: b29a uxth r2, r3 801fcce: 693b ldr r3, [r7, #16] 801fcd0: 691c ldr r4, [r3, #16] 801fcd2: 4610 mov r0, r2 801fcd4: f7f9 fe88 bl 80199e8 801fcd8: 4603 mov r3, r0 801fcda: 81a3 strh r3, [r4, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 801fcdc: 693b ldr r3, [r7, #16] 801fcde: 691b ldr r3, [r3, #16] 801fce0: 2200 movs r2, #0 801fce2: 749a strb r2, [r3, #18] 801fce4: 2200 movs r2, #0 801fce6: 74da strb r2, [r3, #19] return seg; 801fce8: 693b ldr r3, [r7, #16] } 801fcea: 4618 mov r0, r3 801fcec: 371c adds r7, #28 801fcee: 46bd mov sp, r7 801fcf0: bd90 pop {r4, r7, pc} 801fcf2: bf00 nop 801fcf4: 080301c0 .word 0x080301c0 801fcf8: 080301f4 .word 0x080301f4 801fcfc: 08030214 .word 0x08030214 801fd00: 0803023c .word 0x0803023c 801fd04: 08030260 .word 0x08030260 0801fd08 : #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) { 801fd08: b580 push {r7, lr} 801fd0a: b086 sub sp, #24 801fd0c: af00 add r7, sp, #0 801fd0e: 607b str r3, [r7, #4] 801fd10: 4603 mov r3, r0 801fd12: 73fb strb r3, [r7, #15] 801fd14: 460b mov r3, r1 801fd16: 81bb strh r3, [r7, #12] 801fd18: 4613 mov r3, r2 801fd1a: 817b strh r3, [r7, #10] struct pbuf *p; u16_t alloc = length; 801fd1c: 89bb ldrh r3, [r7, #12] 801fd1e: 82fb strh r3, [r7, #22] LWIP_ASSERT("tcp_pbuf_prealloc: invalid oversize", oversize != NULL); 801fd20: 687b ldr r3, [r7, #4] 801fd22: 2b00 cmp r3, #0 801fd24: d105 bne.n 801fd32 801fd26: 4b30 ldr r3, [pc, #192] @ (801fde8 ) 801fd28: 22e8 movs r2, #232 @ 0xe8 801fd2a: 4930 ldr r1, [pc, #192] @ (801fdec ) 801fd2c: 4830 ldr r0, [pc, #192] @ (801fdf0 ) 801fd2e: f00a fdb5 bl 802a89c LWIP_ASSERT("tcp_pbuf_prealloc: invalid pcb", pcb != NULL); 801fd32: 6a3b ldr r3, [r7, #32] 801fd34: 2b00 cmp r3, #0 801fd36: d105 bne.n 801fd44 801fd38: 4b2b ldr r3, [pc, #172] @ (801fde8 ) 801fd3a: 22e9 movs r2, #233 @ 0xe9 801fd3c: 492d ldr r1, [pc, #180] @ (801fdf4 ) 801fd3e: 482c ldr r0, [pc, #176] @ (801fdf0 ) 801fd40: f00a fdac bl 802a89c 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) { 801fd44: 89ba ldrh r2, [r7, #12] 801fd46: 897b ldrh r3, [r7, #10] 801fd48: 429a cmp r2, r3 801fd4a: d221 bcs.n 801fd90 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 801fd4c: f897 3024 ldrb.w r3, [r7, #36] @ 0x24 801fd50: f003 0302 and.w r3, r3, #2 801fd54: 2b00 cmp r3, #0 801fd56: d111 bne.n 801fd7c (!(pcb->flags & TF_NODELAY) && 801fd58: 6a3b ldr r3, [r7, #32] 801fd5a: 8b5b ldrh r3, [r3, #26] 801fd5c: f003 0340 and.w r3, r3, #64 @ 0x40 if ((apiflags & TCP_WRITE_FLAG_MORE) || 801fd60: 2b00 cmp r3, #0 801fd62: d115 bne.n 801fd90 (!(pcb->flags & TF_NODELAY) && 801fd64: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 801fd68: 2b00 cmp r3, #0 801fd6a: d007 beq.n 801fd7c (!first_seg || pcb->unsent != NULL || 801fd6c: 6a3b ldr r3, [r7, #32] 801fd6e: 6edb ldr r3, [r3, #108] @ 0x6c (!first_seg || 801fd70: 2b00 cmp r3, #0 801fd72: d103 bne.n 801fd7c pcb->unacked != NULL))) { 801fd74: 6a3b ldr r3, [r7, #32] 801fd76: 6f1b ldr r3, [r3, #112] @ 0x70 pcb->unsent != NULL || 801fd78: 2b00 cmp r3, #0 801fd7a: d009 beq.n 801fd90 alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(TCP_OVERSIZE_CALC_LENGTH(length))); 801fd7c: 89bb ldrh r3, [r7, #12] 801fd7e: f203 53b7 addw r3, r3, #1463 @ 0x5b7 801fd82: f023 0203 bic.w r2, r3, #3 801fd86: 897b ldrh r3, [r7, #10] 801fd88: 4293 cmp r3, r2 801fd8a: bf28 it cs 801fd8c: 4613 movcs r3, r2 801fd8e: 82fb strh r3, [r7, #22] } } #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ p = pbuf_alloc(layer, alloc, PBUF_RAM); 801fd90: 8af9 ldrh r1, [r7, #22] 801fd92: 7bfb ldrb r3, [r7, #15] 801fd94: f44f 7220 mov.w r2, #640 @ 0x280 801fd98: 4618 mov r0, r3 801fd9a: f7fa fff1 bl 801ad80 801fd9e: 6138 str r0, [r7, #16] if (p == NULL) { 801fda0: 693b ldr r3, [r7, #16] 801fda2: 2b00 cmp r3, #0 801fda4: d101 bne.n 801fdaa return NULL; 801fda6: 2300 movs r3, #0 801fda8: e019 b.n 801fdde } LWIP_ASSERT("need unchained pbuf", p->next == NULL); 801fdaa: 693b ldr r3, [r7, #16] 801fdac: 681b ldr r3, [r3, #0] 801fdae: 2b00 cmp r3, #0 801fdb0: d006 beq.n 801fdc0 801fdb2: 4b0d ldr r3, [pc, #52] @ (801fde8 ) 801fdb4: f240 120b movw r2, #267 @ 0x10b 801fdb8: 490f ldr r1, [pc, #60] @ (801fdf8 ) 801fdba: 480d ldr r0, [pc, #52] @ (801fdf0 ) 801fdbc: f00a fd6e bl 802a89c *oversize = p->len - length; 801fdc0: 693b ldr r3, [r7, #16] 801fdc2: 895a ldrh r2, [r3, #10] 801fdc4: 89bb ldrh r3, [r7, #12] 801fdc6: 1ad3 subs r3, r2, r3 801fdc8: b29a uxth r2, r3 801fdca: 687b ldr r3, [r7, #4] 801fdcc: 801a strh r2, [r3, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 801fdce: 693b ldr r3, [r7, #16] 801fdd0: 89ba ldrh r2, [r7, #12] 801fdd2: 811a strh r2, [r3, #8] 801fdd4: 693b ldr r3, [r7, #16] 801fdd6: 891a ldrh r2, [r3, #8] 801fdd8: 693b ldr r3, [r7, #16] 801fdda: 815a strh r2, [r3, #10] return p; 801fddc: 693b ldr r3, [r7, #16] } 801fdde: 4618 mov r0, r3 801fde0: 3718 adds r7, #24 801fde2: 46bd mov sp, r7 801fde4: bd80 pop {r7, pc} 801fde6: bf00 nop 801fde8: 080301c0 .word 0x080301c0 801fdec: 08030278 .word 0x08030278 801fdf0: 08030214 .word 0x08030214 801fdf4: 0803029c .word 0x0803029c 801fdf8: 080302bc .word 0x080302bc 0801fdfc : * @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) { 801fdfc: b580 push {r7, lr} 801fdfe: b082 sub sp, #8 801fe00: af00 add r7, sp, #0 801fe02: 6078 str r0, [r7, #4] 801fe04: 460b mov r3, r1 801fe06: 807b strh r3, [r7, #2] LWIP_ASSERT("tcp_write_checks: invalid pcb", pcb != NULL); 801fe08: 687b ldr r3, [r7, #4] 801fe0a: 2b00 cmp r3, #0 801fe0c: d106 bne.n 801fe1c 801fe0e: 4b33 ldr r3, [pc, #204] @ (801fedc ) 801fe10: f240 1233 movw r2, #307 @ 0x133 801fe14: 4932 ldr r1, [pc, #200] @ (801fee0 ) 801fe16: 4833 ldr r0, [pc, #204] @ (801fee4 ) 801fe18: f00a fd40 bl 802a89c /* connection is in invalid state for data transmission? */ if ((pcb->state != ESTABLISHED) && 801fe1c: 687b ldr r3, [r7, #4] 801fe1e: 7d1b ldrb r3, [r3, #20] 801fe20: 2b04 cmp r3, #4 801fe22: d00e beq.n 801fe42 (pcb->state != CLOSE_WAIT) && 801fe24: 687b ldr r3, [r7, #4] 801fe26: 7d1b ldrb r3, [r3, #20] if ((pcb->state != ESTABLISHED) && 801fe28: 2b07 cmp r3, #7 801fe2a: d00a beq.n 801fe42 (pcb->state != SYN_SENT) && 801fe2c: 687b ldr r3, [r7, #4] 801fe2e: 7d1b ldrb r3, [r3, #20] (pcb->state != CLOSE_WAIT) && 801fe30: 2b02 cmp r3, #2 801fe32: d006 beq.n 801fe42 (pcb->state != SYN_RCVD)) { 801fe34: 687b ldr r3, [r7, #4] 801fe36: 7d1b ldrb r3, [r3, #20] (pcb->state != SYN_SENT) && 801fe38: 2b03 cmp r3, #3 801fe3a: d002 beq.n 801fe42 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; 801fe3c: f06f 030a mvn.w r3, #10 801fe40: e048 b.n 801fed4 } else if (len == 0) { 801fe42: 887b ldrh r3, [r7, #2] 801fe44: 2b00 cmp r3, #0 801fe46: d101 bne.n 801fe4c return ERR_OK; 801fe48: 2300 movs r3, #0 801fe4a: e043 b.n 801fed4 } /* fail on too much data */ if (len > pcb->snd_buf) { 801fe4c: 687b ldr r3, [r7, #4] 801fe4e: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 801fe52: 887a ldrh r2, [r7, #2] 801fe54: 429a cmp r2, r3 801fe56: d909 bls.n 801fe6c 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); 801fe58: 687b ldr r3, [r7, #4] 801fe5a: 8b5b ldrh r3, [r3, #26] 801fe5c: f043 0380 orr.w r3, r3, #128 @ 0x80 801fe60: b29a uxth r2, r3 801fe62: 687b ldr r3, [r7, #4] 801fe64: 835a strh r2, [r3, #26] return ERR_MEM; 801fe66: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801fe6a: e033 b.n 801fed4 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))) { 801fe6c: 687b ldr r3, [r7, #4] 801fe6e: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801fe72: 2b0f cmp r3, #15 801fe74: d909 bls.n 801fe8a 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); 801fe76: 687b ldr r3, [r7, #4] 801fe78: 8b5b ldrh r3, [r3, #26] 801fe7a: f043 0380 orr.w r3, r3, #128 @ 0x80 801fe7e: b29a uxth r2, r3 801fe80: 687b ldr r3, [r7, #4] 801fe82: 835a strh r2, [r3, #26] return ERR_MEM; 801fe84: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 801fe88: e024 b.n 801fed4 } if (pcb->snd_queuelen != 0) { 801fe8a: 687b ldr r3, [r7, #4] 801fe8c: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801fe90: 2b00 cmp r3, #0 801fe92: d00f beq.n 801feb4 LWIP_ASSERT("tcp_write: pbufs on queue => at least one queue non-empty", 801fe94: 687b ldr r3, [r7, #4] 801fe96: 6f1b ldr r3, [r3, #112] @ 0x70 801fe98: 2b00 cmp r3, #0 801fe9a: d11a bne.n 801fed2 801fe9c: 687b ldr r3, [r7, #4] 801fe9e: 6edb ldr r3, [r3, #108] @ 0x6c 801fea0: 2b00 cmp r3, #0 801fea2: d116 bne.n 801fed2 801fea4: 4b0d ldr r3, [pc, #52] @ (801fedc ) 801fea6: f240 1255 movw r2, #341 @ 0x155 801feaa: 490f ldr r1, [pc, #60] @ (801fee8 ) 801feac: 480d ldr r0, [pc, #52] @ (801fee4 ) 801feae: f00a fcf5 bl 802a89c 801feb2: e00e b.n 801fed2 pcb->unacked != NULL || pcb->unsent != NULL); } else { LWIP_ASSERT("tcp_write: no pbufs on queue => both queues empty", 801feb4: 687b ldr r3, [r7, #4] 801feb6: 6f1b ldr r3, [r3, #112] @ 0x70 801feb8: 2b00 cmp r3, #0 801feba: d103 bne.n 801fec4 801febc: 687b ldr r3, [r7, #4] 801febe: 6edb ldr r3, [r3, #108] @ 0x6c 801fec0: 2b00 cmp r3, #0 801fec2: d006 beq.n 801fed2 801fec4: 4b05 ldr r3, [pc, #20] @ (801fedc ) 801fec6: f44f 72ac mov.w r2, #344 @ 0x158 801feca: 4908 ldr r1, [pc, #32] @ (801feec ) 801fecc: 4805 ldr r0, [pc, #20] @ (801fee4 ) 801fece: f00a fce5 bl 802a89c pcb->unacked == NULL && pcb->unsent == NULL); } return ERR_OK; 801fed2: 2300 movs r3, #0 } 801fed4: 4618 mov r0, r3 801fed6: 3708 adds r7, #8 801fed8: 46bd mov sp, r7 801feda: bd80 pop {r7, pc} 801fedc: 080301c0 .word 0x080301c0 801fee0: 080302d0 .word 0x080302d0 801fee4: 08030214 .word 0x08030214 801fee8: 080302f0 .word 0x080302f0 801feec: 0803032c .word 0x0803032c 0801fef0 : * - 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) { 801fef0: b590 push {r4, r7, lr} 801fef2: b09d sub sp, #116 @ 0x74 801fef4: af04 add r7, sp, #16 801fef6: 60f8 str r0, [r7, #12] 801fef8: 60b9 str r1, [r7, #8] 801fefa: 4611 mov r1, r2 801fefc: 461a mov r2, r3 801fefe: 460b mov r3, r1 801ff00: 80fb strh r3, [r7, #6] 801ff02: 4613 mov r3, r2 801ff04: 717b strb r3, [r7, #5] struct pbuf *concat_p = NULL; 801ff06: 2300 movs r3, #0 801ff08: 63fb str r3, [r7, #60] @ 0x3c struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 801ff0a: 2300 movs r3, #0 801ff0c: 643b str r3, [r7, #64] @ 0x40 801ff0e: 2300 movs r3, #0 801ff10: 657b str r3, [r7, #84] @ 0x54 801ff12: 2300 movs r3, #0 801ff14: 653b str r3, [r7, #80] @ 0x50 801ff16: 2300 movs r3, #0 801ff18: 64fb str r3, [r7, #76] @ 0x4c u16_t pos = 0; /* position in 'arg' data */ 801ff1a: 2300 movs r3, #0 801ff1c: f8a7 304a strh.w r3, [r7, #74] @ 0x4a u16_t queuelen; u8_t optlen; u8_t optflags = 0; 801ff20: 2300 movs r3, #0 801ff22: f887 302b strb.w r3, [r7, #43] @ 0x2b #if TCP_OVERSIZE u16_t oversize = 0; 801ff26: 2300 movs r3, #0 801ff28: 82fb strh r3, [r7, #22] u16_t oversize_used = 0; 801ff2a: 2300 movs r3, #0 801ff2c: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 #if TCP_OVERSIZE_DBGCHECK u16_t oversize_add = 0; 801ff30: 2300 movs r3, #0 801ff32: f8a7 305a strh.w r3, [r7, #90] @ 0x5a #endif /* TCP_OVERSIZE_DBGCHECK*/ #endif /* TCP_OVERSIZE */ u16_t extendlen = 0; 801ff36: 2300 movs r3, #0 801ff38: 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); 801ff3c: 68fb ldr r3, [r7, #12] 801ff3e: 2b00 cmp r3, #0 801ff40: d109 bne.n 801ff56 801ff42: 4b9d ldr r3, [pc, #628] @ (80201b8 ) 801ff44: f44f 72cf mov.w r2, #414 @ 0x19e 801ff48: 499c ldr r1, [pc, #624] @ (80201bc ) 801ff4a: 489d ldr r0, [pc, #628] @ (80201c0 ) 801ff4c: f00a fca6 bl 802a89c 801ff50: f06f 030f mvn.w r3, #15 801ff54: e37b b.n 802064e /* 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)); 801ff56: 68fb ldr r3, [r7, #12] 801ff58: f8b3 3062 ldrh.w r3, [r3, #98] @ 0x62 801ff5c: 085b lsrs r3, r3, #1 801ff5e: b29a uxth r2, r3 801ff60: 68fb ldr r3, [r7, #12] 801ff62: 8e5b ldrh r3, [r3, #50] @ 0x32 801ff64: 4293 cmp r3, r2 801ff66: bf28 it cs 801ff68: 4613 movcs r3, r2 801ff6a: 853b strh r3, [r7, #40] @ 0x28 mss_local = mss_local ? mss_local : pcb->mss; 801ff6c: 8d3b ldrh r3, [r7, #40] @ 0x28 801ff6e: 2b00 cmp r3, #0 801ff70: d102 bne.n 801ff78 801ff72: 68fb ldr r3, [r7, #12] 801ff74: 8e5b ldrh r3, [r3, #50] @ 0x32 801ff76: e000 b.n 801ff7a 801ff78: 8d3b ldrh r3, [r7, #40] @ 0x28 801ff7a: 853b strh r3, [r7, #40] @ 0x28 LWIP_ASSERT_CORE_LOCKED(); 801ff7c: f7f1 f864 bl 8011048 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)", 801ff80: 68bb ldr r3, [r7, #8] 801ff82: 2b00 cmp r3, #0 801ff84: d109 bne.n 801ff9a 801ff86: 4b8c ldr r3, [pc, #560] @ (80201b8 ) 801ff88: f240 12ad movw r2, #429 @ 0x1ad 801ff8c: 498d ldr r1, [pc, #564] @ (80201c4 ) 801ff8e: 488c ldr r0, [pc, #560] @ (80201c0 ) 801ff90: f00a fc84 bl 802a89c 801ff94: f06f 030f mvn.w r3, #15 801ff98: e359 b.n 802064e arg != NULL, return ERR_ARG;); err = tcp_write_checks(pcb, len); 801ff9a: 88fb ldrh r3, [r7, #6] 801ff9c: 4619 mov r1, r3 801ff9e: 68f8 ldr r0, [r7, #12] 801ffa0: f7ff ff2c bl 801fdfc 801ffa4: 4603 mov r3, r0 801ffa6: f887 3027 strb.w r3, [r7, #39] @ 0x27 if (err != ERR_OK) { 801ffaa: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 801ffae: 2b00 cmp r3, #0 801ffb0: d002 beq.n 801ffb8 return err; 801ffb2: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 801ffb6: e34a b.n 802064e } queuelen = pcb->snd_queuelen; 801ffb8: 68fb ldr r3, [r7, #12] 801ffba: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 801ffbe: 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); 801ffc2: 2300 movs r3, #0 801ffc4: 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) { 801ffc8: 68fb ldr r3, [r7, #12] 801ffca: 6edb ldr r3, [r3, #108] @ 0x6c 801ffcc: 2b00 cmp r3, #0 801ffce: f000 8127 beq.w 8020220 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; 801ffd2: 68fb ldr r3, [r7, #12] 801ffd4: 6edb ldr r3, [r3, #108] @ 0x6c 801ffd6: 643b str r3, [r7, #64] @ 0x40 801ffd8: e002 b.n 801ffe0 last_unsent = last_unsent->next); 801ffda: 6c3b ldr r3, [r7, #64] @ 0x40 801ffdc: 681b ldr r3, [r3, #0] 801ffde: 643b str r3, [r7, #64] @ 0x40 for (last_unsent = pcb->unsent; last_unsent->next != NULL; 801ffe0: 6c3b ldr r3, [r7, #64] @ 0x40 801ffe2: 681b ldr r3, [r3, #0] 801ffe4: 2b00 cmp r3, #0 801ffe6: d1f8 bne.n 801ffda /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(last_unsent->flags, pcb); 801ffe8: 6c3b ldr r3, [r7, #64] @ 0x40 801ffea: 7b1b ldrb r3, [r3, #12] 801ffec: 009b lsls r3, r3, #2 801ffee: b29b uxth r3, r3 801fff0: f003 0304 and.w r3, r3, #4 801fff4: 84bb strh r3, [r7, #36] @ 0x24 LWIP_ASSERT("mss_local is too small", mss_local >= last_unsent->len + unsent_optlen); 801fff6: 8d3a ldrh r2, [r7, #40] @ 0x28 801fff8: 6c3b ldr r3, [r7, #64] @ 0x40 801fffa: 891b ldrh r3, [r3, #8] 801fffc: 4619 mov r1, r3 801fffe: 8cbb ldrh r3, [r7, #36] @ 0x24 8020000: 440b add r3, r1 8020002: 429a cmp r2, r3 8020004: da06 bge.n 8020014 8020006: 4b6c ldr r3, [pc, #432] @ (80201b8 ) 8020008: f44f 72f3 mov.w r2, #486 @ 0x1e6 802000c: 496e ldr r1, [pc, #440] @ (80201c8 ) 802000e: 486c ldr r0, [pc, #432] @ (80201c0 ) 8020010: f00a fc44 bl 802a89c space = mss_local - (last_unsent->len + unsent_optlen); 8020014: 6c3b ldr r3, [r7, #64] @ 0x40 8020016: 891a ldrh r2, [r3, #8] 8020018: 8cbb ldrh r3, [r7, #36] @ 0x24 802001a: 4413 add r3, r2 802001c: b29b uxth r3, r3 802001e: 8d3a ldrh r2, [r7, #40] @ 0x28 8020020: 1ad3 subs r3, r2, r3 8020022: 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)", 8020026: 68fb ldr r3, [r7, #12] 8020028: f8b3 2068 ldrh.w r2, [r3, #104] @ 0x68 802002c: 6c3b ldr r3, [r7, #64] @ 0x40 802002e: 895b ldrh r3, [r3, #10] 8020030: 429a cmp r2, r3 8020032: d006 beq.n 8020042 8020034: 4b60 ldr r3, [pc, #384] @ (80201b8 ) 8020036: f240 12f3 movw r2, #499 @ 0x1f3 802003a: 4964 ldr r1, [pc, #400] @ (80201cc ) 802003c: 4860 ldr r0, [pc, #384] @ (80201c0 ) 802003e: f00a fc2d bl 802a89c pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 8020042: 68fb ldr r3, [r7, #12] 8020044: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 8020048: 82fb strh r3, [r7, #22] if (oversize > 0) { 802004a: 8afb ldrh r3, [r7, #22] 802004c: 2b00 cmp r3, #0 802004e: d02e beq.n 80200ae LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space); 8020050: 8afb ldrh r3, [r7, #22] 8020052: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 8020056: 429a cmp r2, r3 8020058: d206 bcs.n 8020068 802005a: 4b57 ldr r3, [pc, #348] @ (80201b8 ) 802005c: f44f 72fc mov.w r2, #504 @ 0x1f8 8020060: 495b ldr r1, [pc, #364] @ (80201d0 ) 8020062: 4857 ldr r0, [pc, #348] @ (80201c0 ) 8020064: f00a fc1a bl 802a89c seg = last_unsent; 8020068: 6c3b ldr r3, [r7, #64] @ 0x40 802006a: 657b str r3, [r7, #84] @ 0x54 oversize_used = LWIP_MIN(space, LWIP_MIN(oversize, len)); 802006c: 8afb ldrh r3, [r7, #22] 802006e: 88fa ldrh r2, [r7, #6] 8020070: 4293 cmp r3, r2 8020072: bf28 it cs 8020074: 4613 movcs r3, r2 8020076: b29b uxth r3, r3 8020078: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 802007c: 4293 cmp r3, r2 802007e: bf28 it cs 8020080: 4613 movcs r3, r2 8020082: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 pos += oversize_used; 8020086: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 802008a: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 802008e: 4413 add r3, r2 8020090: f8a7 304a strh.w r3, [r7, #74] @ 0x4a oversize -= oversize_used; 8020094: 8afa ldrh r2, [r7, #22] 8020096: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 802009a: 1ad3 subs r3, r2, r3 802009c: b29b uxth r3, r3 802009e: 82fb strh r3, [r7, #22] space -= oversize_used; 80200a0: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 80200a4: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 80200a8: 1ad3 subs r3, r2, r3 80200aa: 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)); 80200ae: 8afb ldrh r3, [r7, #22] 80200b0: 2b00 cmp r3, #0 80200b2: d00b beq.n 80200cc 80200b4: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 80200b8: 88fb ldrh r3, [r7, #6] 80200ba: 429a cmp r2, r3 80200bc: d006 beq.n 80200cc 80200be: 4b3e ldr r3, [pc, #248] @ (80201b8 ) 80200c0: f44f 7200 mov.w r2, #512 @ 0x200 80200c4: 4943 ldr r1, [pc, #268] @ (80201d4 ) 80200c6: 483e ldr r0, [pc, #248] @ (80201c0 ) 80200c8: f00a fbe8 bl 802a89c * * 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)) { 80200cc: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 80200d0: 88fb ldrh r3, [r7, #6] 80200d2: 429a cmp r2, r3 80200d4: f080 8172 bcs.w 80203bc 80200d8: f8b7 305c ldrh.w r3, [r7, #92] @ 0x5c 80200dc: 2b00 cmp r3, #0 80200de: f000 816d beq.w 80203bc 80200e2: 6c3b ldr r3, [r7, #64] @ 0x40 80200e4: 891b ldrh r3, [r3, #8] 80200e6: 2b00 cmp r3, #0 80200e8: f000 8168 beq.w 80203bc u16_t seglen = LWIP_MIN(space, len - pos); 80200ec: 88fa ldrh r2, [r7, #6] 80200ee: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 80200f2: 1ad2 subs r2, r2, r3 80200f4: f8b7 305c ldrh.w r3, [r7, #92] @ 0x5c 80200f8: 4293 cmp r3, r2 80200fa: bfa8 it ge 80200fc: 4613 movge r3, r2 80200fe: 847b strh r3, [r7, #34] @ 0x22 seg = last_unsent; 8020100: 6c3b ldr r3, [r7, #64] @ 0x40 8020102: 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) { 8020104: 797b ldrb r3, [r7, #5] 8020106: f003 0301 and.w r3, r3, #1 802010a: 2b00 cmp r3, #0 802010c: d02b beq.n 8020166 /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 802010e: f107 0016 add.w r0, r7, #22 8020112: f8b7 205c ldrh.w r2, [r7, #92] @ 0x5c 8020116: 8c79 ldrh r1, [r7, #34] @ 0x22 8020118: 2301 movs r3, #1 802011a: 9302 str r3, [sp, #8] 802011c: 797b ldrb r3, [r7, #5] 802011e: 9301 str r3, [sp, #4] 8020120: 68fb ldr r3, [r7, #12] 8020122: 9300 str r3, [sp, #0] 8020124: 4603 mov r3, r0 8020126: 2000 movs r0, #0 8020128: f7ff fdee bl 801fd08 802012c: 63f8 str r0, [r7, #60] @ 0x3c 802012e: 6bfb ldr r3, [r7, #60] @ 0x3c 8020130: 2b00 cmp r3, #0 8020132: f000 825a beq.w 80205ea ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } #if TCP_OVERSIZE_DBGCHECK oversize_add = oversize; 8020136: 8afb ldrh r3, [r7, #22] 8020138: 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); 802013c: 6bfb ldr r3, [r7, #60] @ 0x3c 802013e: 6858 ldr r0, [r3, #4] 8020140: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020144: 68ba ldr r2, [r7, #8] 8020146: 4413 add r3, r2 8020148: 8c7a ldrh r2, [r7, #34] @ 0x22 802014a: 4619 mov r1, r3 802014c: f00a fe2f bl 802adae #if TCP_CHECKSUM_ON_COPY concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ queuelen += pbuf_clen(concat_p); 8020150: 6bf8 ldr r0, [r7, #60] @ 0x3c 8020152: f7fb f9b9 bl 801b4c8 8020156: 4603 mov r3, r0 8020158: 461a mov r2, r3 802015a: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 802015e: 4413 add r3, r2 8020160: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 8020164: e055 b.n 8020212 } 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); 8020166: 6c3b ldr r3, [r7, #64] @ 0x40 8020168: 685b ldr r3, [r3, #4] 802016a: 63bb str r3, [r7, #56] @ 0x38 802016c: e002 b.n 8020174 802016e: 6bbb ldr r3, [r7, #56] @ 0x38 8020170: 681b ldr r3, [r3, #0] 8020172: 63bb str r3, [r7, #56] @ 0x38 8020174: 6bbb ldr r3, [r7, #56] @ 0x38 8020176: 681b ldr r3, [r3, #0] 8020178: 2b00 cmp r3, #0 802017a: d1f8 bne.n 802016e if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 802017c: 6bbb ldr r3, [r7, #56] @ 0x38 802017e: 7b1b ldrb r3, [r3, #12] 8020180: f003 03c0 and.w r3, r3, #192 @ 0xc0 8020184: 2b00 cmp r3, #0 8020186: d129 bne.n 80201dc (const u8_t *)p->payload + p->len == (const u8_t *)arg) { 8020188: 6bbb ldr r3, [r7, #56] @ 0x38 802018a: 685b ldr r3, [r3, #4] 802018c: 6bba ldr r2, [r7, #56] @ 0x38 802018e: 8952 ldrh r2, [r2, #10] 8020190: 4413 add r3, r2 if (((p->type_internal & (PBUF_TYPE_FLAG_STRUCT_DATA_CONTIGUOUS | PBUF_TYPE_FLAG_DATA_VOLATILE)) == 0) && 8020192: 68ba ldr r2, [r7, #8] 8020194: 429a cmp r2, r3 8020196: d121 bne.n 80201dc LWIP_ASSERT("tcp_write: ROM pbufs cannot be oversized", pos == 0); 8020198: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 802019c: 2b00 cmp r3, #0 802019e: d006 beq.n 80201ae 80201a0: 4b05 ldr r3, [pc, #20] @ (80201b8 ) 80201a2: f240 2231 movw r2, #561 @ 0x231 80201a6: 490c ldr r1, [pc, #48] @ (80201d8 ) 80201a8: 4805 ldr r0, [pc, #20] @ (80201c0 ) 80201aa: f00a fb77 bl 802a89c extendlen = seglen; 80201ae: 8c7b ldrh r3, [r7, #34] @ 0x22 80201b0: f8a7 305e strh.w r3, [r7, #94] @ 0x5e 80201b4: e02d b.n 8020212 80201b6: bf00 nop 80201b8: 080301c0 .word 0x080301c0 80201bc: 08030360 .word 0x08030360 80201c0: 08030214 .word 0x08030214 80201c4: 08030378 .word 0x08030378 80201c8: 080303ac .word 0x080303ac 80201cc: 080303c4 .word 0x080303c4 80201d0: 080303f4 .word 0x080303f4 80201d4: 08030414 .word 0x08030414 80201d8: 08030434 .word 0x08030434 } else { if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { 80201dc: 8c7b ldrh r3, [r7, #34] @ 0x22 80201de: 2201 movs r2, #1 80201e0: 4619 mov r1, r3 80201e2: 2000 movs r0, #0 80201e4: f7fa fdcc bl 801ad80 80201e8: 63f8 str r0, [r7, #60] @ 0x3c 80201ea: 6bfb ldr r3, [r7, #60] @ 0x3c 80201ec: 2b00 cmp r3, #0 80201ee: f000 81fe beq.w 80205ee 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; 80201f2: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 80201f6: 68ba ldr r2, [r7, #8] 80201f8: 441a add r2, r3 80201fa: 6bfb ldr r3, [r7, #60] @ 0x3c 80201fc: 605a str r2, [r3, #4] queuelen += pbuf_clen(concat_p); 80201fe: 6bf8 ldr r0, [r7, #60] @ 0x3c 8020200: f7fb f962 bl 801b4c8 8020204: 4603 mov r3, r0 8020206: 461a mov r2, r3 8020208: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 802020c: 4413 add r3, r2 802020e: f8a7 3048 strh.w r3, [r7, #72] @ 0x48 &concat_chksum, &concat_chksum_swapped); concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ } pos += seglen; 8020212: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 8020216: 8c7b ldrh r3, [r7, #34] @ 0x22 8020218: 4413 add r3, r2 802021a: f8a7 304a strh.w r3, [r7, #74] @ 0x4a 802021e: e0cd b.n 80203bc } #endif /* !LWIP_NETIF_TX_SINGLE_PBUF */ } else { #if TCP_OVERSIZE LWIP_ASSERT("unsent_oversize mismatch (pcb->unsent is NULL)", 8020220: 68fb ldr r3, [r7, #12] 8020222: f8b3 3068 ldrh.w r3, [r3, #104] @ 0x68 8020226: 2b00 cmp r3, #0 8020228: f000 80c8 beq.w 80203bc 802022c: 4b72 ldr r3, [pc, #456] @ (80203f8 ) 802022e: f240 224a movw r2, #586 @ 0x24a 8020232: 4972 ldr r1, [pc, #456] @ (80203fc ) 8020234: 4872 ldr r0, [pc, #456] @ (8020400 ) 8020236: f00a fb31 bl 802a89c * 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) { 802023a: e0bf b.n 80203bc struct pbuf *p; u16_t left = len - pos; 802023c: 88fa ldrh r2, [r7, #6] 802023e: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020242: 1ad3 subs r3, r2, r3 8020244: 843b strh r3, [r7, #32] u16_t max_len = mss_local - optlen; 8020246: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 802024a: b29b uxth r3, r3 802024c: 8d3a ldrh r2, [r7, #40] @ 0x28 802024e: 1ad3 subs r3, r2, r3 8020250: 83fb strh r3, [r7, #30] u16_t seglen = LWIP_MIN(left, max_len); 8020252: 8bfa ldrh r2, [r7, #30] 8020254: 8c3b ldrh r3, [r7, #32] 8020256: 4293 cmp r3, r2 8020258: bf28 it cs 802025a: 4613 movcs r3, r2 802025c: 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) { 802025e: 797b ldrb r3, [r7, #5] 8020260: f003 0301 and.w r3, r3, #1 8020264: 2b00 cmp r3, #0 8020266: d036 beq.n 80202d6 /* 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) { 8020268: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 802026c: b29a uxth r2, r3 802026e: 8bbb ldrh r3, [r7, #28] 8020270: 4413 add r3, r2 8020272: b299 uxth r1, r3 8020274: 6cfb ldr r3, [r7, #76] @ 0x4c 8020276: 2b00 cmp r3, #0 8020278: bf0c ite eq 802027a: 2301 moveq r3, #1 802027c: 2300 movne r3, #0 802027e: b2db uxtb r3, r3 8020280: f107 0016 add.w r0, r7, #22 8020284: 8d3a ldrh r2, [r7, #40] @ 0x28 8020286: 9302 str r3, [sp, #8] 8020288: 797b ldrb r3, [r7, #5] 802028a: 9301 str r3, [sp, #4] 802028c: 68fb ldr r3, [r7, #12] 802028e: 9300 str r3, [sp, #0] 8020290: 4603 mov r3, r0 8020292: 2036 movs r0, #54 @ 0x36 8020294: f7ff fd38 bl 801fd08 8020298: 6378 str r0, [r7, #52] @ 0x34 802029a: 6b7b ldr r3, [r7, #52] @ 0x34 802029c: 2b00 cmp r3, #0 802029e: f000 81a8 beq.w 80205f2 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", 80202a2: 6b7b ldr r3, [r7, #52] @ 0x34 80202a4: 895b ldrh r3, [r3, #10] 80202a6: 8bba ldrh r2, [r7, #28] 80202a8: 429a cmp r2, r3 80202aa: d906 bls.n 80202ba 80202ac: 4b52 ldr r3, [pc, #328] @ (80203f8 ) 80202ae: f240 2266 movw r2, #614 @ 0x266 80202b2: 4954 ldr r1, [pc, #336] @ (8020404 ) 80202b4: 4852 ldr r0, [pc, #328] @ (8020400 ) 80202b6: f00a faf1 bl 802a89c (p->len >= seglen)); TCP_DATA_COPY2((char *)p->payload + optlen, (const u8_t *)arg + pos, seglen, &chksum, &chksum_swapped); 80202ba: 6b7b ldr r3, [r7, #52] @ 0x34 80202bc: 685a ldr r2, [r3, #4] 80202be: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 80202c2: 18d0 adds r0, r2, r3 80202c4: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 80202c8: 68ba ldr r2, [r7, #8] 80202ca: 4413 add r3, r2 80202cc: 8bba ldrh r2, [r7, #28] 80202ce: 4619 mov r1, r3 80202d0: f00a fd6d bl 802adae 80202d4: e02f b.n 8020336 * 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); 80202d6: 8afb ldrh r3, [r7, #22] 80202d8: 2b00 cmp r3, #0 80202da: d006 beq.n 80202ea 80202dc: 4b46 ldr r3, [pc, #280] @ (80203f8 ) 80202de: f240 2271 movw r2, #625 @ 0x271 80202e2: 4949 ldr r1, [pc, #292] @ (8020408 ) 80202e4: 4846 ldr r0, [pc, #280] @ (8020400 ) 80202e6: f00a fad9 bl 802a89c #endif /* TCP_OVERSIZE */ if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { 80202ea: 8bbb ldrh r3, [r7, #28] 80202ec: 2201 movs r2, #1 80202ee: 4619 mov r1, r3 80202f0: 2036 movs r0, #54 @ 0x36 80202f2: f7fa fd45 bl 801ad80 80202f6: 61b8 str r0, [r7, #24] 80202f8: 69bb ldr r3, [r7, #24] 80202fa: 2b00 cmp r3, #0 80202fc: f000 817b beq.w 80205f6 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; 8020300: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020304: 68ba ldr r2, [r7, #8] 8020306: 441a add r2, r3 8020308: 69bb ldr r3, [r7, #24] 802030a: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 802030c: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 8020310: b29b uxth r3, r3 8020312: f44f 7220 mov.w r2, #640 @ 0x280 8020316: 4619 mov r1, r3 8020318: 2036 movs r0, #54 @ 0x36 802031a: f7fa fd31 bl 801ad80 802031e: 6378 str r0, [r7, #52] @ 0x34 8020320: 6b7b ldr r3, [r7, #52] @ 0x34 8020322: 2b00 cmp r3, #0 8020324: d103 bne.n 802032e /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 8020326: 69b8 ldr r0, [r7, #24] 8020328: f7fb f840 bl 801b3ac LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("tcp_write: could not allocate memory for header pbuf\n")); goto memerr; 802032c: e166 b.n 80205fc } /* Concatenate the headers and data pbufs together. */ pbuf_cat(p/*header*/, p2/*data*/); 802032e: 69b9 ldr r1, [r7, #24] 8020330: 6b78 ldr r0, [r7, #52] @ 0x34 8020332: f7fb f909 bl 801b548 } queuelen += pbuf_clen(p); 8020336: 6b78 ldr r0, [r7, #52] @ 0x34 8020338: f7fb f8c6 bl 801b4c8 802033c: 4603 mov r3, r0 802033e: 461a mov r2, r3 8020340: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 8020344: 4413 add r3, r2 8020346: 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)) { 802034a: f8b7 3048 ldrh.w r3, [r7, #72] @ 0x48 802034e: 2b10 cmp r3, #16 8020350: d903 bls.n 802035a 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); 8020352: 6b78 ldr r0, [r7, #52] @ 0x34 8020354: f7fb f82a bl 801b3ac goto memerr; 8020358: e150 b.n 80205fc } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 802035a: 68fb ldr r3, [r7, #12] 802035c: 6dda ldr r2, [r3, #92] @ 0x5c 802035e: f8b7 304a ldrh.w r3, [r7, #74] @ 0x4a 8020362: 441a add r2, r3 8020364: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8020368: 9300 str r3, [sp, #0] 802036a: 4613 mov r3, r2 802036c: 2200 movs r2, #0 802036e: 6b79 ldr r1, [r7, #52] @ 0x34 8020370: 68f8 ldr r0, [r7, #12] 8020372: f7ff fc29 bl 801fbc8 8020376: 6578 str r0, [r7, #84] @ 0x54 8020378: 6d7b ldr r3, [r7, #84] @ 0x54 802037a: 2b00 cmp r3, #0 802037c: f000 813d beq.w 80205fa goto memerr; } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = oversize; 8020380: 8afa ldrh r2, [r7, #22] 8020382: 6d7b ldr r3, [r7, #84] @ 0x54 8020384: 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) { 8020386: 6cfb ldr r3, [r7, #76] @ 0x4c 8020388: 2b00 cmp r3, #0 802038a: d102 bne.n 8020392 queue = seg; 802038c: 6d7b ldr r3, [r7, #84] @ 0x54 802038e: 64fb str r3, [r7, #76] @ 0x4c 8020390: e00c b.n 80203ac } else { /* Attach the segment to the end of the queued segments */ LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); 8020392: 6d3b ldr r3, [r7, #80] @ 0x50 8020394: 2b00 cmp r3, #0 8020396: d106 bne.n 80203a6 8020398: 4b17 ldr r3, [pc, #92] @ (80203f8 ) 802039a: f240 22ab movw r2, #683 @ 0x2ab 802039e: 491b ldr r1, [pc, #108] @ (802040c ) 80203a0: 4817 ldr r0, [pc, #92] @ (8020400 ) 80203a2: f00a fa7b bl 802a89c prev_seg->next = seg; 80203a6: 6d3b ldr r3, [r7, #80] @ 0x50 80203a8: 6d7a ldr r2, [r7, #84] @ 0x54 80203aa: 601a str r2, [r3, #0] } /* remember last segment of to-be-queued data for next iteration */ prev_seg = seg; 80203ac: 6d7b ldr r3, [r7, #84] @ 0x54 80203ae: 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; 80203b0: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 80203b4: 8bbb ldrh r3, [r7, #28] 80203b6: 4413 add r3, r2 80203b8: f8a7 304a strh.w r3, [r7, #74] @ 0x4a while (pos < len) { 80203bc: f8b7 204a ldrh.w r2, [r7, #74] @ 0x4a 80203c0: 88fb ldrh r3, [r7, #6] 80203c2: 429a cmp r2, r3 80203c4: f4ff af3a bcc.w 802023c /* * All three segmentation phases were successful. We can commit the * transaction. */ #if TCP_OVERSIZE_DBGCHECK if ((last_unsent != NULL) && (oversize_add != 0)) { 80203c8: 6c3b ldr r3, [r7, #64] @ 0x40 80203ca: 2b00 cmp r3, #0 80203cc: d00b beq.n 80203e6 80203ce: f8b7 305a ldrh.w r3, [r7, #90] @ 0x5a 80203d2: 2b00 cmp r3, #0 80203d4: d007 beq.n 80203e6 last_unsent->oversize_left += oversize_add; 80203d6: 6c3b ldr r3, [r7, #64] @ 0x40 80203d8: 895a ldrh r2, [r3, #10] 80203da: f8b7 305a ldrh.w r3, [r7, #90] @ 0x5a 80203de: 4413 add r3, r2 80203e0: b29a uxth r2, r3 80203e2: 6c3b ldr r3, [r7, #64] @ 0x40 80203e4: 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) { 80203e6: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 80203ea: 2b00 cmp r3, #0 80203ec: d052 beq.n 8020494 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 80203ee: 6c3b ldr r3, [r7, #64] @ 0x40 80203f0: 685b ldr r3, [r3, #4] 80203f2: 633b str r3, [r7, #48] @ 0x30 80203f4: e02e b.n 8020454 80203f6: bf00 nop 80203f8: 080301c0 .word 0x080301c0 80203fc: 08030460 .word 0x08030460 8020400: 08030214 .word 0x08030214 8020404: 08030490 .word 0x08030490 8020408: 080304d0 .word 0x080304d0 802040c: 080304e0 .word 0x080304e0 p->tot_len += oversize_used; 8020410: 6b3b ldr r3, [r7, #48] @ 0x30 8020412: 891a ldrh r2, [r3, #8] 8020414: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8020418: 4413 add r3, r2 802041a: b29a uxth r2, r3 802041c: 6b3b ldr r3, [r7, #48] @ 0x30 802041e: 811a strh r2, [r3, #8] if (p->next == NULL) { 8020420: 6b3b ldr r3, [r7, #48] @ 0x30 8020422: 681b ldr r3, [r3, #0] 8020424: 2b00 cmp r3, #0 8020426: d112 bne.n 802044e TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 8020428: 6b3b ldr r3, [r7, #48] @ 0x30 802042a: 685b ldr r3, [r3, #4] 802042c: 6b3a ldr r2, [r7, #48] @ 0x30 802042e: 8952 ldrh r2, [r2, #10] 8020430: 4413 add r3, r2 8020432: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8020436: 68b9 ldr r1, [r7, #8] 8020438: 4618 mov r0, r3 802043a: f00a fcb8 bl 802adae p->len += oversize_used; 802043e: 6b3b ldr r3, [r7, #48] @ 0x30 8020440: 895a ldrh r2, [r3, #10] 8020442: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8020446: 4413 add r3, r2 8020448: b29a uxth r2, r3 802044a: 6b3b ldr r3, [r7, #48] @ 0x30 802044c: 815a strh r2, [r3, #10] for (p = last_unsent->p; p; p = p->next) { 802044e: 6b3b ldr r3, [r7, #48] @ 0x30 8020450: 681b ldr r3, [r3, #0] 8020452: 633b str r3, [r7, #48] @ 0x30 8020454: 6b3b ldr r3, [r7, #48] @ 0x30 8020456: 2b00 cmp r3, #0 8020458: d1da bne.n 8020410 } } last_unsent->len += oversize_used; 802045a: 6c3b ldr r3, [r7, #64] @ 0x40 802045c: 891a ldrh r2, [r3, #8] 802045e: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8020462: 4413 add r3, r2 8020464: b29a uxth r2, r3 8020466: 6c3b ldr r3, [r7, #64] @ 0x40 8020468: 811a strh r2, [r3, #8] #if TCP_OVERSIZE_DBGCHECK LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", 802046a: 6c3b ldr r3, [r7, #64] @ 0x40 802046c: 895b ldrh r3, [r3, #10] 802046e: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8020472: 429a cmp r2, r3 8020474: d906 bls.n 8020484 8020476: 4b78 ldr r3, [pc, #480] @ (8020658 ) 8020478: f240 22d3 movw r2, #723 @ 0x2d3 802047c: 4977 ldr r1, [pc, #476] @ (802065c ) 802047e: 4878 ldr r0, [pc, #480] @ (8020660 ) 8020480: f00a fa0c bl 802a89c last_unsent->oversize_left >= oversize_used); last_unsent->oversize_left -= oversize_used; 8020484: 6c3b ldr r3, [r7, #64] @ 0x40 8020486: 895a ldrh r2, [r3, #10] 8020488: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 802048c: 1ad3 subs r3, r2, r3 802048e: b29a uxth r2, r3 8020490: 6c3b ldr r3, [r7, #64] @ 0x40 8020492: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ } pcb->unsent_oversize = oversize; 8020494: 8afa ldrh r2, [r7, #22] 8020496: 68fb ldr r3, [r7, #12] 8020498: 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) { 802049c: 6bfb ldr r3, [r7, #60] @ 0x3c 802049e: 2b00 cmp r3, #0 80204a0: d018 beq.n 80204d4 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", 80204a2: 6c3b ldr r3, [r7, #64] @ 0x40 80204a4: 2b00 cmp r3, #0 80204a6: d106 bne.n 80204b6 80204a8: 4b6b ldr r3, [pc, #428] @ (8020658 ) 80204aa: f44f 7238 mov.w r2, #736 @ 0x2e0 80204ae: 496d ldr r1, [pc, #436] @ (8020664 ) 80204b0: 486b ldr r0, [pc, #428] @ (8020660 ) 80204b2: f00a f9f3 bl 802a89c (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 80204b6: 6c3b ldr r3, [r7, #64] @ 0x40 80204b8: 685b ldr r3, [r3, #4] 80204ba: 6bf9 ldr r1, [r7, #60] @ 0x3c 80204bc: 4618 mov r0, r3 80204be: f7fb f843 bl 801b548 last_unsent->len += concat_p->tot_len; 80204c2: 6c3b ldr r3, [r7, #64] @ 0x40 80204c4: 891a ldrh r2, [r3, #8] 80204c6: 6bfb ldr r3, [r7, #60] @ 0x3c 80204c8: 891b ldrh r3, [r3, #8] 80204ca: 4413 add r3, r2 80204cc: b29a uxth r2, r3 80204ce: 6c3b ldr r3, [r7, #64] @ 0x40 80204d0: 811a strh r2, [r3, #8] 80204d2: e03c b.n 802054e } else if (extendlen > 0) { 80204d4: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 80204d8: 2b00 cmp r3, #0 80204da: d038 beq.n 802054e struct pbuf *p; LWIP_ASSERT("tcp_write: extension of reference requires reference", 80204dc: 6c3b ldr r3, [r7, #64] @ 0x40 80204de: 2b00 cmp r3, #0 80204e0: d003 beq.n 80204ea 80204e2: 6c3b ldr r3, [r7, #64] @ 0x40 80204e4: 685b ldr r3, [r3, #4] 80204e6: 2b00 cmp r3, #0 80204e8: d106 bne.n 80204f8 80204ea: 4b5b ldr r3, [pc, #364] @ (8020658 ) 80204ec: f240 22e6 movw r2, #742 @ 0x2e6 80204f0: 495d ldr r1, [pc, #372] @ (8020668 ) 80204f2: 485b ldr r0, [pc, #364] @ (8020660 ) 80204f4: f00a f9d2 bl 802a89c last_unsent != NULL && last_unsent->p != NULL); for (p = last_unsent->p; p->next != NULL; p = p->next) { 80204f8: 6c3b ldr r3, [r7, #64] @ 0x40 80204fa: 685b ldr r3, [r3, #4] 80204fc: 62fb str r3, [r7, #44] @ 0x2c 80204fe: e00a b.n 8020516 p->tot_len += extendlen; 8020500: 6afb ldr r3, [r7, #44] @ 0x2c 8020502: 891a ldrh r2, [r3, #8] 8020504: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 8020508: 4413 add r3, r2 802050a: b29a uxth r2, r3 802050c: 6afb ldr r3, [r7, #44] @ 0x2c 802050e: 811a strh r2, [r3, #8] for (p = last_unsent->p; p->next != NULL; p = p->next) { 8020510: 6afb ldr r3, [r7, #44] @ 0x2c 8020512: 681b ldr r3, [r3, #0] 8020514: 62fb str r3, [r7, #44] @ 0x2c 8020516: 6afb ldr r3, [r7, #44] @ 0x2c 8020518: 681b ldr r3, [r3, #0] 802051a: 2b00 cmp r3, #0 802051c: d1f0 bne.n 8020500 } p->tot_len += extendlen; 802051e: 6afb ldr r3, [r7, #44] @ 0x2c 8020520: 891a ldrh r2, [r3, #8] 8020522: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 8020526: 4413 add r3, r2 8020528: b29a uxth r2, r3 802052a: 6afb ldr r3, [r7, #44] @ 0x2c 802052c: 811a strh r2, [r3, #8] p->len += extendlen; 802052e: 6afb ldr r3, [r7, #44] @ 0x2c 8020530: 895a ldrh r2, [r3, #10] 8020532: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 8020536: 4413 add r3, r2 8020538: b29a uxth r2, r3 802053a: 6afb ldr r3, [r7, #44] @ 0x2c 802053c: 815a strh r2, [r3, #10] last_unsent->len += extendlen; 802053e: 6c3b ldr r3, [r7, #64] @ 0x40 8020540: 891a ldrh r2, [r3, #8] 8020542: f8b7 305e ldrh.w r3, [r7, #94] @ 0x5e 8020546: 4413 add r3, r2 8020548: b29a uxth r2, r3 802054a: 6c3b ldr r3, [r7, #64] @ 0x40 802054c: 811a strh r2, [r3, #8] /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 802054e: 6c3b ldr r3, [r7, #64] @ 0x40 8020550: 2b00 cmp r3, #0 8020552: d103 bne.n 802055c pcb->unsent = queue; 8020554: 68fb ldr r3, [r7, #12] 8020556: 6cfa ldr r2, [r7, #76] @ 0x4c 8020558: 66da str r2, [r3, #108] @ 0x6c 802055a: e002 b.n 8020562 } else { last_unsent->next = queue; 802055c: 6c3b ldr r3, [r7, #64] @ 0x40 802055e: 6cfa ldr r2, [r7, #76] @ 0x4c 8020560: 601a str r2, [r3, #0] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 8020562: 68fb ldr r3, [r7, #12] 8020564: 6dda ldr r2, [r3, #92] @ 0x5c 8020566: 88fb ldrh r3, [r7, #6] 8020568: 441a add r2, r3 802056a: 68fb ldr r3, [r7, #12] 802056c: 65da str r2, [r3, #92] @ 0x5c pcb->snd_buf -= len; 802056e: 68fb ldr r3, [r7, #12] 8020570: f8b3 2064 ldrh.w r2, [r3, #100] @ 0x64 8020574: 88fb ldrh r3, [r7, #6] 8020576: 1ad3 subs r3, r2, r3 8020578: b29a uxth r2, r3 802057a: 68fb ldr r3, [r7, #12] 802057c: f8a3 2064 strh.w r2, [r3, #100] @ 0x64 pcb->snd_queuelen = queuelen; 8020580: 68fb ldr r3, [r7, #12] 8020582: f8b7 2048 ldrh.w r2, [r7, #72] @ 0x48 8020586: 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) { 802058a: 68fb ldr r3, [r7, #12] 802058c: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020590: 2b00 cmp r3, #0 8020592: d00e beq.n 80205b2 LWIP_ASSERT("tcp_write: valid queue length", 8020594: 68fb ldr r3, [r7, #12] 8020596: 6f1b ldr r3, [r3, #112] @ 0x70 8020598: 2b00 cmp r3, #0 802059a: d10a bne.n 80205b2 802059c: 68fb ldr r3, [r7, #12] 802059e: 6edb ldr r3, [r3, #108] @ 0x6c 80205a0: 2b00 cmp r3, #0 80205a2: d106 bne.n 80205b2 80205a4: 4b2c ldr r3, [pc, #176] @ (8020658 ) 80205a6: f240 3212 movw r2, #786 @ 0x312 80205aa: 4930 ldr r1, [pc, #192] @ (802066c ) 80205ac: 482c ldr r0, [pc, #176] @ (8020660 ) 80205ae: f00a f975 bl 802a89c 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)) { 80205b2: 6d7b ldr r3, [r7, #84] @ 0x54 80205b4: 2b00 cmp r3, #0 80205b6: d016 beq.n 80205e6 80205b8: 6d7b ldr r3, [r7, #84] @ 0x54 80205ba: 691b ldr r3, [r3, #16] 80205bc: 2b00 cmp r3, #0 80205be: d012 beq.n 80205e6 80205c0: 797b ldrb r3, [r7, #5] 80205c2: f003 0302 and.w r3, r3, #2 80205c6: 2b00 cmp r3, #0 80205c8: d10d bne.n 80205e6 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 80205ca: 6d7b ldr r3, [r7, #84] @ 0x54 80205cc: 691b ldr r3, [r3, #16] 80205ce: 899b ldrh r3, [r3, #12] 80205d0: b29c uxth r4, r3 80205d2: 2008 movs r0, #8 80205d4: f7f9 fa08 bl 80199e8 80205d8: 4603 mov r3, r0 80205da: 461a mov r2, r3 80205dc: 6d7b ldr r3, [r7, #84] @ 0x54 80205de: 691b ldr r3, [r3, #16] 80205e0: 4322 orrs r2, r4 80205e2: b292 uxth r2, r2 80205e4: 819a strh r2, [r3, #12] } return ERR_OK; 80205e6: 2300 movs r3, #0 80205e8: e031 b.n 802064e goto memerr; 80205ea: bf00 nop 80205ec: e006 b.n 80205fc goto memerr; 80205ee: bf00 nop 80205f0: e004 b.n 80205fc goto memerr; 80205f2: bf00 nop 80205f4: e002 b.n 80205fc goto memerr; 80205f6: bf00 nop 80205f8: e000 b.n 80205fc goto memerr; 80205fa: bf00 nop memerr: tcp_set_flags(pcb, TF_NAGLEMEMERR); 80205fc: 68fb ldr r3, [r7, #12] 80205fe: 8b5b ldrh r3, [r3, #26] 8020600: f043 0380 orr.w r3, r3, #128 @ 0x80 8020604: b29a uxth r2, r3 8020606: 68fb ldr r3, [r7, #12] 8020608: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 802060a: 6bfb ldr r3, [r7, #60] @ 0x3c 802060c: 2b00 cmp r3, #0 802060e: d002 beq.n 8020616 pbuf_free(concat_p); 8020610: 6bf8 ldr r0, [r7, #60] @ 0x3c 8020612: f7fa fecb bl 801b3ac } if (queue != NULL) { 8020616: 6cfb ldr r3, [r7, #76] @ 0x4c 8020618: 2b00 cmp r3, #0 802061a: d002 beq.n 8020622 tcp_segs_free(queue); 802061c: 6cf8 ldr r0, [r7, #76] @ 0x4c 802061e: f7fc fb09 bl 801cc34 } if (pcb->snd_queuelen != 0) { 8020622: 68fb ldr r3, [r7, #12] 8020624: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020628: 2b00 cmp r3, #0 802062a: d00e beq.n 802064a LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || 802062c: 68fb ldr r3, [r7, #12] 802062e: 6f1b ldr r3, [r3, #112] @ 0x70 8020630: 2b00 cmp r3, #0 8020632: d10a bne.n 802064a 8020634: 68fb ldr r3, [r7, #12] 8020636: 6edb ldr r3, [r3, #108] @ 0x6c 8020638: 2b00 cmp r3, #0 802063a: d106 bne.n 802064a 802063c: 4b06 ldr r3, [pc, #24] @ (8020658 ) 802063e: f240 3227 movw r2, #807 @ 0x327 8020642: 490a ldr r1, [pc, #40] @ (802066c ) 8020644: 4806 ldr r0, [pc, #24] @ (8020660 ) 8020646: f00a f929 bl 802a89c 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; 802064a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 802064e: 4618 mov r0, r3 8020650: 3764 adds r7, #100 @ 0x64 8020652: 46bd mov sp, r7 8020654: bd90 pop {r4, r7, pc} 8020656: bf00 nop 8020658: 080301c0 .word 0x080301c0 802065c: 080304f4 .word 0x080304f4 8020660: 08030214 .word 0x08030214 8020664: 08030520 .word 0x08030520 8020668: 08030558 .word 0x08030558 802066c: 08030590 .word 0x08030590 08020670 : * @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) { 8020670: b590 push {r4, r7, lr} 8020672: b08b sub sp, #44 @ 0x2c 8020674: af02 add r7, sp, #8 8020676: 6078 str r0, [r7, #4] 8020678: 460b mov r3, r1 802067a: 807b strh r3, [r7, #2] struct tcp_seg *seg = NULL, *useg = NULL; 802067c: 2300 movs r3, #0 802067e: 61bb str r3, [r7, #24] 8020680: 2300 movs r3, #0 8020682: 617b str r3, [r7, #20] struct pbuf *p = NULL; 8020684: 2300 movs r3, #0 8020686: 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); 8020688: 687b ldr r3, [r7, #4] 802068a: 2b00 cmp r3, #0 802068c: d106 bne.n 802069c 802068e: 4b97 ldr r3, [pc, #604] @ (80208ec ) 8020690: f240 324b movw r2, #843 @ 0x34b 8020694: 4996 ldr r1, [pc, #600] @ (80208f0 ) 8020696: 4897 ldr r0, [pc, #604] @ (80208f4 ) 8020698: f00a f900 bl 802a89c useg = pcb->unsent; 802069c: 687b ldr r3, [r7, #4] 802069e: 6edb ldr r3, [r3, #108] @ 0x6c 80206a0: 617b str r3, [r7, #20] if (useg == NULL) { 80206a2: 697b ldr r3, [r7, #20] 80206a4: 2b00 cmp r3, #0 80206a6: d102 bne.n 80206ae return ERR_MEM; 80206a8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80206ac: e119 b.n 80208e2 } if (split == 0) { 80206ae: 887b ldrh r3, [r7, #2] 80206b0: 2b00 cmp r3, #0 80206b2: d109 bne.n 80206c8 LWIP_ASSERT("Can't split segment into length 0", 0); 80206b4: 4b8d ldr r3, [pc, #564] @ (80208ec ) 80206b6: f240 3253 movw r2, #851 @ 0x353 80206ba: 498f ldr r1, [pc, #572] @ (80208f8 ) 80206bc: 488d ldr r0, [pc, #564] @ (80208f4 ) 80206be: f00a f8ed bl 802a89c return ERR_VAL; 80206c2: f06f 0305 mvn.w r3, #5 80206c6: e10c b.n 80208e2 } if (useg->len <= split) { 80206c8: 697b ldr r3, [r7, #20] 80206ca: 891b ldrh r3, [r3, #8] 80206cc: 887a ldrh r2, [r7, #2] 80206ce: 429a cmp r2, r3 80206d0: d301 bcc.n 80206d6 return ERR_OK; 80206d2: 2300 movs r3, #0 80206d4: e105 b.n 80208e2 } LWIP_ASSERT("split <= mss", split <= pcb->mss); 80206d6: 687b ldr r3, [r7, #4] 80206d8: 8e5b ldrh r3, [r3, #50] @ 0x32 80206da: 887a ldrh r2, [r7, #2] 80206dc: 429a cmp r2, r3 80206de: d906 bls.n 80206ee 80206e0: 4b82 ldr r3, [pc, #520] @ (80208ec ) 80206e2: f240 325b movw r2, #859 @ 0x35b 80206e6: 4985 ldr r1, [pc, #532] @ (80208fc ) 80206e8: 4882 ldr r0, [pc, #520] @ (80208f4 ) 80206ea: f00a f8d7 bl 802a89c LWIP_ASSERT("useg->len > 0", useg->len > 0); 80206ee: 697b ldr r3, [r7, #20] 80206f0: 891b ldrh r3, [r3, #8] 80206f2: 2b00 cmp r3, #0 80206f4: d106 bne.n 8020704 80206f6: 4b7d ldr r3, [pc, #500] @ (80208ec ) 80206f8: f44f 7257 mov.w r2, #860 @ 0x35c 80206fc: 4980 ldr r1, [pc, #512] @ (8020900 ) 80206fe: 487d ldr r0, [pc, #500] @ (80208f4 ) 8020700: f00a f8cc bl 802a89c * 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; 8020704: 697b ldr r3, [r7, #20] 8020706: 7b1b ldrb r3, [r3, #12] 8020708: 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); 802070a: 7bfb ldrb r3, [r7, #15] 802070c: 009b lsls r3, r3, #2 802070e: b2db uxtb r3, r3 8020710: f003 0304 and.w r3, r3, #4 8020714: 73bb strb r3, [r7, #14] remainder = useg->len - split; 8020716: 697b ldr r3, [r7, #20] 8020718: 891a ldrh r2, [r3, #8] 802071a: 887b ldrh r3, [r7, #2] 802071c: 1ad3 subs r3, r2, r3 802071e: 81bb strh r3, [r7, #12] /* Create new pbuf for the remainder of the split */ p = pbuf_alloc(PBUF_TRANSPORT, remainder + optlen, PBUF_RAM); 8020720: 7bbb ldrb r3, [r7, #14] 8020722: b29a uxth r2, r3 8020724: 89bb ldrh r3, [r7, #12] 8020726: 4413 add r3, r2 8020728: b29b uxth r3, r3 802072a: f44f 7220 mov.w r2, #640 @ 0x280 802072e: 4619 mov r1, r3 8020730: 2036 movs r0, #54 @ 0x36 8020732: f7fa fb25 bl 801ad80 8020736: 6138 str r0, [r7, #16] if (p == NULL) { 8020738: 693b ldr r3, [r7, #16] 802073a: 2b00 cmp r3, #0 802073c: f000 80ba beq.w 80208b4 ("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; 8020740: 697b ldr r3, [r7, #20] 8020742: 685b ldr r3, [r3, #4] 8020744: 891a ldrh r2, [r3, #8] 8020746: 697b ldr r3, [r7, #20] 8020748: 891b ldrh r3, [r3, #8] 802074a: 1ad3 subs r3, r2, r3 802074c: b29a uxth r2, r3 802074e: 887b ldrh r3, [r7, #2] 8020750: 4413 add r3, r2 8020752: 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) { 8020754: 697b ldr r3, [r7, #20] 8020756: 6858 ldr r0, [r3, #4] 8020758: 693b ldr r3, [r7, #16] 802075a: 685a ldr r2, [r3, #4] 802075c: 7bbb ldrb r3, [r7, #14] 802075e: 18d1 adds r1, r2, r3 8020760: 897b ldrh r3, [r7, #10] 8020762: 89ba ldrh r2, [r7, #12] 8020764: f7fb f828 bl 801b7b8 8020768: 4603 mov r3, r0 802076a: 461a mov r2, r3 802076c: 89bb ldrh r3, [r7, #12] 802076e: 4293 cmp r3, r2 8020770: f040 80a2 bne.w 80208b8 #endif /* TCP_CHECKSUM_ON_COPY */ /* Options are created when calling tcp_output() */ /* Migrate flags from original segment */ split_flags = TCPH_FLAGS(useg->tcphdr); 8020774: 697b ldr r3, [r7, #20] 8020776: 691b ldr r3, [r3, #16] 8020778: 899b ldrh r3, [r3, #12] 802077a: b29b uxth r3, r3 802077c: 4618 mov r0, r3 802077e: f7f9 f933 bl 80199e8 8020782: 4603 mov r3, r0 8020784: b2db uxtb r3, r3 8020786: f003 033f and.w r3, r3, #63 @ 0x3f 802078a: 77fb strb r3, [r7, #31] remainder_flags = 0; /* ACK added in tcp_output() */ 802078c: 2300 movs r3, #0 802078e: 77bb strb r3, [r7, #30] if (split_flags & TCP_PSH) { 8020790: 7ffb ldrb r3, [r7, #31] 8020792: f003 0308 and.w r3, r3, #8 8020796: 2b00 cmp r3, #0 8020798: d007 beq.n 80207aa split_flags &= ~TCP_PSH; 802079a: 7ffb ldrb r3, [r7, #31] 802079c: f023 0308 bic.w r3, r3, #8 80207a0: 77fb strb r3, [r7, #31] remainder_flags |= TCP_PSH; 80207a2: 7fbb ldrb r3, [r7, #30] 80207a4: f043 0308 orr.w r3, r3, #8 80207a8: 77bb strb r3, [r7, #30] } if (split_flags & TCP_FIN) { 80207aa: 7ffb ldrb r3, [r7, #31] 80207ac: f003 0301 and.w r3, r3, #1 80207b0: 2b00 cmp r3, #0 80207b2: d007 beq.n 80207c4 split_flags &= ~TCP_FIN; 80207b4: 7ffb ldrb r3, [r7, #31] 80207b6: f023 0301 bic.w r3, r3, #1 80207ba: 77fb strb r3, [r7, #31] remainder_flags |= TCP_FIN; 80207bc: 7fbb ldrb r3, [r7, #30] 80207be: f043 0301 orr.w r3, r3, #1 80207c2: 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); 80207c4: 697b ldr r3, [r7, #20] 80207c6: 691b ldr r3, [r3, #16] 80207c8: 685b ldr r3, [r3, #4] 80207ca: 4618 mov r0, r3 80207cc: f7f9 f921 bl 8019a12 80207d0: 4602 mov r2, r0 80207d2: 887b ldrh r3, [r7, #2] 80207d4: 18d1 adds r1, r2, r3 80207d6: 7fba ldrb r2, [r7, #30] 80207d8: 7bfb ldrb r3, [r7, #15] 80207da: 9300 str r3, [sp, #0] 80207dc: 460b mov r3, r1 80207de: 6939 ldr r1, [r7, #16] 80207e0: 6878 ldr r0, [r7, #4] 80207e2: f7ff f9f1 bl 801fbc8 80207e6: 61b8 str r0, [r7, #24] if (seg == NULL) { 80207e8: 69bb ldr r3, [r7, #24] 80207ea: 2b00 cmp r3, #0 80207ec: d066 beq.n 80208bc 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); 80207ee: 697b ldr r3, [r7, #20] 80207f0: 685b ldr r3, [r3, #4] 80207f2: 4618 mov r0, r3 80207f4: f7fa fe68 bl 801b4c8 80207f8: 4603 mov r3, r0 80207fa: 461a mov r2, r3 80207fc: 687b ldr r3, [r7, #4] 80207fe: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020802: 1a9b subs r3, r3, r2 8020804: b29a uxth r2, r3 8020806: 687b ldr r3, [r7, #4] 8020808: 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); 802080c: 697b ldr r3, [r7, #20] 802080e: 6858 ldr r0, [r3, #4] 8020810: 697b ldr r3, [r7, #20] 8020812: 685b ldr r3, [r3, #4] 8020814: 891a ldrh r2, [r3, #8] 8020816: 89bb ldrh r3, [r7, #12] 8020818: 1ad3 subs r3, r2, r3 802081a: b29b uxth r3, r3 802081c: 4619 mov r1, r3 802081e: f7fa fc0f bl 801b040 useg->len -= remainder; 8020822: 697b ldr r3, [r7, #20] 8020824: 891a ldrh r2, [r3, #8] 8020826: 89bb ldrh r3, [r7, #12] 8020828: 1ad3 subs r3, r2, r3 802082a: b29a uxth r2, r3 802082c: 697b ldr r3, [r7, #20] 802082e: 811a strh r2, [r3, #8] TCPH_SET_FLAG(useg->tcphdr, split_flags); 8020830: 697b ldr r3, [r7, #20] 8020832: 691b ldr r3, [r3, #16] 8020834: 899b ldrh r3, [r3, #12] 8020836: b29c uxth r4, r3 8020838: 7ffb ldrb r3, [r7, #31] 802083a: b29b uxth r3, r3 802083c: 4618 mov r0, r3 802083e: f7f9 f8d3 bl 80199e8 8020842: 4603 mov r3, r0 8020844: 461a mov r2, r3 8020846: 697b ldr r3, [r7, #20] 8020848: 691b ldr r3, [r3, #16] 802084a: 4322 orrs r2, r4 802084c: b292 uxth r2, r2 802084e: 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; 8020850: 697b ldr r3, [r7, #20] 8020852: 2200 movs r2, #0 8020854: 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); 8020856: 697b ldr r3, [r7, #20] 8020858: 685b ldr r3, [r3, #4] 802085a: 4618 mov r0, r3 802085c: f7fa fe34 bl 801b4c8 8020860: 4603 mov r3, r0 8020862: 461a mov r2, r3 8020864: 687b ldr r3, [r7, #4] 8020866: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 802086a: 4413 add r3, r2 802086c: b29a uxth r2, r3 802086e: 687b ldr r3, [r7, #4] 8020870: 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); 8020874: 69bb ldr r3, [r7, #24] 8020876: 685b ldr r3, [r3, #4] 8020878: 4618 mov r0, r3 802087a: f7fa fe25 bl 801b4c8 802087e: 4603 mov r3, r0 8020880: 461a mov r2, r3 8020882: 687b ldr r3, [r7, #4] 8020884: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020888: 4413 add r3, r2 802088a: b29a uxth r2, r3 802088c: 687b ldr r3, [r7, #4] 802088e: f8a3 2066 strh.w r2, [r3, #102] @ 0x66 /* Finally insert remainder into queue after split (which stays head) */ seg->next = useg->next; 8020892: 697b ldr r3, [r7, #20] 8020894: 681a ldr r2, [r3, #0] 8020896: 69bb ldr r3, [r7, #24] 8020898: 601a str r2, [r3, #0] useg->next = seg; 802089a: 697b ldr r3, [r7, #20] 802089c: 69ba ldr r2, [r7, #24] 802089e: 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) { 80208a0: 69bb ldr r3, [r7, #24] 80208a2: 681b ldr r3, [r3, #0] 80208a4: 2b00 cmp r3, #0 80208a6: d103 bne.n 80208b0 pcb->unsent_oversize = 0; 80208a8: 687b ldr r3, [r7, #4] 80208aa: 2200 movs r2, #0 80208ac: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } #endif /* TCP_OVERSIZE */ return ERR_OK; 80208b0: 2300 movs r3, #0 80208b2: e016 b.n 80208e2 goto memerr; 80208b4: bf00 nop 80208b6: e002 b.n 80208be goto memerr; 80208b8: bf00 nop 80208ba: e000 b.n 80208be goto memerr; 80208bc: bf00 nop memerr: TCP_STATS_INC(tcp.memerr); LWIP_ASSERT("seg == NULL", seg == NULL); 80208be: 69bb ldr r3, [r7, #24] 80208c0: 2b00 cmp r3, #0 80208c2: d006 beq.n 80208d2 80208c4: 4b09 ldr r3, [pc, #36] @ (80208ec ) 80208c6: f44f 7276 mov.w r2, #984 @ 0x3d8 80208ca: 490e ldr r1, [pc, #56] @ (8020904 ) 80208cc: 4809 ldr r0, [pc, #36] @ (80208f4 ) 80208ce: f009 ffe5 bl 802a89c if (p != NULL) { 80208d2: 693b ldr r3, [r7, #16] 80208d4: 2b00 cmp r3, #0 80208d6: d002 beq.n 80208de pbuf_free(p); 80208d8: 6938 ldr r0, [r7, #16] 80208da: f7fa fd67 bl 801b3ac } return ERR_MEM; 80208de: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 80208e2: 4618 mov r0, r3 80208e4: 3724 adds r7, #36 @ 0x24 80208e6: 46bd mov sp, r7 80208e8: bd90 pop {r4, r7, pc} 80208ea: bf00 nop 80208ec: 080301c0 .word 0x080301c0 80208f0: 080305b0 .word 0x080305b0 80208f4: 08030214 .word 0x08030214 80208f8: 080305d4 .word 0x080305d4 80208fc: 080305f8 .word 0x080305f8 8020900: 08030608 .word 0x08030608 8020904: 08030618 .word 0x08030618 08020908 : * @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) { 8020908: b590 push {r4, r7, lr} 802090a: b085 sub sp, #20 802090c: af00 add r7, sp, #0 802090e: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_send_fin: invalid pcb", pcb != NULL); 8020910: 687b ldr r3, [r7, #4] 8020912: 2b00 cmp r3, #0 8020914: d106 bne.n 8020924 8020916: 4b21 ldr r3, [pc, #132] @ (802099c ) 8020918: f240 32eb movw r2, #1003 @ 0x3eb 802091c: 4920 ldr r1, [pc, #128] @ (80209a0 ) 802091e: 4821 ldr r0, [pc, #132] @ (80209a4 ) 8020920: f009 ffbc bl 802a89c /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 8020924: 687b ldr r3, [r7, #4] 8020926: 6edb ldr r3, [r3, #108] @ 0x6c 8020928: 2b00 cmp r3, #0 802092a: d02e beq.n 802098a struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; 802092c: 687b ldr r3, [r7, #4] 802092e: 6edb ldr r3, [r3, #108] @ 0x6c 8020930: 60fb str r3, [r7, #12] 8020932: e002 b.n 802093a last_unsent = last_unsent->next); 8020934: 68fb ldr r3, [r7, #12] 8020936: 681b ldr r3, [r3, #0] 8020938: 60fb str r3, [r7, #12] for (last_unsent = pcb->unsent; last_unsent->next != NULL; 802093a: 68fb ldr r3, [r7, #12] 802093c: 681b ldr r3, [r3, #0] 802093e: 2b00 cmp r3, #0 8020940: d1f8 bne.n 8020934 if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 8020942: 68fb ldr r3, [r7, #12] 8020944: 691b ldr r3, [r3, #16] 8020946: 899b ldrh r3, [r3, #12] 8020948: b29b uxth r3, r3 802094a: 4618 mov r0, r3 802094c: f7f9 f84c bl 80199e8 8020950: 4603 mov r3, r0 8020952: b2db uxtb r3, r3 8020954: f003 0307 and.w r3, r3, #7 8020958: 2b00 cmp r3, #0 802095a: d116 bne.n 802098a /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); 802095c: 68fb ldr r3, [r7, #12] 802095e: 691b ldr r3, [r3, #16] 8020960: 899b ldrh r3, [r3, #12] 8020962: b29c uxth r4, r3 8020964: 2001 movs r0, #1 8020966: f7f9 f83f bl 80199e8 802096a: 4603 mov r3, r0 802096c: 461a mov r2, r3 802096e: 68fb ldr r3, [r7, #12] 8020970: 691b ldr r3, [r3, #16] 8020972: 4322 orrs r2, r4 8020974: b292 uxth r2, r2 8020976: 819a strh r2, [r3, #12] tcp_set_flags(pcb, TF_FIN); 8020978: 687b ldr r3, [r7, #4] 802097a: 8b5b ldrh r3, [r3, #26] 802097c: f043 0320 orr.w r3, r3, #32 8020980: b29a uxth r2, r3 8020982: 687b ldr r3, [r7, #4] 8020984: 835a strh r2, [r3, #26] return ERR_OK; 8020986: 2300 movs r3, #0 8020988: e004 b.n 8020994 } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 802098a: 2101 movs r1, #1 802098c: 6878 ldr r0, [r7, #4] 802098e: f000 f80b bl 80209a8 8020992: 4603 mov r3, r0 } 8020994: 4618 mov r0, r3 8020996: 3714 adds r7, #20 8020998: 46bd mov sp, r7 802099a: bd90 pop {r4, r7, pc} 802099c: 080301c0 .word 0x080301c0 80209a0: 08030624 .word 0x08030624 80209a4: 08030214 .word 0x08030214 080209a8 : * @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) { 80209a8: b580 push {r7, lr} 80209aa: b088 sub sp, #32 80209ac: af02 add r7, sp, #8 80209ae: 6078 str r0, [r7, #4] 80209b0: 460b mov r3, r1 80209b2: 70fb strb r3, [r7, #3] struct pbuf *p; struct tcp_seg *seg; u8_t optflags = 0; 80209b4: 2300 movs r3, #0 80209b6: 75fb strb r3, [r7, #23] u8_t optlen = 0; 80209b8: 2300 movs r3, #0 80209ba: 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)", 80209bc: 78fb ldrb r3, [r7, #3] 80209be: f003 0303 and.w r3, r3, #3 80209c2: 2b00 cmp r3, #0 80209c4: d106 bne.n 80209d4 80209c6: 4b67 ldr r3, [pc, #412] @ (8020b64 ) 80209c8: f240 4211 movw r2, #1041 @ 0x411 80209cc: 4966 ldr r1, [pc, #408] @ (8020b68 ) 80209ce: 4867 ldr r0, [pc, #412] @ (8020b6c ) 80209d0: f009 ff64 bl 802a89c (flags & (TCP_SYN | TCP_FIN)) != 0); LWIP_ASSERT("tcp_enqueue_flags: invalid pcb", pcb != NULL); 80209d4: 687b ldr r3, [r7, #4] 80209d6: 2b00 cmp r3, #0 80209d8: d106 bne.n 80209e8 80209da: 4b62 ldr r3, [pc, #392] @ (8020b64 ) 80209dc: f240 4213 movw r2, #1043 @ 0x413 80209e0: 4963 ldr r1, [pc, #396] @ (8020b70 ) 80209e2: 4862 ldr r0, [pc, #392] @ (8020b6c ) 80209e4: f009 ff5a bl 802a89c /* 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) { 80209e8: 78fb ldrb r3, [r7, #3] 80209ea: f003 0302 and.w r3, r3, #2 80209ee: 2b00 cmp r3, #0 80209f0: d001 beq.n 80209f6 optflags = TF_SEG_OPTS_MSS; 80209f2: 2301 movs r3, #1 80209f4: 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); 80209f6: 7dfb ldrb r3, [r7, #23] 80209f8: 009b lsls r3, r3, #2 80209fa: b2db uxtb r3, r3 80209fc: f003 0304 and.w r3, r3, #4 8020a00: 75bb strb r3, [r7, #22] /* Allocate pbuf with room for TCP header + options */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 8020a02: 7dbb ldrb r3, [r7, #22] 8020a04: b29b uxth r3, r3 8020a06: f44f 7220 mov.w r2, #640 @ 0x280 8020a0a: 4619 mov r1, r3 8020a0c: 2036 movs r0, #54 @ 0x36 8020a0e: f7fa f9b7 bl 801ad80 8020a12: 60f8 str r0, [r7, #12] 8020a14: 68fb ldr r3, [r7, #12] 8020a16: 2b00 cmp r3, #0 8020a18: d109 bne.n 8020a2e tcp_set_flags(pcb, TF_NAGLEMEMERR); 8020a1a: 687b ldr r3, [r7, #4] 8020a1c: 8b5b ldrh r3, [r3, #26] 8020a1e: f043 0380 orr.w r3, r3, #128 @ 0x80 8020a22: b29a uxth r2, r3 8020a24: 687b ldr r3, [r7, #4] 8020a26: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 8020a28: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8020a2c: e095 b.n 8020b5a } LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", 8020a2e: 68fb ldr r3, [r7, #12] 8020a30: 895a ldrh r2, [r3, #10] 8020a32: 7dbb ldrb r3, [r7, #22] 8020a34: b29b uxth r3, r3 8020a36: 429a cmp r2, r3 8020a38: d206 bcs.n 8020a48 8020a3a: 4b4a ldr r3, [pc, #296] @ (8020b64 ) 8020a3c: f240 4239 movw r2, #1081 @ 0x439 8020a40: 494c ldr r1, [pc, #304] @ (8020b74 ) 8020a42: 484a ldr r0, [pc, #296] @ (8020b6c ) 8020a44: f009 ff2a bl 802a89c (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) { 8020a48: 687b ldr r3, [r7, #4] 8020a4a: 6dd9 ldr r1, [r3, #92] @ 0x5c 8020a4c: 78fa ldrb r2, [r7, #3] 8020a4e: 7dfb ldrb r3, [r7, #23] 8020a50: 9300 str r3, [sp, #0] 8020a52: 460b mov r3, r1 8020a54: 68f9 ldr r1, [r7, #12] 8020a56: 6878 ldr r0, [r7, #4] 8020a58: f7ff f8b6 bl 801fbc8 8020a5c: 60b8 str r0, [r7, #8] 8020a5e: 68bb ldr r3, [r7, #8] 8020a60: 2b00 cmp r3, #0 8020a62: d109 bne.n 8020a78 tcp_set_flags(pcb, TF_NAGLEMEMERR); 8020a64: 687b ldr r3, [r7, #4] 8020a66: 8b5b ldrh r3, [r3, #26] 8020a68: f043 0380 orr.w r3, r3, #128 @ 0x80 8020a6c: b29a uxth r2, r3 8020a6e: 687b ldr r3, [r7, #4] 8020a70: 835a strh r2, [r3, #26] TCP_STATS_INC(tcp.memerr); return ERR_MEM; 8020a72: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8020a76: e070 b.n 8020b5a } LWIP_ASSERT("seg->tcphdr not aligned", ((mem_ptr_t)seg->tcphdr % LWIP_MIN(MEM_ALIGNMENT, 4)) == 0); 8020a78: 68bb ldr r3, [r7, #8] 8020a7a: 691b ldr r3, [r3, #16] 8020a7c: f003 0303 and.w r3, r3, #3 8020a80: 2b00 cmp r3, #0 8020a82: d006 beq.n 8020a92 8020a84: 4b37 ldr r3, [pc, #220] @ (8020b64 ) 8020a86: f240 4242 movw r2, #1090 @ 0x442 8020a8a: 493b ldr r1, [pc, #236] @ (8020b78 ) 8020a8c: 4837 ldr r0, [pc, #220] @ (8020b6c ) 8020a8e: f009 ff05 bl 802a89c LWIP_ASSERT("tcp_enqueue_flags: invalid segment length", seg->len == 0); 8020a92: 68bb ldr r3, [r7, #8] 8020a94: 891b ldrh r3, [r3, #8] 8020a96: 2b00 cmp r3, #0 8020a98: d006 beq.n 8020aa8 8020a9a: 4b32 ldr r3, [pc, #200] @ (8020b64 ) 8020a9c: f240 4243 movw r2, #1091 @ 0x443 8020aa0: 4936 ldr r1, [pc, #216] @ (8020b7c ) 8020aa2: 4832 ldr r0, [pc, #200] @ (8020b6c ) 8020aa4: f009 fefa bl 802a89c 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) { 8020aa8: 687b ldr r3, [r7, #4] 8020aaa: 6edb ldr r3, [r3, #108] @ 0x6c 8020aac: 2b00 cmp r3, #0 8020aae: d103 bne.n 8020ab8 pcb->unsent = seg; 8020ab0: 687b ldr r3, [r7, #4] 8020ab2: 68ba ldr r2, [r7, #8] 8020ab4: 66da str r2, [r3, #108] @ 0x6c 8020ab6: e00d b.n 8020ad4 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 8020ab8: 687b ldr r3, [r7, #4] 8020aba: 6edb ldr r3, [r3, #108] @ 0x6c 8020abc: 613b str r3, [r7, #16] 8020abe: e002 b.n 8020ac6 8020ac0: 693b ldr r3, [r7, #16] 8020ac2: 681b ldr r3, [r3, #0] 8020ac4: 613b str r3, [r7, #16] 8020ac6: 693b ldr r3, [r7, #16] 8020ac8: 681b ldr r3, [r3, #0] 8020aca: 2b00 cmp r3, #0 8020acc: d1f8 bne.n 8020ac0 useg->next = seg; 8020ace: 693b ldr r3, [r7, #16] 8020ad0: 68ba ldr r2, [r7, #8] 8020ad2: 601a str r2, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 8020ad4: 687b ldr r3, [r7, #4] 8020ad6: 2200 movs r2, #0 8020ad8: 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)) { 8020adc: 78fb ldrb r3, [r7, #3] 8020ade: f003 0302 and.w r3, r3, #2 8020ae2: 2b00 cmp r3, #0 8020ae4: d104 bne.n 8020af0 8020ae6: 78fb ldrb r3, [r7, #3] 8020ae8: f003 0301 and.w r3, r3, #1 8020aec: 2b00 cmp r3, #0 8020aee: d004 beq.n 8020afa pcb->snd_lbb++; 8020af0: 687b ldr r3, [r7, #4] 8020af2: 6ddb ldr r3, [r3, #92] @ 0x5c 8020af4: 1c5a adds r2, r3, #1 8020af6: 687b ldr r3, [r7, #4] 8020af8: 65da str r2, [r3, #92] @ 0x5c /* optlen does not influence snd_buf */ } if (flags & TCP_FIN) { 8020afa: 78fb ldrb r3, [r7, #3] 8020afc: f003 0301 and.w r3, r3, #1 8020b00: 2b00 cmp r3, #0 8020b02: d006 beq.n 8020b12 tcp_set_flags(pcb, TF_FIN); 8020b04: 687b ldr r3, [r7, #4] 8020b06: 8b5b ldrh r3, [r3, #26] 8020b08: f043 0320 orr.w r3, r3, #32 8020b0c: b29a uxth r2, r3 8020b0e: 687b ldr r3, [r7, #4] 8020b10: 835a strh r2, [r3, #26] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 8020b12: 68bb ldr r3, [r7, #8] 8020b14: 685b ldr r3, [r3, #4] 8020b16: 4618 mov r0, r3 8020b18: f7fa fcd6 bl 801b4c8 8020b1c: 4603 mov r3, r0 8020b1e: 461a mov r2, r3 8020b20: 687b ldr r3, [r7, #4] 8020b22: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020b26: 4413 add r3, r2 8020b28: b29a uxth r2, r3 8020b2a: 687b ldr r3, [r7, #4] 8020b2c: 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) { 8020b30: 687b ldr r3, [r7, #4] 8020b32: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020b36: 2b00 cmp r3, #0 8020b38: d00e beq.n 8020b58 LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", 8020b3a: 687b ldr r3, [r7, #4] 8020b3c: 6f1b ldr r3, [r3, #112] @ 0x70 8020b3e: 2b00 cmp r3, #0 8020b40: d10a bne.n 8020b58 8020b42: 687b ldr r3, [r7, #4] 8020b44: 6edb ldr r3, [r3, #108] @ 0x6c 8020b46: 2b00 cmp r3, #0 8020b48: d106 bne.n 8020b58 8020b4a: 4b06 ldr r3, [pc, #24] @ (8020b64 ) 8020b4c: f240 4265 movw r2, #1125 @ 0x465 8020b50: 490b ldr r1, [pc, #44] @ (8020b80 ) 8020b52: 4806 ldr r0, [pc, #24] @ (8020b6c ) 8020b54: f009 fea2 bl 802a89c pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; 8020b58: 2300 movs r3, #0 } 8020b5a: 4618 mov r0, r3 8020b5c: 3718 adds r7, #24 8020b5e: 46bd mov sp, r7 8020b60: bd80 pop {r7, pc} 8020b62: bf00 nop 8020b64: 080301c0 .word 0x080301c0 8020b68: 08030640 .word 0x08030640 8020b6c: 08030214 .word 0x08030214 8020b70: 08030698 .word 0x08030698 8020b74: 080306b8 .word 0x080306b8 8020b78: 080306f4 .word 0x080306f4 8020b7c: 0803070c .word 0x0803070c 8020b80: 08030738 .word 0x08030738 08020b84 : * @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) { 8020b84: b5b0 push {r4, r5, r7, lr} 8020b86: b08a sub sp, #40 @ 0x28 8020b88: af00 add r7, sp, #0 8020b8a: 6078 str r0, [r7, #4] struct netif *netif; #if TCP_CWND_DEBUG s16_t i = 0; #endif /* TCP_CWND_DEBUG */ LWIP_ASSERT_CORE_LOCKED(); 8020b8c: f7f0 fa5c bl 8011048 LWIP_ASSERT("tcp_output: invalid pcb", pcb != NULL); 8020b90: 687b ldr r3, [r7, #4] 8020b92: 2b00 cmp r3, #0 8020b94: d106 bne.n 8020ba4 8020b96: 4b8a ldr r3, [pc, #552] @ (8020dc0 ) 8020b98: f240 42e1 movw r2, #1249 @ 0x4e1 8020b9c: 4989 ldr r1, [pc, #548] @ (8020dc4 ) 8020b9e: 488a ldr r0, [pc, #552] @ (8020dc8 ) 8020ba0: f009 fe7c bl 802a89c /* pcb->state LISTEN not allowed here */ LWIP_ASSERT("don't call tcp_output for listen-pcbs", 8020ba4: 687b ldr r3, [r7, #4] 8020ba6: 7d1b ldrb r3, [r3, #20] 8020ba8: 2b01 cmp r3, #1 8020baa: d106 bne.n 8020bba 8020bac: 4b84 ldr r3, [pc, #528] @ (8020dc0 ) 8020bae: f240 42e3 movw r2, #1251 @ 0x4e3 8020bb2: 4986 ldr r1, [pc, #536] @ (8020dcc ) 8020bb4: 4884 ldr r0, [pc, #528] @ (8020dc8 ) 8020bb6: f009 fe71 bl 802a89c /* 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) { 8020bba: 4b85 ldr r3, [pc, #532] @ (8020dd0 ) 8020bbc: 681b ldr r3, [r3, #0] 8020bbe: 687a ldr r2, [r7, #4] 8020bc0: 429a cmp r2, r3 8020bc2: d101 bne.n 8020bc8 return ERR_OK; 8020bc4: 2300 movs r3, #0 8020bc6: e1d1 b.n 8020f6c } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 8020bc8: 687b ldr r3, [r7, #4] 8020bca: f8b3 2048 ldrh.w r2, [r3, #72] @ 0x48 8020bce: 687b ldr r3, [r7, #4] 8020bd0: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 8020bd4: 4293 cmp r3, r2 8020bd6: bf28 it cs 8020bd8: 4613 movcs r3, r2 8020bda: b29b uxth r3, r3 8020bdc: 61bb str r3, [r7, #24] seg = pcb->unsent; 8020bde: 687b ldr r3, [r7, #4] 8020be0: 6edb ldr r3, [r3, #108] @ 0x6c 8020be2: 627b str r3, [r7, #36] @ 0x24 if (seg == NULL) { 8020be4: 6a7b ldr r3, [r7, #36] @ 0x24 8020be6: 2b00 cmp r3, #0 8020be8: d10b bne.n 8020c02 ", 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) { 8020bea: 687b ldr r3, [r7, #4] 8020bec: 8b5b ldrh r3, [r3, #26] 8020bee: f003 0302 and.w r3, r3, #2 8020bf2: 2b00 cmp r3, #0 8020bf4: f000 81ad beq.w 8020f52 return tcp_send_empty_ack(pcb); 8020bf8: 6878 ldr r0, [r7, #4] 8020bfa: f000 fdd7 bl 80217ac 8020bfe: 4603 mov r3, r0 8020c00: e1b4 b.n 8020f6c 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); 8020c02: 6879 ldr r1, [r7, #4] 8020c04: 687b ldr r3, [r7, #4] 8020c06: 3304 adds r3, #4 8020c08: 461a mov r2, r3 8020c0a: 6878 ldr r0, [r7, #4] 8020c0c: f7fe ffc0 bl 801fb90 8020c10: 6178 str r0, [r7, #20] if (netif == NULL) { 8020c12: 697b ldr r3, [r7, #20] 8020c14: 2b00 cmp r3, #0 8020c16: d102 bne.n 8020c1e return ERR_RTE; 8020c18: f06f 0303 mvn.w r3, #3 8020c1c: e1a6 b.n 8020f6c } /* If we don't have a local IP address, we get one from netif */ if (ip_addr_isany(&pcb->local_ip)) { 8020c1e: 687b ldr r3, [r7, #4] 8020c20: 2b00 cmp r3, #0 8020c22: d003 beq.n 8020c2c 8020c24: 687b ldr r3, [r7, #4] 8020c26: 681b ldr r3, [r3, #0] 8020c28: 2b00 cmp r3, #0 8020c2a: d111 bne.n 8020c50 const ip_addr_t *local_ip = ip_netif_get_local_ip(netif, &pcb->remote_ip); 8020c2c: 697b ldr r3, [r7, #20] 8020c2e: 2b00 cmp r3, #0 8020c30: d002 beq.n 8020c38 8020c32: 697b ldr r3, [r7, #20] 8020c34: 3304 adds r3, #4 8020c36: e000 b.n 8020c3a 8020c38: 2300 movs r3, #0 8020c3a: 613b str r3, [r7, #16] if (local_ip == NULL) { 8020c3c: 693b ldr r3, [r7, #16] 8020c3e: 2b00 cmp r3, #0 8020c40: d102 bne.n 8020c48 return ERR_RTE; 8020c42: f06f 0303 mvn.w r3, #3 8020c46: e191 b.n 8020f6c } ip_addr_copy(pcb->local_ip, *local_ip); 8020c48: 693b ldr r3, [r7, #16] 8020c4a: 681a ldr r2, [r3, #0] 8020c4c: 687b ldr r3, [r7, #4] 8020c4e: 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) { 8020c50: 6a7b ldr r3, [r7, #36] @ 0x24 8020c52: 691b ldr r3, [r3, #16] 8020c54: 685b ldr r3, [r3, #4] 8020c56: 4618 mov r0, r3 8020c58: f7f8 fedb bl 8019a12 8020c5c: 4602 mov r2, r0 8020c5e: 687b ldr r3, [r7, #4] 8020c60: 6c5b ldr r3, [r3, #68] @ 0x44 8020c62: 1ad3 subs r3, r2, r3 8020c64: 6a7a ldr r2, [r7, #36] @ 0x24 8020c66: 8912 ldrh r2, [r2, #8] 8020c68: 4413 add r3, r2 8020c6a: 69ba ldr r2, [r7, #24] 8020c6c: 429a cmp r2, r3 8020c6e: d227 bcs.n 8020cc0 * 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) { 8020c70: 687b ldr r3, [r7, #4] 8020c72: f8b3 3060 ldrh.w r3, [r3, #96] @ 0x60 8020c76: 461a mov r2, r3 8020c78: 69bb ldr r3, [r7, #24] 8020c7a: 4293 cmp r3, r2 8020c7c: d114 bne.n 8020ca8 8020c7e: 687b ldr r3, [r7, #4] 8020c80: 6f1b ldr r3, [r3, #112] @ 0x70 8020c82: 2b00 cmp r3, #0 8020c84: d110 bne.n 8020ca8 8020c86: 687b ldr r3, [r7, #4] 8020c88: f893 3099 ldrb.w r3, [r3, #153] @ 0x99 8020c8c: 2b00 cmp r3, #0 8020c8e: d10b bne.n 8020ca8 pcb->persist_cnt = 0; 8020c90: 687b ldr r3, [r7, #4] 8020c92: 2200 movs r2, #0 8020c94: f883 2098 strb.w r2, [r3, #152] @ 0x98 pcb->persist_backoff = 1; 8020c98: 687b ldr r3, [r7, #4] 8020c9a: 2201 movs r2, #1 8020c9c: f883 2099 strb.w r2, [r3, #153] @ 0x99 pcb->persist_probe = 0; 8020ca0: 687b ldr r3, [r7, #4] 8020ca2: 2200 movs r2, #0 8020ca4: 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) { 8020ca8: 687b ldr r3, [r7, #4] 8020caa: 8b5b ldrh r3, [r3, #26] 8020cac: f003 0302 and.w r3, r3, #2 8020cb0: 2b00 cmp r3, #0 8020cb2: f000 8150 beq.w 8020f56 return tcp_send_empty_ack(pcb); 8020cb6: 6878 ldr r0, [r7, #4] 8020cb8: f000 fd78 bl 80217ac 8020cbc: 4603 mov r3, r0 8020cbe: e155 b.n 8020f6c } goto output_done; } /* Stop persist timer, above conditions are not active */ pcb->persist_backoff = 0; 8020cc0: 687b ldr r3, [r7, #4] 8020cc2: 2200 movs r2, #0 8020cc4: f883 2099 strb.w r2, [r3, #153] @ 0x99 /* useg should point to last segment on unacked queue */ useg = pcb->unacked; 8020cc8: 687b ldr r3, [r7, #4] 8020cca: 6f1b ldr r3, [r3, #112] @ 0x70 8020ccc: 623b str r3, [r7, #32] if (useg != NULL) { 8020cce: 6a3b ldr r3, [r7, #32] 8020cd0: 2b00 cmp r3, #0 8020cd2: f000 811f beq.w 8020f14 for (; useg->next != NULL; useg = useg->next); 8020cd6: e002 b.n 8020cde 8020cd8: 6a3b ldr r3, [r7, #32] 8020cda: 681b ldr r3, [r3, #0] 8020cdc: 623b str r3, [r7, #32] 8020cde: 6a3b ldr r3, [r7, #32] 8020ce0: 681b ldr r3, [r3, #0] 8020ce2: 2b00 cmp r3, #0 8020ce4: d1f8 bne.n 8020cd8 } /* data available and window allows it to be sent? */ while (seg != NULL && 8020ce6: e115 b.n 8020f14 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { LWIP_ASSERT("RST not expected here!", 8020ce8: 6a7b ldr r3, [r7, #36] @ 0x24 8020cea: 691b ldr r3, [r3, #16] 8020cec: 899b ldrh r3, [r3, #12] 8020cee: b29b uxth r3, r3 8020cf0: 4618 mov r0, r3 8020cf2: f7f8 fe79 bl 80199e8 8020cf6: 4603 mov r3, r0 8020cf8: b2db uxtb r3, r3 8020cfa: f003 0304 and.w r3, r3, #4 8020cfe: 2b00 cmp r3, #0 8020d00: d006 beq.n 8020d10 8020d02: 4b2f ldr r3, [pc, #188] @ (8020dc0 ) 8020d04: f240 5236 movw r2, #1334 @ 0x536 8020d08: 4932 ldr r1, [pc, #200] @ (8020dd4 ) 8020d0a: 482f ldr r0, [pc, #188] @ (8020dc8 ) 8020d0c: f009 fdc6 bl 802a89c * - 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) && 8020d10: 687b ldr r3, [r7, #4] 8020d12: 6f1b ldr r3, [r3, #112] @ 0x70 8020d14: 2b00 cmp r3, #0 8020d16: d01f beq.n 8020d58 8020d18: 687b ldr r3, [r7, #4] 8020d1a: 8b5b ldrh r3, [r3, #26] 8020d1c: f003 0344 and.w r3, r3, #68 @ 0x44 8020d20: 2b00 cmp r3, #0 8020d22: d119 bne.n 8020d58 8020d24: 687b ldr r3, [r7, #4] 8020d26: 6edb ldr r3, [r3, #108] @ 0x6c 8020d28: 2b00 cmp r3, #0 8020d2a: d00b beq.n 8020d44 8020d2c: 687b ldr r3, [r7, #4] 8020d2e: 6edb ldr r3, [r3, #108] @ 0x6c 8020d30: 681b ldr r3, [r3, #0] 8020d32: 2b00 cmp r3, #0 8020d34: d110 bne.n 8020d58 8020d36: 687b ldr r3, [r7, #4] 8020d38: 6edb ldr r3, [r3, #108] @ 0x6c 8020d3a: 891a ldrh r2, [r3, #8] 8020d3c: 687b ldr r3, [r7, #4] 8020d3e: 8e5b ldrh r3, [r3, #50] @ 0x32 8020d40: 429a cmp r2, r3 8020d42: d209 bcs.n 8020d58 8020d44: 687b ldr r3, [r7, #4] 8020d46: f8b3 3064 ldrh.w r3, [r3, #100] @ 0x64 8020d4a: 2b00 cmp r3, #0 8020d4c: d004 beq.n 8020d58 8020d4e: 687b ldr r3, [r7, #4] 8020d50: f8b3 3066 ldrh.w r3, [r3, #102] @ 0x66 8020d54: 2b0f cmp r3, #15 8020d56: d901 bls.n 8020d5c 8020d58: 2301 movs r3, #1 8020d5a: e000 b.n 8020d5e 8020d5c: 2300 movs r3, #0 8020d5e: 2b00 cmp r3, #0 8020d60: d106 bne.n 8020d70 ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)) { 8020d62: 687b ldr r3, [r7, #4] 8020d64: 8b5b ldrh r3, [r3, #26] 8020d66: f003 03a0 and.w r3, r3, #160 @ 0xa0 if ((tcp_do_output_nagle(pcb) == 0) && 8020d6a: 2b00 cmp r3, #0 8020d6c: f000 80e7 beq.w 8020f3e pcb->lastack, lwip_ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ if (pcb->state != SYN_SENT) { 8020d70: 687b ldr r3, [r7, #4] 8020d72: 7d1b ldrb r3, [r3, #20] 8020d74: 2b02 cmp r3, #2 8020d76: d00d beq.n 8020d94 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 8020d78: 6a7b ldr r3, [r7, #36] @ 0x24 8020d7a: 691b ldr r3, [r3, #16] 8020d7c: 899b ldrh r3, [r3, #12] 8020d7e: b29c uxth r4, r3 8020d80: 2010 movs r0, #16 8020d82: f7f8 fe31 bl 80199e8 8020d86: 4603 mov r3, r0 8020d88: 461a mov r2, r3 8020d8a: 6a7b ldr r3, [r7, #36] @ 0x24 8020d8c: 691b ldr r3, [r3, #16] 8020d8e: 4322 orrs r2, r4 8020d90: b292 uxth r2, r2 8020d92: 819a strh r2, [r3, #12] } err = tcp_output_segment(seg, pcb, netif); 8020d94: 697a ldr r2, [r7, #20] 8020d96: 6879 ldr r1, [r7, #4] 8020d98: 6a78 ldr r0, [r7, #36] @ 0x24 8020d9a: f000 f90b bl 8020fb4 8020d9e: 4603 mov r3, r0 8020da0: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 8020da2: f997 300f ldrsb.w r3, [r7, #15] 8020da6: 2b00 cmp r3, #0 8020da8: d016 beq.n 8020dd8 /* segment could not be sent, for whatever reason */ tcp_set_flags(pcb, TF_NAGLEMEMERR); 8020daa: 687b ldr r3, [r7, #4] 8020dac: 8b5b ldrh r3, [r3, #26] 8020dae: f043 0380 orr.w r3, r3, #128 @ 0x80 8020db2: b29a uxth r2, r3 8020db4: 687b ldr r3, [r7, #4] 8020db6: 835a strh r2, [r3, #26] return err; 8020db8: f997 300f ldrsb.w r3, [r7, #15] 8020dbc: e0d6 b.n 8020f6c 8020dbe: bf00 nop 8020dc0: 080301c0 .word 0x080301c0 8020dc4: 08030760 .word 0x08030760 8020dc8: 08030214 .word 0x08030214 8020dcc: 08030778 .word 0x08030778 8020dd0: 2402afc8 .word 0x2402afc8 8020dd4: 080307a0 .word 0x080307a0 } #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; 8020dd8: 6a7b ldr r3, [r7, #36] @ 0x24 8020dda: 2200 movs r2, #0 8020ddc: 815a strh r2, [r3, #10] #endif /* TCP_OVERSIZE_DBGCHECK */ pcb->unsent = seg->next; 8020dde: 6a7b ldr r3, [r7, #36] @ 0x24 8020de0: 681a ldr r2, [r3, #0] 8020de2: 687b ldr r3, [r7, #4] 8020de4: 66da str r2, [r3, #108] @ 0x6c if (pcb->state != SYN_SENT) { 8020de6: 687b ldr r3, [r7, #4] 8020de8: 7d1b ldrb r3, [r3, #20] 8020dea: 2b02 cmp r3, #2 8020dec: d006 beq.n 8020dfc tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8020dee: 687b ldr r3, [r7, #4] 8020df0: 8b5b ldrh r3, [r3, #26] 8020df2: f023 0303 bic.w r3, r3, #3 8020df6: b29a uxth r2, r3 8020df8: 687b ldr r3, [r7, #4] 8020dfa: 835a strh r2, [r3, #26] } snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 8020dfc: 6a7b ldr r3, [r7, #36] @ 0x24 8020dfe: 691b ldr r3, [r3, #16] 8020e00: 685b ldr r3, [r3, #4] 8020e02: 4618 mov r0, r3 8020e04: f7f8 fe05 bl 8019a12 8020e08: 4604 mov r4, r0 8020e0a: 6a7b ldr r3, [r7, #36] @ 0x24 8020e0c: 891b ldrh r3, [r3, #8] 8020e0e: 461d mov r5, r3 8020e10: 6a7b ldr r3, [r7, #36] @ 0x24 8020e12: 691b ldr r3, [r3, #16] 8020e14: 899b ldrh r3, [r3, #12] 8020e16: b29b uxth r3, r3 8020e18: 4618 mov r0, r3 8020e1a: f7f8 fde5 bl 80199e8 8020e1e: 4603 mov r3, r0 8020e20: b2db uxtb r3, r3 8020e22: f003 0303 and.w r3, r3, #3 8020e26: 2b00 cmp r3, #0 8020e28: d001 beq.n 8020e2e 8020e2a: 2301 movs r3, #1 8020e2c: e000 b.n 8020e30 8020e2e: 2300 movs r3, #0 8020e30: 442b add r3, r5 8020e32: 4423 add r3, r4 8020e34: 60bb str r3, [r7, #8] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 8020e36: 687b ldr r3, [r7, #4] 8020e38: 6d1a ldr r2, [r3, #80] @ 0x50 8020e3a: 68bb ldr r3, [r7, #8] 8020e3c: 1ad3 subs r3, r2, r3 8020e3e: 2b00 cmp r3, #0 8020e40: da02 bge.n 8020e48 pcb->snd_nxt = snd_nxt; 8020e42: 687b ldr r3, [r7, #4] 8020e44: 68ba ldr r2, [r7, #8] 8020e46: 651a str r2, [r3, #80] @ 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 8020e48: 6a7b ldr r3, [r7, #36] @ 0x24 8020e4a: 891b ldrh r3, [r3, #8] 8020e4c: 461c mov r4, r3 8020e4e: 6a7b ldr r3, [r7, #36] @ 0x24 8020e50: 691b ldr r3, [r3, #16] 8020e52: 899b ldrh r3, [r3, #12] 8020e54: b29b uxth r3, r3 8020e56: 4618 mov r0, r3 8020e58: f7f8 fdc6 bl 80199e8 8020e5c: 4603 mov r3, r0 8020e5e: b2db uxtb r3, r3 8020e60: f003 0303 and.w r3, r3, #3 8020e64: 2b00 cmp r3, #0 8020e66: d001 beq.n 8020e6c 8020e68: 2301 movs r3, #1 8020e6a: e000 b.n 8020e6e 8020e6c: 2300 movs r3, #0 8020e6e: 4423 add r3, r4 8020e70: 2b00 cmp r3, #0 8020e72: d049 beq.n 8020f08 seg->next = NULL; 8020e74: 6a7b ldr r3, [r7, #36] @ 0x24 8020e76: 2200 movs r2, #0 8020e78: 601a str r2, [r3, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 8020e7a: 687b ldr r3, [r7, #4] 8020e7c: 6f1b ldr r3, [r3, #112] @ 0x70 8020e7e: 2b00 cmp r3, #0 8020e80: d105 bne.n 8020e8e pcb->unacked = seg; 8020e82: 687b ldr r3, [r7, #4] 8020e84: 6a7a ldr r2, [r7, #36] @ 0x24 8020e86: 671a str r2, [r3, #112] @ 0x70 useg = seg; 8020e88: 6a7b ldr r3, [r7, #36] @ 0x24 8020e8a: 623b str r3, [r7, #32] 8020e8c: e03f b.n 8020f0e /* 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))) { 8020e8e: 6a7b ldr r3, [r7, #36] @ 0x24 8020e90: 691b ldr r3, [r3, #16] 8020e92: 685b ldr r3, [r3, #4] 8020e94: 4618 mov r0, r3 8020e96: f7f8 fdbc bl 8019a12 8020e9a: 4604 mov r4, r0 8020e9c: 6a3b ldr r3, [r7, #32] 8020e9e: 691b ldr r3, [r3, #16] 8020ea0: 685b ldr r3, [r3, #4] 8020ea2: 4618 mov r0, r3 8020ea4: f7f8 fdb5 bl 8019a12 8020ea8: 4603 mov r3, r0 8020eaa: 1ae3 subs r3, r4, r3 8020eac: 2b00 cmp r3, #0 8020eae: da24 bge.n 8020efa /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 8020eb0: 687b ldr r3, [r7, #4] 8020eb2: 3370 adds r3, #112 @ 0x70 8020eb4: 61fb str r3, [r7, #28] while (*cur_seg && 8020eb6: e002 b.n 8020ebe TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 8020eb8: 69fb ldr r3, [r7, #28] 8020eba: 681b ldr r3, [r3, #0] 8020ebc: 61fb str r3, [r7, #28] while (*cur_seg && 8020ebe: 69fb ldr r3, [r7, #28] 8020ec0: 681b ldr r3, [r3, #0] 8020ec2: 2b00 cmp r3, #0 8020ec4: d011 beq.n 8020eea TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 8020ec6: 69fb ldr r3, [r7, #28] 8020ec8: 681b ldr r3, [r3, #0] 8020eca: 691b ldr r3, [r3, #16] 8020ecc: 685b ldr r3, [r3, #4] 8020ece: 4618 mov r0, r3 8020ed0: f7f8 fd9f bl 8019a12 8020ed4: 4604 mov r4, r0 8020ed6: 6a7b ldr r3, [r7, #36] @ 0x24 8020ed8: 691b ldr r3, [r3, #16] 8020eda: 685b ldr r3, [r3, #4] 8020edc: 4618 mov r0, r3 8020ede: f7f8 fd98 bl 8019a12 8020ee2: 4603 mov r3, r0 8020ee4: 1ae3 subs r3, r4, r3 while (*cur_seg && 8020ee6: 2b00 cmp r3, #0 8020ee8: dbe6 blt.n 8020eb8 } seg->next = (*cur_seg); 8020eea: 69fb ldr r3, [r7, #28] 8020eec: 681a ldr r2, [r3, #0] 8020eee: 6a7b ldr r3, [r7, #36] @ 0x24 8020ef0: 601a str r2, [r3, #0] (*cur_seg) = seg; 8020ef2: 69fb ldr r3, [r7, #28] 8020ef4: 6a7a ldr r2, [r7, #36] @ 0x24 8020ef6: 601a str r2, [r3, #0] 8020ef8: e009 b.n 8020f0e } else { /* add segment to tail of unacked list */ useg->next = seg; 8020efa: 6a3b ldr r3, [r7, #32] 8020efc: 6a7a ldr r2, [r7, #36] @ 0x24 8020efe: 601a str r2, [r3, #0] useg = useg->next; 8020f00: 6a3b ldr r3, [r7, #32] 8020f02: 681b ldr r3, [r3, #0] 8020f04: 623b str r3, [r7, #32] 8020f06: e002 b.n 8020f0e } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 8020f08: 6a78 ldr r0, [r7, #36] @ 0x24 8020f0a: f7fb fea8 bl 801cc5e } seg = pcb->unsent; 8020f0e: 687b ldr r3, [r7, #4] 8020f10: 6edb ldr r3, [r3, #108] @ 0x6c 8020f12: 627b str r3, [r7, #36] @ 0x24 while (seg != NULL && 8020f14: 6a7b ldr r3, [r7, #36] @ 0x24 8020f16: 2b00 cmp r3, #0 8020f18: d012 beq.n 8020f40 lwip_ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { 8020f1a: 6a7b ldr r3, [r7, #36] @ 0x24 8020f1c: 691b ldr r3, [r3, #16] 8020f1e: 685b ldr r3, [r3, #4] 8020f20: 4618 mov r0, r3 8020f22: f7f8 fd76 bl 8019a12 8020f26: 4602 mov r2, r0 8020f28: 687b ldr r3, [r7, #4] 8020f2a: 6c5b ldr r3, [r3, #68] @ 0x44 8020f2c: 1ad3 subs r3, r2, r3 8020f2e: 6a7a ldr r2, [r7, #36] @ 0x24 8020f30: 8912 ldrh r2, [r2, #8] 8020f32: 4413 add r3, r2 while (seg != NULL && 8020f34: 69ba ldr r2, [r7, #24] 8020f36: 429a cmp r2, r3 8020f38: f4bf aed6 bcs.w 8020ce8 8020f3c: e000 b.n 8020f40 break; 8020f3e: bf00 nop } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 8020f40: 687b ldr r3, [r7, #4] 8020f42: 6edb ldr r3, [r3, #108] @ 0x6c 8020f44: 2b00 cmp r3, #0 8020f46: d108 bne.n 8020f5a /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 8020f48: 687b ldr r3, [r7, #4] 8020f4a: 2200 movs r2, #0 8020f4c: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 8020f50: e004 b.n 8020f5c goto output_done; 8020f52: bf00 nop 8020f54: e002 b.n 8020f5c goto output_done; 8020f56: bf00 nop 8020f58: e000 b.n 8020f5c } #endif /* TCP_OVERSIZE */ output_done: 8020f5a: bf00 nop tcp_clear_flags(pcb, TF_NAGLEMEMERR); 8020f5c: 687b ldr r3, [r7, #4] 8020f5e: 8b5b ldrh r3, [r3, #26] 8020f60: f023 0380 bic.w r3, r3, #128 @ 0x80 8020f64: b29a uxth r2, r3 8020f66: 687b ldr r3, [r7, #4] 8020f68: 835a strh r2, [r3, #26] return ERR_OK; 8020f6a: 2300 movs r3, #0 } 8020f6c: 4618 mov r0, r3 8020f6e: 3728 adds r7, #40 @ 0x28 8020f70: 46bd mov sp, r7 8020f72: bdb0 pop {r4, r5, r7, pc} 08020f74 : * @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) { 8020f74: b580 push {r7, lr} 8020f76: b082 sub sp, #8 8020f78: af00 add r7, sp, #0 8020f7a: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_output_segment_busy: invalid seg", seg != NULL); 8020f7c: 687b ldr r3, [r7, #4] 8020f7e: 2b00 cmp r3, #0 8020f80: d106 bne.n 8020f90 8020f82: 4b09 ldr r3, [pc, #36] @ (8020fa8 ) 8020f84: f240 529a movw r2, #1434 @ 0x59a 8020f88: 4908 ldr r1, [pc, #32] @ (8020fac ) 8020f8a: 4809 ldr r0, [pc, #36] @ (8020fb0 ) 8020f8c: f009 fc86 bl 802a89c /* 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) { 8020f90: 687b ldr r3, [r7, #4] 8020f92: 685b ldr r3, [r3, #4] 8020f94: 7b9b ldrb r3, [r3, #14] 8020f96: 2b01 cmp r3, #1 8020f98: d001 beq.n 8020f9e /* other reference found */ return 1; 8020f9a: 2301 movs r3, #1 8020f9c: e000 b.n 8020fa0 } /* no other references found */ return 0; 8020f9e: 2300 movs r3, #0 } 8020fa0: 4618 mov r0, r3 8020fa2: 3708 adds r7, #8 8020fa4: 46bd mov sp, r7 8020fa6: bd80 pop {r7, pc} 8020fa8: 080301c0 .word 0x080301c0 8020fac: 080307b8 .word 0x080307b8 8020fb0: 08030214 .word 0x08030214 08020fb4 : * @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) { 8020fb4: b5b0 push {r4, r5, r7, lr} 8020fb6: b08c sub sp, #48 @ 0x30 8020fb8: af04 add r7, sp, #16 8020fba: 60f8 str r0, [r7, #12] 8020fbc: 60b9 str r1, [r7, #8] 8020fbe: 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); 8020fc0: 68fb ldr r3, [r7, #12] 8020fc2: 2b00 cmp r3, #0 8020fc4: d106 bne.n 8020fd4 8020fc6: 4b64 ldr r3, [pc, #400] @ (8021158 ) 8020fc8: f44f 62b7 mov.w r2, #1464 @ 0x5b8 8020fcc: 4963 ldr r1, [pc, #396] @ (802115c ) 8020fce: 4864 ldr r0, [pc, #400] @ (8021160 ) 8020fd0: f009 fc64 bl 802a89c LWIP_ASSERT("tcp_output_segment: invalid pcb", pcb != NULL); 8020fd4: 68bb ldr r3, [r7, #8] 8020fd6: 2b00 cmp r3, #0 8020fd8: d106 bne.n 8020fe8 8020fda: 4b5f ldr r3, [pc, #380] @ (8021158 ) 8020fdc: f240 52b9 movw r2, #1465 @ 0x5b9 8020fe0: 4960 ldr r1, [pc, #384] @ (8021164 ) 8020fe2: 485f ldr r0, [pc, #380] @ (8021160 ) 8020fe4: f009 fc5a bl 802a89c LWIP_ASSERT("tcp_output_segment: invalid netif", netif != NULL); 8020fe8: 687b ldr r3, [r7, #4] 8020fea: 2b00 cmp r3, #0 8020fec: d106 bne.n 8020ffc 8020fee: 4b5a ldr r3, [pc, #360] @ (8021158 ) 8020ff0: f240 52ba movw r2, #1466 @ 0x5ba 8020ff4: 495c ldr r1, [pc, #368] @ (8021168 ) 8020ff6: 485a ldr r0, [pc, #360] @ (8021160 ) 8020ff8: f009 fc50 bl 802a89c if (tcp_output_segment_busy(seg)) { 8020ffc: 68f8 ldr r0, [r7, #12] 8020ffe: f7ff ffb9 bl 8020f74 8021002: 4603 mov r3, r0 8021004: 2b00 cmp r3, #0 8021006: d001 beq.n 802100c /* 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; 8021008: 2300 movs r3, #0 802100a: e0a1 b.n 8021150 } /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = lwip_htonl(pcb->rcv_nxt); 802100c: 68bb ldr r3, [r7, #8] 802100e: 6a5a ldr r2, [r3, #36] @ 0x24 8021010: 68fb ldr r3, [r7, #12] 8021012: 691c ldr r4, [r3, #16] 8021014: 4610 mov r0, r2 8021016: f7f8 fcfc bl 8019a12 802101a: 4603 mov r3, r0 802101c: 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))); 802101e: 68bb ldr r3, [r7, #8] 8021020: 8d5a ldrh r2, [r3, #42] @ 0x2a 8021022: 68fb ldr r3, [r7, #12] 8021024: 691c ldr r4, [r3, #16] 8021026: 4610 mov r0, r2 8021028: f7f8 fcde bl 80199e8 802102c: 4603 mov r3, r0 802102e: 81e3 strh r3, [r4, #14] } pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8021030: 68bb ldr r3, [r7, #8] 8021032: 6a5b ldr r3, [r3, #36] @ 0x24 8021034: 68ba ldr r2, [r7, #8] 8021036: 8d52 ldrh r2, [r2, #42] @ 0x2a 8021038: 441a add r2, r3 802103a: 68bb ldr r3, [r7, #8] 802103c: 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); 802103e: 68fb ldr r3, [r7, #12] 8021040: 691b ldr r3, [r3, #16] 8021042: 3314 adds r3, #20 8021044: 61fb str r3, [r7, #28] if (seg->flags & TF_SEG_OPTS_MSS) { 8021046: 68fb ldr r3, [r7, #12] 8021048: 7b1b ldrb r3, [r3, #12] 802104a: f003 0301 and.w r3, r3, #1 802104e: 2b00 cmp r3, #0 8021050: d015 beq.n 802107e u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss_netif(TCP_MSS, netif, &pcb->remote_ip); 8021052: 68bb ldr r3, [r7, #8] 8021054: 3304 adds r3, #4 8021056: 461a mov r2, r3 8021058: 6879 ldr r1, [r7, #4] 802105a: f240 50b4 movw r0, #1460 @ 0x5b4 802105e: f7fc f9cd bl 801d3fc 8021062: 4603 mov r3, r0 8021064: 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); 8021066: 8b7b ldrh r3, [r7, #26] 8021068: f043 7301 orr.w r3, r3, #33816576 @ 0x2040000 802106c: 4618 mov r0, r3 802106e: f7f8 fcd0 bl 8019a12 8021072: 4602 mov r2, r0 8021074: 69fb ldr r3, [r7, #28] 8021076: 601a str r2, [r3, #0] opts += 1; 8021078: 69fb ldr r3, [r7, #28] 802107a: 3304 adds r3, #4 802107c: 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) { 802107e: 68bb ldr r3, [r7, #8] 8021080: f9b3 3030 ldrsh.w r3, [r3, #48] @ 0x30 8021084: 2b00 cmp r3, #0 8021086: da02 bge.n 802108e pcb->rtime = 0; 8021088: 68bb ldr r3, [r7, #8] 802108a: 2200 movs r2, #0 802108c: 861a strh r2, [r3, #48] @ 0x30 } if (pcb->rttest == 0) { 802108e: 68bb ldr r3, [r7, #8] 8021090: 6b5b ldr r3, [r3, #52] @ 0x34 8021092: 2b00 cmp r3, #0 8021094: d10c bne.n 80210b0 pcb->rttest = tcp_ticks; 8021096: 4b35 ldr r3, [pc, #212] @ (802116c ) 8021098: 681a ldr r2, [r3, #0] 802109a: 68bb ldr r3, [r7, #8] 802109c: 635a str r2, [r3, #52] @ 0x34 pcb->rtseq = lwip_ntohl(seg->tcphdr->seqno); 802109e: 68fb ldr r3, [r7, #12] 80210a0: 691b ldr r3, [r3, #16] 80210a2: 685b ldr r3, [r3, #4] 80210a4: 4618 mov r0, r3 80210a6: f7f8 fcb4 bl 8019a12 80210aa: 4602 mov r2, r0 80210ac: 68bb ldr r3, [r7, #8] 80210ae: 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); 80210b0: 68fb ldr r3, [r7, #12] 80210b2: 691a ldr r2, [r3, #16] 80210b4: 68fb ldr r3, [r7, #12] 80210b6: 685b ldr r3, [r3, #4] 80210b8: 685b ldr r3, [r3, #4] 80210ba: 1ad3 subs r3, r2, r3 80210bc: 833b strh r3, [r7, #24] if (len == 0) { /** Exclude retransmitted segments from this count. */ MIB2_STATS_INC(mib2.tcpoutsegs); } seg->p->len -= len; 80210be: 68fb ldr r3, [r7, #12] 80210c0: 685b ldr r3, [r3, #4] 80210c2: 8959 ldrh r1, [r3, #10] 80210c4: 68fb ldr r3, [r7, #12] 80210c6: 685b ldr r3, [r3, #4] 80210c8: 8b3a ldrh r2, [r7, #24] 80210ca: 1a8a subs r2, r1, r2 80210cc: b292 uxth r2, r2 80210ce: 815a strh r2, [r3, #10] seg->p->tot_len -= len; 80210d0: 68fb ldr r3, [r7, #12] 80210d2: 685b ldr r3, [r3, #4] 80210d4: 8919 ldrh r1, [r3, #8] 80210d6: 68fb ldr r3, [r7, #12] 80210d8: 685b ldr r3, [r3, #4] 80210da: 8b3a ldrh r2, [r7, #24] 80210dc: 1a8a subs r2, r1, r2 80210de: b292 uxth r2, r2 80210e0: 811a strh r2, [r3, #8] seg->p->payload = seg->tcphdr; 80210e2: 68fb ldr r3, [r7, #12] 80210e4: 685b ldr r3, [r3, #4] 80210e6: 68fa ldr r2, [r7, #12] 80210e8: 6912 ldr r2, [r2, #16] 80210ea: 605a str r2, [r3, #4] seg->tcphdr->chksum = 0; 80210ec: 68fb ldr r3, [r7, #12] 80210ee: 691b ldr r3, [r3, #16] 80210f0: 2200 movs r2, #0 80210f2: 741a strb r2, [r3, #16] 80210f4: 2200 movs r2, #0 80210f6: 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)); 80210f8: 68fb ldr r3, [r7, #12] 80210fa: 691a ldr r2, [r3, #16] 80210fc: 68fb ldr r3, [r7, #12] 80210fe: 7b1b ldrb r3, [r3, #12] 8021100: f003 0301 and.w r3, r3, #1 8021104: 2b00 cmp r3, #0 8021106: d001 beq.n 802110c 8021108: 2318 movs r3, #24 802110a: e000 b.n 802110e 802110c: 2314 movs r3, #20 802110e: 4413 add r3, r2 8021110: 69fa ldr r2, [r7, #28] 8021112: 429a cmp r2, r3 8021114: d006 beq.n 8021124 8021116: 4b10 ldr r3, [pc, #64] @ (8021158 ) 8021118: f240 621c movw r2, #1564 @ 0x61c 802111c: 4914 ldr r1, [pc, #80] @ (8021170 ) 802111e: 4810 ldr r0, [pc, #64] @ (8021160 ) 8021120: f009 fbbc bl 802a89c } #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, 8021124: 68fb ldr r3, [r7, #12] 8021126: 6858 ldr r0, [r3, #4] 8021128: 68b9 ldr r1, [r7, #8] 802112a: 68bb ldr r3, [r7, #8] 802112c: 1d1c adds r4, r3, #4 802112e: 68bb ldr r3, [r7, #8] 8021130: 7add ldrb r5, [r3, #11] 8021132: 68bb ldr r3, [r7, #8] 8021134: 7a9b ldrb r3, [r3, #10] 8021136: 687a ldr r2, [r7, #4] 8021138: 9202 str r2, [sp, #8] 802113a: 2206 movs r2, #6 802113c: 9201 str r2, [sp, #4] 802113e: 9300 str r3, [sp, #0] 8021140: 462b mov r3, r5 8021142: 4622 mov r2, r4 8021144: f004 fd7a bl 8025c3c 8021148: 4603 mov r3, r0 802114a: 75fb strb r3, [r7, #23] seg->chksum = SWAP_BYTES_IN_WORD(seg->chksum); seg->chksum_swapped = 1; } #endif return err; 802114c: f997 3017 ldrsb.w r3, [r7, #23] } 8021150: 4618 mov r0, r3 8021152: 3720 adds r7, #32 8021154: 46bd mov sp, r7 8021156: bdb0 pop {r4, r5, r7, pc} 8021158: 080301c0 .word 0x080301c0 802115c: 080307e0 .word 0x080307e0 8021160: 08030214 .word 0x08030214 8021164: 08030800 .word 0x08030800 8021168: 08030820 .word 0x08030820 802116c: 2402af78 .word 0x2402af78 8021170: 08030844 .word 0x08030844 08021174 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ err_t tcp_rexmit_rto_prepare(struct tcp_pcb *pcb) { 8021174: b5b0 push {r4, r5, r7, lr} 8021176: b084 sub sp, #16 8021178: af00 add r7, sp, #0 802117a: 6078 str r0, [r7, #4] struct tcp_seg *seg; LWIP_ASSERT("tcp_rexmit_rto_prepare: invalid pcb", pcb != NULL); 802117c: 687b ldr r3, [r7, #4] 802117e: 2b00 cmp r3, #0 8021180: d106 bne.n 8021190 8021182: 4b36 ldr r3, [pc, #216] @ (802125c ) 8021184: f240 6263 movw r2, #1635 @ 0x663 8021188: 4935 ldr r1, [pc, #212] @ (8021260 ) 802118a: 4836 ldr r0, [pc, #216] @ (8021264 ) 802118c: f009 fb86 bl 802a89c if (pcb->unacked == NULL) { 8021190: 687b ldr r3, [r7, #4] 8021192: 6f1b ldr r3, [r3, #112] @ 0x70 8021194: 2b00 cmp r3, #0 8021196: d102 bne.n 802119e return ERR_VAL; 8021198: f06f 0305 mvn.w r3, #5 802119c: e059 b.n 8021252 /* 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) { 802119e: 687b ldr r3, [r7, #4] 80211a0: 6f1b ldr r3, [r3, #112] @ 0x70 80211a2: 60fb str r3, [r7, #12] 80211a4: e00b b.n 80211be if (tcp_output_segment_busy(seg)) { 80211a6: 68f8 ldr r0, [r7, #12] 80211a8: f7ff fee4 bl 8020f74 80211ac: 4603 mov r3, r0 80211ae: 2b00 cmp r3, #0 80211b0: d002 beq.n 80211b8 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 80211b2: f06f 0305 mvn.w r3, #5 80211b6: e04c b.n 8021252 for (seg = pcb->unacked; seg->next != NULL; seg = seg->next) { 80211b8: 68fb ldr r3, [r7, #12] 80211ba: 681b ldr r3, [r3, #0] 80211bc: 60fb str r3, [r7, #12] 80211be: 68fb ldr r3, [r7, #12] 80211c0: 681b ldr r3, [r3, #0] 80211c2: 2b00 cmp r3, #0 80211c4: d1ef bne.n 80211a6 } } if (tcp_output_segment_busy(seg)) { 80211c6: 68f8 ldr r0, [r7, #12] 80211c8: f7ff fed4 bl 8020f74 80211cc: 4603 mov r3, r0 80211ce: 2b00 cmp r3, #0 80211d0: d002 beq.n 80211d8 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit_rto: segment busy\n")); return ERR_VAL; 80211d2: f06f 0305 mvn.w r3, #5 80211d6: e03c b.n 8021252 } /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 80211d8: 687b ldr r3, [r7, #4] 80211da: 6eda ldr r2, [r3, #108] @ 0x6c 80211dc: 68fb ldr r3, [r7, #12] 80211de: 601a str r2, [r3, #0] #if TCP_OVERSIZE_DBGCHECK /* if last unsent changed, we need to update unsent_oversize */ if (pcb->unsent == NULL) { 80211e0: 687b ldr r3, [r7, #4] 80211e2: 6edb ldr r3, [r3, #108] @ 0x6c 80211e4: 2b00 cmp r3, #0 80211e6: d104 bne.n 80211f2 pcb->unsent_oversize = seg->oversize_left; 80211e8: 68fb ldr r3, [r7, #12] 80211ea: 895a ldrh r2, [r3, #10] 80211ec: 687b ldr r3, [r7, #4] 80211ee: 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; 80211f2: 687b ldr r3, [r7, #4] 80211f4: 6f1a ldr r2, [r3, #112] @ 0x70 80211f6: 687b ldr r3, [r7, #4] 80211f8: 66da str r2, [r3, #108] @ 0x6c /* unacked queue is now empty */ pcb->unacked = NULL; 80211fa: 687b ldr r3, [r7, #4] 80211fc: 2200 movs r2, #0 80211fe: 671a str r2, [r3, #112] @ 0x70 /* Mark RTO in-progress */ tcp_set_flags(pcb, TF_RTO); 8021200: 687b ldr r3, [r7, #4] 8021202: 8b5b ldrh r3, [r3, #26] 8021204: f443 6300 orr.w r3, r3, #2048 @ 0x800 8021208: b29a uxth r2, r3 802120a: 687b ldr r3, [r7, #4] 802120c: 835a strh r2, [r3, #26] /* Record the next byte following retransmit */ pcb->rto_end = lwip_ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 802120e: 68fb ldr r3, [r7, #12] 8021210: 691b ldr r3, [r3, #16] 8021212: 685b ldr r3, [r3, #4] 8021214: 4618 mov r0, r3 8021216: f7f8 fbfc bl 8019a12 802121a: 4604 mov r4, r0 802121c: 68fb ldr r3, [r7, #12] 802121e: 891b ldrh r3, [r3, #8] 8021220: 461d mov r5, r3 8021222: 68fb ldr r3, [r7, #12] 8021224: 691b ldr r3, [r3, #16] 8021226: 899b ldrh r3, [r3, #12] 8021228: b29b uxth r3, r3 802122a: 4618 mov r0, r3 802122c: f7f8 fbdc bl 80199e8 8021230: 4603 mov r3, r0 8021232: b2db uxtb r3, r3 8021234: f003 0303 and.w r3, r3, #3 8021238: 2b00 cmp r3, #0 802123a: d001 beq.n 8021240 802123c: 2301 movs r3, #1 802123e: e000 b.n 8021242 8021240: 2300 movs r3, #0 8021242: 442b add r3, r5 8021244: 18e2 adds r2, r4, r3 8021246: 687b ldr r3, [r7, #4] 8021248: 64da str r2, [r3, #76] @ 0x4c /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 802124a: 687b ldr r3, [r7, #4] 802124c: 2200 movs r2, #0 802124e: 635a str r2, [r3, #52] @ 0x34 return ERR_OK; 8021250: 2300 movs r3, #0 } 8021252: 4618 mov r0, r3 8021254: 3710 adds r7, #16 8021256: 46bd mov sp, r7 8021258: bdb0 pop {r4, r5, r7, pc} 802125a: bf00 nop 802125c: 080301c0 .word 0x080301c0 8021260: 08030858 .word 0x08030858 8021264: 08030214 .word 0x08030214 08021268 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto_commit(struct tcp_pcb *pcb) { 8021268: b580 push {r7, lr} 802126a: b082 sub sp, #8 802126c: af00 add r7, sp, #0 802126e: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto_commit: invalid pcb", pcb != NULL); 8021270: 687b ldr r3, [r7, #4] 8021272: 2b00 cmp r3, #0 8021274: d106 bne.n 8021284 8021276: 4b0d ldr r3, [pc, #52] @ (80212ac ) 8021278: f44f 62d3 mov.w r2, #1688 @ 0x698 802127c: 490c ldr r1, [pc, #48] @ (80212b0 ) 802127e: 480d ldr r0, [pc, #52] @ (80212b4 ) 8021280: f009 fb0c bl 802a89c /* increment number of retransmissions */ if (pcb->nrtx < 0xFF) { 8021284: 687b ldr r3, [r7, #4] 8021286: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 802128a: 2bff cmp r3, #255 @ 0xff 802128c: d007 beq.n 802129e ++pcb->nrtx; 802128e: 687b ldr r3, [r7, #4] 8021290: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 8021294: 3301 adds r3, #1 8021296: b2da uxtb r2, r3 8021298: 687b ldr r3, [r7, #4] 802129a: f883 2042 strb.w r2, [r3, #66] @ 0x42 } /* Do the actual retransmission */ tcp_output(pcb); 802129e: 6878 ldr r0, [r7, #4] 80212a0: f7ff fc70 bl 8020b84 } 80212a4: bf00 nop 80212a6: 3708 adds r7, #8 80212a8: 46bd mov sp, r7 80212aa: bd80 pop {r7, pc} 80212ac: 080301c0 .word 0x080301c0 80212b0: 0803087c .word 0x0803087c 80212b4: 08030214 .word 0x08030214 080212b8 : * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto(struct tcp_pcb *pcb) { 80212b8: b580 push {r7, lr} 80212ba: b082 sub sp, #8 80212bc: af00 add r7, sp, #0 80212be: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_rto: invalid pcb", pcb != NULL); 80212c0: 687b ldr r3, [r7, #4] 80212c2: 2b00 cmp r3, #0 80212c4: d106 bne.n 80212d4 80212c6: 4b0a ldr r3, [pc, #40] @ (80212f0 ) 80212c8: f240 62ad movw r2, #1709 @ 0x6ad 80212cc: 4909 ldr r1, [pc, #36] @ (80212f4 ) 80212ce: 480a ldr r0, [pc, #40] @ (80212f8 ) 80212d0: f009 fae4 bl 802a89c if (tcp_rexmit_rto_prepare(pcb) == ERR_OK) { 80212d4: 6878 ldr r0, [r7, #4] 80212d6: f7ff ff4d bl 8021174 80212da: 4603 mov r3, r0 80212dc: 2b00 cmp r3, #0 80212de: d102 bne.n 80212e6 tcp_rexmit_rto_commit(pcb); 80212e0: 6878 ldr r0, [r7, #4] 80212e2: f7ff ffc1 bl 8021268 } } 80212e6: bf00 nop 80212e8: 3708 adds r7, #8 80212ea: 46bd mov sp, r7 80212ec: bd80 pop {r7, pc} 80212ee: bf00 nop 80212f0: 080301c0 .word 0x080301c0 80212f4: 080308a0 .word 0x080308a0 80212f8: 08030214 .word 0x08030214 080212fc : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ err_t tcp_rexmit(struct tcp_pcb *pcb) { 80212fc: b590 push {r4, r7, lr} 80212fe: b085 sub sp, #20 8021300: af00 add r7, sp, #0 8021302: 6078 str r0, [r7, #4] struct tcp_seg *seg; struct tcp_seg **cur_seg; LWIP_ASSERT("tcp_rexmit: invalid pcb", pcb != NULL); 8021304: 687b ldr r3, [r7, #4] 8021306: 2b00 cmp r3, #0 8021308: d106 bne.n 8021318 802130a: 4b2f ldr r3, [pc, #188] @ (80213c8 ) 802130c: f240 62c1 movw r2, #1729 @ 0x6c1 8021310: 492e ldr r1, [pc, #184] @ (80213cc ) 8021312: 482f ldr r0, [pc, #188] @ (80213d0 ) 8021314: f009 fac2 bl 802a89c if (pcb->unacked == NULL) { 8021318: 687b ldr r3, [r7, #4] 802131a: 6f1b ldr r3, [r3, #112] @ 0x70 802131c: 2b00 cmp r3, #0 802131e: d102 bne.n 8021326 return ERR_VAL; 8021320: f06f 0305 mvn.w r3, #5 8021324: e04c b.n 80213c0 } seg = pcb->unacked; 8021326: 687b ldr r3, [r7, #4] 8021328: 6f1b ldr r3, [r3, #112] @ 0x70 802132a: 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)) { 802132c: 68b8 ldr r0, [r7, #8] 802132e: f7ff fe21 bl 8020f74 8021332: 4603 mov r3, r0 8021334: 2b00 cmp r3, #0 8021336: d002 beq.n 802133e LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_rexmit busy\n")); return ERR_VAL; 8021338: f06f 0305 mvn.w r3, #5 802133c: e040 b.n 80213c0 } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ pcb->unacked = seg->next; 802133e: 68bb ldr r3, [r7, #8] 8021340: 681a ldr r2, [r3, #0] 8021342: 687b ldr r3, [r7, #4] 8021344: 671a str r2, [r3, #112] @ 0x70 cur_seg = &(pcb->unsent); 8021346: 687b ldr r3, [r7, #4] 8021348: 336c adds r3, #108 @ 0x6c 802134a: 60fb str r3, [r7, #12] while (*cur_seg && 802134c: e002 b.n 8021354 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 802134e: 68fb ldr r3, [r7, #12] 8021350: 681b ldr r3, [r3, #0] 8021352: 60fb str r3, [r7, #12] while (*cur_seg && 8021354: 68fb ldr r3, [r7, #12] 8021356: 681b ldr r3, [r3, #0] 8021358: 2b00 cmp r3, #0 802135a: d011 beq.n 8021380 TCP_SEQ_LT(lwip_ntohl((*cur_seg)->tcphdr->seqno), lwip_ntohl(seg->tcphdr->seqno))) { 802135c: 68fb ldr r3, [r7, #12] 802135e: 681b ldr r3, [r3, #0] 8021360: 691b ldr r3, [r3, #16] 8021362: 685b ldr r3, [r3, #4] 8021364: 4618 mov r0, r3 8021366: f7f8 fb54 bl 8019a12 802136a: 4604 mov r4, r0 802136c: 68bb ldr r3, [r7, #8] 802136e: 691b ldr r3, [r3, #16] 8021370: 685b ldr r3, [r3, #4] 8021372: 4618 mov r0, r3 8021374: f7f8 fb4d bl 8019a12 8021378: 4603 mov r3, r0 802137a: 1ae3 subs r3, r4, r3 while (*cur_seg && 802137c: 2b00 cmp r3, #0 802137e: dbe6 blt.n 802134e } seg->next = *cur_seg; 8021380: 68fb ldr r3, [r7, #12] 8021382: 681a ldr r2, [r3, #0] 8021384: 68bb ldr r3, [r7, #8] 8021386: 601a str r2, [r3, #0] *cur_seg = seg; 8021388: 68fb ldr r3, [r7, #12] 802138a: 68ba ldr r2, [r7, #8] 802138c: 601a str r2, [r3, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 802138e: 68bb ldr r3, [r7, #8] 8021390: 681b ldr r3, [r3, #0] 8021392: 2b00 cmp r3, #0 8021394: d103 bne.n 802139e /* the retransmitted segment is last in unsent, so reset unsent_oversize */ pcb->unsent_oversize = 0; 8021396: 687b ldr r3, [r7, #4] 8021398: 2200 movs r2, #0 802139a: f8a3 2068 strh.w r2, [r3, #104] @ 0x68 } #endif /* TCP_OVERSIZE */ if (pcb->nrtx < 0xFF) { 802139e: 687b ldr r3, [r7, #4] 80213a0: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 80213a4: 2bff cmp r3, #255 @ 0xff 80213a6: d007 beq.n 80213b8 ++pcb->nrtx; 80213a8: 687b ldr r3, [r7, #4] 80213aa: f893 3042 ldrb.w r3, [r3, #66] @ 0x42 80213ae: 3301 adds r3, #1 80213b0: b2da uxtb r2, r3 80213b2: 687b ldr r3, [r7, #4] 80213b4: f883 2042 strb.w r2, [r3, #66] @ 0x42 } /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 80213b8: 687b ldr r3, [r7, #4] 80213ba: 2200 movs r2, #0 80213bc: 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; 80213be: 2300 movs r3, #0 } 80213c0: 4618 mov r0, r3 80213c2: 3714 adds r7, #20 80213c4: 46bd mov sp, r7 80213c6: bd90 pop {r4, r7, pc} 80213c8: 080301c0 .word 0x080301c0 80213cc: 080308bc .word 0x080308bc 80213d0: 08030214 .word 0x08030214 080213d4 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { 80213d4: b580 push {r7, lr} 80213d6: b082 sub sp, #8 80213d8: af00 add r7, sp, #0 80213da: 6078 str r0, [r7, #4] LWIP_ASSERT("tcp_rexmit_fast: invalid pcb", pcb != NULL); 80213dc: 687b ldr r3, [r7, #4] 80213de: 2b00 cmp r3, #0 80213e0: d106 bne.n 80213f0 80213e2: 4b2a ldr r3, [pc, #168] @ (802148c ) 80213e4: f240 62f9 movw r2, #1785 @ 0x6f9 80213e8: 4929 ldr r1, [pc, #164] @ (8021490 ) 80213ea: 482a ldr r0, [pc, #168] @ (8021494 ) 80213ec: f009 fa56 bl 802a89c if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 80213f0: 687b ldr r3, [r7, #4] 80213f2: 6f1b ldr r3, [r3, #112] @ 0x70 80213f4: 2b00 cmp r3, #0 80213f6: d045 beq.n 8021484 80213f8: 687b ldr r3, [r7, #4] 80213fa: 8b5b ldrh r3, [r3, #26] 80213fc: f003 0304 and.w r3, r3, #4 8021400: 2b00 cmp r3, #0 8021402: d13f bne.n 8021484 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) { 8021404: 6878 ldr r0, [r7, #4] 8021406: f7ff ff79 bl 80212fc 802140a: 4603 mov r3, r0 802140c: 2b00 cmp r3, #0 802140e: d139 bne.n 8021484 /* 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; 8021410: 687b ldr r3, [r7, #4] 8021412: f8b3 2060 ldrh.w r2, [r3, #96] @ 0x60 8021416: 687b ldr r3, [r7, #4] 8021418: f8b3 3048 ldrh.w r3, [r3, #72] @ 0x48 802141c: 4293 cmp r3, r2 802141e: bf28 it cs 8021420: 4613 movcs r3, r2 8021422: b29b uxth r3, r3 8021424: 2b00 cmp r3, #0 8021426: da00 bge.n 802142a 8021428: 3301 adds r3, #1 802142a: 105b asrs r3, r3, #1 802142c: b29a uxth r2, r3 802142e: 687b ldr r3, [r7, #4] 8021430: f8a3 204a strh.w r2, [r3, #74] @ 0x4a /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < (2U * pcb->mss)) { 8021434: 687b ldr r3, [r7, #4] 8021436: f8b3 304a ldrh.w r3, [r3, #74] @ 0x4a 802143a: 461a mov r2, r3 802143c: 687b ldr r3, [r7, #4] 802143e: 8e5b ldrh r3, [r3, #50] @ 0x32 8021440: 005b lsls r3, r3, #1 8021442: 429a cmp r2, r3 8021444: d206 bcs.n 8021454 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; 8021446: 687b ldr r3, [r7, #4] 8021448: 8e5b ldrh r3, [r3, #50] @ 0x32 802144a: 005b lsls r3, r3, #1 802144c: b29a uxth r2, r3 802144e: 687b ldr r3, [r7, #4] 8021450: f8a3 204a strh.w r2, [r3, #74] @ 0x4a } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 8021454: 687b ldr r3, [r7, #4] 8021456: f8b3 204a ldrh.w r2, [r3, #74] @ 0x4a 802145a: 687b ldr r3, [r7, #4] 802145c: 8e5b ldrh r3, [r3, #50] @ 0x32 802145e: 4619 mov r1, r3 8021460: 0049 lsls r1, r1, #1 8021462: 440b add r3, r1 8021464: b29b uxth r3, r3 8021466: 4413 add r3, r2 8021468: b29a uxth r2, r3 802146a: 687b ldr r3, [r7, #4] 802146c: f8a3 2048 strh.w r2, [r3, #72] @ 0x48 tcp_set_flags(pcb, TF_INFR); 8021470: 687b ldr r3, [r7, #4] 8021472: 8b5b ldrh r3, [r3, #26] 8021474: f043 0304 orr.w r3, r3, #4 8021478: b29a uxth r2, r3 802147a: 687b ldr r3, [r7, #4] 802147c: 835a strh r2, [r3, #26] /* Reset the retransmission timer to prevent immediate rto retransmissions */ pcb->rtime = 0; 802147e: 687b ldr r3, [r7, #4] 8021480: 2200 movs r2, #0 8021482: 861a strh r2, [r3, #48] @ 0x30 } } } 8021484: bf00 nop 8021486: 3708 adds r7, #8 8021488: 46bd mov sp, r7 802148a: bd80 pop {r7, pc} 802148c: 080301c0 .word 0x080301c0 8021490: 080308d4 .word 0x080308d4 8021494: 08030214 .word 0x08030214 08021498 : 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) { 8021498: b580 push {r7, lr} 802149a: b086 sub sp, #24 802149c: af00 add r7, sp, #0 802149e: 60f8 str r0, [r7, #12] 80214a0: 607b str r3, [r7, #4] 80214a2: 460b mov r3, r1 80214a4: 817b strh r3, [r7, #10] 80214a6: 4613 mov r3, r2 80214a8: 813b strh r3, [r7, #8] struct tcp_hdr *tcphdr; struct pbuf *p; p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 80214aa: 897a ldrh r2, [r7, #10] 80214ac: 893b ldrh r3, [r7, #8] 80214ae: 4413 add r3, r2 80214b0: b29b uxth r3, r3 80214b2: 3314 adds r3, #20 80214b4: b29b uxth r3, r3 80214b6: f44f 7220 mov.w r2, #640 @ 0x280 80214ba: 4619 mov r1, r3 80214bc: 2022 movs r0, #34 @ 0x22 80214be: f7f9 fc5f bl 801ad80 80214c2: 6178 str r0, [r7, #20] if (p != NULL) { 80214c4: 697b ldr r3, [r7, #20] 80214c6: 2b00 cmp r3, #0 80214c8: d04d beq.n 8021566 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", 80214ca: 897b ldrh r3, [r7, #10] 80214cc: 3313 adds r3, #19 80214ce: 697a ldr r2, [r7, #20] 80214d0: 8952 ldrh r2, [r2, #10] 80214d2: 4293 cmp r3, r2 80214d4: db06 blt.n 80214e4 80214d6: 4b26 ldr r3, [pc, #152] @ (8021570 ) 80214d8: f240 7223 movw r2, #1827 @ 0x723 80214dc: 4925 ldr r1, [pc, #148] @ (8021574 ) 80214de: 4826 ldr r0, [pc, #152] @ (8021578 ) 80214e0: f009 f9dc bl 802a89c (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 80214e4: 697b ldr r3, [r7, #20] 80214e6: 685b ldr r3, [r3, #4] 80214e8: 613b str r3, [r7, #16] tcphdr->src = lwip_htons(src_port); 80214ea: 8c3b ldrh r3, [r7, #32] 80214ec: 4618 mov r0, r3 80214ee: f7f8 fa7b bl 80199e8 80214f2: 4603 mov r3, r0 80214f4: 461a mov r2, r3 80214f6: 693b ldr r3, [r7, #16] 80214f8: 801a strh r2, [r3, #0] tcphdr->dest = lwip_htons(dst_port); 80214fa: 8cbb ldrh r3, [r7, #36] @ 0x24 80214fc: 4618 mov r0, r3 80214fe: f7f8 fa73 bl 80199e8 8021502: 4603 mov r3, r0 8021504: 461a mov r2, r3 8021506: 693b ldr r3, [r7, #16] 8021508: 805a strh r2, [r3, #2] tcphdr->seqno = seqno_be; 802150a: 693b ldr r3, [r7, #16] 802150c: 687a ldr r2, [r7, #4] 802150e: 605a str r2, [r3, #4] tcphdr->ackno = lwip_htonl(ackno); 8021510: 68f8 ldr r0, [r7, #12] 8021512: f7f8 fa7e bl 8019a12 8021516: 4602 mov r2, r0 8021518: 693b ldr r3, [r7, #16] 802151a: 609a str r2, [r3, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), flags); 802151c: 897b ldrh r3, [r7, #10] 802151e: 089b lsrs r3, r3, #2 8021520: b29b uxth r3, r3 8021522: 3305 adds r3, #5 8021524: b29b uxth r3, r3 8021526: 031b lsls r3, r3, #12 8021528: b29a uxth r2, r3 802152a: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 802152e: b29b uxth r3, r3 8021530: 4313 orrs r3, r2 8021532: b29b uxth r3, r3 8021534: 4618 mov r0, r3 8021536: f7f8 fa57 bl 80199e8 802153a: 4603 mov r3, r0 802153c: 461a mov r2, r3 802153e: 693b ldr r3, [r7, #16] 8021540: 819a strh r2, [r3, #12] tcphdr->wnd = lwip_htons(wnd); 8021542: 8dbb ldrh r3, [r7, #44] @ 0x2c 8021544: 4618 mov r0, r3 8021546: f7f8 fa4f bl 80199e8 802154a: 4603 mov r3, r0 802154c: 461a mov r2, r3 802154e: 693b ldr r3, [r7, #16] 8021550: 81da strh r2, [r3, #14] tcphdr->chksum = 0; 8021552: 693b ldr r3, [r7, #16] 8021554: 2200 movs r2, #0 8021556: 741a strb r2, [r3, #16] 8021558: 2200 movs r2, #0 802155a: 745a strb r2, [r3, #17] tcphdr->urgp = 0; 802155c: 693b ldr r3, [r7, #16] 802155e: 2200 movs r2, #0 8021560: 749a strb r2, [r3, #18] 8021562: 2200 movs r2, #0 8021564: 74da strb r2, [r3, #19] } return p; 8021566: 697b ldr r3, [r7, #20] } 8021568: 4618 mov r0, r3 802156a: 3718 adds r7, #24 802156c: 46bd mov sp, r7 802156e: bd80 pop {r7, pc} 8021570: 080301c0 .word 0x080301c0 8021574: 080308f4 .word 0x080308f4 8021578: 08030214 .word 0x08030214 0802157c : * @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 */) { 802157c: b5b0 push {r4, r5, r7, lr} 802157e: b08a sub sp, #40 @ 0x28 8021580: af04 add r7, sp, #16 8021582: 60f8 str r0, [r7, #12] 8021584: 607b str r3, [r7, #4] 8021586: 460b mov r3, r1 8021588: 817b strh r3, [r7, #10] 802158a: 4613 mov r3, r2 802158c: 813b strh r3, [r7, #8] struct pbuf *p; LWIP_ASSERT("tcp_output_alloc_header: invalid pcb", pcb != NULL); 802158e: 68fb ldr r3, [r7, #12] 8021590: 2b00 cmp r3, #0 8021592: d106 bne.n 80215a2 8021594: 4b15 ldr r3, [pc, #84] @ (80215ec ) 8021596: f240 7242 movw r2, #1858 @ 0x742 802159a: 4915 ldr r1, [pc, #84] @ (80215f0 ) 802159c: 4815 ldr r0, [pc, #84] @ (80215f4 ) 802159e: f009 f97d bl 802a89c p = tcp_output_alloc_header_common(pcb->rcv_nxt, optlen, datalen, 80215a2: 68fb ldr r3, [r7, #12] 80215a4: 6a58 ldr r0, [r3, #36] @ 0x24 80215a6: 68fb ldr r3, [r7, #12] 80215a8: 8adb ldrh r3, [r3, #22] 80215aa: 68fa ldr r2, [r7, #12] 80215ac: 8b12 ldrh r2, [r2, #24] 80215ae: 68f9 ldr r1, [r7, #12] 80215b0: 8d49 ldrh r1, [r1, #42] @ 0x2a 80215b2: 893d ldrh r5, [r7, #8] 80215b4: 897c ldrh r4, [r7, #10] 80215b6: 9103 str r1, [sp, #12] 80215b8: 2110 movs r1, #16 80215ba: 9102 str r1, [sp, #8] 80215bc: 9201 str r2, [sp, #4] 80215be: 9300 str r3, [sp, #0] 80215c0: 687b ldr r3, [r7, #4] 80215c2: 462a mov r2, r5 80215c4: 4621 mov r1, r4 80215c6: f7ff ff67 bl 8021498 80215ca: 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) { 80215cc: 697b ldr r3, [r7, #20] 80215ce: 2b00 cmp r3, #0 80215d0: d006 beq.n 80215e0 /* If we're sending a packet, update the announced right window edge */ pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 80215d2: 68fb ldr r3, [r7, #12] 80215d4: 6a5b ldr r3, [r3, #36] @ 0x24 80215d6: 68fa ldr r2, [r7, #12] 80215d8: 8d52 ldrh r2, [r2, #42] @ 0x2a 80215da: 441a add r2, r3 80215dc: 68fb ldr r3, [r7, #12] 80215de: 62da str r2, [r3, #44] @ 0x2c } return p; 80215e0: 697b ldr r3, [r7, #20] } 80215e2: 4618 mov r0, r3 80215e4: 3718 adds r7, #24 80215e6: 46bd mov sp, r7 80215e8: bdb0 pop {r4, r5, r7, pc} 80215ea: bf00 nop 80215ec: 080301c0 .word 0x080301c0 80215f0: 08030924 .word 0x08030924 80215f4: 08030214 .word 0x08030214 080215f8 : /* 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) { 80215f8: b580 push {r7, lr} 80215fa: b088 sub sp, #32 80215fc: af00 add r7, sp, #0 80215fe: 60f8 str r0, [r7, #12] 8021600: 60b9 str r1, [r7, #8] 8021602: 4611 mov r1, r2 8021604: 461a mov r2, r3 8021606: 460b mov r3, r1 8021608: 71fb strb r3, [r7, #7] 802160a: 4613 mov r3, r2 802160c: 71bb strb r3, [r7, #6] struct tcp_hdr *tcphdr; u32_t *opts; u16_t sacks_len = 0; 802160e: 2300 movs r3, #0 8021610: 83fb strh r3, [r7, #30] LWIP_ASSERT("tcp_output_fill_options: invalid pbuf", p != NULL); 8021612: 68bb ldr r3, [r7, #8] 8021614: 2b00 cmp r3, #0 8021616: d106 bne.n 8021626 8021618: 4b12 ldr r3, [pc, #72] @ (8021664 ) 802161a: f240 7256 movw r2, #1878 @ 0x756 802161e: 4912 ldr r1, [pc, #72] @ (8021668 ) 8021620: 4812 ldr r0, [pc, #72] @ (802166c ) 8021622: f009 f93b bl 802a89c tcphdr = (struct tcp_hdr *)p->payload; 8021626: 68bb ldr r3, [r7, #8] 8021628: 685b ldr r3, [r3, #4] 802162a: 61bb str r3, [r7, #24] opts = (u32_t *)(void *)(tcphdr + 1); 802162c: 69bb ldr r3, [r7, #24] 802162e: 3314 adds r3, #20 8021630: 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)); 8021632: 8bfb ldrh r3, [r7, #30] 8021634: 009b lsls r3, r3, #2 8021636: 461a mov r2, r3 8021638: 79fb ldrb r3, [r7, #7] 802163a: 009b lsls r3, r3, #2 802163c: f003 0304 and.w r3, r3, #4 8021640: 4413 add r3, r2 8021642: 3314 adds r3, #20 8021644: 69ba ldr r2, [r7, #24] 8021646: 4413 add r3, r2 8021648: 697a ldr r2, [r7, #20] 802164a: 429a cmp r2, r3 802164c: d006 beq.n 802165c 802164e: 4b05 ldr r3, [pc, #20] @ (8021664 ) 8021650: f240 7275 movw r2, #1909 @ 0x775 8021654: 4906 ldr r1, [pc, #24] @ (8021670 ) 8021656: 4805 ldr r0, [pc, #20] @ (802166c ) 8021658: f009 f920 bl 802a89c LWIP_UNUSED_ARG(optflags); /* for LWIP_NOASSERT */ LWIP_UNUSED_ARG(opts); /* for LWIP_NOASSERT */ } 802165c: bf00 nop 802165e: 3720 adds r7, #32 8021660: 46bd mov sp, r7 8021662: bd80 pop {r7, pc} 8021664: 080301c0 .word 0x080301c0 8021668: 0803094c .word 0x0803094c 802166c: 08030214 .word 0x08030214 8021670: 08030844 .word 0x08030844 08021674 : * 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) { 8021674: b580 push {r7, lr} 8021676: b08a sub sp, #40 @ 0x28 8021678: af04 add r7, sp, #16 802167a: 60f8 str r0, [r7, #12] 802167c: 60b9 str r1, [r7, #8] 802167e: 607a str r2, [r7, #4] 8021680: 603b str r3, [r7, #0] err_t err; struct netif *netif; LWIP_ASSERT("tcp_output_control_segment: invalid pbuf", p != NULL); 8021682: 68bb ldr r3, [r7, #8] 8021684: 2b00 cmp r3, #0 8021686: d106 bne.n 8021696 8021688: 4b1c ldr r3, [pc, #112] @ (80216fc ) 802168a: f240 7287 movw r2, #1927 @ 0x787 802168e: 491c ldr r1, [pc, #112] @ (8021700 ) 8021690: 481c ldr r0, [pc, #112] @ (8021704 ) 8021692: f009 f903 bl 802a89c netif = tcp_route(pcb, src, dst); 8021696: 683a ldr r2, [r7, #0] 8021698: 6879 ldr r1, [r7, #4] 802169a: 68f8 ldr r0, [r7, #12] 802169c: f7fe fa78 bl 801fb90 80216a0: 6138 str r0, [r7, #16] if (netif == NULL) { 80216a2: 693b ldr r3, [r7, #16] 80216a4: 2b00 cmp r3, #0 80216a6: d102 bne.n 80216ae err = ERR_RTE; 80216a8: 23fc movs r3, #252 @ 0xfc 80216aa: 75fb strb r3, [r7, #23] 80216ac: e01c b.n 80216e8 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) { 80216ae: 68fb ldr r3, [r7, #12] 80216b0: 2b00 cmp r3, #0 80216b2: d006 beq.n 80216c2 NETIF_SET_HINTS(netif, LWIP_CONST_CAST(struct netif_hint*, &(pcb->netif_hints))); ttl = pcb->ttl; 80216b4: 68fb ldr r3, [r7, #12] 80216b6: 7adb ldrb r3, [r3, #11] 80216b8: 75bb strb r3, [r7, #22] tos = pcb->tos; 80216ba: 68fb ldr r3, [r7, #12] 80216bc: 7a9b ldrb r3, [r3, #10] 80216be: 757b strb r3, [r7, #21] 80216c0: e003 b.n 80216ca } else { /* Send output with hardcoded TTL/HL since we have no access to the pcb */ ttl = TCP_TTL; 80216c2: 23ff movs r3, #255 @ 0xff 80216c4: 75bb strb r3, [r7, #22] tos = 0; 80216c6: 2300 movs r3, #0 80216c8: 757b strb r3, [r7, #21] } TCP_STATS_INC(tcp.xmit); err = ip_output_if(p, src, dst, ttl, tos, IP_PROTO_TCP, netif); 80216ca: 7dba ldrb r2, [r7, #22] 80216cc: 693b ldr r3, [r7, #16] 80216ce: 9302 str r3, [sp, #8] 80216d0: 2306 movs r3, #6 80216d2: 9301 str r3, [sp, #4] 80216d4: 7d7b ldrb r3, [r7, #21] 80216d6: 9300 str r3, [sp, #0] 80216d8: 4613 mov r3, r2 80216da: 683a ldr r2, [r7, #0] 80216dc: 6879 ldr r1, [r7, #4] 80216de: 68b8 ldr r0, [r7, #8] 80216e0: f004 faac bl 8025c3c 80216e4: 4603 mov r3, r0 80216e6: 75fb strb r3, [r7, #23] NETIF_RESET_HINTS(netif); } pbuf_free(p); 80216e8: 68b8 ldr r0, [r7, #8] 80216ea: f7f9 fe5f bl 801b3ac return err; 80216ee: f997 3017 ldrsb.w r3, [r7, #23] } 80216f2: 4618 mov r0, r3 80216f4: 3718 adds r7, #24 80216f6: 46bd mov sp, r7 80216f8: bd80 pop {r7, pc} 80216fa: bf00 nop 80216fc: 080301c0 .word 0x080301c0 8021700: 08030974 .word 0x08030974 8021704: 08030214 .word 0x08030214 08021708 : */ 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) { 8021708: b590 push {r4, r7, lr} 802170a: b08b sub sp, #44 @ 0x2c 802170c: af04 add r7, sp, #16 802170e: 60f8 str r0, [r7, #12] 8021710: 60b9 str r1, [r7, #8] 8021712: 607a str r2, [r7, #4] 8021714: 603b str r3, [r7, #0] struct pbuf *p; u16_t wnd; u8_t optlen; LWIP_ASSERT("tcp_rst: invalid local_ip", local_ip != NULL); 8021716: 683b ldr r3, [r7, #0] 8021718: 2b00 cmp r3, #0 802171a: d106 bne.n 802172a 802171c: 4b1f ldr r3, [pc, #124] @ (802179c ) 802171e: f240 72c4 movw r2, #1988 @ 0x7c4 8021722: 491f ldr r1, [pc, #124] @ (80217a0 ) 8021724: 481f ldr r0, [pc, #124] @ (80217a4 ) 8021726: f009 f8b9 bl 802a89c LWIP_ASSERT("tcp_rst: invalid remote_ip", remote_ip != NULL); 802172a: 6abb ldr r3, [r7, #40] @ 0x28 802172c: 2b00 cmp r3, #0 802172e: d106 bne.n 802173e 8021730: 4b1a ldr r3, [pc, #104] @ (802179c ) 8021732: f240 72c5 movw r2, #1989 @ 0x7c5 8021736: 491c ldr r1, [pc, #112] @ (80217a8 ) 8021738: 481a ldr r0, [pc, #104] @ (80217a4 ) 802173a: f009 f8af bl 802a89c optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 802173e: 2300 movs r3, #0 8021740: 75fb strb r3, [r7, #23] #if LWIP_WND_SCALE wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF)); #else wnd = PP_HTONS(TCP_WND); 8021742: f24d 0316 movw r3, #53270 @ 0xd016 8021746: 82bb strh r3, [r7, #20] #endif p = tcp_output_alloc_header_common(ackno, optlen, 0, lwip_htonl(seqno), local_port, 8021748: 7dfb ldrb r3, [r7, #23] 802174a: b29c uxth r4, r3 802174c: 68b8 ldr r0, [r7, #8] 802174e: f7f8 f960 bl 8019a12 8021752: 4602 mov r2, r0 8021754: 8abb ldrh r3, [r7, #20] 8021756: 9303 str r3, [sp, #12] 8021758: 2314 movs r3, #20 802175a: 9302 str r3, [sp, #8] 802175c: 8e3b ldrh r3, [r7, #48] @ 0x30 802175e: 9301 str r3, [sp, #4] 8021760: 8dbb ldrh r3, [r7, #44] @ 0x2c 8021762: 9300 str r3, [sp, #0] 8021764: 4613 mov r3, r2 8021766: 2200 movs r2, #0 8021768: 4621 mov r1, r4 802176a: 6878 ldr r0, [r7, #4] 802176c: f7ff fe94 bl 8021498 8021770: 6138 str r0, [r7, #16] remote_port, TCP_RST | TCP_ACK, wnd); if (p == NULL) { 8021772: 693b ldr r3, [r7, #16] 8021774: 2b00 cmp r3, #0 8021776: d00c beq.n 8021792 LWIP_DEBUGF(TCP_DEBUG, ("tcp_rst: could not allocate memory for pbuf\n")); return; } tcp_output_fill_options(pcb, p, 0, optlen); 8021778: 7dfb ldrb r3, [r7, #23] 802177a: 2200 movs r2, #0 802177c: 6939 ldr r1, [r7, #16] 802177e: 68f8 ldr r0, [r7, #12] 8021780: f7ff ff3a bl 80215f8 MIB2_STATS_INC(mib2.tcpoutrsts); tcp_output_control_segment(pcb, p, local_ip, remote_ip); 8021784: 6abb ldr r3, [r7, #40] @ 0x28 8021786: 683a ldr r2, [r7, #0] 8021788: 6939 ldr r1, [r7, #16] 802178a: 68f8 ldr r0, [r7, #12] 802178c: f7ff ff72 bl 8021674 8021790: e000 b.n 8021794 return; 8021792: bf00 nop LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 8021794: 371c adds r7, #28 8021796: 46bd mov sp, r7 8021798: bd90 pop {r4, r7, pc} 802179a: bf00 nop 802179c: 080301c0 .word 0x080301c0 80217a0: 080309a0 .word 0x080309a0 80217a4: 08030214 .word 0x08030214 80217a8: 080309bc .word 0x080309bc 080217ac : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 80217ac: b590 push {r4, r7, lr} 80217ae: b087 sub sp, #28 80217b0: af00 add r7, sp, #0 80217b2: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen, optflags = 0; 80217b4: 2300 movs r3, #0 80217b6: 75fb strb r3, [r7, #23] u8_t num_sacks = 0; 80217b8: 2300 movs r3, #0 80217ba: 75bb strb r3, [r7, #22] LWIP_ASSERT("tcp_send_empty_ack: invalid pcb", pcb != NULL); 80217bc: 687b ldr r3, [r7, #4] 80217be: 2b00 cmp r3, #0 80217c0: d106 bne.n 80217d0 80217c2: 4b28 ldr r3, [pc, #160] @ (8021864 ) 80217c4: f240 72ea movw r2, #2026 @ 0x7ea 80217c8: 4927 ldr r1, [pc, #156] @ (8021868 ) 80217ca: 4828 ldr r0, [pc, #160] @ (802186c ) 80217cc: f009 f866 bl 802a89c #if LWIP_TCP_TIMESTAMPS if (pcb->flags & TF_TIMESTAMP) { optflags = TF_SEG_OPTS_TS; } #endif optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(optflags, pcb); 80217d0: 7dfb ldrb r3, [r7, #23] 80217d2: 009b lsls r3, r3, #2 80217d4: b2db uxtb r3, r3 80217d6: f003 0304 and.w r3, r3, #4 80217da: 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)); 80217dc: 7d7b ldrb r3, [r7, #21] 80217de: b29c uxth r4, r3 80217e0: 687b ldr r3, [r7, #4] 80217e2: 6d1b ldr r3, [r3, #80] @ 0x50 80217e4: 4618 mov r0, r3 80217e6: f7f8 f914 bl 8019a12 80217ea: 4603 mov r3, r0 80217ec: 2200 movs r2, #0 80217ee: 4621 mov r1, r4 80217f0: 6878 ldr r0, [r7, #4] 80217f2: f7ff fec3 bl 802157c 80217f6: 6138 str r0, [r7, #16] if (p == NULL) { 80217f8: 693b ldr r3, [r7, #16] 80217fa: 2b00 cmp r3, #0 80217fc: d109 bne.n 8021812 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 80217fe: 687b ldr r3, [r7, #4] 8021800: 8b5b ldrh r3, [r3, #26] 8021802: f043 0303 orr.w r3, r3, #3 8021806: b29a uxth r2, r3 8021808: 687b ldr r3, [r7, #4] 802180a: 835a strh r2, [r3, #26] LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); return ERR_BUF; 802180c: f06f 0301 mvn.w r3, #1 8021810: e023 b.n 802185a } tcp_output_fill_options(pcb, p, optflags, num_sacks); 8021812: 7dbb ldrb r3, [r7, #22] 8021814: 7dfa ldrb r2, [r7, #23] 8021816: 6939 ldr r1, [r7, #16] 8021818: 6878 ldr r0, [r7, #4] 802181a: f7ff feed bl 80215f8 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); 802181e: 687a ldr r2, [r7, #4] 8021820: 687b ldr r3, [r7, #4] 8021822: 3304 adds r3, #4 8021824: 6939 ldr r1, [r7, #16] 8021826: 6878 ldr r0, [r7, #4] 8021828: f7ff ff24 bl 8021674 802182c: 4603 mov r3, r0 802182e: 73fb strb r3, [r7, #15] if (err != ERR_OK) { 8021830: f997 300f ldrsb.w r3, [r7, #15] 8021834: 2b00 cmp r3, #0 8021836: d007 beq.n 8021848 /* let tcp_fasttmr retry sending this ACK */ tcp_set_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8021838: 687b ldr r3, [r7, #4] 802183a: 8b5b ldrh r3, [r3, #26] 802183c: f043 0303 orr.w r3, r3, #3 8021840: b29a uxth r2, r3 8021842: 687b ldr r3, [r7, #4] 8021844: 835a strh r2, [r3, #26] 8021846: e006 b.n 8021856 } else { /* remove ACK flags from the PCB, as we sent an empty ACK now */ tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW); 8021848: 687b ldr r3, [r7, #4] 802184a: 8b5b ldrh r3, [r3, #26] 802184c: f023 0303 bic.w r3, r3, #3 8021850: b29a uxth r2, r3 8021852: 687b ldr r3, [r7, #4] 8021854: 835a strh r2, [r3, #26] } return err; 8021856: f997 300f ldrsb.w r3, [r7, #15] } 802185a: 4618 mov r0, r3 802185c: 371c adds r7, #28 802185e: 46bd mov sp, r7 8021860: bd90 pop {r4, r7, pc} 8021862: bf00 nop 8021864: 080301c0 .word 0x080301c0 8021868: 080309d8 .word 0x080309d8 802186c: 08030214 .word 0x08030214 08021870 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ err_t tcp_keepalive(struct tcp_pcb *pcb) { 8021870: b590 push {r4, r7, lr} 8021872: b085 sub sp, #20 8021874: af00 add r7, sp, #0 8021876: 6078 str r0, [r7, #4] err_t err; struct pbuf *p; u8_t optlen = LWIP_TCP_OPT_LENGTH_SEGMENT(0, pcb); 8021878: 2300 movs r3, #0 802187a: 72bb strb r3, [r7, #10] LWIP_ASSERT("tcp_keepalive: invalid pcb", pcb != NULL); 802187c: 687b ldr r3, [r7, #4] 802187e: 2b00 cmp r3, #0 8021880: d106 bne.n 8021890 8021882: 4b18 ldr r3, [pc, #96] @ (80218e4 ) 8021884: f640 0224 movw r2, #2084 @ 0x824 8021888: 4917 ldr r1, [pc, #92] @ (80218e8 ) 802188a: 4818 ldr r0, [pc, #96] @ (80218ec ) 802188c: f009 f806 bl 802a89c 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)); 8021890: 7abb ldrb r3, [r7, #10] 8021892: b29c uxth r4, r3 8021894: 687b ldr r3, [r7, #4] 8021896: 6d1b ldr r3, [r3, #80] @ 0x50 8021898: 3b01 subs r3, #1 802189a: 4618 mov r0, r3 802189c: f7f8 f8b9 bl 8019a12 80218a0: 4603 mov r3, r0 80218a2: 2200 movs r2, #0 80218a4: 4621 mov r1, r4 80218a6: 6878 ldr r0, [r7, #4] 80218a8: f7ff fe68 bl 802157c 80218ac: 60f8 str r0, [r7, #12] if (p == NULL) { 80218ae: 68fb ldr r3, [r7, #12] 80218b0: 2b00 cmp r3, #0 80218b2: d102 bne.n 80218ba LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: could not allocate memory for pbuf\n")); return ERR_MEM; 80218b4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80218b8: e010 b.n 80218dc } tcp_output_fill_options(pcb, p, 0, optlen); 80218ba: 7abb ldrb r3, [r7, #10] 80218bc: 2200 movs r2, #0 80218be: 68f9 ldr r1, [r7, #12] 80218c0: 6878 ldr r0, [r7, #4] 80218c2: f7ff fe99 bl 80215f8 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 80218c6: 687a ldr r2, [r7, #4] 80218c8: 687b ldr r3, [r7, #4] 80218ca: 3304 adds r3, #4 80218cc: 68f9 ldr r1, [r7, #12] 80218ce: 6878 ldr r0, [r7, #4] 80218d0: f7ff fed0 bl 8021674 80218d4: 4603 mov r3, r0 80218d6: 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; 80218d8: f997 300b ldrsb.w r3, [r7, #11] } 80218dc: 4618 mov r0, r3 80218de: 3714 adds r7, #20 80218e0: 46bd mov sp, r7 80218e2: bd90 pop {r4, r7, pc} 80218e4: 080301c0 .word 0x080301c0 80218e8: 080309f8 .word 0x080309f8 80218ec: 08030214 .word 0x08030214 080218f0 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ err_t tcp_zero_window_probe(struct tcp_pcb *pcb) { 80218f0: b590 push {r4, r7, lr} 80218f2: b08b sub sp, #44 @ 0x2c 80218f4: af00 add r7, sp, #0 80218f6: 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); 80218f8: 2300 movs r3, #0 80218fa: 74fb strb r3, [r7, #19] LWIP_ASSERT("tcp_zero_window_probe: invalid pcb", pcb != NULL); 80218fc: 687b ldr r3, [r7, #4] 80218fe: 2b00 cmp r3, #0 8021900: d106 bne.n 8021910 8021902: 4b4d ldr r3, [pc, #308] @ (8021a38 ) 8021904: f640 024f movw r2, #2127 @ 0x84f 8021908: 494c ldr r1, [pc, #304] @ (8021a3c ) 802190a: 484d ldr r0, [pc, #308] @ (8021a40 ) 802190c: f008 ffc6 bl 802a89c ("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; 8021910: 687b ldr r3, [r7, #4] 8021912: 6edb ldr r3, [r3, #108] @ 0x6c 8021914: 627b str r3, [r7, #36] @ 0x24 if (seg == NULL) { 8021916: 6a7b ldr r3, [r7, #36] @ 0x24 8021918: 2b00 cmp r3, #0 802191a: d101 bne.n 8021920 /* Not expected, persist timer should be off when the send buffer is empty */ return ERR_OK; 802191c: 2300 movs r3, #0 802191e: e087 b.n 8021a30 /* 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) { 8021920: 687b ldr r3, [r7, #4] 8021922: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 8021926: 2bff cmp r3, #255 @ 0xff 8021928: d007 beq.n 802193a ++pcb->persist_probe; 802192a: 687b ldr r3, [r7, #4] 802192c: f893 309a ldrb.w r3, [r3, #154] @ 0x9a 8021930: 3301 adds r3, #1 8021932: b2da uxtb r2, r3 8021934: 687b ldr r3, [r7, #4] 8021936: f883 209a strb.w r2, [r3, #154] @ 0x9a } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 802193a: 6a7b ldr r3, [r7, #36] @ 0x24 802193c: 691b ldr r3, [r3, #16] 802193e: 899b ldrh r3, [r3, #12] 8021940: b29b uxth r3, r3 8021942: 4618 mov r0, r3 8021944: f7f8 f850 bl 80199e8 8021948: 4603 mov r3, r0 802194a: b2db uxtb r3, r3 802194c: f003 0301 and.w r3, r3, #1 8021950: 2b00 cmp r3, #0 8021952: d005 beq.n 8021960 8021954: 6a7b ldr r3, [r7, #36] @ 0x24 8021956: 891b ldrh r3, [r3, #8] 8021958: 2b00 cmp r3, #0 802195a: d101 bne.n 8021960 802195c: 2301 movs r3, #1 802195e: e000 b.n 8021962 8021960: 2300 movs r3, #0 8021962: 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; 8021966: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802196a: 2b00 cmp r3, #0 802196c: bf0c ite eq 802196e: 2301 moveq r3, #1 8021970: 2300 movne r3, #0 8021972: b2db uxtb r3, r3 8021974: 843b strh r3, [r7, #32] p = tcp_output_alloc_header(pcb, optlen, len, seg->tcphdr->seqno); 8021976: 7cfb ldrb r3, [r7, #19] 8021978: b299 uxth r1, r3 802197a: 6a7b ldr r3, [r7, #36] @ 0x24 802197c: 691b ldr r3, [r3, #16] 802197e: 685b ldr r3, [r3, #4] 8021980: 8c3a ldrh r2, [r7, #32] 8021982: 6878 ldr r0, [r7, #4] 8021984: f7ff fdfa bl 802157c 8021988: 61f8 str r0, [r7, #28] if (p == NULL) { 802198a: 69fb ldr r3, [r7, #28] 802198c: 2b00 cmp r3, #0 802198e: d102 bne.n 8021996 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return ERR_MEM; 8021990: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8021994: e04c b.n 8021a30 } tcphdr = (struct tcp_hdr *)p->payload; 8021996: 69fb ldr r3, [r7, #28] 8021998: 685b ldr r3, [r3, #4] 802199a: 61bb str r3, [r7, #24] if (is_fin) { 802199c: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80219a0: 2b00 cmp r3, #0 80219a2: d011 beq.n 80219c8 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 80219a4: 69bb ldr r3, [r7, #24] 80219a6: 899b ldrh r3, [r3, #12] 80219a8: b29b uxth r3, r3 80219aa: b21b sxth r3, r3 80219ac: f423 537c bic.w r3, r3, #16128 @ 0x3f00 80219b0: b21c sxth r4, r3 80219b2: 2011 movs r0, #17 80219b4: f7f8 f818 bl 80199e8 80219b8: 4603 mov r3, r0 80219ba: b21b sxth r3, r3 80219bc: 4323 orrs r3, r4 80219be: b21b sxth r3, r3 80219c0: b29a uxth r2, r3 80219c2: 69bb ldr r3, [r7, #24] 80219c4: 819a strh r2, [r3, #12] 80219c6: e010 b.n 80219ea } else { /* Data segment, copy in one byte from the head of the unacked queue */ char *d = ((char *)p->payload + TCP_HLEN); 80219c8: 69fb ldr r3, [r7, #28] 80219ca: 685b ldr r3, [r3, #4] 80219cc: 3314 adds r3, #20 80219ce: 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); 80219d0: 6a7b ldr r3, [r7, #36] @ 0x24 80219d2: 6858 ldr r0, [r3, #4] 80219d4: 6a7b ldr r3, [r7, #36] @ 0x24 80219d6: 685b ldr r3, [r3, #4] 80219d8: 891a ldrh r2, [r3, #8] 80219da: 6a7b ldr r3, [r7, #36] @ 0x24 80219dc: 891b ldrh r3, [r3, #8] 80219de: 1ad3 subs r3, r2, r3 80219e0: b29b uxth r3, r3 80219e2: 2201 movs r2, #1 80219e4: 6979 ldr r1, [r7, #20] 80219e6: f7f9 fee7 bl 801b7b8 } /* The byte may be acknowledged without the window being opened. */ snd_nxt = lwip_ntohl(seg->tcphdr->seqno) + 1; 80219ea: 6a7b ldr r3, [r7, #36] @ 0x24 80219ec: 691b ldr r3, [r3, #16] 80219ee: 685b ldr r3, [r3, #4] 80219f0: 4618 mov r0, r3 80219f2: f7f8 f80e bl 8019a12 80219f6: 4603 mov r3, r0 80219f8: 3301 adds r3, #1 80219fa: 60fb str r3, [r7, #12] if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 80219fc: 687b ldr r3, [r7, #4] 80219fe: 6d1a ldr r2, [r3, #80] @ 0x50 8021a00: 68fb ldr r3, [r7, #12] 8021a02: 1ad3 subs r3, r2, r3 8021a04: 2b00 cmp r3, #0 8021a06: da02 bge.n 8021a0e pcb->snd_nxt = snd_nxt; 8021a08: 687b ldr r3, [r7, #4] 8021a0a: 68fa ldr r2, [r7, #12] 8021a0c: 651a str r2, [r3, #80] @ 0x50 } tcp_output_fill_options(pcb, p, 0, optlen); 8021a0e: 7cfb ldrb r3, [r7, #19] 8021a10: 2200 movs r2, #0 8021a12: 69f9 ldr r1, [r7, #28] 8021a14: 6878 ldr r0, [r7, #4] 8021a16: f7ff fdef bl 80215f8 err = tcp_output_control_segment(pcb, p, &pcb->local_ip, &pcb->remote_ip); 8021a1a: 687a ldr r2, [r7, #4] 8021a1c: 687b ldr r3, [r7, #4] 8021a1e: 3304 adds r3, #4 8021a20: 69f9 ldr r1, [r7, #28] 8021a22: 6878 ldr r0, [r7, #4] 8021a24: f7ff fe26 bl 8021674 8021a28: 4603 mov r3, r0 8021a2a: 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; 8021a2c: f997 300b ldrsb.w r3, [r7, #11] } 8021a30: 4618 mov r0, r3 8021a32: 372c adds r7, #44 @ 0x2c 8021a34: 46bd mov sp, r7 8021a36: bd90 pop {r4, r7, pc} 8021a38: 080301c0 .word 0x080301c0 8021a3c: 08030a14 .word 0x08030a14 8021a40: 08030214 .word 0x08030214 08021a44 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 8021a44: b580 push {r7, lr} 8021a46: b082 sub sp, #8 8021a48: af00 add r7, sp, #0 8021a4a: 6078 str r0, [r7, #4] LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 8021a4c: f7f9 ffa2 bl 801b994 /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 8021a50: 4b0a ldr r3, [pc, #40] @ (8021a7c ) 8021a52: 681b ldr r3, [r3, #0] 8021a54: 2b00 cmp r3, #0 8021a56: d103 bne.n 8021a60 8021a58: 4b09 ldr r3, [pc, #36] @ (8021a80 ) 8021a5a: 681b ldr r3, [r3, #0] 8021a5c: 2b00 cmp r3, #0 8021a5e: d005 beq.n 8021a6c /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8021a60: 2200 movs r2, #0 8021a62: 4908 ldr r1, [pc, #32] @ (8021a84 ) 8021a64: 20fa movs r0, #250 @ 0xfa 8021a66: f000 f8f5 bl 8021c54 8021a6a: e003 b.n 8021a74 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 8021a6c: 4b06 ldr r3, [pc, #24] @ (8021a88 ) 8021a6e: 2200 movs r2, #0 8021a70: 601a str r2, [r3, #0] } } 8021a72: bf00 nop 8021a74: bf00 nop 8021a76: 3708 adds r7, #8 8021a78: 46bd mov sp, r7 8021a7a: bd80 pop {r7, pc} 8021a7c: 2402af84 .word 0x2402af84 8021a80: 2402af88 .word 0x2402af88 8021a84: 08021a45 .word 0x08021a45 8021a88: 2402afd4 .word 0x2402afd4 08021a8c : * the reason is to have the TCP timer only running when * there are active (or time-wait) PCBs. */ void tcp_timer_needed(void) { 8021a8c: b580 push {r7, lr} 8021a8e: af00 add r7, sp, #0 LWIP_ASSERT_CORE_LOCKED(); 8021a90: f7ef fada bl 8011048 /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 8021a94: 4b0a ldr r3, [pc, #40] @ (8021ac0 ) 8021a96: 681b ldr r3, [r3, #0] 8021a98: 2b00 cmp r3, #0 8021a9a: d10f bne.n 8021abc 8021a9c: 4b09 ldr r3, [pc, #36] @ (8021ac4 ) 8021a9e: 681b ldr r3, [r3, #0] 8021aa0: 2b00 cmp r3, #0 8021aa2: d103 bne.n 8021aac 8021aa4: 4b08 ldr r3, [pc, #32] @ (8021ac8 ) 8021aa6: 681b ldr r3, [r3, #0] 8021aa8: 2b00 cmp r3, #0 8021aaa: d007 beq.n 8021abc /* enable and start timer */ tcpip_tcp_timer_active = 1; 8021aac: 4b04 ldr r3, [pc, #16] @ (8021ac0 ) 8021aae: 2201 movs r2, #1 8021ab0: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 8021ab2: 2200 movs r2, #0 8021ab4: 4905 ldr r1, [pc, #20] @ (8021acc ) 8021ab6: 20fa movs r0, #250 @ 0xfa 8021ab8: f000 f8cc bl 8021c54 } } 8021abc: bf00 nop 8021abe: bd80 pop {r7, pc} 8021ac0: 2402afd4 .word 0x2402afd4 8021ac4: 2402af84 .word 0x2402af84 8021ac8: 2402af88 .word 0x2402af88 8021acc: 08021a45 .word 0x08021a45 08021ad0 : #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 { 8021ad0: b580 push {r7, lr} 8021ad2: b086 sub sp, #24 8021ad4: af00 add r7, sp, #0 8021ad6: 60f8 str r0, [r7, #12] 8021ad8: 60b9 str r1, [r7, #8] 8021ada: 607a str r2, [r7, #4] struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 8021adc: 200a movs r0, #10 8021ade: f7f8 fd01 bl 801a4e4 8021ae2: 6138 str r0, [r7, #16] if (timeout == NULL) { 8021ae4: 693b ldr r3, [r7, #16] 8021ae6: 2b00 cmp r3, #0 8021ae8: d109 bne.n 8021afe LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); 8021aea: 693b ldr r3, [r7, #16] 8021aec: 2b00 cmp r3, #0 8021aee: d151 bne.n 8021b94 8021af0: 4b2a ldr r3, [pc, #168] @ (8021b9c ) 8021af2: 22be movs r2, #190 @ 0xbe 8021af4: 492a ldr r1, [pc, #168] @ (8021ba0 ) 8021af6: 482b ldr r0, [pc, #172] @ (8021ba4 ) 8021af8: f008 fed0 bl 802a89c return; 8021afc: e04a b.n 8021b94 } timeout->next = NULL; 8021afe: 693b ldr r3, [r7, #16] 8021b00: 2200 movs r2, #0 8021b02: 601a str r2, [r3, #0] timeout->h = handler; 8021b04: 693b ldr r3, [r7, #16] 8021b06: 68ba ldr r2, [r7, #8] 8021b08: 609a str r2, [r3, #8] timeout->arg = arg; 8021b0a: 693b ldr r3, [r7, #16] 8021b0c: 687a ldr r2, [r7, #4] 8021b0e: 60da str r2, [r3, #12] timeout->time = abs_time; 8021b10: 693b ldr r3, [r7, #16] 8021b12: 68fa ldr r2, [r7, #12] 8021b14: 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) { 8021b16: 4b24 ldr r3, [pc, #144] @ (8021ba8 ) 8021b18: 681b ldr r3, [r3, #0] 8021b1a: 2b00 cmp r3, #0 8021b1c: d103 bne.n 8021b26 next_timeout = timeout; 8021b1e: 4a22 ldr r2, [pc, #136] @ (8021ba8 ) 8021b20: 693b ldr r3, [r7, #16] 8021b22: 6013 str r3, [r2, #0] return; 8021b24: e037 b.n 8021b96 } if (TIME_LESS_THAN(timeout->time, next_timeout->time)) { 8021b26: 693b ldr r3, [r7, #16] 8021b28: 685a ldr r2, [r3, #4] 8021b2a: 4b1f ldr r3, [pc, #124] @ (8021ba8 ) 8021b2c: 681b ldr r3, [r3, #0] 8021b2e: 685b ldr r3, [r3, #4] 8021b30: 1ad3 subs r3, r2, r3 8021b32: 0fdb lsrs r3, r3, #31 8021b34: f003 0301 and.w r3, r3, #1 8021b38: b2db uxtb r3, r3 8021b3a: 2b00 cmp r3, #0 8021b3c: d007 beq.n 8021b4e timeout->next = next_timeout; 8021b3e: 4b1a ldr r3, [pc, #104] @ (8021ba8 ) 8021b40: 681a ldr r2, [r3, #0] 8021b42: 693b ldr r3, [r7, #16] 8021b44: 601a str r2, [r3, #0] next_timeout = timeout; 8021b46: 4a18 ldr r2, [pc, #96] @ (8021ba8 ) 8021b48: 693b ldr r3, [r7, #16] 8021b4a: 6013 str r3, [r2, #0] 8021b4c: e023 b.n 8021b96 } else { for (t = next_timeout; t != NULL; t = t->next) { 8021b4e: 4b16 ldr r3, [pc, #88] @ (8021ba8 ) 8021b50: 681b ldr r3, [r3, #0] 8021b52: 617b str r3, [r7, #20] 8021b54: e01a b.n 8021b8c if ((t->next == NULL) || TIME_LESS_THAN(timeout->time, t->next->time)) { 8021b56: 697b ldr r3, [r7, #20] 8021b58: 681b ldr r3, [r3, #0] 8021b5a: 2b00 cmp r3, #0 8021b5c: d00b beq.n 8021b76 8021b5e: 693b ldr r3, [r7, #16] 8021b60: 685a ldr r2, [r3, #4] 8021b62: 697b ldr r3, [r7, #20] 8021b64: 681b ldr r3, [r3, #0] 8021b66: 685b ldr r3, [r3, #4] 8021b68: 1ad3 subs r3, r2, r3 8021b6a: 0fdb lsrs r3, r3, #31 8021b6c: f003 0301 and.w r3, r3, #1 8021b70: b2db uxtb r3, r3 8021b72: 2b00 cmp r3, #0 8021b74: d007 beq.n 8021b86 timeout->next = t->next; 8021b76: 697b ldr r3, [r7, #20] 8021b78: 681a ldr r2, [r3, #0] 8021b7a: 693b ldr r3, [r7, #16] 8021b7c: 601a str r2, [r3, #0] t->next = timeout; 8021b7e: 697b ldr r3, [r7, #20] 8021b80: 693a ldr r2, [r7, #16] 8021b82: 601a str r2, [r3, #0] break; 8021b84: e007 b.n 8021b96 for (t = next_timeout; t != NULL; t = t->next) { 8021b86: 697b ldr r3, [r7, #20] 8021b88: 681b ldr r3, [r3, #0] 8021b8a: 617b str r3, [r7, #20] 8021b8c: 697b ldr r3, [r7, #20] 8021b8e: 2b00 cmp r3, #0 8021b90: d1e1 bne.n 8021b56 8021b92: e000 b.n 8021b96 return; 8021b94: bf00 nop } } } } 8021b96: 3718 adds r7, #24 8021b98: 46bd mov sp, r7 8021b9a: bd80 pop {r7, pc} 8021b9c: 08030a38 .word 0x08030a38 8021ba0: 08030a6c .word 0x08030a6c 8021ba4: 08030aac .word 0x08030aac 8021ba8: 2402afcc .word 0x2402afcc 08021bac : #if !LWIP_TESTMODE static #endif void lwip_cyclic_timer(void *arg) { 8021bac: b580 push {r7, lr} 8021bae: b086 sub sp, #24 8021bb0: af00 add r7, sp, #0 8021bb2: 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; 8021bb4: 687b ldr r3, [r7, #4] 8021bb6: 617b str r3, [r7, #20] #if LWIP_DEBUG_TIMERNAMES LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: %s()\n", cyclic->handler_name)); #endif cyclic->handler(); 8021bb8: 697b ldr r3, [r7, #20] 8021bba: 685b ldr r3, [r3, #4] 8021bbc: 4798 blx r3 now = sys_now(); 8021bbe: f7ee ffa7 bl 8010b10 8021bc2: 6138 str r0, [r7, #16] next_timeout_time = (u32_t)(current_timeout_due_time + cyclic->interval_ms); /* overflow handled by TIME_LESS_THAN macro */ 8021bc4: 697b ldr r3, [r7, #20] 8021bc6: 681a ldr r2, [r3, #0] 8021bc8: 4b0f ldr r3, [pc, #60] @ (8021c08 ) 8021bca: 681b ldr r3, [r3, #0] 8021bcc: 4413 add r3, r2 8021bce: 60fb str r3, [r7, #12] if (TIME_LESS_THAN(next_timeout_time, now)) { 8021bd0: 68fa ldr r2, [r7, #12] 8021bd2: 693b ldr r3, [r7, #16] 8021bd4: 1ad3 subs r3, r2, r3 8021bd6: 0fdb lsrs r3, r3, #31 8021bd8: f003 0301 and.w r3, r3, #1 8021bdc: b2db uxtb r3, r3 8021bde: 2b00 cmp r3, #0 8021be0: d009 beq.n 8021bf6 /* 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); 8021be2: 697b ldr r3, [r7, #20] 8021be4: 681a ldr r2, [r3, #0] 8021be6: 693b ldr r3, [r7, #16] 8021be8: 4413 add r3, r2 8021bea: 687a ldr r2, [r7, #4] 8021bec: 4907 ldr r1, [pc, #28] @ (8021c0c ) 8021bee: 4618 mov r0, r3 8021bf0: f7ff ff6e bl 8021ad0 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 } } 8021bf4: e004 b.n 8021c00 sys_timeout_abs(next_timeout_time, lwip_cyclic_timer, arg); 8021bf6: 687a ldr r2, [r7, #4] 8021bf8: 4904 ldr r1, [pc, #16] @ (8021c0c ) 8021bfa: 68f8 ldr r0, [r7, #12] 8021bfc: f7ff ff68 bl 8021ad0 } 8021c00: bf00 nop 8021c02: 3718 adds r7, #24 8021c04: 46bd mov sp, r7 8021c06: bd80 pop {r7, pc} 8021c08: 2402afd0 .word 0x2402afd0 8021c0c: 08021bad .word 0x08021bad 08021c10 : /** Initialize this module */ void sys_timeouts_init(void) { 8021c10: b580 push {r7, lr} 8021c12: b082 sub sp, #8 8021c14: 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++) { 8021c16: 2301 movs r3, #1 8021c18: 607b str r3, [r7, #4] 8021c1a: e00e b.n 8021c3a /* 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])); 8021c1c: 4a0b ldr r2, [pc, #44] @ (8021c4c ) 8021c1e: 687b ldr r3, [r7, #4] 8021c20: f852 0033 ldr.w r0, [r2, r3, lsl #3] 8021c24: 687b ldr r3, [r7, #4] 8021c26: 00db lsls r3, r3, #3 8021c28: 4a08 ldr r2, [pc, #32] @ (8021c4c ) 8021c2a: 4413 add r3, r2 8021c2c: 461a mov r2, r3 8021c2e: 4908 ldr r1, [pc, #32] @ (8021c50 ) 8021c30: f000 f810 bl 8021c54 for (i = (LWIP_TCP ? 1 : 0); i < LWIP_ARRAYSIZE(lwip_cyclic_timers); i++) { 8021c34: 687b ldr r3, [r7, #4] 8021c36: 3301 adds r3, #1 8021c38: 607b str r3, [r7, #4] 8021c3a: 687b ldr r3, [r7, #4] 8021c3c: 2b04 cmp r3, #4 8021c3e: d9ed bls.n 8021c1c } } 8021c40: bf00 nop 8021c42: bf00 nop 8021c44: 3708 adds r7, #8 8021c46: 46bd mov sp, r7 8021c48: bd80 pop {r7, pc} 8021c4a: bf00 nop 8021c4c: 08031c80 .word 0x08031c80 8021c50: 08021bad .word 0x08021bad 08021c54 : 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 */ { 8021c54: b580 push {r7, lr} 8021c56: b086 sub sp, #24 8021c58: af00 add r7, sp, #0 8021c5a: 60f8 str r0, [r7, #12] 8021c5c: 60b9 str r1, [r7, #8] 8021c5e: 607a str r2, [r7, #4] u32_t next_timeout_time; LWIP_ASSERT_CORE_LOCKED(); 8021c60: f7ef f9f2 bl 8011048 LWIP_ASSERT("Timeout time too long, max is LWIP_UINT32_MAX/4 msecs", msecs <= (LWIP_UINT32_MAX / 4)); 8021c64: 68fb ldr r3, [r7, #12] 8021c66: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 8021c6a: d306 bcc.n 8021c7a 8021c6c: 4b0a ldr r3, [pc, #40] @ (8021c98 ) 8021c6e: f240 1229 movw r2, #297 @ 0x129 8021c72: 490a ldr r1, [pc, #40] @ (8021c9c ) 8021c74: 480a ldr r0, [pc, #40] @ (8021ca0 ) 8021c76: f008 fe11 bl 802a89c next_timeout_time = (u32_t)(sys_now() + msecs); /* overflow handled by TIME_LESS_THAN macro */ 8021c7a: f7ee ff49 bl 8010b10 8021c7e: 4602 mov r2, r0 8021c80: 68fb ldr r3, [r7, #12] 8021c82: 4413 add r3, r2 8021c84: 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); 8021c86: 687a ldr r2, [r7, #4] 8021c88: 68b9 ldr r1, [r7, #8] 8021c8a: 6978 ldr r0, [r7, #20] 8021c8c: f7ff ff20 bl 8021ad0 #endif } 8021c90: bf00 nop 8021c92: 3718 adds r7, #24 8021c94: 46bd mov sp, r7 8021c96: bd80 pop {r7, pc} 8021c98: 08030a38 .word 0x08030a38 8021c9c: 08030ad4 .word 0x08030ad4 8021ca0: 08030aac .word 0x08030aac 08021ca4 : * * Must be called periodically from your main loop. */ void sys_check_timeouts(void) { 8021ca4: b580 push {r7, lr} 8021ca6: b084 sub sp, #16 8021ca8: af00 add r7, sp, #0 u32_t now; LWIP_ASSERT_CORE_LOCKED(); 8021caa: f7ef f9cd bl 8011048 /* Process only timers expired at the start of the function. */ now = sys_now(); 8021cae: f7ee ff2f bl 8010b10 8021cb2: 60f8 str r0, [r7, #12] sys_timeout_handler handler; void *arg; PBUF_CHECK_FREE_OOSEQ(); tmptimeout = next_timeout; 8021cb4: 4b17 ldr r3, [pc, #92] @ (8021d14 ) 8021cb6: 681b ldr r3, [r3, #0] 8021cb8: 60bb str r3, [r7, #8] if (tmptimeout == NULL) { 8021cba: 68bb ldr r3, [r7, #8] 8021cbc: 2b00 cmp r3, #0 8021cbe: d022 beq.n 8021d06 return; } if (TIME_LESS_THAN(now, tmptimeout->time)) { 8021cc0: 68bb ldr r3, [r7, #8] 8021cc2: 685b ldr r3, [r3, #4] 8021cc4: 68fa ldr r2, [r7, #12] 8021cc6: 1ad3 subs r3, r2, r3 8021cc8: 0fdb lsrs r3, r3, #31 8021cca: f003 0301 and.w r3, r3, #1 8021cce: b2db uxtb r3, r3 8021cd0: 2b00 cmp r3, #0 8021cd2: d11a bne.n 8021d0a return; } /* Timeout has expired */ next_timeout = tmptimeout->next; 8021cd4: 68bb ldr r3, [r7, #8] 8021cd6: 681b ldr r3, [r3, #0] 8021cd8: 4a0e ldr r2, [pc, #56] @ (8021d14 ) 8021cda: 6013 str r3, [r2, #0] handler = tmptimeout->h; 8021cdc: 68bb ldr r3, [r7, #8] 8021cde: 689b ldr r3, [r3, #8] 8021ce0: 607b str r3, [r7, #4] arg = tmptimeout->arg; 8021ce2: 68bb ldr r3, [r7, #8] 8021ce4: 68db ldr r3, [r3, #12] 8021ce6: 603b str r3, [r7, #0] current_timeout_due_time = tmptimeout->time; 8021ce8: 68bb ldr r3, [r7, #8] 8021cea: 685b ldr r3, [r3, #4] 8021cec: 4a0a ldr r2, [pc, #40] @ (8021d18 ) 8021cee: 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); 8021cf0: 68b9 ldr r1, [r7, #8] 8021cf2: 200a movs r0, #10 8021cf4: f7f8 fc6c bl 801a5d0 if (handler != NULL) { 8021cf8: 687b ldr r3, [r7, #4] 8021cfa: 2b00 cmp r3, #0 8021cfc: d0da beq.n 8021cb4 handler(arg); 8021cfe: 687b ldr r3, [r7, #4] 8021d00: 6838 ldr r0, [r7, #0] 8021d02: 4798 blx r3 do { 8021d04: e7d6 b.n 8021cb4 return; 8021d06: bf00 nop 8021d08: e000 b.n 8021d0c return; 8021d0a: bf00 nop } LWIP_TCPIP_THREAD_ALIVE(); /* Repeat until all expired timers have been called */ } while (1); } 8021d0c: 3710 adds r7, #16 8021d0e: 46bd mov sp, r7 8021d10: bd80 pop {r7, pc} 8021d12: bf00 nop 8021d14: 2402afcc .word 0x2402afcc 8021d18: 2402afd0 .word 0x2402afd0 08021d1c : /** Return the time left before the next timeout is due. If no timeouts are * enqueued, returns 0xffffffff */ u32_t sys_timeouts_sleeptime(void) { 8021d1c: b580 push {r7, lr} 8021d1e: b082 sub sp, #8 8021d20: af00 add r7, sp, #0 u32_t now; LWIP_ASSERT_CORE_LOCKED(); 8021d22: f7ef f991 bl 8011048 if (next_timeout == NULL) { 8021d26: 4b16 ldr r3, [pc, #88] @ (8021d80 ) 8021d28: 681b ldr r3, [r3, #0] 8021d2a: 2b00 cmp r3, #0 8021d2c: d102 bne.n 8021d34 return SYS_TIMEOUTS_SLEEPTIME_INFINITE; 8021d2e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8021d32: e020 b.n 8021d76 } now = sys_now(); 8021d34: f7ee feec bl 8010b10 8021d38: 6078 str r0, [r7, #4] if (TIME_LESS_THAN(next_timeout->time, now)) { 8021d3a: 4b11 ldr r3, [pc, #68] @ (8021d80 ) 8021d3c: 681b ldr r3, [r3, #0] 8021d3e: 685a ldr r2, [r3, #4] 8021d40: 687b ldr r3, [r7, #4] 8021d42: 1ad3 subs r3, r2, r3 8021d44: 0fdb lsrs r3, r3, #31 8021d46: f003 0301 and.w r3, r3, #1 8021d4a: b2db uxtb r3, r3 8021d4c: 2b00 cmp r3, #0 8021d4e: d001 beq.n 8021d54 return 0; 8021d50: 2300 movs r3, #0 8021d52: e010 b.n 8021d76 } else { u32_t ret = (u32_t)(next_timeout->time - now); 8021d54: 4b0a ldr r3, [pc, #40] @ (8021d80 ) 8021d56: 681b ldr r3, [r3, #0] 8021d58: 685a ldr r2, [r3, #4] 8021d5a: 687b ldr r3, [r7, #4] 8021d5c: 1ad3 subs r3, r2, r3 8021d5e: 603b str r3, [r7, #0] LWIP_ASSERT("invalid sleeptime", ret <= LWIP_MAX_TIMEOUT); 8021d60: 683b ldr r3, [r7, #0] 8021d62: 2b00 cmp r3, #0 8021d64: da06 bge.n 8021d74 8021d66: 4b07 ldr r3, [pc, #28] @ (8021d84 ) 8021d68: f44f 72dc mov.w r2, #440 @ 0x1b8 8021d6c: 4906 ldr r1, [pc, #24] @ (8021d88 ) 8021d6e: 4807 ldr r0, [pc, #28] @ (8021d8c ) 8021d70: f008 fd94 bl 802a89c return ret; 8021d74: 683b ldr r3, [r7, #0] } } 8021d76: 4618 mov r0, r3 8021d78: 3708 adds r7, #8 8021d7a: 46bd mov sp, r7 8021d7c: bd80 pop {r7, pc} 8021d7e: bf00 nop 8021d80: 2402afcc .word 0x2402afcc 8021d84: 08030a38 .word 0x08030a38 8021d88: 08030b0c .word 0x08030b0c 8021d8c: 08030aac .word 0x08030aac 08021d90 : /** * Initialize this module. */ void udp_init(void) { 8021d90: b580 push {r7, lr} 8021d92: af00 add r7, sp, #0 #ifdef LWIP_RAND udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND()); 8021d94: f007 fa58 bl 8029248 8021d98: 4603 mov r3, r0 8021d9a: b29b uxth r3, r3 8021d9c: f3c3 030d ubfx r3, r3, #0, #14 8021da0: b29b uxth r3, r3 8021da2: f5a3 4380 sub.w r3, r3, #16384 @ 0x4000 8021da6: b29a uxth r2, r3 8021da8: 4b01 ldr r3, [pc, #4] @ (8021db0 ) 8021daa: 801a strh r2, [r3, #0] #endif /* LWIP_RAND */ } 8021dac: bf00 nop 8021dae: bd80 pop {r7, pc} 8021db0: 24000054 .word 0x24000054 08021db4 : * * @return a new (free) local UDP port number */ static u16_t udp_new_port(void) { 8021db4: b480 push {r7} 8021db6: b083 sub sp, #12 8021db8: af00 add r7, sp, #0 u16_t n = 0; 8021dba: 2300 movs r3, #0 8021dbc: 80fb strh r3, [r7, #6] struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 8021dbe: 4b17 ldr r3, [pc, #92] @ (8021e1c ) 8021dc0: 881b ldrh r3, [r3, #0] 8021dc2: 1c5a adds r2, r3, #1 8021dc4: b291 uxth r1, r2 8021dc6: 4a15 ldr r2, [pc, #84] @ (8021e1c ) 8021dc8: 8011 strh r1, [r2, #0] 8021dca: f64f 72ff movw r2, #65535 @ 0xffff 8021dce: 4293 cmp r3, r2 8021dd0: d103 bne.n 8021dda udp_port = UDP_LOCAL_PORT_RANGE_START; 8021dd2: 4b12 ldr r3, [pc, #72] @ (8021e1c ) 8021dd4: f44f 4240 mov.w r2, #49152 @ 0xc000 8021dd8: 801a strh r2, [r3, #0] } /* Check all PCBs. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8021dda: 4b11 ldr r3, [pc, #68] @ (8021e20 ) 8021ddc: 681b ldr r3, [r3, #0] 8021dde: 603b str r3, [r7, #0] 8021de0: e011 b.n 8021e06 if (pcb->local_port == udp_port) { 8021de2: 683b ldr r3, [r7, #0] 8021de4: 8a5a ldrh r2, [r3, #18] 8021de6: 4b0d ldr r3, [pc, #52] @ (8021e1c ) 8021de8: 881b ldrh r3, [r3, #0] 8021dea: 429a cmp r2, r3 8021dec: d108 bne.n 8021e00 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 8021dee: 88fb ldrh r3, [r7, #6] 8021df0: 3301 adds r3, #1 8021df2: 80fb strh r3, [r7, #6] 8021df4: 88fb ldrh r3, [r7, #6] 8021df6: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 8021dfa: d3e0 bcc.n 8021dbe return 0; 8021dfc: 2300 movs r3, #0 8021dfe: e007 b.n 8021e10 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8021e00: 683b ldr r3, [r7, #0] 8021e02: 68db ldr r3, [r3, #12] 8021e04: 603b str r3, [r7, #0] 8021e06: 683b ldr r3, [r7, #0] 8021e08: 2b00 cmp r3, #0 8021e0a: d1ea bne.n 8021de2 } goto again; } } return udp_port; 8021e0c: 4b03 ldr r3, [pc, #12] @ (8021e1c ) 8021e0e: 881b ldrh r3, [r3, #0] } 8021e10: 4618 mov r0, r3 8021e12: 370c adds r7, #12 8021e14: 46bd mov sp, r7 8021e16: f85d 7b04 ldr.w r7, [sp], #4 8021e1a: 4770 bx lr 8021e1c: 24000054 .word 0x24000054 8021e20: 2402afd8 .word 0x2402afd8 08021e24 : * @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) { 8021e24: b580 push {r7, lr} 8021e26: b084 sub sp, #16 8021e28: af00 add r7, sp, #0 8021e2a: 60f8 str r0, [r7, #12] 8021e2c: 60b9 str r1, [r7, #8] 8021e2e: 4613 mov r3, r2 8021e30: 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); 8021e32: 68fb ldr r3, [r7, #12] 8021e34: 2b00 cmp r3, #0 8021e36: d105 bne.n 8021e44 8021e38: 4b27 ldr r3, [pc, #156] @ (8021ed8 ) 8021e3a: 2287 movs r2, #135 @ 0x87 8021e3c: 4927 ldr r1, [pc, #156] @ (8021edc ) 8021e3e: 4828 ldr r0, [pc, #160] @ (8021ee0 ) 8021e40: f008 fd2c bl 802a89c LWIP_ASSERT("udp_input_local_match: invalid netif", inp != NULL); 8021e44: 68bb ldr r3, [r7, #8] 8021e46: 2b00 cmp r3, #0 8021e48: d105 bne.n 8021e56 8021e4a: 4b23 ldr r3, [pc, #140] @ (8021ed8 ) 8021e4c: 2288 movs r2, #136 @ 0x88 8021e4e: 4925 ldr r1, [pc, #148] @ (8021ee4 ) 8021e50: 4823 ldr r0, [pc, #140] @ (8021ee0 ) 8021e52: f008 fd23 bl 802a89c /* check if PCB is bound to specific netif */ if ((pcb->netif_idx != NETIF_NO_INDEX) && 8021e56: 68fb ldr r3, [r7, #12] 8021e58: 7a1b ldrb r3, [r3, #8] 8021e5a: 2b00 cmp r3, #0 8021e5c: d00b beq.n 8021e76 (pcb->netif_idx != netif_get_index(ip_data.current_input_netif))) { 8021e5e: 68fb ldr r3, [r7, #12] 8021e60: 7a1a ldrb r2, [r3, #8] 8021e62: 4b21 ldr r3, [pc, #132] @ (8021ee8 ) 8021e64: 685b ldr r3, [r3, #4] 8021e66: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8021e6a: 3301 adds r3, #1 8021e6c: b2db uxtb r3, r3 if ((pcb->netif_idx != NETIF_NO_INDEX) && 8021e6e: 429a cmp r2, r3 8021e70: d001 beq.n 8021e76 return 0; 8021e72: 2300 movs r3, #0 8021e74: e02b b.n 8021ece /* 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) { 8021e76: 79fb ldrb r3, [r7, #7] 8021e78: 2b00 cmp r3, #0 8021e7a: d018 beq.n 8021eae #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)) || 8021e7c: 68fb ldr r3, [r7, #12] 8021e7e: 2b00 cmp r3, #0 8021e80: d013 beq.n 8021eaa 8021e82: 68fb ldr r3, [r7, #12] 8021e84: 681b ldr r3, [r3, #0] 8021e86: 2b00 cmp r3, #0 8021e88: d00f beq.n 8021eaa ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 8021e8a: 4b17 ldr r3, [pc, #92] @ (8021ee8 ) 8021e8c: 695b ldr r3, [r3, #20] if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 8021e8e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8021e92: d00a beq.n 8021eaa ip4_addr_netcmp(ip_2_ip4(&pcb->local_ip), ip4_current_dest_addr(), netif_ip4_netmask(inp))) { 8021e94: 68fb ldr r3, [r7, #12] 8021e96: 681a ldr r2, [r3, #0] 8021e98: 4b13 ldr r3, [pc, #76] @ (8021ee8 ) 8021e9a: 695b ldr r3, [r3, #20] 8021e9c: 405a eors r2, r3 8021e9e: 68bb ldr r3, [r7, #8] 8021ea0: 3308 adds r3, #8 8021ea2: 681b ldr r3, [r3, #0] 8021ea4: 4013 ands r3, r2 ((ip4_current_dest_addr()->addr == IPADDR_BROADCAST)) || 8021ea6: 2b00 cmp r3, #0 8021ea8: d110 bne.n 8021ecc return 1; 8021eaa: 2301 movs r3, #1 8021eac: e00f b.n 8021ece } } } 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())) { 8021eae: 68fb ldr r3, [r7, #12] 8021eb0: 2b00 cmp r3, #0 8021eb2: d009 beq.n 8021ec8 8021eb4: 68fb ldr r3, [r7, #12] 8021eb6: 681b ldr r3, [r3, #0] 8021eb8: 2b00 cmp r3, #0 8021eba: d005 beq.n 8021ec8 8021ebc: 68fb ldr r3, [r7, #12] 8021ebe: 681a ldr r2, [r3, #0] 8021ec0: 4b09 ldr r3, [pc, #36] @ (8021ee8 ) 8021ec2: 695b ldr r3, [r3, #20] 8021ec4: 429a cmp r2, r3 8021ec6: d101 bne.n 8021ecc return 1; 8021ec8: 2301 movs r3, #1 8021eca: e000 b.n 8021ece } } return 0; 8021ecc: 2300 movs r3, #0 } 8021ece: 4618 mov r0, r3 8021ed0: 3710 adds r7, #16 8021ed2: 46bd mov sp, r7 8021ed4: bd80 pop {r7, pc} 8021ed6: bf00 nop 8021ed8: 08030b20 .word 0x08030b20 8021edc: 08030b50 .word 0x08030b50 8021ee0: 08030b74 .word 0x08030b74 8021ee4: 08030b9c .word 0x08030b9c 8021ee8: 24024428 .word 0x24024428 08021eec : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 8021eec: b590 push {r4, r7, lr} 8021eee: b08d sub sp, #52 @ 0x34 8021ef0: af02 add r7, sp, #8 8021ef2: 6078 str r0, [r7, #4] 8021ef4: 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; 8021ef6: 2300 movs r3, #0 8021ef8: 77fb strb r3, [r7, #31] LWIP_UNUSED_ARG(inp); LWIP_ASSERT_CORE_LOCKED(); 8021efa: f7ef f8a5 bl 8011048 LWIP_ASSERT("udp_input: invalid pbuf", p != NULL); 8021efe: 687b ldr r3, [r7, #4] 8021f00: 2b00 cmp r3, #0 8021f02: d105 bne.n 8021f10 8021f04: 4b7c ldr r3, [pc, #496] @ (80220f8 ) 8021f06: 22cf movs r2, #207 @ 0xcf 8021f08: 497c ldr r1, [pc, #496] @ (80220fc ) 8021f0a: 487d ldr r0, [pc, #500] @ (8022100 ) 8021f0c: f008 fcc6 bl 802a89c LWIP_ASSERT("udp_input: invalid netif", inp != NULL); 8021f10: 683b ldr r3, [r7, #0] 8021f12: 2b00 cmp r3, #0 8021f14: d105 bne.n 8021f22 8021f16: 4b78 ldr r3, [pc, #480] @ (80220f8 ) 8021f18: 22d0 movs r2, #208 @ 0xd0 8021f1a: 497a ldr r1, [pc, #488] @ (8022104 ) 8021f1c: 4878 ldr r0, [pc, #480] @ (8022100 ) 8021f1e: f008 fcbd bl 802a89c PERF_START; UDP_STATS_INC(udp.recv); /* Check minimum length (UDP header) */ if (p->len < UDP_HLEN) { 8021f22: 687b ldr r3, [r7, #4] 8021f24: 895b ldrh r3, [r3, #10] 8021f26: 2b07 cmp r3, #7 8021f28: d803 bhi.n 8021f32 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); 8021f2a: 6878 ldr r0, [r7, #4] 8021f2c: f7f9 fa3e bl 801b3ac goto end; 8021f30: e0de b.n 80220f0 } udphdr = (struct udp_hdr *)p->payload; 8021f32: 687b ldr r3, [r7, #4] 8021f34: 685b ldr r3, [r3, #4] 8021f36: 617b str r3, [r7, #20] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(ip_current_dest_addr(), ip_current_netif()); 8021f38: 4b73 ldr r3, [pc, #460] @ (8022108 ) 8021f3a: 695b ldr r3, [r3, #20] 8021f3c: 4a72 ldr r2, [pc, #456] @ (8022108 ) 8021f3e: 6812 ldr r2, [r2, #0] 8021f40: 4611 mov r1, r2 8021f42: 4618 mov r0, r3 8021f44: f003 ff54 bl 8025df0 8021f48: 4603 mov r3, r0 8021f4a: 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); 8021f4c: 697b ldr r3, [r7, #20] 8021f4e: 881b ldrh r3, [r3, #0] 8021f50: b29b uxth r3, r3 8021f52: 4618 mov r0, r3 8021f54: f7f7 fd48 bl 80199e8 8021f58: 4603 mov r3, r0 8021f5a: 823b strh r3, [r7, #16] dest = lwip_ntohs(udphdr->dest); 8021f5c: 697b ldr r3, [r7, #20] 8021f5e: 885b ldrh r3, [r3, #2] 8021f60: b29b uxth r3, r3 8021f62: 4618 mov r0, r3 8021f64: f7f7 fd40 bl 80199e8 8021f68: 4603 mov r3, r0 8021f6a: 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; 8021f6c: 2300 movs r3, #0 8021f6e: 623b str r3, [r7, #32] prev = NULL; 8021f70: 2300 movs r3, #0 8021f72: 627b str r3, [r7, #36] @ 0x24 uncon_pcb = NULL; 8021f74: 2300 movs r3, #0 8021f76: 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) { 8021f78: 4b64 ldr r3, [pc, #400] @ (802210c ) 8021f7a: 681b ldr r3, [r3, #0] 8021f7c: 623b str r3, [r7, #32] 8021f7e: e054 b.n 802202a 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) && 8021f80: 6a3b ldr r3, [r7, #32] 8021f82: 8a5b ldrh r3, [r3, #18] 8021f84: 89fa ldrh r2, [r7, #14] 8021f86: 429a cmp r2, r3 8021f88: d14a bne.n 8022020 (udp_input_local_match(pcb, inp, broadcast) != 0)) { 8021f8a: 7cfb ldrb r3, [r7, #19] 8021f8c: 461a mov r2, r3 8021f8e: 6839 ldr r1, [r7, #0] 8021f90: 6a38 ldr r0, [r7, #32] 8021f92: f7ff ff47 bl 8021e24 8021f96: 4603 mov r3, r0 if ((pcb->local_port == dest) && 8021f98: 2b00 cmp r3, #0 8021f9a: d041 beq.n 8022020 if ((pcb->flags & UDP_FLAGS_CONNECTED) == 0) { 8021f9c: 6a3b ldr r3, [r7, #32] 8021f9e: 7c1b ldrb r3, [r3, #16] 8021fa0: f003 0304 and.w r3, r3, #4 8021fa4: 2b00 cmp r3, #0 8021fa6: d11d bne.n 8021fe4 if (uncon_pcb == NULL) { 8021fa8: 69bb ldr r3, [r7, #24] 8021faa: 2b00 cmp r3, #0 8021fac: d102 bne.n 8021fb4 /* the first unconnected matching PCB */ uncon_pcb = pcb; 8021fae: 6a3b ldr r3, [r7, #32] 8021fb0: 61bb str r3, [r7, #24] 8021fb2: e017 b.n 8021fe4 #if LWIP_IPV4 } else if (broadcast && ip4_current_dest_addr()->addr == IPADDR_BROADCAST) { 8021fb4: 7cfb ldrb r3, [r7, #19] 8021fb6: 2b00 cmp r3, #0 8021fb8: d014 beq.n 8021fe4 8021fba: 4b53 ldr r3, [pc, #332] @ (8022108 ) 8021fbc: 695b ldr r3, [r3, #20] 8021fbe: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8021fc2: d10f bne.n 8021fe4 /* 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))) { 8021fc4: 69bb ldr r3, [r7, #24] 8021fc6: 681a ldr r2, [r3, #0] 8021fc8: 683b ldr r3, [r7, #0] 8021fca: 3304 adds r3, #4 8021fcc: 681b ldr r3, [r3, #0] 8021fce: 429a cmp r2, r3 8021fd0: d008 beq.n 8021fe4 /* 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))) { 8021fd2: 6a3b ldr r3, [r7, #32] 8021fd4: 681a ldr r2, [r3, #0] 8021fd6: 683b ldr r3, [r7, #0] 8021fd8: 3304 adds r3, #4 8021fda: 681b ldr r3, [r3, #0] 8021fdc: 429a cmp r2, r3 8021fde: d101 bne.n 8021fe4 /* better match */ uncon_pcb = pcb; 8021fe0: 6a3b ldr r3, [r7, #32] 8021fe2: 61bb str r3, [r7, #24] } #endif /* SO_REUSE */ } /* compare PCB remote addr+port to UDP source addr+port */ if ((pcb->remote_port == src) && 8021fe4: 6a3b ldr r3, [r7, #32] 8021fe6: 8a9b ldrh r3, [r3, #20] 8021fe8: 8a3a ldrh r2, [r7, #16] 8021fea: 429a cmp r2, r3 8021fec: d118 bne.n 8022020 (ip_addr_isany_val(pcb->remote_ip) || 8021fee: 6a3b ldr r3, [r7, #32] 8021ff0: 685b ldr r3, [r3, #4] if ((pcb->remote_port == src) && 8021ff2: 2b00 cmp r3, #0 8021ff4: d005 beq.n 8022002 ip_addr_cmp(&pcb->remote_ip, ip_current_src_addr()))) { 8021ff6: 6a3b ldr r3, [r7, #32] 8021ff8: 685a ldr r2, [r3, #4] 8021ffa: 4b43 ldr r3, [pc, #268] @ (8022108 ) 8021ffc: 691b ldr r3, [r3, #16] (ip_addr_isany_val(pcb->remote_ip) || 8021ffe: 429a cmp r2, r3 8022000: d10e bne.n 8022020 /* the first fully matching PCB */ if (prev != NULL) { 8022002: 6a7b ldr r3, [r7, #36] @ 0x24 8022004: 2b00 cmp r3, #0 8022006: d014 beq.n 8022032 /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; 8022008: 6a3b ldr r3, [r7, #32] 802200a: 68da ldr r2, [r3, #12] 802200c: 6a7b ldr r3, [r7, #36] @ 0x24 802200e: 60da str r2, [r3, #12] pcb->next = udp_pcbs; 8022010: 4b3e ldr r3, [pc, #248] @ (802210c ) 8022012: 681a ldr r2, [r3, #0] 8022014: 6a3b ldr r3, [r7, #32] 8022016: 60da str r2, [r3, #12] udp_pcbs = pcb; 8022018: 4a3c ldr r2, [pc, #240] @ (802210c ) 802201a: 6a3b ldr r3, [r7, #32] 802201c: 6013 str r3, [r2, #0] } else { UDP_STATS_INC(udp.cachehit); } break; 802201e: e008 b.n 8022032 } } prev = pcb; 8022020: 6a3b ldr r3, [r7, #32] 8022022: 627b str r3, [r7, #36] @ 0x24 for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 8022024: 6a3b ldr r3, [r7, #32] 8022026: 68db ldr r3, [r3, #12] 8022028: 623b str r3, [r7, #32] 802202a: 6a3b ldr r3, [r7, #32] 802202c: 2b00 cmp r3, #0 802202e: d1a7 bne.n 8021f80 8022030: e000 b.n 8022034 break; 8022032: bf00 nop } /* no fully matching pcb found? then look for an unconnected pcb */ if (pcb == NULL) { 8022034: 6a3b ldr r3, [r7, #32] 8022036: 2b00 cmp r3, #0 8022038: d101 bne.n 802203e pcb = uncon_pcb; 802203a: 69bb ldr r3, [r7, #24] 802203c: 623b str r3, [r7, #32] } /* Check checksum if this is a match or if it was directed at us. */ if (pcb != NULL) { 802203e: 6a3b ldr r3, [r7, #32] 8022040: 2b00 cmp r3, #0 8022042: d002 beq.n 802204a for_us = 1; 8022044: 2301 movs r3, #1 8022046: 77fb strb r3, [r7, #31] 8022048: e00a b.n 8022060 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()); 802204a: 683b ldr r3, [r7, #0] 802204c: 3304 adds r3, #4 802204e: 681a ldr r2, [r3, #0] 8022050: 4b2d ldr r3, [pc, #180] @ (8022108 ) 8022052: 695b ldr r3, [r3, #20] 8022054: 429a cmp r2, r3 8022056: bf0c ite eq 8022058: 2301 moveq r3, #1 802205a: 2300 movne r3, #0 802205c: b2db uxtb r3, r3 802205e: 77fb strb r3, [r7, #31] } #endif /* LWIP_IPV4 */ } if (for_us) { 8022060: 7ffb ldrb r3, [r7, #31] 8022062: 2b00 cmp r3, #0 8022064: d041 beq.n 80220ea } } } } #endif /* CHECKSUM_CHECK_UDP */ if (pbuf_remove_header(p, UDP_HLEN)) { 8022066: 2108 movs r1, #8 8022068: 6878 ldr r0, [r7, #4] 802206a: f7f9 f8e7 bl 801b23c 802206e: 4603 mov r3, r0 8022070: 2b00 cmp r3, #0 8022072: d00a beq.n 802208a /* Can we cope with this failing? Just assert for now */ LWIP_ASSERT("pbuf_remove_header failed\n", 0); 8022074: 4b20 ldr r3, [pc, #128] @ (80220f8 ) 8022076: f44f 72b8 mov.w r2, #368 @ 0x170 802207a: 4925 ldr r1, [pc, #148] @ (8022110 ) 802207c: 4820 ldr r0, [pc, #128] @ (8022100 ) 802207e: f008 fc0d bl 802a89c UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); 8022082: 6878 ldr r0, [r7, #4] 8022084: f7f9 f992 bl 801b3ac goto end; 8022088: e032 b.n 80220f0 } if (pcb != NULL) { 802208a: 6a3b ldr r3, [r7, #32] 802208c: 2b00 cmp r3, #0 802208e: d012 beq.n 80220b6 } } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 8022090: 6a3b ldr r3, [r7, #32] 8022092: 699b ldr r3, [r3, #24] 8022094: 2b00 cmp r3, #0 8022096: d00a beq.n 80220ae /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 8022098: 6a3b ldr r3, [r7, #32] 802209a: 699c ldr r4, [r3, #24] 802209c: 6a3b ldr r3, [r7, #32] 802209e: 69d8 ldr r0, [r3, #28] 80220a0: 8a3b ldrh r3, [r7, #16] 80220a2: 9300 str r3, [sp, #0] 80220a4: 4b1b ldr r3, [pc, #108] @ (8022114 ) 80220a6: 687a ldr r2, [r7, #4] 80220a8: 6a39 ldr r1, [r7, #32] 80220aa: 47a0 blx r4 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); return; 80220ac: e021 b.n 80220f2 pbuf_free(p); 80220ae: 6878 ldr r0, [r7, #4] 80220b0: f7f9 f97c bl 801b3ac goto end; 80220b4: e01c b.n 80220f0 if (!broadcast && !ip_addr_ismulticast(ip_current_dest_addr())) { 80220b6: 7cfb ldrb r3, [r7, #19] 80220b8: 2b00 cmp r3, #0 80220ba: d112 bne.n 80220e2 80220bc: 4b12 ldr r3, [pc, #72] @ (8022108 ) 80220be: 695b ldr r3, [r3, #20] 80220c0: f003 03f0 and.w r3, r3, #240 @ 0xf0 80220c4: 2be0 cmp r3, #224 @ 0xe0 80220c6: d00c beq.n 80220e2 pbuf_header_force(p, (s16_t)(ip_current_header_tot_len() + UDP_HLEN)); 80220c8: 4b0f ldr r3, [pc, #60] @ (8022108 ) 80220ca: 899b ldrh r3, [r3, #12] 80220cc: 3308 adds r3, #8 80220ce: b29b uxth r3, r3 80220d0: b21b sxth r3, r3 80220d2: 4619 mov r1, r3 80220d4: 6878 ldr r0, [r7, #4] 80220d6: f7f9 f924 bl 801b322 icmp_port_unreach(ip_current_is_v6(), p); 80220da: 2103 movs r1, #3 80220dc: 6878 ldr r0, [r7, #4] 80220de: f003 fb3b bl 8025758 pbuf_free(p); 80220e2: 6878 ldr r0, [r7, #4] 80220e4: f7f9 f962 bl 801b3ac return; 80220e8: e003 b.n 80220f2 pbuf_free(p); 80220ea: 6878 ldr r0, [r7, #4] 80220ec: f7f9 f95e bl 801b3ac return; 80220f0: bf00 nop UDP_STATS_INC(udp.drop); MIB2_STATS_INC(mib2.udpinerrors); pbuf_free(p); PERF_STOP("udp_input"); #endif /* CHECKSUM_CHECK_UDP */ } 80220f2: 372c adds r7, #44 @ 0x2c 80220f4: 46bd mov sp, r7 80220f6: bd90 pop {r4, r7, pc} 80220f8: 08030b20 .word 0x08030b20 80220fc: 08030bc4 .word 0x08030bc4 8022100: 08030b74 .word 0x08030b74 8022104: 08030bdc .word 0x08030bdc 8022108: 24024428 .word 0x24024428 802210c: 2402afd8 .word 0x2402afd8 8022110: 08030bf8 .word 0x08030bf8 8022114: 24024438 .word 0x24024438 08022118 : * * @see udp_disconnect() udp_sendto() */ err_t udp_send(struct udp_pcb *pcb, struct pbuf *p) { 8022118: b580 push {r7, lr} 802211a: b082 sub sp, #8 802211c: af00 add r7, sp, #0 802211e: 6078 str r0, [r7, #4] 8022120: 6039 str r1, [r7, #0] LWIP_ERROR("udp_send: invalid pcb", pcb != NULL, return ERR_ARG); 8022122: 687b ldr r3, [r7, #4] 8022124: 2b00 cmp r3, #0 8022126: d109 bne.n 802213c 8022128: 4b11 ldr r3, [pc, #68] @ (8022170 ) 802212a: f240 12d5 movw r2, #469 @ 0x1d5 802212e: 4911 ldr r1, [pc, #68] @ (8022174 ) 8022130: 4811 ldr r0, [pc, #68] @ (8022178 ) 8022132: f008 fbb3 bl 802a89c 8022136: f06f 030f mvn.w r3, #15 802213a: e015 b.n 8022168 LWIP_ERROR("udp_send: invalid pbuf", p != NULL, return ERR_ARG); 802213c: 683b ldr r3, [r7, #0] 802213e: 2b00 cmp r3, #0 8022140: d109 bne.n 8022156 8022142: 4b0b ldr r3, [pc, #44] @ (8022170 ) 8022144: f44f 72eb mov.w r2, #470 @ 0x1d6 8022148: 490c ldr r1, [pc, #48] @ (802217c ) 802214a: 480b ldr r0, [pc, #44] @ (8022178 ) 802214c: f008 fba6 bl 802a89c 8022150: f06f 030f mvn.w r3, #15 8022154: e008 b.n 8022168 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); 8022156: 687b ldr r3, [r7, #4] 8022158: 1d1a adds r2, r3, #4 802215a: 687b ldr r3, [r7, #4] 802215c: 8a9b ldrh r3, [r3, #20] 802215e: 6839 ldr r1, [r7, #0] 8022160: 6878 ldr r0, [r7, #4] 8022162: f000 f80d bl 8022180 8022166: 4603 mov r3, r0 } 8022168: 4618 mov r0, r3 802216a: 3708 adds r7, #8 802216c: 46bd mov sp, r7 802216e: bd80 pop {r7, pc} 8022170: 08030b20 .word 0x08030b20 8022174: 08030c14 .word 0x08030c14 8022178: 08030b74 .word 0x08030b74 802217c: 08030c2c .word 0x08030c2c 08022180 : * @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) { 8022180: b580 push {r7, lr} 8022182: b088 sub sp, #32 8022184: af02 add r7, sp, #8 8022186: 60f8 str r0, [r7, #12] 8022188: 60b9 str r1, [r7, #8] 802218a: 607a str r2, [r7, #4] 802218c: 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); 802218e: 68fb ldr r3, [r7, #12] 8022190: 2b00 cmp r3, #0 8022192: d109 bne.n 80221a8 8022194: 4b23 ldr r3, [pc, #140] @ (8022224 ) 8022196: f44f 7206 mov.w r2, #536 @ 0x218 802219a: 4923 ldr r1, [pc, #140] @ (8022228 ) 802219c: 4823 ldr r0, [pc, #140] @ (802222c ) 802219e: f008 fb7d bl 802a89c 80221a2: f06f 030f mvn.w r3, #15 80221a6: e038 b.n 802221a LWIP_ERROR("udp_sendto: invalid pbuf", p != NULL, return ERR_ARG); 80221a8: 68bb ldr r3, [r7, #8] 80221aa: 2b00 cmp r3, #0 80221ac: d109 bne.n 80221c2 80221ae: 4b1d ldr r3, [pc, #116] @ (8022224 ) 80221b0: f240 2219 movw r2, #537 @ 0x219 80221b4: 491e ldr r1, [pc, #120] @ (8022230 ) 80221b6: 481d ldr r0, [pc, #116] @ (802222c ) 80221b8: f008 fb70 bl 802a89c 80221bc: f06f 030f mvn.w r3, #15 80221c0: e02b b.n 802221a LWIP_ERROR("udp_sendto: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 80221c2: 687b ldr r3, [r7, #4] 80221c4: 2b00 cmp r3, #0 80221c6: d109 bne.n 80221dc 80221c8: 4b16 ldr r3, [pc, #88] @ (8022224 ) 80221ca: f240 221a movw r2, #538 @ 0x21a 80221ce: 4919 ldr r1, [pc, #100] @ (8022234 ) 80221d0: 4816 ldr r0, [pc, #88] @ (802222c ) 80221d2: f008 fb63 bl 802a89c 80221d6: f06f 030f mvn.w r3, #15 80221da: e01e b.n 802221a return ERR_VAL; } LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send\n")); if (pcb->netif_idx != NETIF_NO_INDEX) { 80221dc: 68fb ldr r3, [r7, #12] 80221de: 7a1b ldrb r3, [r3, #8] 80221e0: 2b00 cmp r3, #0 80221e2: d006 beq.n 80221f2 netif = netif_get_by_index(pcb->netif_idx); 80221e4: 68fb ldr r3, [r7, #12] 80221e6: 7a1b ldrb r3, [r3, #8] 80221e8: 4618 mov r0, r3 80221ea: f7f8 fd1f bl 801ac2c 80221ee: 6178 str r0, [r7, #20] 80221f0: e003 b.n 80221fa if (netif == NULL) #endif /* LWIP_MULTICAST_TX_OPTIONS */ { /* find the outgoing network interface for this packet */ netif = ip_route(&pcb->local_ip, dst_ip); 80221f2: 6878 ldr r0, [r7, #4] 80221f4: f003 fb44 bl 8025880 80221f8: 6178 str r0, [r7, #20] } } /* no outgoing network interface could be found? */ if (netif == NULL) { 80221fa: 697b ldr r3, [r7, #20] 80221fc: 2b00 cmp r3, #0 80221fe: d102 bne.n 8022206 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; 8022200: f06f 0303 mvn.w r3, #3 8022204: e009 b.n 802221a } #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); 8022206: 887a ldrh r2, [r7, #2] 8022208: 697b ldr r3, [r7, #20] 802220a: 9300 str r3, [sp, #0] 802220c: 4613 mov r3, r2 802220e: 687a ldr r2, [r7, #4] 8022210: 68b9 ldr r1, [r7, #8] 8022212: 68f8 ldr r0, [r7, #12] 8022214: f000 f810 bl 8022238 8022218: 4603 mov r3, r0 #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ } 802221a: 4618 mov r0, r3 802221c: 3718 adds r7, #24 802221e: 46bd mov sp, r7 8022220: bd80 pop {r7, pc} 8022222: bf00 nop 8022224: 08030b20 .word 0x08030b20 8022228: 08030c44 .word 0x08030c44 802222c: 08030b74 .word 0x08030b74 8022230: 08030c5c .word 0x08030c5c 8022234: 08030c78 .word 0x08030c78 08022238 : * @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) { 8022238: b580 push {r7, lr} 802223a: b088 sub sp, #32 802223c: af02 add r7, sp, #8 802223e: 60f8 str r0, [r7, #12] 8022240: 60b9 str r1, [r7, #8] 8022242: 607a str r2, [r7, #4] 8022244: 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); 8022246: 68fb ldr r3, [r7, #12] 8022248: 2b00 cmp r3, #0 802224a: d109 bne.n 8022260 802224c: 4b2e ldr r3, [pc, #184] @ (8022308 ) 802224e: f44f 7220 mov.w r2, #640 @ 0x280 8022252: 492e ldr r1, [pc, #184] @ (802230c ) 8022254: 482e ldr r0, [pc, #184] @ (8022310 ) 8022256: f008 fb21 bl 802a89c 802225a: f06f 030f mvn.w r3, #15 802225e: e04f b.n 8022300 LWIP_ERROR("udp_sendto_if: invalid pbuf", p != NULL, return ERR_ARG); 8022260: 68bb ldr r3, [r7, #8] 8022262: 2b00 cmp r3, #0 8022264: d109 bne.n 802227a 8022266: 4b28 ldr r3, [pc, #160] @ (8022308 ) 8022268: f240 2281 movw r2, #641 @ 0x281 802226c: 4929 ldr r1, [pc, #164] @ (8022314 ) 802226e: 4828 ldr r0, [pc, #160] @ (8022310 ) 8022270: f008 fb14 bl 802a89c 8022274: f06f 030f mvn.w r3, #15 8022278: e042 b.n 8022300 LWIP_ERROR("udp_sendto_if: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 802227a: 687b ldr r3, [r7, #4] 802227c: 2b00 cmp r3, #0 802227e: d109 bne.n 8022294 8022280: 4b21 ldr r3, [pc, #132] @ (8022308 ) 8022282: f240 2282 movw r2, #642 @ 0x282 8022286: 4924 ldr r1, [pc, #144] @ (8022318 ) 8022288: 4821 ldr r0, [pc, #132] @ (8022310 ) 802228a: f008 fb07 bl 802a89c 802228e: f06f 030f mvn.w r3, #15 8022292: e035 b.n 8022300 LWIP_ERROR("udp_sendto_if: invalid netif", netif != NULL, return ERR_ARG); 8022294: 6a3b ldr r3, [r7, #32] 8022296: 2b00 cmp r3, #0 8022298: d109 bne.n 80222ae 802229a: 4b1b ldr r3, [pc, #108] @ (8022308 ) 802229c: f240 2283 movw r2, #643 @ 0x283 80222a0: 491e ldr r1, [pc, #120] @ (802231c ) 80222a2: 481b ldr r0, [pc, #108] @ (8022310 ) 80222a4: f008 fafa bl 802a89c 80222a8: f06f 030f mvn.w r3, #15 80222ac: e028 b.n 8022300 #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)) || 80222ae: 68fb ldr r3, [r7, #12] 80222b0: 2b00 cmp r3, #0 80222b2: d009 beq.n 80222c8 80222b4: 68fb ldr r3, [r7, #12] 80222b6: 681b ldr r3, [r3, #0] 80222b8: 2b00 cmp r3, #0 80222ba: d005 beq.n 80222c8 ip4_addr_ismulticast(ip_2_ip4(&pcb->local_ip))) { 80222bc: 68fb ldr r3, [r7, #12] 80222be: 681b ldr r3, [r3, #0] 80222c0: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip)) || 80222c4: 2be0 cmp r3, #224 @ 0xe0 80222c6: d103 bne.n 80222d0 /* if the local_ip is any or multicast * use the outgoing network interface IP address as source address */ src_ip = netif_ip_addr4(netif); 80222c8: 6a3b ldr r3, [r7, #32] 80222ca: 3304 adds r3, #4 80222cc: 617b str r3, [r7, #20] 80222ce: e00b b.n 80222e8 } 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))) { 80222d0: 68fb ldr r3, [r7, #12] 80222d2: 681a ldr r2, [r3, #0] 80222d4: 6a3b ldr r3, [r7, #32] 80222d6: 3304 adds r3, #4 80222d8: 681b ldr r3, [r3, #0] 80222da: 429a cmp r2, r3 80222dc: d002 beq.n 80222e4 /* local_ip doesn't match, drop the packet */ return ERR_RTE; 80222de: f06f 0303 mvn.w r3, #3 80222e2: e00d b.n 8022300 } /* use UDP PCB local IP address as source address */ src_ip = &pcb->local_ip; 80222e4: 68fb ldr r3, [r7, #12] 80222e6: 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); 80222e8: 887a ldrh r2, [r7, #2] 80222ea: 697b ldr r3, [r7, #20] 80222ec: 9301 str r3, [sp, #4] 80222ee: 6a3b ldr r3, [r7, #32] 80222f0: 9300 str r3, [sp, #0] 80222f2: 4613 mov r3, r2 80222f4: 687a ldr r2, [r7, #4] 80222f6: 68b9 ldr r1, [r7, #8] 80222f8: 68f8 ldr r0, [r7, #12] 80222fa: f000 f811 bl 8022320 80222fe: 4603 mov r3, r0 #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ } 8022300: 4618 mov r0, r3 8022302: 3718 adds r7, #24 8022304: 46bd mov sp, r7 8022306: bd80 pop {r7, pc} 8022308: 08030b20 .word 0x08030b20 802230c: 08030c94 .word 0x08030c94 8022310: 08030b74 .word 0x08030b74 8022314: 08030cb0 .word 0x08030cb0 8022318: 08030ccc .word 0x08030ccc 802231c: 08030cec .word 0x08030cec 08022320 : /** @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) { 8022320: b580 push {r7, lr} 8022322: b08c sub sp, #48 @ 0x30 8022324: af04 add r7, sp, #16 8022326: 60f8 str r0, [r7, #12] 8022328: 60b9 str r1, [r7, #8] 802232a: 607a str r2, [r7, #4] 802232c: 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(); 802232e: f7ee fe8b bl 8011048 LWIP_ERROR("udp_sendto_if_src: invalid pcb", pcb != NULL, return ERR_ARG); 8022332: 68fb ldr r3, [r7, #12] 8022334: 2b00 cmp r3, #0 8022336: d109 bne.n 802234c 8022338: 4b65 ldr r3, [pc, #404] @ (80224d0 ) 802233a: f240 22d1 movw r2, #721 @ 0x2d1 802233e: 4965 ldr r1, [pc, #404] @ (80224d4 ) 8022340: 4865 ldr r0, [pc, #404] @ (80224d8 ) 8022342: f008 faab bl 802a89c 8022346: f06f 030f mvn.w r3, #15 802234a: e0bc b.n 80224c6 LWIP_ERROR("udp_sendto_if_src: invalid pbuf", p != NULL, return ERR_ARG); 802234c: 68bb ldr r3, [r7, #8] 802234e: 2b00 cmp r3, #0 8022350: d109 bne.n 8022366 8022352: 4b5f ldr r3, [pc, #380] @ (80224d0 ) 8022354: f240 22d2 movw r2, #722 @ 0x2d2 8022358: 4960 ldr r1, [pc, #384] @ (80224dc ) 802235a: 485f ldr r0, [pc, #380] @ (80224d8 ) 802235c: f008 fa9e bl 802a89c 8022360: f06f 030f mvn.w r3, #15 8022364: e0af b.n 80224c6 LWIP_ERROR("udp_sendto_if_src: invalid dst_ip", dst_ip != NULL, return ERR_ARG); 8022366: 687b ldr r3, [r7, #4] 8022368: 2b00 cmp r3, #0 802236a: d109 bne.n 8022380 802236c: 4b58 ldr r3, [pc, #352] @ (80224d0 ) 802236e: f240 22d3 movw r2, #723 @ 0x2d3 8022372: 495b ldr r1, [pc, #364] @ (80224e0 ) 8022374: 4858 ldr r0, [pc, #352] @ (80224d8 ) 8022376: f008 fa91 bl 802a89c 802237a: f06f 030f mvn.w r3, #15 802237e: e0a2 b.n 80224c6 LWIP_ERROR("udp_sendto_if_src: invalid src_ip", src_ip != NULL, return ERR_ARG); 8022380: 6afb ldr r3, [r7, #44] @ 0x2c 8022382: 2b00 cmp r3, #0 8022384: d109 bne.n 802239a 8022386: 4b52 ldr r3, [pc, #328] @ (80224d0 ) 8022388: f44f 7235 mov.w r2, #724 @ 0x2d4 802238c: 4955 ldr r1, [pc, #340] @ (80224e4 ) 802238e: 4852 ldr r0, [pc, #328] @ (80224d8 ) 8022390: f008 fa84 bl 802a89c 8022394: f06f 030f mvn.w r3, #15 8022398: e095 b.n 80224c6 LWIP_ERROR("udp_sendto_if_src: invalid netif", netif != NULL, return ERR_ARG); 802239a: 6abb ldr r3, [r7, #40] @ 0x28 802239c: 2b00 cmp r3, #0 802239e: d109 bne.n 80223b4 80223a0: 4b4b ldr r3, [pc, #300] @ (80224d0 ) 80223a2: f240 22d5 movw r2, #725 @ 0x2d5 80223a6: 4950 ldr r1, [pc, #320] @ (80224e8 ) 80223a8: 484b ldr r0, [pc, #300] @ (80224d8 ) 80223aa: f008 fa77 bl 802a89c 80223ae: f06f 030f mvn.w r3, #15 80223b2: e088 b.n 80224c6 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) { 80223b4: 68fb ldr r3, [r7, #12] 80223b6: 8a5b ldrh r3, [r3, #18] 80223b8: 2b00 cmp r3, #0 80223ba: d10f bne.n 80223dc 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); 80223bc: 68f9 ldr r1, [r7, #12] 80223be: 68fb ldr r3, [r7, #12] 80223c0: 8a5b ldrh r3, [r3, #18] 80223c2: 461a mov r2, r3 80223c4: 68f8 ldr r0, [r7, #12] 80223c6: f000 f893 bl 80224f0 80223ca: 4603 mov r3, r0 80223cc: 76fb strb r3, [r7, #27] if (err != ERR_OK) { 80223ce: f997 301b ldrsb.w r3, [r7, #27] 80223d2: 2b00 cmp r3, #0 80223d4: d002 beq.n 80223dc LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: forced port bind failed\n")); return err; 80223d6: f997 301b ldrsb.w r3, [r7, #27] 80223da: e074 b.n 80224c6 } } /* packet too large to add a UDP header without causing an overflow? */ if ((u16_t)(p->tot_len + UDP_HLEN) < p->tot_len) { 80223dc: 68bb ldr r3, [r7, #8] 80223de: 891b ldrh r3, [r3, #8] 80223e0: f64f 72f7 movw r2, #65527 @ 0xfff7 80223e4: 4293 cmp r3, r2 80223e6: d902 bls.n 80223ee return ERR_MEM; 80223e8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80223ec: e06b b.n 80224c6 } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_add_header(p, UDP_HLEN)) { 80223ee: 2108 movs r1, #8 80223f0: 68b8 ldr r0, [r7, #8] 80223f2: f7f8 ff13 bl 801b21c 80223f6: 4603 mov r3, r0 80223f8: 2b00 cmp r3, #0 80223fa: d015 beq.n 8022428 /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); 80223fc: f44f 7220 mov.w r2, #640 @ 0x280 8022400: 2108 movs r1, #8 8022402: 2022 movs r0, #34 @ 0x22 8022404: f7f8 fcbc bl 801ad80 8022408: 61f8 str r0, [r7, #28] /* new header pbuf could not be allocated? */ if (q == NULL) { 802240a: 69fb ldr r3, [r7, #28] 802240c: 2b00 cmp r3, #0 802240e: d102 bne.n 8022416 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); return ERR_MEM; 8022410: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8022414: e057 b.n 80224c6 } if (p->tot_len != 0) { 8022416: 68bb ldr r3, [r7, #8] 8022418: 891b ldrh r3, [r3, #8] 802241a: 2b00 cmp r3, #0 802241c: d006 beq.n 802242c /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 802241e: 68b9 ldr r1, [r7, #8] 8022420: 69f8 ldr r0, [r7, #28] 8022422: f7f9 f8e7 bl 801b5f4 8022426: e001 b.n 802242c 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; 8022428: 68bb ldr r3, [r7, #8] 802242a: 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", 802242c: 69fb ldr r3, [r7, #28] 802242e: 895b ldrh r3, [r3, #10] 8022430: 2b07 cmp r3, #7 8022432: d806 bhi.n 8022442 8022434: 4b26 ldr r3, [pc, #152] @ (80224d0 ) 8022436: f240 320d movw r2, #781 @ 0x30d 802243a: 492c ldr r1, [pc, #176] @ (80224ec ) 802243c: 4826 ldr r0, [pc, #152] @ (80224d8 ) 802243e: f008 fa2d bl 802a89c (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; 8022442: 69fb ldr r3, [r7, #28] 8022444: 685b ldr r3, [r3, #4] 8022446: 617b str r3, [r7, #20] udphdr->src = lwip_htons(pcb->local_port); 8022448: 68fb ldr r3, [r7, #12] 802244a: 8a5b ldrh r3, [r3, #18] 802244c: 4618 mov r0, r3 802244e: f7f7 facb bl 80199e8 8022452: 4603 mov r3, r0 8022454: 461a mov r2, r3 8022456: 697b ldr r3, [r7, #20] 8022458: 801a strh r2, [r3, #0] udphdr->dest = lwip_htons(dst_port); 802245a: 887b ldrh r3, [r7, #2] 802245c: 4618 mov r0, r3 802245e: f7f7 fac3 bl 80199e8 8022462: 4603 mov r3, r0 8022464: 461a mov r2, r3 8022466: 697b ldr r3, [r7, #20] 8022468: 805a strh r2, [r3, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 802246a: 697b ldr r3, [r7, #20] 802246c: 2200 movs r2, #0 802246e: 719a strb r2, [r3, #6] 8022470: 2200 movs r2, #0 8022472: 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); 8022474: 69fb ldr r3, [r7, #28] 8022476: 891b ldrh r3, [r3, #8] 8022478: 4618 mov r0, r3 802247a: f7f7 fab5 bl 80199e8 802247e: 4603 mov r3, r0 8022480: 461a mov r2, r3 8022482: 697b ldr r3, [r7, #20] 8022484: 809a strh r2, [r3, #4] } udphdr->chksum = udpchksum; } } #endif /* CHECKSUM_GEN_UDP */ ip_proto = IP_PROTO_UDP; 8022486: 2311 movs r3, #17 8022488: 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; 802248a: 68fb ldr r3, [r7, #12] 802248c: 7adb ldrb r3, [r3, #11] 802248e: 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); 8022490: 68fb ldr r3, [r7, #12] 8022492: 7a9b ldrb r3, [r3, #10] 8022494: 7cb9 ldrb r1, [r7, #18] 8022496: 6aba ldr r2, [r7, #40] @ 0x28 8022498: 9202 str r2, [sp, #8] 802249a: 7cfa ldrb r2, [r7, #19] 802249c: 9201 str r2, [sp, #4] 802249e: 9300 str r3, [sp, #0] 80224a0: 460b mov r3, r1 80224a2: 687a ldr r2, [r7, #4] 80224a4: 6af9 ldr r1, [r7, #44] @ 0x2c 80224a6: 69f8 ldr r0, [r7, #28] 80224a8: f003 fbf2 bl 8025c90 80224ac: 4603 mov r3, r0 80224ae: 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) { 80224b0: 69fa ldr r2, [r7, #28] 80224b2: 68bb ldr r3, [r7, #8] 80224b4: 429a cmp r2, r3 80224b6: d004 beq.n 80224c2 /* free the header pbuf */ pbuf_free(q); 80224b8: 69f8 ldr r0, [r7, #28] 80224ba: f7f8 ff77 bl 801b3ac q = NULL; 80224be: 2300 movs r3, #0 80224c0: 61fb str r3, [r7, #28] /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; 80224c2: f997 301b ldrsb.w r3, [r7, #27] } 80224c6: 4618 mov r0, r3 80224c8: 3720 adds r7, #32 80224ca: 46bd mov sp, r7 80224cc: bd80 pop {r7, pc} 80224ce: bf00 nop 80224d0: 08030b20 .word 0x08030b20 80224d4: 08030d0c .word 0x08030d0c 80224d8: 08030b74 .word 0x08030b74 80224dc: 08030d2c .word 0x08030d2c 80224e0: 08030d4c .word 0x08030d4c 80224e4: 08030d70 .word 0x08030d70 80224e8: 08030d94 .word 0x08030d94 80224ec: 08030db8 .word 0x08030db8 080224f0 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 80224f0: b580 push {r7, lr} 80224f2: b086 sub sp, #24 80224f4: af00 add r7, sp, #0 80224f6: 60f8 str r0, [r7, #12] 80224f8: 60b9 str r1, [r7, #8] 80224fa: 4613 mov r3, r2 80224fc: 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(); 80224fe: f7ee fda3 bl 8011048 #if LWIP_IPV4 /* Don't propagate NULL pointer (IPv4 ANY) to subsequent functions */ if (ipaddr == NULL) { 8022502: 68bb ldr r3, [r7, #8] 8022504: 2b00 cmp r3, #0 8022506: d101 bne.n 802250c ipaddr = IP4_ADDR_ANY; 8022508: 4b39 ldr r3, [pc, #228] @ (80225f0 ) 802250a: 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); 802250c: 68fb ldr r3, [r7, #12] 802250e: 2b00 cmp r3, #0 8022510: d109 bne.n 8022526 8022512: 4b38 ldr r3, [pc, #224] @ (80225f4 ) 8022514: f240 32b7 movw r2, #951 @ 0x3b7 8022518: 4937 ldr r1, [pc, #220] @ (80225f8 ) 802251a: 4838 ldr r0, [pc, #224] @ (80225fc ) 802251c: f008 f9be bl 802a89c 8022520: f06f 030f mvn.w r3, #15 8022524: e060 b.n 80225e8 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; 8022526: 2300 movs r3, #0 8022528: 74fb strb r3, [r7, #19] /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802252a: 4b35 ldr r3, [pc, #212] @ (8022600 ) 802252c: 681b ldr r3, [r3, #0] 802252e: 617b str r3, [r7, #20] 8022530: e009 b.n 8022546 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 8022532: 68fa ldr r2, [r7, #12] 8022534: 697b ldr r3, [r7, #20] 8022536: 429a cmp r2, r3 8022538: d102 bne.n 8022540 rebind = 1; 802253a: 2301 movs r3, #1 802253c: 74fb strb r3, [r7, #19] break; 802253e: e005 b.n 802254c for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8022540: 697b ldr r3, [r7, #20] 8022542: 68db ldr r3, [r3, #12] 8022544: 617b str r3, [r7, #20] 8022546: 697b ldr r3, [r7, #20] 8022548: 2b00 cmp r3, #0 802254a: d1f2 bne.n 8022532 ipaddr = &zoned_ipaddr; } #endif /* LWIP_IPV6 && LWIP_IPV6_SCOPES */ /* no port specified? */ if (port == 0) { 802254c: 88fb ldrh r3, [r7, #6] 802254e: 2b00 cmp r3, #0 8022550: d109 bne.n 8022566 port = udp_new_port(); 8022552: f7ff fc2f bl 8021db4 8022556: 4603 mov r3, r0 8022558: 80fb strh r3, [r7, #6] if (port == 0) { 802255a: 88fb ldrh r3, [r7, #6] 802255c: 2b00 cmp r3, #0 802255e: d12c bne.n 80225ba /* no more ports available in local range */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); return ERR_USE; 8022560: f06f 0307 mvn.w r3, #7 8022564: e040 b.n 80225e8 } } else { for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 8022566: 4b26 ldr r3, [pc, #152] @ (8022600 ) 8022568: 681b ldr r3, [r3, #0] 802256a: 617b str r3, [r7, #20] 802256c: e022 b.n 80225b4 if (pcb != ipcb) { 802256e: 68fa ldr r2, [r7, #12] 8022570: 697b ldr r3, [r7, #20] 8022572: 429a cmp r2, r3 8022574: d01b beq.n 80225ae 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) && 8022576: 697b ldr r3, [r7, #20] 8022578: 8a5b ldrh r3, [r3, #18] 802257a: 88fa ldrh r2, [r7, #6] 802257c: 429a cmp r2, r3 802257e: d116 bne.n 80225ae /* IP address matches or any IP used? */ (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 8022580: 697b ldr r3, [r7, #20] 8022582: 681a ldr r2, [r3, #0] 8022584: 68bb ldr r3, [r7, #8] 8022586: 681b ldr r3, [r3, #0] if ((ipcb->local_port == port) && 8022588: 429a cmp r2, r3 802258a: d00d beq.n 80225a8 (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 802258c: 68bb ldr r3, [r7, #8] 802258e: 2b00 cmp r3, #0 8022590: d00a beq.n 80225a8 8022592: 68bb ldr r3, [r7, #8] 8022594: 681b ldr r3, [r3, #0] 8022596: 2b00 cmp r3, #0 8022598: d006 beq.n 80225a8 ip_addr_isany(&ipcb->local_ip))) { 802259a: 697b ldr r3, [r7, #20] (ip_addr_cmp(&ipcb->local_ip, ipaddr) || ip_addr_isany(ipaddr) || 802259c: 2b00 cmp r3, #0 802259e: d003 beq.n 80225a8 ip_addr_isany(&ipcb->local_ip))) { 80225a0: 697b ldr r3, [r7, #20] 80225a2: 681b ldr r3, [r3, #0] 80225a4: 2b00 cmp r3, #0 80225a6: d102 bne.n 80225ae /* 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; 80225a8: f06f 0307 mvn.w r3, #7 80225ac: e01c b.n 80225e8 for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80225ae: 697b ldr r3, [r7, #20] 80225b0: 68db ldr r3, [r3, #12] 80225b2: 617b str r3, [r7, #20] 80225b4: 697b ldr r3, [r7, #20] 80225b6: 2b00 cmp r3, #0 80225b8: d1d9 bne.n 802256e } } } } ip_addr_set_ipaddr(&pcb->local_ip, ipaddr); 80225ba: 68bb ldr r3, [r7, #8] 80225bc: 2b00 cmp r3, #0 80225be: d002 beq.n 80225c6 80225c0: 68bb ldr r3, [r7, #8] 80225c2: 681b ldr r3, [r3, #0] 80225c4: e000 b.n 80225c8 80225c6: 2300 movs r3, #0 80225c8: 68fa ldr r2, [r7, #12] 80225ca: 6013 str r3, [r2, #0] pcb->local_port = port; 80225cc: 68fb ldr r3, [r7, #12] 80225ce: 88fa ldrh r2, [r7, #6] 80225d0: 825a strh r2, [r3, #18] mib2_udp_bind(pcb); /* pcb not active yet? */ if (rebind == 0) { 80225d2: 7cfb ldrb r3, [r7, #19] 80225d4: 2b00 cmp r3, #0 80225d6: d106 bne.n 80225e6 /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 80225d8: 4b09 ldr r3, [pc, #36] @ (8022600 ) 80225da: 681a ldr r2, [r3, #0] 80225dc: 68fb ldr r3, [r7, #12] 80225de: 60da str r2, [r3, #12] udp_pcbs = pcb; 80225e0: 4a07 ldr r2, [pc, #28] @ (8022600 ) 80225e2: 68fb ldr r3, [r7, #12] 80225e4: 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; 80225e6: 2300 movs r3, #0 } 80225e8: 4618 mov r0, r3 80225ea: 3718 adds r7, #24 80225ec: 46bd mov sp, r7 80225ee: bd80 pop {r7, pc} 80225f0: 08031ca8 .word 0x08031ca8 80225f4: 08030b20 .word 0x08030b20 80225f8: 08030de8 .word 0x08030de8 80225fc: 08030b74 .word 0x08030b74 8022600: 2402afd8 .word 0x2402afd8 08022604 : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) { 8022604: b580 push {r7, lr} 8022606: b086 sub sp, #24 8022608: af00 add r7, sp, #0 802260a: 60f8 str r0, [r7, #12] 802260c: 60b9 str r1, [r7, #8] 802260e: 4613 mov r3, r2 8022610: 80fb strh r3, [r7, #6] struct udp_pcb *ipcb; LWIP_ASSERT_CORE_LOCKED(); 8022612: f7ee fd19 bl 8011048 LWIP_ERROR("udp_connect: invalid pcb", pcb != NULL, return ERR_ARG); 8022616: 68fb ldr r3, [r7, #12] 8022618: 2b00 cmp r3, #0 802261a: d109 bne.n 8022630 802261c: 4b2c ldr r3, [pc, #176] @ (80226d0 ) 802261e: f240 4235 movw r2, #1077 @ 0x435 8022622: 492c ldr r1, [pc, #176] @ (80226d4 ) 8022624: 482c ldr r0, [pc, #176] @ (80226d8 ) 8022626: f008 f939 bl 802a89c 802262a: f06f 030f mvn.w r3, #15 802262e: e04b b.n 80226c8 LWIP_ERROR("udp_connect: invalid ipaddr", ipaddr != NULL, return ERR_ARG); 8022630: 68bb ldr r3, [r7, #8] 8022632: 2b00 cmp r3, #0 8022634: d109 bne.n 802264a 8022636: 4b26 ldr r3, [pc, #152] @ (80226d0 ) 8022638: f240 4236 movw r2, #1078 @ 0x436 802263c: 4927 ldr r1, [pc, #156] @ (80226dc ) 802263e: 4826 ldr r0, [pc, #152] @ (80226d8 ) 8022640: f008 f92c bl 802a89c 8022644: f06f 030f mvn.w r3, #15 8022648: e03e b.n 80226c8 if (pcb->local_port == 0) { 802264a: 68fb ldr r3, [r7, #12] 802264c: 8a5b ldrh r3, [r3, #18] 802264e: 2b00 cmp r3, #0 8022650: d10f bne.n 8022672 err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 8022652: 68f9 ldr r1, [r7, #12] 8022654: 68fb ldr r3, [r7, #12] 8022656: 8a5b ldrh r3, [r3, #18] 8022658: 461a mov r2, r3 802265a: 68f8 ldr r0, [r7, #12] 802265c: f7ff ff48 bl 80224f0 8022660: 4603 mov r3, r0 8022662: 75fb strb r3, [r7, #23] if (err != ERR_OK) { 8022664: f997 3017 ldrsb.w r3, [r7, #23] 8022668: 2b00 cmp r3, #0 802266a: d002 beq.n 8022672 return err; 802266c: f997 3017 ldrsb.w r3, [r7, #23] 8022670: e02a b.n 80226c8 } } ip_addr_set_ipaddr(&pcb->remote_ip, ipaddr); 8022672: 68bb ldr r3, [r7, #8] 8022674: 2b00 cmp r3, #0 8022676: d002 beq.n 802267e 8022678: 68bb ldr r3, [r7, #8] 802267a: 681b ldr r3, [r3, #0] 802267c: e000 b.n 8022680 802267e: 2300 movs r3, #0 8022680: 68fa ldr r2, [r7, #12] 8022682: 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; 8022684: 68fb ldr r3, [r7, #12] 8022686: 88fa ldrh r2, [r7, #6] 8022688: 829a strh r2, [r3, #20] pcb->flags |= UDP_FLAGS_CONNECTED; 802268a: 68fb ldr r3, [r7, #12] 802268c: 7c1b ldrb r3, [r3, #16] 802268e: f043 0304 orr.w r3, r3, #4 8022692: b2da uxtb r2, r3 8022694: 68fb ldr r3, [r7, #12] 8022696: 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) { 8022698: 4b11 ldr r3, [pc, #68] @ (80226e0 ) 802269a: 681b ldr r3, [r3, #0] 802269c: 613b str r3, [r7, #16] 802269e: e008 b.n 80226b2 if (pcb == ipcb) { 80226a0: 68fa ldr r2, [r7, #12] 80226a2: 693b ldr r3, [r7, #16] 80226a4: 429a cmp r2, r3 80226a6: d101 bne.n 80226ac /* already on the list, just return */ return ERR_OK; 80226a8: 2300 movs r3, #0 80226aa: e00d b.n 80226c8 for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 80226ac: 693b ldr r3, [r7, #16] 80226ae: 68db ldr r3, [r3, #12] 80226b0: 613b str r3, [r7, #16] 80226b2: 693b ldr r3, [r7, #16] 80226b4: 2b00 cmp r3, #0 80226b6: d1f3 bne.n 80226a0 } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 80226b8: 4b09 ldr r3, [pc, #36] @ (80226e0 ) 80226ba: 681a ldr r2, [r3, #0] 80226bc: 68fb ldr r3, [r7, #12] 80226be: 60da str r2, [r3, #12] udp_pcbs = pcb; 80226c0: 4a07 ldr r2, [pc, #28] @ (80226e0 ) 80226c2: 68fb ldr r3, [r7, #12] 80226c4: 6013 str r3, [r2, #0] return ERR_OK; 80226c6: 2300 movs r3, #0 } 80226c8: 4618 mov r0, r3 80226ca: 3718 adds r7, #24 80226cc: 46bd mov sp, r7 80226ce: bd80 pop {r7, pc} 80226d0: 08030b20 .word 0x08030b20 80226d4: 08030e00 .word 0x08030e00 80226d8: 08030b74 .word 0x08030b74 80226dc: 08030e1c .word 0x08030e1c 80226e0: 2402afd8 .word 0x2402afd8 080226e4 : * * @param pcb the udp pcb to disconnect. */ void udp_disconnect(struct udp_pcb *pcb) { 80226e4: b580 push {r7, lr} 80226e6: b082 sub sp, #8 80226e8: af00 add r7, sp, #0 80226ea: 6078 str r0, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 80226ec: f7ee fcac bl 8011048 LWIP_ERROR("udp_disconnect: invalid pcb", pcb != NULL, return); 80226f0: 687b ldr r3, [r7, #4] 80226f2: 2b00 cmp r3, #0 80226f4: d107 bne.n 8022706 80226f6: 4b0d ldr r3, [pc, #52] @ (802272c ) 80226f8: f240 426a movw r2, #1130 @ 0x46a 80226fc: 490c ldr r1, [pc, #48] @ (8022730 ) 80226fe: 480d ldr r0, [pc, #52] @ (8022734 ) 8022700: f008 f8cc bl 802a89c 8022704: e00f b.n 8022726 #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); 8022706: 687b ldr r3, [r7, #4] 8022708: 2200 movs r2, #0 802270a: 605a str r2, [r3, #4] #if LWIP_IPV4 && LWIP_IPV6 } #endif pcb->remote_port = 0; 802270c: 687b ldr r3, [r7, #4] 802270e: 2200 movs r2, #0 8022710: 829a strh r2, [r3, #20] pcb->netif_idx = NETIF_NO_INDEX; 8022712: 687b ldr r3, [r7, #4] 8022714: 2200 movs r2, #0 8022716: 721a strb r2, [r3, #8] /* mark PCB as unconnected */ udp_clear_flags(pcb, UDP_FLAGS_CONNECTED); 8022718: 687b ldr r3, [r7, #4] 802271a: 7c1b ldrb r3, [r3, #16] 802271c: f023 0304 bic.w r3, r3, #4 8022720: b2da uxtb r2, r3 8022722: 687b ldr r3, [r7, #4] 8022724: 741a strb r2, [r3, #16] } 8022726: 3708 adds r7, #8 8022728: 46bd mov sp, r7 802272a: bd80 pop {r7, pc} 802272c: 08030b20 .word 0x08030b20 8022730: 08030e38 .word 0x08030e38 8022734: 08030b74 .word 0x08030b74 08022738 : * @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) { 8022738: b580 push {r7, lr} 802273a: b084 sub sp, #16 802273c: af00 add r7, sp, #0 802273e: 60f8 str r0, [r7, #12] 8022740: 60b9 str r1, [r7, #8] 8022742: 607a str r2, [r7, #4] LWIP_ASSERT_CORE_LOCKED(); 8022744: f7ee fc80 bl 8011048 LWIP_ERROR("udp_recv: invalid pcb", pcb != NULL, return); 8022748: 68fb ldr r3, [r7, #12] 802274a: 2b00 cmp r3, #0 802274c: d107 bne.n 802275e 802274e: 4b08 ldr r3, [pc, #32] @ (8022770 ) 8022750: f240 428a movw r2, #1162 @ 0x48a 8022754: 4907 ldr r1, [pc, #28] @ (8022774 ) 8022756: 4808 ldr r0, [pc, #32] @ (8022778 ) 8022758: f008 f8a0 bl 802a89c 802275c: e005 b.n 802276a /* remember recv() callback and user data */ pcb->recv = recv; 802275e: 68fb ldr r3, [r7, #12] 8022760: 68ba ldr r2, [r7, #8] 8022762: 619a str r2, [r3, #24] pcb->recv_arg = recv_arg; 8022764: 68fb ldr r3, [r7, #12] 8022766: 687a ldr r2, [r7, #4] 8022768: 61da str r2, [r3, #28] } 802276a: 3710 adds r7, #16 802276c: 46bd mov sp, r7 802276e: bd80 pop {r7, pc} 8022770: 08030b20 .word 0x08030b20 8022774: 08030e54 .word 0x08030e54 8022778: 08030b74 .word 0x08030b74 0802277c : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 802277c: b580 push {r7, lr} 802277e: b084 sub sp, #16 8022780: af00 add r7, sp, #0 8022782: 6078 str r0, [r7, #4] struct udp_pcb *pcb2; LWIP_ASSERT_CORE_LOCKED(); 8022784: f7ee fc60 bl 8011048 LWIP_ERROR("udp_remove: invalid pcb", pcb != NULL, return); 8022788: 687b ldr r3, [r7, #4] 802278a: 2b00 cmp r3, #0 802278c: d107 bne.n 802279e 802278e: 4b19 ldr r3, [pc, #100] @ (80227f4 ) 8022790: f240 42a1 movw r2, #1185 @ 0x4a1 8022794: 4918 ldr r1, [pc, #96] @ (80227f8 ) 8022796: 4819 ldr r0, [pc, #100] @ (80227fc ) 8022798: f008 f880 bl 802a89c 802279c: e026 b.n 80227ec mib2_udp_unbind(pcb); /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 802279e: 4b18 ldr r3, [pc, #96] @ (8022800 ) 80227a0: 681b ldr r3, [r3, #0] 80227a2: 687a ldr r2, [r7, #4] 80227a4: 429a cmp r2, r3 80227a6: d105 bne.n 80227b4 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 80227a8: 4b15 ldr r3, [pc, #84] @ (8022800 ) 80227aa: 681b ldr r3, [r3, #0] 80227ac: 68db ldr r3, [r3, #12] 80227ae: 4a14 ldr r2, [pc, #80] @ (8022800 ) 80227b0: 6013 str r3, [r2, #0] 80227b2: e017 b.n 80227e4 /* pcb not 1st in list */ } else { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 80227b4: 4b12 ldr r3, [pc, #72] @ (8022800 ) 80227b6: 681b ldr r3, [r3, #0] 80227b8: 60fb str r3, [r7, #12] 80227ba: e010 b.n 80227de /* find pcb in udp_pcbs list */ if (pcb2->next != NULL && pcb2->next == pcb) { 80227bc: 68fb ldr r3, [r7, #12] 80227be: 68db ldr r3, [r3, #12] 80227c0: 2b00 cmp r3, #0 80227c2: d009 beq.n 80227d8 80227c4: 68fb ldr r3, [r7, #12] 80227c6: 68db ldr r3, [r3, #12] 80227c8: 687a ldr r2, [r7, #4] 80227ca: 429a cmp r2, r3 80227cc: d104 bne.n 80227d8 /* remove pcb from list */ pcb2->next = pcb->next; 80227ce: 687b ldr r3, [r7, #4] 80227d0: 68da ldr r2, [r3, #12] 80227d2: 68fb ldr r3, [r7, #12] 80227d4: 60da str r2, [r3, #12] break; 80227d6: e005 b.n 80227e4 for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 80227d8: 68fb ldr r3, [r7, #12] 80227da: 68db ldr r3, [r3, #12] 80227dc: 60fb str r3, [r7, #12] 80227de: 68fb ldr r3, [r7, #12] 80227e0: 2b00 cmp r3, #0 80227e2: d1eb bne.n 80227bc } } } memp_free(MEMP_UDP_PCB, pcb); 80227e4: 6879 ldr r1, [r7, #4] 80227e6: 2000 movs r0, #0 80227e8: f7f7 fef2 bl 801a5d0 } 80227ec: 3710 adds r7, #16 80227ee: 46bd mov sp, r7 80227f0: bd80 pop {r7, pc} 80227f2: bf00 nop 80227f4: 08030b20 .word 0x08030b20 80227f8: 08030e6c .word 0x08030e6c 80227fc: 08030b74 .word 0x08030b74 8022800: 2402afd8 .word 0x2402afd8 08022804 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 8022804: b580 push {r7, lr} 8022806: b082 sub sp, #8 8022808: af00 add r7, sp, #0 struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 802280a: f7ee fc1d bl 8011048 pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 802280e: 2000 movs r0, #0 8022810: f7f7 fe68 bl 801a4e4 8022814: 6078 str r0, [r7, #4] /* could allocate UDP PCB? */ if (pcb != NULL) { 8022816: 687b ldr r3, [r7, #4] 8022818: 2b00 cmp r3, #0 802281a: d007 beq.n 802282c /* 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)); 802281c: 2220 movs r2, #32 802281e: 2100 movs r1, #0 8022820: 6878 ldr r0, [r7, #4] 8022822: f008 f9cd bl 802abc0 pcb->ttl = UDP_TTL; 8022826: 687b ldr r3, [r7, #4] 8022828: 22ff movs r2, #255 @ 0xff 802282a: 72da strb r2, [r3, #11] #if LWIP_MULTICAST_TX_OPTIONS udp_set_multicast_ttl(pcb, UDP_TTL); #endif /* LWIP_MULTICAST_TX_OPTIONS */ } return pcb; 802282c: 687b ldr r3, [r7, #4] } 802282e: 4618 mov r0, r3 8022830: 3708 adds r7, #8 8022832: 46bd mov sp, r7 8022834: bd80 pop {r7, pc} 08022836 : * * @see udp_remove() */ struct udp_pcb * udp_new_ip_type(u8_t type) { 8022836: b580 push {r7, lr} 8022838: b084 sub sp, #16 802283a: af00 add r7, sp, #0 802283c: 4603 mov r3, r0 802283e: 71fb strb r3, [r7, #7] struct udp_pcb *pcb; LWIP_ASSERT_CORE_LOCKED(); 8022840: f7ee fc02 bl 8011048 pcb = udp_new(); 8022844: f7ff ffde bl 8022804 8022848: 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; 802284a: 68fb ldr r3, [r7, #12] } 802284c: 4618 mov r0, r3 802284e: 3710 adds r7, #16 8022850: 46bd mov sp, r7 8022852: bd80 pop {r7, pc} 08022854 : * * @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) { 8022854: b480 push {r7} 8022856: b085 sub sp, #20 8022858: af00 add r7, sp, #0 802285a: 6078 str r0, [r7, #4] 802285c: 6039 str r1, [r7, #0] struct udp_pcb *upcb; if (!ip_addr_isany(old_addr) && !ip_addr_isany(new_addr)) { 802285e: 687b ldr r3, [r7, #4] 8022860: 2b00 cmp r3, #0 8022862: d01e beq.n 80228a2 8022864: 687b ldr r3, [r7, #4] 8022866: 681b ldr r3, [r3, #0] 8022868: 2b00 cmp r3, #0 802286a: d01a beq.n 80228a2 802286c: 683b ldr r3, [r7, #0] 802286e: 2b00 cmp r3, #0 8022870: d017 beq.n 80228a2 8022872: 683b ldr r3, [r7, #0] 8022874: 681b ldr r3, [r3, #0] 8022876: 2b00 cmp r3, #0 8022878: d013 beq.n 80228a2 for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 802287a: 4b0d ldr r3, [pc, #52] @ (80228b0 ) 802287c: 681b ldr r3, [r3, #0] 802287e: 60fb str r3, [r7, #12] 8022880: e00c b.n 802289c /* PCB bound to current local interface address? */ if (ip_addr_cmp(&upcb->local_ip, old_addr)) { 8022882: 68fb ldr r3, [r7, #12] 8022884: 681a ldr r2, [r3, #0] 8022886: 687b ldr r3, [r7, #4] 8022888: 681b ldr r3, [r3, #0] 802288a: 429a cmp r2, r3 802288c: d103 bne.n 8022896 /* 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); 802288e: 683b ldr r3, [r7, #0] 8022890: 681a ldr r2, [r3, #0] 8022892: 68fb ldr r3, [r7, #12] 8022894: 601a str r2, [r3, #0] for (upcb = udp_pcbs; upcb != NULL; upcb = upcb->next) { 8022896: 68fb ldr r3, [r7, #12] 8022898: 68db ldr r3, [r3, #12] 802289a: 60fb str r3, [r7, #12] 802289c: 68fb ldr r3, [r7, #12] 802289e: 2b00 cmp r3, #0 80228a0: d1ef bne.n 8022882 } } } } 80228a2: bf00 nop 80228a4: 3714 adds r7, #20 80228a6: 46bd mov sp, r7 80228a8: f85d 7b04 ldr.w r7, [sp], #4 80228ac: 4770 bx lr 80228ae: bf00 nop 80228b0: 2402afd8 .word 0x2402afd8 080228b4 : 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) { 80228b4: b580 push {r7, lr} 80228b6: af00 add r7, sp, #0 if (dhcp_pcb_refcount == 0) { 80228b8: 4b20 ldr r3, [pc, #128] @ (802293c ) 80228ba: 781b ldrb r3, [r3, #0] 80228bc: 2b00 cmp r3, #0 80228be: d133 bne.n 8022928 LWIP_ASSERT("dhcp_inc_pcb_refcount(): memory leak", dhcp_pcb == NULL); 80228c0: 4b1f ldr r3, [pc, #124] @ (8022940 ) 80228c2: 681b ldr r3, [r3, #0] 80228c4: 2b00 cmp r3, #0 80228c6: d005 beq.n 80228d4 80228c8: 4b1e ldr r3, [pc, #120] @ (8022944 ) 80228ca: 22e5 movs r2, #229 @ 0xe5 80228cc: 491e ldr r1, [pc, #120] @ (8022948 ) 80228ce: 481f ldr r0, [pc, #124] @ (802294c ) 80228d0: f007 ffe4 bl 802a89c /* allocate UDP PCB */ dhcp_pcb = udp_new(); 80228d4: f7ff ff96 bl 8022804 80228d8: 4603 mov r3, r0 80228da: 4a19 ldr r2, [pc, #100] @ (8022940 ) 80228dc: 6013 str r3, [r2, #0] if (dhcp_pcb == NULL) { 80228de: 4b18 ldr r3, [pc, #96] @ (8022940 ) 80228e0: 681b ldr r3, [r3, #0] 80228e2: 2b00 cmp r3, #0 80228e4: d102 bne.n 80228ec return ERR_MEM; 80228e6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80228ea: e024 b.n 8022936 } ip_set_option(dhcp_pcb, SOF_BROADCAST); 80228ec: 4b14 ldr r3, [pc, #80] @ (8022940 ) 80228ee: 681b ldr r3, [r3, #0] 80228f0: 7a5a ldrb r2, [r3, #9] 80228f2: 4b13 ldr r3, [pc, #76] @ (8022940 ) 80228f4: 681b ldr r3, [r3, #0] 80228f6: f042 0220 orr.w r2, r2, #32 80228fa: b2d2 uxtb r2, r2 80228fc: 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); 80228fe: 4b10 ldr r3, [pc, #64] @ (8022940 ) 8022900: 681b ldr r3, [r3, #0] 8022902: 2244 movs r2, #68 @ 0x44 8022904: 4912 ldr r1, [pc, #72] @ (8022950 ) 8022906: 4618 mov r0, r3 8022908: f7ff fdf2 bl 80224f0 udp_connect(dhcp_pcb, IP4_ADDR_ANY, LWIP_IANA_PORT_DHCP_SERVER); 802290c: 4b0c ldr r3, [pc, #48] @ (8022940 ) 802290e: 681b ldr r3, [r3, #0] 8022910: 2243 movs r2, #67 @ 0x43 8022912: 490f ldr r1, [pc, #60] @ (8022950 ) 8022914: 4618 mov r0, r3 8022916: f7ff fe75 bl 8022604 udp_recv(dhcp_pcb, dhcp_recv, NULL); 802291a: 4b09 ldr r3, [pc, #36] @ (8022940 ) 802291c: 681b ldr r3, [r3, #0] 802291e: 2200 movs r2, #0 8022920: 490c ldr r1, [pc, #48] @ (8022954 ) 8022922: 4618 mov r0, r3 8022924: f7ff ff08 bl 8022738 } dhcp_pcb_refcount++; 8022928: 4b04 ldr r3, [pc, #16] @ (802293c ) 802292a: 781b ldrb r3, [r3, #0] 802292c: 3301 adds r3, #1 802292e: b2da uxtb r2, r3 8022930: 4b02 ldr r3, [pc, #8] @ (802293c ) 8022932: 701a strb r2, [r3, #0] return ERR_OK; 8022934: 2300 movs r3, #0 } 8022936: 4618 mov r0, r3 8022938: bd80 pop {r7, pc} 802293a: bf00 nop 802293c: 2402b008 .word 0x2402b008 8022940: 2402b004 .word 0x2402b004 8022944: 08030e84 .word 0x08030e84 8022948: 08030ebc .word 0x08030ebc 802294c: 08030ee4 .word 0x08030ee4 8022950: 08031ca8 .word 0x08031ca8 8022954: 08024225 .word 0x08024225 08022958 : /** Free DHCP PCB if the last netif stops using it */ static void dhcp_dec_pcb_refcount(void) { 8022958: b580 push {r7, lr} 802295a: af00 add r7, sp, #0 LWIP_ASSERT("dhcp_pcb_refcount(): refcount error", (dhcp_pcb_refcount > 0)); 802295c: 4b0e ldr r3, [pc, #56] @ (8022998 ) 802295e: 781b ldrb r3, [r3, #0] 8022960: 2b00 cmp r3, #0 8022962: d105 bne.n 8022970 8022964: 4b0d ldr r3, [pc, #52] @ (802299c ) 8022966: 22ff movs r2, #255 @ 0xff 8022968: 490d ldr r1, [pc, #52] @ (80229a0 ) 802296a: 480e ldr r0, [pc, #56] @ (80229a4 ) 802296c: f007 ff96 bl 802a89c dhcp_pcb_refcount--; 8022970: 4b09 ldr r3, [pc, #36] @ (8022998 ) 8022972: 781b ldrb r3, [r3, #0] 8022974: 3b01 subs r3, #1 8022976: b2da uxtb r2, r3 8022978: 4b07 ldr r3, [pc, #28] @ (8022998 ) 802297a: 701a strb r2, [r3, #0] if (dhcp_pcb_refcount == 0) { 802297c: 4b06 ldr r3, [pc, #24] @ (8022998 ) 802297e: 781b ldrb r3, [r3, #0] 8022980: 2b00 cmp r3, #0 8022982: d107 bne.n 8022994 udp_remove(dhcp_pcb); 8022984: 4b08 ldr r3, [pc, #32] @ (80229a8 ) 8022986: 681b ldr r3, [r3, #0] 8022988: 4618 mov r0, r3 802298a: f7ff fef7 bl 802277c dhcp_pcb = NULL; 802298e: 4b06 ldr r3, [pc, #24] @ (80229a8 ) 8022990: 2200 movs r2, #0 8022992: 601a str r2, [r3, #0] } } 8022994: bf00 nop 8022996: bd80 pop {r7, pc} 8022998: 2402b008 .word 0x2402b008 802299c: 08030e84 .word 0x08030e84 80229a0: 08030f0c .word 0x08030f0c 80229a4: 08030ee4 .word 0x08030ee4 80229a8: 2402b004 .word 0x2402b004 080229ac : * * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { 80229ac: b580 push {r7, lr} 80229ae: b084 sub sp, #16 80229b0: af00 add r7, sp, #0 80229b2: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80229b4: 687b ldr r3, [r7, #4] 80229b6: 6a5b ldr r3, [r3, #36] @ 0x24 80229b8: 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); 80229ba: 210c movs r1, #12 80229bc: 68f8 ldr r0, [r7, #12] 80229be: f001 f862 bl 8023a86 /* 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); 80229c2: 4b06 ldr r3, [pc, #24] @ (80229dc ) 80229c4: 4a05 ldr r2, [pc, #20] @ (80229dc ) 80229c6: 4905 ldr r1, [pc, #20] @ (80229dc ) 80229c8: 6878 ldr r0, [r7, #4] 80229ca: f7f7 ffa5 bl 801a918 /* We can immediately restart discovery */ dhcp_discover(netif); 80229ce: 6878 ldr r0, [r7, #4] 80229d0: f000 fc4c bl 802326c } 80229d4: bf00 nop 80229d6: 3710 adds r7, #16 80229d8: 46bd mov sp, r7 80229da: bd80 pop {r7, pc} 80229dc: 08031ca8 .word 0x08031ca8 080229e0 : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 80229e0: b580 push {r7, lr} 80229e2: b084 sub sp, #16 80229e4: af00 add r7, sp, #0 80229e6: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80229e8: 687b ldr r3, [r7, #4] 80229ea: 6a5b ldr r3, [r3, #36] @ 0x24 80229ec: 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); 80229ee: 2108 movs r1, #8 80229f0: 68f8 ldr r0, [r7, #12] 80229f2: f001 f848 bl 8023a86 /* 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); 80229f6: 68fb ldr r3, [r7, #12] 80229f8: 331c adds r3, #28 80229fa: 2200 movs r2, #0 80229fc: 4619 mov r1, r3 80229fe: 6878 ldr r0, [r7, #4] 8022a00: f002 fb88 bl 8025114 8022a04: 4603 mov r3, r0 8022a06: 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) { 8022a08: 68fb ldr r3, [r7, #12] 8022a0a: 799b ldrb r3, [r3, #6] 8022a0c: 2bff cmp r3, #255 @ 0xff 8022a0e: d005 beq.n 8022a1c dhcp->tries++; 8022a10: 68fb ldr r3, [r7, #12] 8022a12: 799b ldrb r3, [r3, #6] 8022a14: 3301 adds r3, #1 8022a16: b2da uxtb r2, r3 8022a18: 68fb ldr r3, [r7, #12] 8022a1a: 719a strb r2, [r3, #6] } msecs = 500; 8022a1c: f44f 73fa mov.w r3, #500 @ 0x1f4 8022a20: 813b strh r3, [r7, #8] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8022a22: 893b ldrh r3, [r7, #8] 8022a24: f203 13f3 addw r3, r3, #499 @ 0x1f3 8022a28: 4a06 ldr r2, [pc, #24] @ (8022a44 ) 8022a2a: fb82 1203 smull r1, r2, r2, r3 8022a2e: 1152 asrs r2, r2, #5 8022a30: 17db asrs r3, r3, #31 8022a32: 1ad3 subs r3, r2, r3 8022a34: b29a uxth r2, r3 8022a36: 68fb ldr r3, [r7, #12] 8022a38: 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)); } 8022a3a: bf00 nop 8022a3c: 3710 adds r7, #16 8022a3e: 46bd mov sp, r7 8022a40: bd80 pop {r7, pc} 8022a42: bf00 nop 8022a44: 10624dd3 .word 0x10624dd3 08022a48 : * * @param netif the netif under DHCP control */ static void dhcp_handle_offer(struct netif *netif, struct dhcp_msg *msg_in) { 8022a48: b580 push {r7, lr} 8022a4a: b084 sub sp, #16 8022a4c: af00 add r7, sp, #0 8022a4e: 6078 str r0, [r7, #4] 8022a50: 6039 str r1, [r7, #0] struct dhcp *dhcp = netif_dhcp_data(netif); 8022a52: 687b ldr r3, [r7, #4] 8022a54: 6a5b ldr r3, [r3, #36] @ 0x24 8022a56: 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)) { 8022a58: 4b0c ldr r3, [pc, #48] @ (8022a8c ) 8022a5a: 789b ldrb r3, [r3, #2] 8022a5c: 2b00 cmp r3, #0 8022a5e: d011 beq.n 8022a84 dhcp->request_timeout = 0; /* stop timer */ 8022a60: 68fb ldr r3, [r7, #12] 8022a62: 2200 movs r2, #0 8022a64: 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))); 8022a66: 4b0a ldr r3, [pc, #40] @ (8022a90 ) 8022a68: 689b ldr r3, [r3, #8] 8022a6a: 4618 mov r0, r3 8022a6c: f7f6 ffd1 bl 8019a12 8022a70: 4602 mov r2, r0 8022a72: 68fb ldr r3, [r7, #12] 8022a74: 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); 8022a76: 683b ldr r3, [r7, #0] 8022a78: 691a ldr r2, [r3, #16] 8022a7a: 68fb ldr r3, [r7, #12] 8022a7c: 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); 8022a7e: 6878 ldr r0, [r7, #4] 8022a80: f000 f808 bl 8022a94 } 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)); } } 8022a84: bf00 nop 8022a86: 3710 adds r7, #16 8022a88: 46bd mov sp, r7 8022a8a: bd80 pop {r7, pc} 8022a8c: 2402affc .word 0x2402affc 8022a90: 2402afdc .word 0x2402afdc 08022a94 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 8022a94: b5b0 push {r4, r5, r7, lr} 8022a96: b08a sub sp, #40 @ 0x28 8022a98: af02 add r7, sp, #8 8022a9a: 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;); 8022a9c: 687b ldr r3, [r7, #4] 8022a9e: 2b00 cmp r3, #0 8022aa0: d109 bne.n 8022ab6 8022aa2: 4b71 ldr r3, [pc, #452] @ (8022c68 ) 8022aa4: f240 1277 movw r2, #375 @ 0x177 8022aa8: 4970 ldr r1, [pc, #448] @ (8022c6c ) 8022aaa: 4871 ldr r0, [pc, #452] @ (8022c70 ) 8022aac: f007 fef6 bl 802a89c 8022ab0: f06f 030f mvn.w r3, #15 8022ab4: e0d3 b.n 8022c5e dhcp = netif_dhcp_data(netif); 8022ab6: 687b ldr r3, [r7, #4] 8022ab8: 6a5b ldr r3, [r3, #36] @ 0x24 8022aba: 61bb str r3, [r7, #24] LWIP_ERROR("dhcp_select: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 8022abc: 69bb ldr r3, [r7, #24] 8022abe: 2b00 cmp r3, #0 8022ac0: d109 bne.n 8022ad6 8022ac2: 4b69 ldr r3, [pc, #420] @ (8022c68 ) 8022ac4: f240 1279 movw r2, #377 @ 0x179 8022ac8: 496a ldr r1, [pc, #424] @ (8022c74 ) 8022aca: 4869 ldr r0, [pc, #420] @ (8022c70 ) 8022acc: f007 fee6 bl 802a89c 8022ad0: f06f 0305 mvn.w r3, #5 8022ad4: e0c3 b.n 8022c5e 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); 8022ad6: 2101 movs r1, #1 8022ad8: 69b8 ldr r0, [r7, #24] 8022ada: f000 ffd4 bl 8023a86 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 8022ade: f107 030c add.w r3, r7, #12 8022ae2: 2203 movs r2, #3 8022ae4: 69b9 ldr r1, [r7, #24] 8022ae6: 6878 ldr r0, [r7, #4] 8022ae8: f001 fc66 bl 80243b8 8022aec: 6178 str r0, [r7, #20] if (p_out != NULL) { 8022aee: 697b ldr r3, [r7, #20] 8022af0: 2b00 cmp r3, #0 8022af2: f000 8085 beq.w 8022c00 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8022af6: 697b ldr r3, [r7, #20] 8022af8: 685b ldr r3, [r3, #4] 8022afa: 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); 8022afc: 89b8 ldrh r0, [r7, #12] 8022afe: 693b ldr r3, [r7, #16] 8022b00: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b04: 2302 movs r3, #2 8022b06: 2239 movs r2, #57 @ 0x39 8022b08: f000 ffd8 bl 8023abc 8022b0c: 4603 mov r3, r0 8022b0e: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 8022b10: 89b8 ldrh r0, [r7, #12] 8022b12: 693b ldr r3, [r7, #16] 8022b14: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b18: 687b ldr r3, [r7, #4] 8022b1a: 8d1b ldrh r3, [r3, #40] @ 0x28 8022b1c: 461a mov r2, r3 8022b1e: f001 f827 bl 8023b70 8022b22: 4603 mov r3, r0 8022b24: 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); 8022b26: 89b8 ldrh r0, [r7, #12] 8022b28: 693b ldr r3, [r7, #16] 8022b2a: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b2e: 2304 movs r3, #4 8022b30: 2232 movs r2, #50 @ 0x32 8022b32: f000 ffc3 bl 8023abc 8022b36: 4603 mov r3, r0 8022b38: 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))); 8022b3a: 89bc ldrh r4, [r7, #12] 8022b3c: 693b ldr r3, [r7, #16] 8022b3e: f103 05f0 add.w r5, r3, #240 @ 0xf0 8022b42: 69bb ldr r3, [r7, #24] 8022b44: 69db ldr r3, [r3, #28] 8022b46: 4618 mov r0, r3 8022b48: f7f6 ff63 bl 8019a12 8022b4c: 4603 mov r3, r0 8022b4e: 461a mov r2, r3 8022b50: 4629 mov r1, r5 8022b52: 4620 mov r0, r4 8022b54: f001 f83e bl 8023bd4 8022b58: 4603 mov r3, r0 8022b5a: 81bb strh r3, [r7, #12] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 8022b5c: 89b8 ldrh r0, [r7, #12] 8022b5e: 693b ldr r3, [r7, #16] 8022b60: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b64: 2304 movs r3, #4 8022b66: 2236 movs r2, #54 @ 0x36 8022b68: f000 ffa8 bl 8023abc 8022b6c: 4603 mov r3, r0 8022b6e: 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)))); 8022b70: 89bc ldrh r4, [r7, #12] 8022b72: 693b ldr r3, [r7, #16] 8022b74: f103 05f0 add.w r5, r3, #240 @ 0xf0 8022b78: 69bb ldr r3, [r7, #24] 8022b7a: 699b ldr r3, [r3, #24] 8022b7c: 4618 mov r0, r3 8022b7e: f7f6 ff48 bl 8019a12 8022b82: 4603 mov r3, r0 8022b84: 461a mov r2, r3 8022b86: 4629 mov r1, r5 8022b88: 4620 mov r0, r4 8022b8a: f001 f823 bl 8023bd4 8022b8e: 4603 mov r3, r0 8022b90: 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)); 8022b92: 89b8 ldrh r0, [r7, #12] 8022b94: 693b ldr r3, [r7, #16] 8022b96: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022b9a: 2303 movs r3, #3 8022b9c: 2237 movs r2, #55 @ 0x37 8022b9e: f000 ff8d bl 8023abc 8022ba2: 4603 mov r3, r0 8022ba4: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022ba6: 2300 movs r3, #0 8022ba8: 77fb strb r3, [r7, #31] 8022baa: e00e b.n 8022bca options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 8022bac: 89b8 ldrh r0, [r7, #12] 8022bae: 693b ldr r3, [r7, #16] 8022bb0: f103 01f0 add.w r1, r3, #240 @ 0xf0 8022bb4: 7ffb ldrb r3, [r7, #31] 8022bb6: 4a30 ldr r2, [pc, #192] @ (8022c78 ) 8022bb8: 5cd3 ldrb r3, [r2, r3] 8022bba: 461a mov r2, r3 8022bbc: f000 ffb2 bl 8023b24 8022bc0: 4603 mov r3, r0 8022bc2: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8022bc4: 7ffb ldrb r3, [r7, #31] 8022bc6: 3301 adds r3, #1 8022bc8: 77fb strb r3, [r7, #31] 8022bca: 7ffb ldrb r3, [r7, #31] 8022bcc: 2b02 cmp r3, #2 8022bce: d9ed bls.n 8022bac #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); 8022bd0: 89b8 ldrh r0, [r7, #12] 8022bd2: 693b ldr r3, [r7, #16] 8022bd4: 33f0 adds r3, #240 @ 0xf0 8022bd6: 697a ldr r2, [r7, #20] 8022bd8: 4619 mov r1, r3 8022bda: f001 fcc3 bl 8024564 /* 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); 8022bde: 4b27 ldr r3, [pc, #156] @ (8022c7c ) 8022be0: 6818 ldr r0, [r3, #0] 8022be2: 4b27 ldr r3, [pc, #156] @ (8022c80 ) 8022be4: 9301 str r3, [sp, #4] 8022be6: 687b ldr r3, [r7, #4] 8022be8: 9300 str r3, [sp, #0] 8022bea: 2343 movs r3, #67 @ 0x43 8022bec: 4a25 ldr r2, [pc, #148] @ (8022c84 ) 8022bee: 6979 ldr r1, [r7, #20] 8022bf0: f7ff fb96 bl 8022320 8022bf4: 4603 mov r3, r0 8022bf6: 77bb strb r3, [r7, #30] pbuf_free(p_out); 8022bf8: 6978 ldr r0, [r7, #20] 8022bfa: f7f8 fbd7 bl 801b3ac 8022bfe: e001 b.n 8022c04 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; 8022c00: 23ff movs r3, #255 @ 0xff 8022c02: 77bb strb r3, [r7, #30] } if (dhcp->tries < 255) { 8022c04: 69bb ldr r3, [r7, #24] 8022c06: 799b ldrb r3, [r3, #6] 8022c08: 2bff cmp r3, #255 @ 0xff 8022c0a: d005 beq.n 8022c18 dhcp->tries++; 8022c0c: 69bb ldr r3, [r7, #24] 8022c0e: 799b ldrb r3, [r3, #6] 8022c10: 3301 adds r3, #1 8022c12: b2da uxtb r2, r3 8022c14: 69bb ldr r3, [r7, #24] 8022c16: 719a strb r2, [r3, #6] } msecs = (u16_t)((dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000); 8022c18: 69bb ldr r3, [r7, #24] 8022c1a: 799b ldrb r3, [r3, #6] 8022c1c: 2b05 cmp r3, #5 8022c1e: d80d bhi.n 8022c3c 8022c20: 69bb ldr r3, [r7, #24] 8022c22: 799b ldrb r3, [r3, #6] 8022c24: 461a mov r2, r3 8022c26: 2301 movs r3, #1 8022c28: 4093 lsls r3, r2 8022c2a: b29b uxth r3, r3 8022c2c: 461a mov r2, r3 8022c2e: 0152 lsls r2, r2, #5 8022c30: 1ad2 subs r2, r2, r3 8022c32: 0092 lsls r2, r2, #2 8022c34: 4413 add r3, r2 8022c36: 00db lsls r3, r3, #3 8022c38: b29b uxth r3, r3 8022c3a: e001 b.n 8022c40 8022c3c: f64e 2360 movw r3, #60000 @ 0xea60 8022c40: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8022c42: 89fb ldrh r3, [r7, #14] 8022c44: f203 13f3 addw r3, r3, #499 @ 0x1f3 8022c48: 4a0f ldr r2, [pc, #60] @ (8022c88 ) 8022c4a: fb82 1203 smull r1, r2, r2, r3 8022c4e: 1152 asrs r2, r2, #5 8022c50: 17db asrs r3, r3, #31 8022c52: 1ad3 subs r3, r2, r3 8022c54: b29a uxth r2, r3 8022c56: 69bb ldr r3, [r7, #24] 8022c58: 811a strh r2, [r3, #8] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; 8022c5a: f997 301e ldrsb.w r3, [r7, #30] } 8022c5e: 4618 mov r0, r3 8022c60: 3720 adds r7, #32 8022c62: 46bd mov sp, r7 8022c64: bdb0 pop {r4, r5, r7, pc} 8022c66: bf00 nop 8022c68: 08030e84 .word 0x08030e84 8022c6c: 08030f30 .word 0x08030f30 8022c70: 08030ee4 .word 0x08030ee4 8022c74: 08030f4c .word 0x08030f4c 8022c78: 24000058 .word 0x24000058 8022c7c: 2402b004 .word 0x2402b004 8022c80: 08031ca8 .word 0x08031ca8 8022c84: 08031cac .word 0x08031cac 8022c88: 10624dd3 .word 0x10624dd3 08022c8c : * 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) { 8022c8c: b580 push {r7, lr} 8022c8e: b082 sub sp, #8 8022c90: 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) { 8022c92: 4b27 ldr r3, [pc, #156] @ (8022d30 ) 8022c94: 681b ldr r3, [r3, #0] 8022c96: 607b str r3, [r7, #4] 8022c98: e042 b.n 8022d20 /* only act on DHCP configured interfaces */ struct dhcp *dhcp = netif_dhcp_data(netif); 8022c9a: 687b ldr r3, [r7, #4] 8022c9c: 6a5b ldr r3, [r3, #36] @ 0x24 8022c9e: 603b str r3, [r7, #0] if ((dhcp != NULL) && (dhcp->state != DHCP_STATE_OFF)) { 8022ca0: 683b ldr r3, [r7, #0] 8022ca2: 2b00 cmp r3, #0 8022ca4: d039 beq.n 8022d1a 8022ca6: 683b ldr r3, [r7, #0] 8022ca8: 795b ldrb r3, [r3, #5] 8022caa: 2b00 cmp r3, #0 8022cac: d035 beq.n 8022d1a /* compare lease time to expire timeout */ if (dhcp->t0_timeout && (++dhcp->lease_used == dhcp->t0_timeout)) { 8022cae: 683b ldr r3, [r7, #0] 8022cb0: 8a9b ldrh r3, [r3, #20] 8022cb2: 2b00 cmp r3, #0 8022cb4: d012 beq.n 8022cdc 8022cb6: 683b ldr r3, [r7, #0] 8022cb8: 8a5b ldrh r3, [r3, #18] 8022cba: 3301 adds r3, #1 8022cbc: b29a uxth r2, r3 8022cbe: 683b ldr r3, [r7, #0] 8022cc0: 825a strh r2, [r3, #18] 8022cc2: 683b ldr r3, [r7, #0] 8022cc4: 8a5a ldrh r2, [r3, #18] 8022cc6: 683b ldr r3, [r7, #0] 8022cc8: 8a9b ldrh r3, [r3, #20] 8022cca: 429a cmp r2, r3 8022ccc: d106 bne.n 8022cdc 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); 8022cce: 6878 ldr r0, [r7, #4] 8022cd0: f000 fe32 bl 8023938 dhcp_start(netif); 8022cd4: 6878 ldr r0, [r7, #4] 8022cd6: f000 f96b bl 8022fb0 8022cda: e01e b.n 8022d1a /* timer is active (non zero), and triggers (zeroes) now? */ } else if (dhcp->t2_rebind_time && (dhcp->t2_rebind_time-- == 1)) { 8022cdc: 683b ldr r3, [r7, #0] 8022cde: 8a1b ldrh r3, [r3, #16] 8022ce0: 2b00 cmp r3, #0 8022ce2: d00b beq.n 8022cfc 8022ce4: 683b ldr r3, [r7, #0] 8022ce6: 8a1b ldrh r3, [r3, #16] 8022ce8: 1e5a subs r2, r3, #1 8022cea: b291 uxth r1, r2 8022cec: 683a ldr r2, [r7, #0] 8022cee: 8211 strh r1, [r2, #16] 8022cf0: 2b01 cmp r3, #1 8022cf2: d103 bne.n 8022cfc 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); 8022cf4: 6878 ldr r0, [r7, #4] 8022cf6: f000 f8c7 bl 8022e88 8022cfa: e00e b.n 8022d1a /* timer is active (non zero), and triggers (zeroes) now */ } else if (dhcp->t1_renew_time && (dhcp->t1_renew_time-- == 1)) { 8022cfc: 683b ldr r3, [r7, #0] 8022cfe: 89db ldrh r3, [r3, #14] 8022d00: 2b00 cmp r3, #0 8022d02: d00a beq.n 8022d1a 8022d04: 683b ldr r3, [r7, #0] 8022d06: 89db ldrh r3, [r3, #14] 8022d08: 1e5a subs r2, r3, #1 8022d0a: b291 uxth r1, r2 8022d0c: 683a ldr r2, [r7, #0] 8022d0e: 81d1 strh r1, [r2, #14] 8022d10: 2b01 cmp r3, #1 8022d12: d102 bne.n 8022d1a 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); 8022d14: 6878 ldr r0, [r7, #4] 8022d16: f000 f888 bl 8022e2a NETIF_FOREACH(netif) { 8022d1a: 687b ldr r3, [r7, #4] 8022d1c: 681b ldr r3, [r3, #0] 8022d1e: 607b str r3, [r7, #4] 8022d20: 687b ldr r3, [r7, #4] 8022d22: 2b00 cmp r3, #0 8022d24: d1b9 bne.n 8022c9a } } } } 8022d26: bf00 nop 8022d28: bf00 nop 8022d2a: 3708 adds r7, #8 8022d2c: 46bd mov sp, r7 8022d2e: bd80 pop {r7, pc} 8022d30: 2402af6c .word 0x2402af6c 08022d34 : * 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) { 8022d34: b580 push {r7, lr} 8022d36: b082 sub sp, #8 8022d38: af00 add r7, sp, #0 struct netif *netif; /* loop through netif's */ NETIF_FOREACH(netif) { 8022d3a: 4b16 ldr r3, [pc, #88] @ (8022d94 ) 8022d3c: 681b ldr r3, [r3, #0] 8022d3e: 607b str r3, [r7, #4] 8022d40: e020 b.n 8022d84 struct dhcp *dhcp = netif_dhcp_data(netif); 8022d42: 687b ldr r3, [r7, #4] 8022d44: 6a5b ldr r3, [r3, #36] @ 0x24 8022d46: 603b str r3, [r7, #0] /* only act on DHCP configured interfaces */ if (dhcp != NULL) { 8022d48: 683b ldr r3, [r7, #0] 8022d4a: 2b00 cmp r3, #0 8022d4c: d017 beq.n 8022d7e /* timer is active (non zero), and is about to trigger now */ if (dhcp->request_timeout > 1) { 8022d4e: 683b ldr r3, [r7, #0] 8022d50: 891b ldrh r3, [r3, #8] 8022d52: 2b01 cmp r3, #1 8022d54: d906 bls.n 8022d64 dhcp->request_timeout--; 8022d56: 683b ldr r3, [r7, #0] 8022d58: 891b ldrh r3, [r3, #8] 8022d5a: 3b01 subs r3, #1 8022d5c: b29a uxth r2, r3 8022d5e: 683b ldr r3, [r7, #0] 8022d60: 811a strh r2, [r3, #8] 8022d62: e00c b.n 8022d7e } else if (dhcp->request_timeout == 1) { 8022d64: 683b ldr r3, [r7, #0] 8022d66: 891b ldrh r3, [r3, #8] 8022d68: 2b01 cmp r3, #1 8022d6a: d108 bne.n 8022d7e dhcp->request_timeout--; 8022d6c: 683b ldr r3, [r7, #0] 8022d6e: 891b ldrh r3, [r3, #8] 8022d70: 3b01 subs r3, #1 8022d72: b29a uxth r2, r3 8022d74: 683b ldr r3, [r7, #0] 8022d76: 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); 8022d78: 6878 ldr r0, [r7, #4] 8022d7a: f000 f80d bl 8022d98 NETIF_FOREACH(netif) { 8022d7e: 687b ldr r3, [r7, #4] 8022d80: 681b ldr r3, [r3, #0] 8022d82: 607b str r3, [r7, #4] 8022d84: 687b ldr r3, [r7, #4] 8022d86: 2b00 cmp r3, #0 8022d88: d1db bne.n 8022d42 } } } } 8022d8a: bf00 nop 8022d8c: bf00 nop 8022d8e: 3708 adds r7, #8 8022d90: 46bd mov sp, r7 8022d92: bd80 pop {r7, pc} 8022d94: 2402af6c .word 0x2402af6c 08022d98 : * * @param netif the netif under DHCP control */ static void dhcp_timeout(struct netif *netif) { 8022d98: b580 push {r7, lr} 8022d9a: b084 sub sp, #16 8022d9c: af00 add r7, sp, #0 8022d9e: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022da0: 687b ldr r3, [r7, #4] 8022da2: 6a5b ldr r3, [r3, #36] @ 0x24 8022da4: 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)) { 8022da6: 68fb ldr r3, [r7, #12] 8022da8: 795b ldrb r3, [r3, #5] 8022daa: 2b0c cmp r3, #12 8022dac: d003 beq.n 8022db6 8022dae: 68fb ldr r3, [r7, #12] 8022db0: 795b ldrb r3, [r3, #5] 8022db2: 2b06 cmp r3, #6 8022db4: d103 bne.n 8022dbe LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); 8022db6: 6878 ldr r0, [r7, #4] 8022db8: f000 fa58 bl 802326c dhcp_reboot(netif); } else { dhcp_discover(netif); } } } 8022dbc: e031 b.n 8022e22 } else if (dhcp->state == DHCP_STATE_REQUESTING) { 8022dbe: 68fb ldr r3, [r7, #12] 8022dc0: 795b ldrb r3, [r3, #5] 8022dc2: 2b01 cmp r3, #1 8022dc4: d10e bne.n 8022de4 if (dhcp->tries <= 5) { 8022dc6: 68fb ldr r3, [r7, #12] 8022dc8: 799b ldrb r3, [r3, #6] 8022dca: 2b05 cmp r3, #5 8022dcc: d803 bhi.n 8022dd6 dhcp_select(netif); 8022dce: 6878 ldr r0, [r7, #4] 8022dd0: f7ff fe60 bl 8022a94 } 8022dd4: e025 b.n 8022e22 dhcp_release_and_stop(netif); 8022dd6: 6878 ldr r0, [r7, #4] 8022dd8: f000 fdae bl 8023938 dhcp_start(netif); 8022ddc: 6878 ldr r0, [r7, #4] 8022dde: f000 f8e7 bl 8022fb0 } 8022de2: e01e b.n 8022e22 } else if (dhcp->state == DHCP_STATE_CHECKING) { 8022de4: 68fb ldr r3, [r7, #12] 8022de6: 795b ldrb r3, [r3, #5] 8022de8: 2b08 cmp r3, #8 8022dea: d10b bne.n 8022e04 if (dhcp->tries <= 1) { 8022dec: 68fb ldr r3, [r7, #12] 8022dee: 799b ldrb r3, [r3, #6] 8022df0: 2b01 cmp r3, #1 8022df2: d803 bhi.n 8022dfc dhcp_check(netif); 8022df4: 6878 ldr r0, [r7, #4] 8022df6: f7ff fdf3 bl 80229e0 } 8022dfa: e012 b.n 8022e22 dhcp_bind(netif); 8022dfc: 6878 ldr r0, [r7, #4] 8022dfe: f000 fad7 bl 80233b0 } 8022e02: e00e b.n 8022e22 } else if (dhcp->state == DHCP_STATE_REBOOTING) { 8022e04: 68fb ldr r3, [r7, #12] 8022e06: 795b ldrb r3, [r3, #5] 8022e08: 2b03 cmp r3, #3 8022e0a: d10a bne.n 8022e22 if (dhcp->tries < REBOOT_TRIES) { 8022e0c: 68fb ldr r3, [r7, #12] 8022e0e: 799b ldrb r3, [r3, #6] 8022e10: 2b01 cmp r3, #1 8022e12: d803 bhi.n 8022e1c dhcp_reboot(netif); 8022e14: 6878 ldr r0, [r7, #4] 8022e16: f000 fcdb bl 80237d0 } 8022e1a: e002 b.n 8022e22 dhcp_discover(netif); 8022e1c: 6878 ldr r0, [r7, #4] 8022e1e: f000 fa25 bl 802326c } 8022e22: bf00 nop 8022e24: 3710 adds r7, #16 8022e26: 46bd mov sp, r7 8022e28: bd80 pop {r7, pc} 08022e2a : * * @param netif the netif under DHCP control */ static void dhcp_t1_timeout(struct netif *netif) { 8022e2a: b580 push {r7, lr} 8022e2c: b084 sub sp, #16 8022e2e: af00 add r7, sp, #0 8022e30: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022e32: 687b ldr r3, [r7, #4] 8022e34: 6a5b ldr r3, [r3, #36] @ 0x24 8022e36: 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) || 8022e38: 68fb ldr r3, [r7, #12] 8022e3a: 795b ldrb r3, [r3, #5] 8022e3c: 2b01 cmp r3, #1 8022e3e: d007 beq.n 8022e50 8022e40: 68fb ldr r3, [r7, #12] 8022e42: 795b ldrb r3, [r3, #5] 8022e44: 2b0a cmp r3, #10 8022e46: d003 beq.n 8022e50 (dhcp->state == DHCP_STATE_RENEWING)) { 8022e48: 68fb ldr r3, [r7, #12] 8022e4a: 795b ldrb r3, [r3, #5] if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 8022e4c: 2b05 cmp r3, #5 8022e4e: d117 bne.n 8022e80 * 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); 8022e50: 6878 ldr r0, [r7, #4] 8022e52: f000 fb87 bl 8023564 /* Calculate next timeout */ if (((dhcp->t2_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 8022e56: 68fb ldr r3, [r7, #12] 8022e58: 899b ldrh r3, [r3, #12] 8022e5a: 461a mov r2, r3 8022e5c: 68fb ldr r3, [r7, #12] 8022e5e: 8a5b ldrh r3, [r3, #18] 8022e60: 1ad3 subs r3, r2, r3 8022e62: 2b01 cmp r3, #1 8022e64: dd0c ble.n 8022e80 dhcp->t1_renew_time = (u16_t)((dhcp->t2_timeout - dhcp->lease_used) / 2); 8022e66: 68fb ldr r3, [r7, #12] 8022e68: 899b ldrh r3, [r3, #12] 8022e6a: 461a mov r2, r3 8022e6c: 68fb ldr r3, [r7, #12] 8022e6e: 8a5b ldrh r3, [r3, #18] 8022e70: 1ad3 subs r3, r2, r3 8022e72: 2b00 cmp r3, #0 8022e74: da00 bge.n 8022e78 8022e76: 3301 adds r3, #1 8022e78: 105b asrs r3, r3, #1 8022e7a: b29a uxth r2, r3 8022e7c: 68fb ldr r3, [r7, #12] 8022e7e: 81da strh r2, [r3, #14] } } } 8022e80: bf00 nop 8022e82: 3710 adds r7, #16 8022e84: 46bd mov sp, r7 8022e86: bd80 pop {r7, pc} 08022e88 : * * @param netif the netif under DHCP control */ static void dhcp_t2_timeout(struct netif *netif) { 8022e88: b580 push {r7, lr} 8022e8a: b084 sub sp, #16 8022e8c: af00 add r7, sp, #0 8022e8e: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8022e90: 687b ldr r3, [r7, #4] 8022e92: 6a5b ldr r3, [r3, #36] @ 0x24 8022e94: 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) || 8022e96: 68fb ldr r3, [r7, #12] 8022e98: 795b ldrb r3, [r3, #5] 8022e9a: 2b01 cmp r3, #1 8022e9c: d00b beq.n 8022eb6 8022e9e: 68fb ldr r3, [r7, #12] 8022ea0: 795b ldrb r3, [r3, #5] 8022ea2: 2b0a cmp r3, #10 8022ea4: d007 beq.n 8022eb6 (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { 8022ea6: 68fb ldr r3, [r7, #12] 8022ea8: 795b ldrb r3, [r3, #5] if ((dhcp->state == DHCP_STATE_REQUESTING) || (dhcp->state == DHCP_STATE_BOUND) || 8022eaa: 2b05 cmp r3, #5 8022eac: d003 beq.n 8022eb6 (dhcp->state == DHCP_STATE_RENEWING) || (dhcp->state == DHCP_STATE_REBINDING)) { 8022eae: 68fb ldr r3, [r7, #12] 8022eb0: 795b ldrb r3, [r3, #5] 8022eb2: 2b04 cmp r3, #4 8022eb4: d117 bne.n 8022ee6 /* 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); 8022eb6: 6878 ldr r0, [r7, #4] 8022eb8: f000 fbf0 bl 802369c /* Calculate next timeout */ if (((dhcp->t0_timeout - dhcp->lease_used) / 2) >= ((60 + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS)) { 8022ebc: 68fb ldr r3, [r7, #12] 8022ebe: 8a9b ldrh r3, [r3, #20] 8022ec0: 461a mov r2, r3 8022ec2: 68fb ldr r3, [r7, #12] 8022ec4: 8a5b ldrh r3, [r3, #18] 8022ec6: 1ad3 subs r3, r2, r3 8022ec8: 2b01 cmp r3, #1 8022eca: dd0c ble.n 8022ee6 dhcp->t2_rebind_time = (u16_t)((dhcp->t0_timeout - dhcp->lease_used) / 2); 8022ecc: 68fb ldr r3, [r7, #12] 8022ece: 8a9b ldrh r3, [r3, #20] 8022ed0: 461a mov r2, r3 8022ed2: 68fb ldr r3, [r7, #12] 8022ed4: 8a5b ldrh r3, [r3, #18] 8022ed6: 1ad3 subs r3, r2, r3 8022ed8: 2b00 cmp r3, #0 8022eda: da00 bge.n 8022ede 8022edc: 3301 adds r3, #1 8022ede: 105b asrs r3, r3, #1 8022ee0: b29a uxth r2, r3 8022ee2: 68fb ldr r3, [r7, #12] 8022ee4: 821a strh r2, [r3, #16] } } } 8022ee6: bf00 nop 8022ee8: 3710 adds r7, #16 8022eea: 46bd mov sp, r7 8022eec: bd80 pop {r7, pc} ... 08022ef0 : * * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif, struct dhcp_msg *msg_in) { 8022ef0: b580 push {r7, lr} 8022ef2: b084 sub sp, #16 8022ef4: af00 add r7, sp, #0 8022ef6: 6078 str r0, [r7, #4] 8022ef8: 6039 str r1, [r7, #0] struct dhcp *dhcp = netif_dhcp_data(netif); 8022efa: 687b ldr r3, [r7, #4] 8022efc: 6a5b ldr r3, [r3, #36] @ 0x24 8022efe: 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); 8022f00: 68fb ldr r3, [r7, #12] 8022f02: 2200 movs r2, #0 8022f04: 621a str r2, [r3, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 8022f06: 68fb ldr r3, [r7, #12] 8022f08: 2200 movs r2, #0 8022f0a: 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)) { 8022f0c: 4b26 ldr r3, [pc, #152] @ (8022fa8 ) 8022f0e: 78db ldrb r3, [r3, #3] 8022f10: 2b00 cmp r3, #0 8022f12: d003 beq.n 8022f1c /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 8022f14: 4b25 ldr r3, [pc, #148] @ (8022fac ) 8022f16: 68da ldr r2, [r3, #12] 8022f18: 68fb ldr r3, [r7, #12] 8022f1a: 629a str r2, [r3, #40] @ 0x28 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 8022f1c: 4b22 ldr r3, [pc, #136] @ (8022fa8 ) 8022f1e: 791b ldrb r3, [r3, #4] 8022f20: 2b00 cmp r3, #0 8022f22: d004 beq.n 8022f2e /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 8022f24: 4b21 ldr r3, [pc, #132] @ (8022fac ) 8022f26: 691a ldr r2, [r3, #16] 8022f28: 68fb ldr r3, [r7, #12] 8022f2a: 62da str r2, [r3, #44] @ 0x2c 8022f2c: e004 b.n 8022f38 } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 8022f2e: 68fb ldr r3, [r7, #12] 8022f30: 6a9b ldr r3, [r3, #40] @ 0x28 8022f32: 085a lsrs r2, r3, #1 8022f34: 68fb ldr r3, [r7, #12] 8022f36: 62da str r2, [r3, #44] @ 0x2c } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 8022f38: 4b1b ldr r3, [pc, #108] @ (8022fa8 ) 8022f3a: 795b ldrb r3, [r3, #5] 8022f3c: 2b00 cmp r3, #0 8022f3e: d004 beq.n 8022f4a /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 8022f40: 4b1a ldr r3, [pc, #104] @ (8022fac ) 8022f42: 695a ldr r2, [r3, #20] 8022f44: 68fb ldr r3, [r7, #12] 8022f46: 631a str r2, [r3, #48] @ 0x30 8022f48: e007 b.n 8022f5a } else { /* calculate safe periods for rebinding (offered_t0_lease * 0.875 -> 87.5%)*/ dhcp->offered_t2_rebind = (dhcp->offered_t0_lease * 7U) / 8U; 8022f4a: 68fb ldr r3, [r7, #12] 8022f4c: 6a9a ldr r2, [r3, #40] @ 0x28 8022f4e: 4613 mov r3, r2 8022f50: 00db lsls r3, r3, #3 8022f52: 1a9b subs r3, r3, r2 8022f54: 08da lsrs r2, r3, #3 8022f56: 68fb ldr r3, [r7, #12] 8022f58: 631a str r2, [r3, #48] @ 0x30 } /* (y)our internet address */ ip4_addr_copy(dhcp->offered_ip_addr, msg_in->yiaddr); 8022f5a: 683b ldr r3, [r7, #0] 8022f5c: 691a ldr r2, [r3, #16] 8022f5e: 68fb ldr r3, [r7, #12] 8022f60: 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)) { 8022f62: 4b11 ldr r3, [pc, #68] @ (8022fa8 ) 8022f64: 799b ldrb r3, [r3, #6] 8022f66: 2b00 cmp r3, #0 8022f68: d00b beq.n 8022f82 /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 8022f6a: 4b10 ldr r3, [pc, #64] @ (8022fac ) 8022f6c: 699b ldr r3, [r3, #24] 8022f6e: 4618 mov r0, r3 8022f70: f7f6 fd4f bl 8019a12 8022f74: 4602 mov r2, r0 8022f76: 68fb ldr r3, [r7, #12] 8022f78: 621a str r2, [r3, #32] dhcp->subnet_mask_given = 1; 8022f7a: 68fb ldr r3, [r7, #12] 8022f7c: 2201 movs r2, #1 8022f7e: 71da strb r2, [r3, #7] 8022f80: e002 b.n 8022f88 } else { dhcp->subnet_mask_given = 0; 8022f82: 68fb ldr r3, [r7, #12] 8022f84: 2200 movs r2, #0 8022f86: 71da strb r2, [r3, #7] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 8022f88: 4b07 ldr r3, [pc, #28] @ (8022fa8 ) 8022f8a: 79db ldrb r3, [r3, #7] 8022f8c: 2b00 cmp r3, #0 8022f8e: d007 beq.n 8022fa0 ip4_addr_set_u32(&dhcp->offered_gw_addr, lwip_htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 8022f90: 4b06 ldr r3, [pc, #24] @ (8022fac ) 8022f92: 69db ldr r3, [r3, #28] 8022f94: 4618 mov r0, r3 8022f96: f7f6 fd3c bl 8019a12 8022f9a: 4602 mov r2, r0 8022f9c: 68fb ldr r3, [r7, #12] 8022f9e: 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 */ } 8022fa0: bf00 nop 8022fa2: 3710 adds r7, #16 8022fa4: 46bd mov sp, r7 8022fa6: bd80 pop {r7, pc} 8022fa8: 2402affc .word 0x2402affc 8022fac: 2402afdc .word 0x2402afdc 08022fb0 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 8022fb0: b580 push {r7, lr} 8022fb2: b084 sub sp, #16 8022fb4: af00 add r7, sp, #0 8022fb6: 6078 str r0, [r7, #4] struct dhcp *dhcp; err_t result; LWIP_ASSERT_CORE_LOCKED(); 8022fb8: f7ee f846 bl 8011048 LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 8022fbc: 687b ldr r3, [r7, #4] 8022fbe: 2b00 cmp r3, #0 8022fc0: d109 bne.n 8022fd6 8022fc2: 4b37 ldr r3, [pc, #220] @ (80230a0 ) 8022fc4: f240 22e7 movw r2, #743 @ 0x2e7 8022fc8: 4936 ldr r1, [pc, #216] @ (80230a4 ) 8022fca: 4837 ldr r0, [pc, #220] @ (80230a8 ) 8022fcc: f007 fc66 bl 802a89c 8022fd0: f06f 030f mvn.w r3, #15 8022fd4: e060 b.n 8023098 LWIP_ERROR("netif is not up, old style port?", netif_is_up(netif), return ERR_ARG;); 8022fd6: 687b ldr r3, [r7, #4] 8022fd8: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8022fdc: f003 0301 and.w r3, r3, #1 8022fe0: 2b00 cmp r3, #0 8022fe2: d109 bne.n 8022ff8 8022fe4: 4b2e ldr r3, [pc, #184] @ (80230a0 ) 8022fe6: f44f 723a mov.w r2, #744 @ 0x2e8 8022fea: 4930 ldr r1, [pc, #192] @ (80230ac ) 8022fec: 482e ldr r0, [pc, #184] @ (80230a8 ) 8022fee: f007 fc55 bl 802a89c 8022ff2: f06f 030f mvn.w r3, #15 8022ff6: e04f b.n 8023098 dhcp = netif_dhcp_data(netif); 8022ff8: 687b ldr r3, [r7, #4] 8022ffa: 6a5b ldr r3, [r3, #36] @ 0x24 8022ffc: 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) { 8022ffe: 687b ldr r3, [r7, #4] 8023000: 8d1b ldrh r3, [r3, #40] @ 0x28 8023002: f5b3 7f10 cmp.w r3, #576 @ 0x240 8023006: d202 bcs.n 802300e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); return ERR_MEM; 8023008: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802300c: e044 b.n 8023098 } /* no DHCP client attached yet? */ if (dhcp == NULL) { 802300e: 68fb ldr r3, [r7, #12] 8023010: 2b00 cmp r3, #0 8023012: d10d bne.n 8023030 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): mallocing new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 8023014: 2034 movs r0, #52 @ 0x34 8023016: f7f7 f8c9 bl 801a1ac 802301a: 60f8 str r0, [r7, #12] if (dhcp == NULL) { 802301c: 68fb ldr r3, [r7, #12] 802301e: 2b00 cmp r3, #0 8023020: d102 bne.n 8023028 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); return ERR_MEM; 8023022: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023026: e037 b.n 8023098 } /* store this dhcp client in the netif */ netif_set_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP, dhcp); 8023028: 687b ldr r3, [r7, #4] 802302a: 68fa ldr r2, [r7, #12] 802302c: 625a str r2, [r3, #36] @ 0x24 802302e: e005 b.n 802303c 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) { 8023030: 68fb ldr r3, [r7, #12] 8023032: 791b ldrb r3, [r3, #4] 8023034: 2b00 cmp r3, #0 8023036: d001 beq.n 802303c dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 8023038: f7ff fc8e bl 8022958 } /* dhcp is cleared below, no need to reset flag*/ } /* clear data structure */ memset(dhcp, 0, sizeof(struct dhcp)); 802303c: 2234 movs r2, #52 @ 0x34 802303e: 2100 movs r1, #0 8023040: 68f8 ldr r0, [r7, #12] 8023042: f007 fdbd bl 802abc0 /* 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 */ 8023046: f7ff fc35 bl 80228b4 802304a: 4603 mov r3, r0 802304c: 2b00 cmp r3, #0 802304e: d002 beq.n 8023056 return ERR_MEM; 8023050: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023054: e020 b.n 8023098 } dhcp->pcb_allocated = 1; 8023056: 68fb ldr r3, [r7, #12] 8023058: 2201 movs r2, #1 802305a: 711a strb r2, [r3, #4] if (!netif_is_link_up(netif)) { 802305c: 687b ldr r3, [r7, #4] 802305e: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8023062: f003 0304 and.w r3, r3, #4 8023066: 2b00 cmp r3, #0 8023068: d105 bne.n 8023076 /* set state INIT and wait for dhcp_network_changed() to call dhcp_discover() */ dhcp_set_state(dhcp, DHCP_STATE_INIT); 802306a: 2102 movs r1, #2 802306c: 68f8 ldr r0, [r7, #12] 802306e: f000 fd0a bl 8023a86 return ERR_OK; 8023072: 2300 movs r3, #0 8023074: e010 b.n 8023098 } /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 8023076: 6878 ldr r0, [r7, #4] 8023078: f000 f8f8 bl 802326c 802307c: 4603 mov r3, r0 802307e: 72fb strb r3, [r7, #11] if (result != ERR_OK) { 8023080: f997 300b ldrsb.w r3, [r7, #11] 8023084: 2b00 cmp r3, #0 8023086: d005 beq.n 8023094 /* free resources allocated above */ dhcp_release_and_stop(netif); 8023088: 6878 ldr r0, [r7, #4] 802308a: f000 fc55 bl 8023938 return ERR_MEM; 802308e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023092: e001 b.n 8023098 } return result; 8023094: f997 300b ldrsb.w r3, [r7, #11] } 8023098: 4618 mov r0, r3 802309a: 3710 adds r7, #16 802309c: 46bd mov sp, r7 802309e: bd80 pop {r7, pc} 80230a0: 08030e84 .word 0x08030e84 80230a4: 08030f68 .word 0x08030f68 80230a8: 08030ee4 .word 0x08030ee4 80230ac: 08030fac .word 0x08030fac 080230b0 : * This enters the REBOOTING state to verify that the currently bound * address is still valid. */ void dhcp_network_changed(struct netif *netif) { 80230b0: b580 push {r7, lr} 80230b2: b084 sub sp, #16 80230b4: af00 add r7, sp, #0 80230b6: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80230b8: 687b ldr r3, [r7, #4] 80230ba: 6a5b ldr r3, [r3, #36] @ 0x24 80230bc: 60fb str r3, [r7, #12] if (!dhcp) { 80230be: 68fb ldr r3, [r7, #12] 80230c0: 2b00 cmp r3, #0 80230c2: d025 beq.n 8023110 return; } switch (dhcp->state) { 80230c4: 68fb ldr r3, [r7, #12] 80230c6: 795b ldrb r3, [r3, #5] 80230c8: 2b0a cmp r3, #10 80230ca: d008 beq.n 80230de 80230cc: 2b0a cmp r3, #10 80230ce: dc0d bgt.n 80230ec 80230d0: 2b00 cmp r3, #0 80230d2: d01f beq.n 8023114 80230d4: 2b00 cmp r3, #0 80230d6: db09 blt.n 80230ec 80230d8: 3b03 subs r3, #3 80230da: 2b02 cmp r3, #2 80230dc: d806 bhi.n 80230ec case DHCP_STATE_REBINDING: case DHCP_STATE_RENEWING: case DHCP_STATE_BOUND: case DHCP_STATE_REBOOTING: dhcp->tries = 0; 80230de: 68fb ldr r3, [r7, #12] 80230e0: 2200 movs r2, #0 80230e2: 719a strb r2, [r3, #6] dhcp_reboot(netif); 80230e4: 6878 ldr r0, [r7, #4] 80230e6: f000 fb73 bl 80237d0 break; 80230ea: e014 b.n 8023116 case DHCP_STATE_OFF: /* stay off */ break; default: LWIP_ASSERT("invalid dhcp->state", dhcp->state <= DHCP_STATE_BACKING_OFF); 80230ec: 68fb ldr r3, [r7, #12] 80230ee: 795b ldrb r3, [r3, #5] 80230f0: 2b0c cmp r3, #12 80230f2: d906 bls.n 8023102 80230f4: 4b09 ldr r3, [pc, #36] @ (802311c ) 80230f6: f240 326d movw r2, #877 @ 0x36d 80230fa: 4909 ldr r1, [pc, #36] @ (8023120 ) 80230fc: 4809 ldr r0, [pc, #36] @ (8023124 ) 80230fe: f007 fbcd bl 802a89c 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; 8023102: 68fb ldr r3, [r7, #12] 8023104: 2200 movs r2, #0 8023106: 719a strb r2, [r3, #6] dhcp_discover(netif); 8023108: 6878 ldr r0, [r7, #4] 802310a: f000 f8af bl 802326c break; 802310e: e002 b.n 8023116 return; 8023110: bf00 nop 8023112: e000 b.n 8023116 break; 8023114: bf00 nop } } 8023116: 3710 adds r7, #16 8023118: 46bd mov sp, r7 802311a: bd80 pop {r7, pc} 802311c: 08030e84 .word 0x08030e84 8023120: 08030fd0 .word 0x08030fd0 8023124: 08030ee4 .word 0x08030ee4 08023128 : * @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) { 8023128: b580 push {r7, lr} 802312a: b084 sub sp, #16 802312c: af00 add r7, sp, #0 802312e: 6078 str r0, [r7, #4] 8023130: 6039 str r1, [r7, #0] struct dhcp *dhcp; LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8023132: 687b ldr r3, [r7, #4] 8023134: 2b00 cmp r3, #0 8023136: d107 bne.n 8023148 8023138: 4b0e ldr r3, [pc, #56] @ (8023174 ) 802313a: f240 328b movw r2, #907 @ 0x38b 802313e: 490e ldr r1, [pc, #56] @ (8023178 ) 8023140: 480e ldr r0, [pc, #56] @ (802317c ) 8023142: f007 fbab bl 802a89c 8023146: e012 b.n 802316e dhcp = netif_dhcp_data(netif); 8023148: 687b ldr r3, [r7, #4] 802314a: 6a5b ldr r3, [r3, #36] @ 0x24 802314c: 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)) { 802314e: 68fb ldr r3, [r7, #12] 8023150: 2b00 cmp r3, #0 8023152: d00c beq.n 802316e 8023154: 68fb ldr r3, [r7, #12] 8023156: 795b ldrb r3, [r3, #5] 8023158: 2b08 cmp r3, #8 802315a: d108 bne.n 802316e 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)) { 802315c: 683b ldr r3, [r7, #0] 802315e: 681a ldr r2, [r3, #0] 8023160: 68fb ldr r3, [r7, #12] 8023162: 69db ldr r3, [r3, #28] 8023164: 429a cmp r2, r3 8023166: d102 bne.n 802316e /* 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); 8023168: 6878 ldr r0, [r7, #4] 802316a: f000 f809 bl 8023180 } } } 802316e: 3710 adds r7, #16 8023170: 46bd mov sp, r7 8023172: bd80 pop {r7, pc} 8023174: 08030e84 .word 0x08030e84 8023178: 08030f68 .word 0x08030f68 802317c: 08030ee4 .word 0x08030ee4 08023180 : * * @param netif the netif under DHCP control */ static err_t dhcp_decline(struct netif *netif) { 8023180: b5b0 push {r4, r5, r7, lr} 8023182: b08a sub sp, #40 @ 0x28 8023184: af02 add r7, sp, #8 8023186: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023188: 687b ldr r3, [r7, #4] 802318a: 6a5b ldr r3, [r3, #36] @ 0x24 802318c: 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); 802318e: 210c movs r1, #12 8023190: 69b8 ldr r0, [r7, #24] 8023192: f000 fc78 bl 8023a86 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_DECLINE, &options_out_len); 8023196: f107 030c add.w r3, r7, #12 802319a: 2204 movs r2, #4 802319c: 69b9 ldr r1, [r7, #24] 802319e: 6878 ldr r0, [r7, #4] 80231a0: f001 f90a bl 80243b8 80231a4: 6178 str r0, [r7, #20] if (p_out != NULL) { 80231a6: 697b ldr r3, [r7, #20] 80231a8: 2b00 cmp r3, #0 80231aa: d035 beq.n 8023218 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80231ac: 697b ldr r3, [r7, #20] 80231ae: 685b ldr r3, [r3, #4] 80231b0: 613b str r3, [r7, #16] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 80231b2: 89b8 ldrh r0, [r7, #12] 80231b4: 693b ldr r3, [r7, #16] 80231b6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80231ba: 2304 movs r3, #4 80231bc: 2232 movs r2, #50 @ 0x32 80231be: f000 fc7d bl 8023abc 80231c2: 4603 mov r3, r0 80231c4: 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))); 80231c6: 89bc ldrh r4, [r7, #12] 80231c8: 693b ldr r3, [r7, #16] 80231ca: f103 05f0 add.w r5, r3, #240 @ 0xf0 80231ce: 69bb ldr r3, [r7, #24] 80231d0: 69db ldr r3, [r3, #28] 80231d2: 4618 mov r0, r3 80231d4: f7f6 fc1d bl 8019a12 80231d8: 4603 mov r3, r0 80231da: 461a mov r2, r3 80231dc: 4629 mov r1, r5 80231de: 4620 mov r0, r4 80231e0: f000 fcf8 bl 8023bd4 80231e4: 4603 mov r3, r0 80231e6: 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); 80231e8: 89b8 ldrh r0, [r7, #12] 80231ea: 693b ldr r3, [r7, #16] 80231ec: 33f0 adds r3, #240 @ 0xf0 80231ee: 697a ldr r2, [r7, #20] 80231f0: 4619 mov r1, r3 80231f2: f001 f9b7 bl 8024564 /* 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); 80231f6: 4b19 ldr r3, [pc, #100] @ (802325c ) 80231f8: 6818 ldr r0, [r3, #0] 80231fa: 4b19 ldr r3, [pc, #100] @ (8023260 ) 80231fc: 9301 str r3, [sp, #4] 80231fe: 687b ldr r3, [r7, #4] 8023200: 9300 str r3, [sp, #0] 8023202: 2343 movs r3, #67 @ 0x43 8023204: 4a17 ldr r2, [pc, #92] @ (8023264 ) 8023206: 6979 ldr r1, [r7, #20] 8023208: f7ff f88a bl 8022320 802320c: 4603 mov r3, r0 802320e: 77fb strb r3, [r7, #31] pbuf_free(p_out); 8023210: 6978 ldr r0, [r7, #20] 8023212: f7f8 f8cb bl 801b3ac 8023216: e001 b.n 802321c 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; 8023218: 23ff movs r3, #255 @ 0xff 802321a: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 802321c: 69bb ldr r3, [r7, #24] 802321e: 799b ldrb r3, [r3, #6] 8023220: 2bff cmp r3, #255 @ 0xff 8023222: d005 beq.n 8023230 dhcp->tries++; 8023224: 69bb ldr r3, [r7, #24] 8023226: 799b ldrb r3, [r3, #6] 8023228: 3301 adds r3, #1 802322a: b2da uxtb r2, r3 802322c: 69bb ldr r3, [r7, #24] 802322e: 719a strb r2, [r3, #6] } msecs = 10 * 1000; 8023230: f242 7310 movw r3, #10000 @ 0x2710 8023234: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8023236: 89fb ldrh r3, [r7, #14] 8023238: f203 13f3 addw r3, r3, #499 @ 0x1f3 802323c: 4a0a ldr r2, [pc, #40] @ (8023268 ) 802323e: fb82 1203 smull r1, r2, r2, r3 8023242: 1152 asrs r2, r2, #5 8023244: 17db asrs r3, r3, #31 8023246: 1ad3 subs r3, r2, r3 8023248: b29a uxth r2, r3 802324a: 69bb ldr r3, [r7, #24] 802324c: 811a strh r2, [r3, #8] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline(): set request timeout %"U16_F" msecs\n", msecs)); return result; 802324e: f997 301f ldrsb.w r3, [r7, #31] } 8023252: 4618 mov r0, r3 8023254: 3720 adds r7, #32 8023256: 46bd mov sp, r7 8023258: bdb0 pop {r4, r5, r7, pc} 802325a: bf00 nop 802325c: 2402b004 .word 0x2402b004 8023260: 08031ca8 .word 0x08031ca8 8023264: 08031cac .word 0x08031cac 8023268: 10624dd3 .word 0x10624dd3 0802326c : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802326c: b580 push {r7, lr} 802326e: b08a sub sp, #40 @ 0x28 8023270: af02 add r7, sp, #8 8023272: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023274: 687b ldr r3, [r7, #4] 8023276: 6a5b ldr r3, [r3, #36] @ 0x24 8023278: 61bb str r3, [r7, #24] err_t result = ERR_OK; 802327a: 2300 movs r3, #0 802327c: 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); 802327e: 69bb ldr r3, [r7, #24] 8023280: 2200 movs r2, #0 8023282: 61da str r2, [r3, #28] dhcp_set_state(dhcp, DHCP_STATE_SELECTING); 8023284: 2106 movs r1, #6 8023286: 69b8 ldr r0, [r7, #24] 8023288: f000 fbfd bl 8023a86 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER, &options_out_len); 802328c: f107 0308 add.w r3, r7, #8 8023290: 2201 movs r2, #1 8023292: 69b9 ldr r1, [r7, #24] 8023294: 6878 ldr r0, [r7, #4] 8023296: f001 f88f bl 80243b8 802329a: 6138 str r0, [r7, #16] if (p_out != NULL) { 802329c: 693b ldr r3, [r7, #16] 802329e: 2b00 cmp r3, #0 80232a0: d04b beq.n 802333a struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80232a2: 693b ldr r3, [r7, #16] 80232a4: 685b ldr r3, [r3, #4] 80232a6: 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); 80232a8: 8938 ldrh r0, [r7, #8] 80232aa: 68fb ldr r3, [r7, #12] 80232ac: f103 01f0 add.w r1, r3, #240 @ 0xf0 80232b0: 2302 movs r3, #2 80232b2: 2239 movs r2, #57 @ 0x39 80232b4: f000 fc02 bl 8023abc 80232b8: 4603 mov r3, r0 80232ba: 813b strh r3, [r7, #8] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80232bc: 8938 ldrh r0, [r7, #8] 80232be: 68fb ldr r3, [r7, #12] 80232c0: f103 01f0 add.w r1, r3, #240 @ 0xf0 80232c4: 687b ldr r3, [r7, #4] 80232c6: 8d1b ldrh r3, [r3, #40] @ 0x28 80232c8: 461a mov r2, r3 80232ca: f000 fc51 bl 8023b70 80232ce: 4603 mov r3, r0 80232d0: 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)); 80232d2: 8938 ldrh r0, [r7, #8] 80232d4: 68fb ldr r3, [r7, #12] 80232d6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80232da: 2303 movs r3, #3 80232dc: 2237 movs r2, #55 @ 0x37 80232de: f000 fbed bl 8023abc 80232e2: 4603 mov r3, r0 80232e4: 813b strh r3, [r7, #8] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80232e6: 2300 movs r3, #0 80232e8: 77fb strb r3, [r7, #31] 80232ea: e00e b.n 802330a options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80232ec: 8938 ldrh r0, [r7, #8] 80232ee: 68fb ldr r3, [r7, #12] 80232f0: f103 01f0 add.w r1, r3, #240 @ 0xf0 80232f4: 7ffb ldrb r3, [r7, #31] 80232f6: 4a29 ldr r2, [pc, #164] @ (802339c ) 80232f8: 5cd3 ldrb r3, [r2, r3] 80232fa: 461a mov r2, r3 80232fc: f000 fc12 bl 8023b24 8023300: 4603 mov r3, r0 8023302: 813b strh r3, [r7, #8] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8023304: 7ffb ldrb r3, [r7, #31] 8023306: 3301 adds r3, #1 8023308: 77fb strb r3, [r7, #31] 802330a: 7ffb ldrb r3, [r7, #31] 802330c: 2b02 cmp r3, #2 802330e: d9ed bls.n 80232ec } 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); 8023310: 8938 ldrh r0, [r7, #8] 8023312: 68fb ldr r3, [r7, #12] 8023314: 33f0 adds r3, #240 @ 0xf0 8023316: 693a ldr r2, [r7, #16] 8023318: 4619 mov r1, r3 802331a: f001 f923 bl 8024564 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); 802331e: 4b20 ldr r3, [pc, #128] @ (80233a0 ) 8023320: 6818 ldr r0, [r3, #0] 8023322: 4b20 ldr r3, [pc, #128] @ (80233a4 ) 8023324: 9301 str r3, [sp, #4] 8023326: 687b ldr r3, [r7, #4] 8023328: 9300 str r3, [sp, #0] 802332a: 2343 movs r3, #67 @ 0x43 802332c: 4a1e ldr r2, [pc, #120] @ (80233a8 ) 802332e: 6939 ldr r1, [r7, #16] 8023330: f7fe fff6 bl 8022320 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); pbuf_free(p_out); 8023334: 6938 ldr r0, [r7, #16] 8023336: f7f8 f839 bl 801b3ac 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) { 802333a: 69bb ldr r3, [r7, #24] 802333c: 799b ldrb r3, [r3, #6] 802333e: 2bff cmp r3, #255 @ 0xff 8023340: d005 beq.n 802334e dhcp->tries++; 8023342: 69bb ldr r3, [r7, #24] 8023344: 799b ldrb r3, [r3, #6] 8023346: 3301 adds r3, #1 8023348: b2da uxtb r2, r3 802334a: 69bb ldr r3, [r7, #24] 802334c: 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); 802334e: 69bb ldr r3, [r7, #24] 8023350: 799b ldrb r3, [r3, #6] 8023352: 2b05 cmp r3, #5 8023354: d80d bhi.n 8023372 8023356: 69bb ldr r3, [r7, #24] 8023358: 799b ldrb r3, [r3, #6] 802335a: 461a mov r2, r3 802335c: 2301 movs r3, #1 802335e: 4093 lsls r3, r2 8023360: b29b uxth r3, r3 8023362: 461a mov r2, r3 8023364: 0152 lsls r2, r2, #5 8023366: 1ad2 subs r2, r2, r3 8023368: 0092 lsls r2, r2, #2 802336a: 4413 add r3, r2 802336c: 00db lsls r3, r3, #3 802336e: b29b uxth r3, r3 8023370: e001 b.n 8023376 8023372: f64e 2360 movw r3, #60000 @ 0xea60 8023376: 817b strh r3, [r7, #10] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8023378: 897b ldrh r3, [r7, #10] 802337a: f203 13f3 addw r3, r3, #499 @ 0x1f3 802337e: 4a0b ldr r2, [pc, #44] @ (80233ac ) 8023380: fb82 1203 smull r1, r2, r2, r3 8023384: 1152 asrs r2, r2, #5 8023386: 17db asrs r3, r3, #31 8023388: 1ad3 subs r3, r2, r3 802338a: b29a uxth r2, r3 802338c: 69bb ldr r3, [r7, #24] 802338e: 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; 8023390: f997 3017 ldrsb.w r3, [r7, #23] } 8023394: 4618 mov r0, r3 8023396: 3720 adds r7, #32 8023398: 46bd mov sp, r7 802339a: bd80 pop {r7, pc} 802339c: 24000058 .word 0x24000058 80233a0: 2402b004 .word 0x2402b004 80233a4: 08031ca8 .word 0x08031ca8 80233a8: 08031cac .word 0x08031cac 80233ac: 10624dd3 .word 0x10624dd3 080233b0 : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 80233b0: b580 push {r7, lr} 80233b2: b088 sub sp, #32 80233b4: af00 add r7, sp, #0 80233b6: 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;); 80233b8: 687b ldr r3, [r7, #4] 80233ba: 2b00 cmp r3, #0 80233bc: d107 bne.n 80233ce 80233be: 4b64 ldr r3, [pc, #400] @ (8023550 ) 80233c0: f240 4215 movw r2, #1045 @ 0x415 80233c4: 4963 ldr r1, [pc, #396] @ (8023554 ) 80233c6: 4864 ldr r0, [pc, #400] @ (8023558 ) 80233c8: f007 fa68 bl 802a89c 80233cc: e0bc b.n 8023548 dhcp = netif_dhcp_data(netif); 80233ce: 687b ldr r3, [r7, #4] 80233d0: 6a5b ldr r3, [r3, #36] @ 0x24 80233d2: 61fb str r3, [r7, #28] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 80233d4: 69fb ldr r3, [r7, #28] 80233d6: 2b00 cmp r3, #0 80233d8: d107 bne.n 80233ea 80233da: 4b5d ldr r3, [pc, #372] @ (8023550 ) 80233dc: f240 4217 movw r2, #1047 @ 0x417 80233e0: 495e ldr r1, [pc, #376] @ (802355c ) 80233e2: 485d ldr r0, [pc, #372] @ (8023558 ) 80233e4: f007 fa5a bl 802a89c 80233e8: e0ae b.n 8023548 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; 80233ea: 69fb ldr r3, [r7, #28] 80233ec: 2200 movs r2, #0 80233ee: 825a strh r2, [r3, #18] if (dhcp->offered_t0_lease != 0xffffffffUL) { 80233f0: 69fb ldr r3, [r7, #28] 80233f2: 6a9b ldr r3, [r3, #40] @ 0x28 80233f4: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80233f8: d019 beq.n 802342e /* 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; 80233fa: 69fb ldr r3, [r7, #28] 80233fc: 6a9b ldr r3, [r3, #40] @ 0x28 80233fe: 331e adds r3, #30 8023400: 4a57 ldr r2, [pc, #348] @ (8023560 ) 8023402: fba2 2303 umull r2, r3, r2, r3 8023406: 095b lsrs r3, r3, #5 8023408: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 802340a: 69bb ldr r3, [r7, #24] 802340c: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8023410: d302 bcc.n 8023418 timeout = 0xffff; 8023412: f64f 73ff movw r3, #65535 @ 0xffff 8023416: 61bb str r3, [r7, #24] } dhcp->t0_timeout = (u16_t)timeout; 8023418: 69bb ldr r3, [r7, #24] 802341a: b29a uxth r2, r3 802341c: 69fb ldr r3, [r7, #28] 802341e: 829a strh r2, [r3, #20] if (dhcp->t0_timeout == 0) { 8023420: 69fb ldr r3, [r7, #28] 8023422: 8a9b ldrh r3, [r3, #20] 8023424: 2b00 cmp r3, #0 8023426: d102 bne.n 802342e dhcp->t0_timeout = 1; 8023428: 69fb ldr r3, [r7, #28] 802342a: 2201 movs r2, #1 802342c: 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) { 802342e: 69fb ldr r3, [r7, #28] 8023430: 6adb ldr r3, [r3, #44] @ 0x2c 8023432: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8023436: d01d beq.n 8023474 /* 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; 8023438: 69fb ldr r3, [r7, #28] 802343a: 6adb ldr r3, [r3, #44] @ 0x2c 802343c: 331e adds r3, #30 802343e: 4a48 ldr r2, [pc, #288] @ (8023560 ) 8023440: fba2 2303 umull r2, r3, r2, r3 8023444: 095b lsrs r3, r3, #5 8023446: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 8023448: 69bb ldr r3, [r7, #24] 802344a: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 802344e: d302 bcc.n 8023456 timeout = 0xffff; 8023450: f64f 73ff movw r3, #65535 @ 0xffff 8023454: 61bb str r3, [r7, #24] } dhcp->t1_timeout = (u16_t)timeout; 8023456: 69bb ldr r3, [r7, #24] 8023458: b29a uxth r2, r3 802345a: 69fb ldr r3, [r7, #28] 802345c: 815a strh r2, [r3, #10] if (dhcp->t1_timeout == 0) { 802345e: 69fb ldr r3, [r7, #28] 8023460: 895b ldrh r3, [r3, #10] 8023462: 2b00 cmp r3, #0 8023464: d102 bne.n 802346c dhcp->t1_timeout = 1; 8023466: 69fb ldr r3, [r7, #28] 8023468: 2201 movs r2, #1 802346a: 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; 802346c: 69fb ldr r3, [r7, #28] 802346e: 895a ldrh r2, [r3, #10] 8023470: 69fb ldr r3, [r7, #28] 8023472: 81da strh r2, [r3, #14] } /* set renewal period timer */ if (dhcp->offered_t2_rebind != 0xffffffffUL) { 8023474: 69fb ldr r3, [r7, #28] 8023476: 6b1b ldr r3, [r3, #48] @ 0x30 8023478: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 802347c: d01d beq.n 80234ba 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; 802347e: 69fb ldr r3, [r7, #28] 8023480: 6b1b ldr r3, [r3, #48] @ 0x30 8023482: 331e adds r3, #30 8023484: 4a36 ldr r2, [pc, #216] @ (8023560 ) 8023486: fba2 2303 umull r2, r3, r2, r3 802348a: 095b lsrs r3, r3, #5 802348c: 61bb str r3, [r7, #24] if (timeout > 0xffff) { 802348e: 69bb ldr r3, [r7, #24] 8023490: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8023494: d302 bcc.n 802349c timeout = 0xffff; 8023496: f64f 73ff movw r3, #65535 @ 0xffff 802349a: 61bb str r3, [r7, #24] } dhcp->t2_timeout = (u16_t)timeout; 802349c: 69bb ldr r3, [r7, #24] 802349e: b29a uxth r2, r3 80234a0: 69fb ldr r3, [r7, #28] 80234a2: 819a strh r2, [r3, #12] if (dhcp->t2_timeout == 0) { 80234a4: 69fb ldr r3, [r7, #28] 80234a6: 899b ldrh r3, [r3, #12] 80234a8: 2b00 cmp r3, #0 80234aa: d102 bne.n 80234b2 dhcp->t2_timeout = 1; 80234ac: 69fb ldr r3, [r7, #28] 80234ae: 2201 movs r2, #1 80234b0: 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; 80234b2: 69fb ldr r3, [r7, #28] 80234b4: 899a ldrh r2, [r3, #12] 80234b6: 69fb ldr r3, [r7, #28] 80234b8: 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)) { 80234ba: 69fb ldr r3, [r7, #28] 80234bc: 895a ldrh r2, [r3, #10] 80234be: 69fb ldr r3, [r7, #28] 80234c0: 899b ldrh r3, [r3, #12] 80234c2: 429a cmp r2, r3 80234c4: d306 bcc.n 80234d4 80234c6: 69fb ldr r3, [r7, #28] 80234c8: 899b ldrh r3, [r3, #12] 80234ca: 2b00 cmp r3, #0 80234cc: d002 beq.n 80234d4 dhcp->t1_timeout = 0; 80234ce: 69fb ldr r3, [r7, #28] 80234d0: 2200 movs r2, #0 80234d2: 815a strh r2, [r3, #10] } if (dhcp->subnet_mask_given) { 80234d4: 69fb ldr r3, [r7, #28] 80234d6: 79db ldrb r3, [r3, #7] 80234d8: 2b00 cmp r3, #0 80234da: d003 beq.n 80234e4 /* copy offered network mask */ ip4_addr_copy(sn_mask, dhcp->offered_sn_mask); 80234dc: 69fb ldr r3, [r7, #28] 80234de: 6a1b ldr r3, [r3, #32] 80234e0: 613b str r3, [r7, #16] 80234e2: e014 b.n 802350e } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 80234e4: 69fb ldr r3, [r7, #28] 80234e6: 331c adds r3, #28 80234e8: 781b ldrb r3, [r3, #0] 80234ea: 75fb strb r3, [r7, #23] if (first_octet <= 127) { 80234ec: f997 3017 ldrsb.w r3, [r7, #23] 80234f0: 2b00 cmp r3, #0 80234f2: db02 blt.n 80234fa ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 80234f4: 23ff movs r3, #255 @ 0xff 80234f6: 613b str r3, [r7, #16] 80234f8: e009 b.n 802350e } else if (first_octet >= 192) { 80234fa: 7dfb ldrb r3, [r7, #23] 80234fc: 2bbf cmp r3, #191 @ 0xbf 80234fe: d903 bls.n 8023508 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 8023500: f06f 437f mvn.w r3, #4278190080 @ 0xff000000 8023504: 613b str r3, [r7, #16] 8023506: e002 b.n 802350e } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 8023508: f64f 73ff movw r3, #65535 @ 0xffff 802350c: 613b str r3, [r7, #16] } } ip4_addr_copy(gw_addr, dhcp->offered_gw_addr); 802350e: 69fb ldr r3, [r7, #28] 8023510: 6a5b ldr r3, [r3, #36] @ 0x24 8023512: 60fb str r3, [r7, #12] /* gateway address not given? */ if (ip4_addr_isany_val(gw_addr)) { 8023514: 68fb ldr r3, [r7, #12] 8023516: 2b00 cmp r3, #0 8023518: d108 bne.n 802352c /* copy network address */ ip4_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 802351a: 69fb ldr r3, [r7, #28] 802351c: 69da ldr r2, [r3, #28] 802351e: 693b ldr r3, [r7, #16] 8023520: 4013 ands r3, r2 8023522: 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)); 8023524: 68fb ldr r3, [r7, #12] 8023526: f043 7380 orr.w r3, r3, #16777216 @ 0x1000000 802352a: 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); 802352c: 210a movs r1, #10 802352e: 69f8 ldr r0, [r7, #28] 8023530: f000 faa9 bl 8023a86 netif_set_addr(netif, &dhcp->offered_ip_addr, &sn_mask, &gw_addr); 8023534: 69fb ldr r3, [r7, #28] 8023536: f103 011c add.w r1, r3, #28 802353a: f107 030c add.w r3, r7, #12 802353e: f107 0210 add.w r2, r7, #16 8023542: 6878 ldr r0, [r7, #4] 8023544: f7f7 f9e8 bl 801a918 /* interface is used by routing now that an address is set */ } 8023548: 3720 adds r7, #32 802354a: 46bd mov sp, r7 802354c: bd80 pop {r7, pc} 802354e: bf00 nop 8023550: 08030e84 .word 0x08030e84 8023554: 08030fe4 .word 0x08030fe4 8023558: 08030ee4 .word 0x08030ee4 802355c: 08031000 .word 0x08031000 8023560: 88888889 .word 0x88888889 08023564 : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 8023564: b580 push {r7, lr} 8023566: b08a sub sp, #40 @ 0x28 8023568: af02 add r7, sp, #8 802356a: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 802356c: 687b ldr r3, [r7, #4] 802356e: 6a5b ldr r3, [r3, #36] @ 0x24 8023570: 61bb str r3, [r7, #24] u16_t msecs; u8_t i; struct pbuf *p_out; u16_t options_out_len; LWIP_ASSERT_CORE_LOCKED(); 8023572: f7ed fd69 bl 8011048 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); dhcp_set_state(dhcp, DHCP_STATE_RENEWING); 8023576: 2105 movs r1, #5 8023578: 69b8 ldr r0, [r7, #24] 802357a: f000 fa84 bl 8023a86 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 802357e: f107 030c add.w r3, r7, #12 8023582: 2203 movs r2, #3 8023584: 69b9 ldr r1, [r7, #24] 8023586: 6878 ldr r0, [r7, #4] 8023588: f000 ff16 bl 80243b8 802358c: 6178 str r0, [r7, #20] if (p_out != NULL) { 802358e: 697b ldr r3, [r7, #20] 8023590: 2b00 cmp r3, #0 8023592: d04e beq.n 8023632 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 8023594: 697b ldr r3, [r7, #20] 8023596: 685b ldr r3, [r3, #4] 8023598: 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); 802359a: 89b8 ldrh r0, [r7, #12] 802359c: 693b ldr r3, [r7, #16] 802359e: f103 01f0 add.w r1, r3, #240 @ 0xf0 80235a2: 2302 movs r3, #2 80235a4: 2239 movs r2, #57 @ 0x39 80235a6: f000 fa89 bl 8023abc 80235aa: 4603 mov r3, r0 80235ac: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80235ae: 89b8 ldrh r0, [r7, #12] 80235b0: 693b ldr r3, [r7, #16] 80235b2: f103 01f0 add.w r1, r3, #240 @ 0xf0 80235b6: 687b ldr r3, [r7, #4] 80235b8: 8d1b ldrh r3, [r3, #40] @ 0x28 80235ba: 461a mov r2, r3 80235bc: f000 fad8 bl 8023b70 80235c0: 4603 mov r3, r0 80235c2: 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)); 80235c4: 89b8 ldrh r0, [r7, #12] 80235c6: 693b ldr r3, [r7, #16] 80235c8: f103 01f0 add.w r1, r3, #240 @ 0xf0 80235cc: 2303 movs r3, #3 80235ce: 2237 movs r2, #55 @ 0x37 80235d0: f000 fa74 bl 8023abc 80235d4: 4603 mov r3, r0 80235d6: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80235d8: 2300 movs r3, #0 80235da: 77bb strb r3, [r7, #30] 80235dc: e00e b.n 80235fc options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 80235de: 89b8 ldrh r0, [r7, #12] 80235e0: 693b ldr r3, [r7, #16] 80235e2: f103 01f0 add.w r1, r3, #240 @ 0xf0 80235e6: 7fbb ldrb r3, [r7, #30] 80235e8: 4a29 ldr r2, [pc, #164] @ (8023690 ) 80235ea: 5cd3 ldrb r3, [r2, r3] 80235ec: 461a mov r2, r3 80235ee: f000 fa99 bl 8023b24 80235f2: 4603 mov r3, r0 80235f4: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 80235f6: 7fbb ldrb r3, [r7, #30] 80235f8: 3301 adds r3, #1 80235fa: 77bb strb r3, [r7, #30] 80235fc: 7fbb ldrb r3, [r7, #30] 80235fe: 2b02 cmp r3, #2 8023600: d9ed bls.n 80235de #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); 8023602: 89b8 ldrh r0, [r7, #12] 8023604: 693b ldr r3, [r7, #16] 8023606: 33f0 adds r3, #240 @ 0xf0 8023608: 697a ldr r2, [r7, #20] 802360a: 4619 mov r1, r3 802360c: f000 ffaa bl 8024564 result = udp_sendto_if(dhcp_pcb, p_out, &dhcp->server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 8023610: 4b20 ldr r3, [pc, #128] @ (8023694 ) 8023612: 6818 ldr r0, [r3, #0] 8023614: 69bb ldr r3, [r7, #24] 8023616: f103 0218 add.w r2, r3, #24 802361a: 687b ldr r3, [r7, #4] 802361c: 9300 str r3, [sp, #0] 802361e: 2343 movs r3, #67 @ 0x43 8023620: 6979 ldr r1, [r7, #20] 8023622: f7fe fe09 bl 8022238 8023626: 4603 mov r3, r0 8023628: 77fb strb r3, [r7, #31] pbuf_free(p_out); 802362a: 6978 ldr r0, [r7, #20] 802362c: f7f7 febe bl 801b3ac 8023630: e001 b.n 8023636 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; 8023632: 23ff movs r3, #255 @ 0xff 8023634: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 8023636: 69bb ldr r3, [r7, #24] 8023638: 799b ldrb r3, [r3, #6] 802363a: 2bff cmp r3, #255 @ 0xff 802363c: d005 beq.n 802364a dhcp->tries++; 802363e: 69bb ldr r3, [r7, #24] 8023640: 799b ldrb r3, [r3, #6] 8023642: 3301 adds r3, #1 8023644: b2da uxtb r2, r3 8023646: 69bb ldr r3, [r7, #24] 8023648: 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); 802364a: 69bb ldr r3, [r7, #24] 802364c: 799b ldrb r3, [r3, #6] 802364e: 2b09 cmp r3, #9 8023650: d809 bhi.n 8023666 8023652: 69bb ldr r3, [r7, #24] 8023654: 799b ldrb r3, [r3, #6] 8023656: 461a mov r2, r3 8023658: 0152 lsls r2, r2, #5 802365a: 1ad2 subs r2, r2, r3 802365c: 0092 lsls r2, r2, #2 802365e: 4413 add r3, r2 8023660: 011b lsls r3, r3, #4 8023662: b29b uxth r3, r3 8023664: e001 b.n 802366a 8023666: f644 6320 movw r3, #20000 @ 0x4e20 802366a: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 802366c: 89fb ldrh r3, [r7, #14] 802366e: f203 13f3 addw r3, r3, #499 @ 0x1f3 8023672: 4a09 ldr r2, [pc, #36] @ (8023698 ) 8023674: fb82 1203 smull r1, r2, r2, r3 8023678: 1152 asrs r2, r2, #5 802367a: 17db asrs r3, r3, #31 802367c: 1ad3 subs r3, r2, r3 802367e: b29a uxth r2, r3 8023680: 69bb ldr r3, [r7, #24] 8023682: 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; 8023684: f997 301f ldrsb.w r3, [r7, #31] } 8023688: 4618 mov r0, r3 802368a: 3720 adds r7, #32 802368c: 46bd mov sp, r7 802368e: bd80 pop {r7, pc} 8023690: 24000058 .word 0x24000058 8023694: 2402b004 .word 0x2402b004 8023698: 10624dd3 .word 0x10624dd3 0802369c : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 802369c: b580 push {r7, lr} 802369e: b08a sub sp, #40 @ 0x28 80236a0: af02 add r7, sp, #8 80236a2: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80236a4: 687b ldr r3, [r7, #4] 80236a6: 6a5b ldr r3, [r3, #36] @ 0x24 80236a8: 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); 80236aa: 2104 movs r1, #4 80236ac: 69b8 ldr r0, [r7, #24] 80236ae: f000 f9ea bl 8023a86 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80236b2: f107 030c add.w r3, r7, #12 80236b6: 2203 movs r2, #3 80236b8: 69b9 ldr r1, [r7, #24] 80236ba: 6878 ldr r0, [r7, #4] 80236bc: f000 fe7c bl 80243b8 80236c0: 6178 str r0, [r7, #20] if (p_out != NULL) { 80236c2: 697b ldr r3, [r7, #20] 80236c4: 2b00 cmp r3, #0 80236c6: d04c beq.n 8023762 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80236c8: 697b ldr r3, [r7, #20] 80236ca: 685b ldr r3, [r3, #4] 80236cc: 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); 80236ce: 89b8 ldrh r0, [r7, #12] 80236d0: 693b ldr r3, [r7, #16] 80236d2: f103 01f0 add.w r1, r3, #240 @ 0xf0 80236d6: 2302 movs r3, #2 80236d8: 2239 movs r2, #57 @ 0x39 80236da: f000 f9ef bl 8023abc 80236de: 4603 mov r3, r0 80236e0: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN(netif)); 80236e2: 89b8 ldrh r0, [r7, #12] 80236e4: 693b ldr r3, [r7, #16] 80236e6: f103 01f0 add.w r1, r3, #240 @ 0xf0 80236ea: 687b ldr r3, [r7, #4] 80236ec: 8d1b ldrh r3, [r3, #40] @ 0x28 80236ee: 461a mov r2, r3 80236f0: f000 fa3e bl 8023b70 80236f4: 4603 mov r3, r0 80236f6: 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)); 80236f8: 89b8 ldrh r0, [r7, #12] 80236fa: 693b ldr r3, [r7, #16] 80236fc: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023700: 2303 movs r3, #3 8023702: 2237 movs r2, #55 @ 0x37 8023704: f000 f9da bl 8023abc 8023708: 4603 mov r3, r0 802370a: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 802370c: 2300 movs r3, #0 802370e: 77bb strb r3, [r7, #30] 8023710: e00e b.n 8023730 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 8023712: 89b8 ldrh r0, [r7, #12] 8023714: 693b ldr r3, [r7, #16] 8023716: f103 01f0 add.w r1, r3, #240 @ 0xf0 802371a: 7fbb ldrb r3, [r7, #30] 802371c: 4a28 ldr r2, [pc, #160] @ (80237c0 ) 802371e: 5cd3 ldrb r3, [r2, r3] 8023720: 461a mov r2, r3 8023722: f000 f9ff bl 8023b24 8023726: 4603 mov r3, r0 8023728: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 802372a: 7fbb ldrb r3, [r7, #30] 802372c: 3301 adds r3, #1 802372e: 77bb strb r3, [r7, #30] 8023730: 7fbb ldrb r3, [r7, #30] 8023732: 2b02 cmp r3, #2 8023734: d9ed bls.n 8023712 #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); 8023736: 89b8 ldrh r0, [r7, #12] 8023738: 693b ldr r3, [r7, #16] 802373a: 33f0 adds r3, #240 @ 0xf0 802373c: 697a ldr r2, [r7, #20] 802373e: 4619 mov r1, r3 8023740: f000 ff10 bl 8024564 /* broadcast to server */ result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 8023744: 4b1f ldr r3, [pc, #124] @ (80237c4 ) 8023746: 6818 ldr r0, [r3, #0] 8023748: 687b ldr r3, [r7, #4] 802374a: 9300 str r3, [sp, #0] 802374c: 2343 movs r3, #67 @ 0x43 802374e: 4a1e ldr r2, [pc, #120] @ (80237c8 ) 8023750: 6979 ldr r1, [r7, #20] 8023752: f7fe fd71 bl 8022238 8023756: 4603 mov r3, r0 8023758: 77fb strb r3, [r7, #31] pbuf_free(p_out); 802375a: 6978 ldr r0, [r7, #20] 802375c: f7f7 fe26 bl 801b3ac 8023760: e001 b.n 8023766 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; 8023762: 23ff movs r3, #255 @ 0xff 8023764: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 8023766: 69bb ldr r3, [r7, #24] 8023768: 799b ldrb r3, [r3, #6] 802376a: 2bff cmp r3, #255 @ 0xff 802376c: d005 beq.n 802377a dhcp->tries++; 802376e: 69bb ldr r3, [r7, #24] 8023770: 799b ldrb r3, [r3, #6] 8023772: 3301 adds r3, #1 8023774: b2da uxtb r2, r3 8023776: 69bb ldr r3, [r7, #24] 8023778: 719a strb r2, [r3, #6] } msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 802377a: 69bb ldr r3, [r7, #24] 802377c: 799b ldrb r3, [r3, #6] 802377e: 2b09 cmp r3, #9 8023780: d809 bhi.n 8023796 8023782: 69bb ldr r3, [r7, #24] 8023784: 799b ldrb r3, [r3, #6] 8023786: 461a mov r2, r3 8023788: 0152 lsls r2, r2, #5 802378a: 1ad2 subs r2, r2, r3 802378c: 0092 lsls r2, r2, #2 802378e: 4413 add r3, r2 8023790: 00db lsls r3, r3, #3 8023792: b29b uxth r3, r3 8023794: e001 b.n 802379a 8023796: f242 7310 movw r3, #10000 @ 0x2710 802379a: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 802379c: 89fb ldrh r3, [r7, #14] 802379e: f203 13f3 addw r3, r3, #499 @ 0x1f3 80237a2: 4a0a ldr r2, [pc, #40] @ (80237cc ) 80237a4: fb82 1203 smull r1, r2, r2, r3 80237a8: 1152 asrs r2, r2, #5 80237aa: 17db asrs r3, r3, #31 80237ac: 1ad3 subs r3, r2, r3 80237ae: b29a uxth r2, r3 80237b0: 69bb ldr r3, [r7, #24] 80237b2: 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; 80237b4: f997 301f ldrsb.w r3, [r7, #31] } 80237b8: 4618 mov r0, r3 80237ba: 3720 adds r7, #32 80237bc: 46bd mov sp, r7 80237be: bd80 pop {r7, pc} 80237c0: 24000058 .word 0x24000058 80237c4: 2402b004 .word 0x2402b004 80237c8: 08031cac .word 0x08031cac 80237cc: 10624dd3 .word 0x10624dd3 080237d0 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 80237d0: b5b0 push {r4, r5, r7, lr} 80237d2: b08a sub sp, #40 @ 0x28 80237d4: af02 add r7, sp, #8 80237d6: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 80237d8: 687b ldr r3, [r7, #4] 80237da: 6a5b ldr r3, [r3, #36] @ 0x24 80237dc: 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); 80237de: 2103 movs r1, #3 80237e0: 69b8 ldr r0, [r7, #24] 80237e2: f000 f950 bl 8023a86 /* create and initialize the DHCP message header */ p_out = dhcp_create_msg(netif, dhcp, DHCP_REQUEST, &options_out_len); 80237e6: f107 030c add.w r3, r7, #12 80237ea: 2203 movs r2, #3 80237ec: 69b9 ldr r1, [r7, #24] 80237ee: 6878 ldr r0, [r7, #4] 80237f0: f000 fde2 bl 80243b8 80237f4: 6178 str r0, [r7, #20] if (p_out != NULL) { 80237f6: 697b ldr r3, [r7, #20] 80237f8: 2b00 cmp r3, #0 80237fa: d066 beq.n 80238ca struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80237fc: 697b ldr r3, [r7, #20] 80237fe: 685b ldr r3, [r3, #4] 8023800: 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); 8023802: 89b8 ldrh r0, [r7, #12] 8023804: 693b ldr r3, [r7, #16] 8023806: f103 01f0 add.w r1, r3, #240 @ 0xf0 802380a: 2302 movs r3, #2 802380c: 2239 movs r2, #57 @ 0x39 802380e: f000 f955 bl 8023abc 8023812: 4603 mov r3, r0 8023814: 81bb strh r3, [r7, #12] options_out_len = dhcp_option_short(options_out_len, msg_out->options, DHCP_MAX_MSG_LEN_MIN_REQUIRED); 8023816: 89b8 ldrh r0, [r7, #12] 8023818: 693b ldr r3, [r7, #16] 802381a: 33f0 adds r3, #240 @ 0xf0 802381c: f44f 7210 mov.w r2, #576 @ 0x240 8023820: 4619 mov r1, r3 8023822: f000 f9a5 bl 8023b70 8023826: 4603 mov r3, r0 8023828: 81bb strh r3, [r7, #12] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_REQUESTED_IP, 4); 802382a: 89b8 ldrh r0, [r7, #12] 802382c: 693b ldr r3, [r7, #16] 802382e: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023832: 2304 movs r3, #4 8023834: 2232 movs r2, #50 @ 0x32 8023836: f000 f941 bl 8023abc 802383a: 4603 mov r3, r0 802383c: 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))); 802383e: 89bc ldrh r4, [r7, #12] 8023840: 693b ldr r3, [r7, #16] 8023842: f103 05f0 add.w r5, r3, #240 @ 0xf0 8023846: 69bb ldr r3, [r7, #24] 8023848: 69db ldr r3, [r3, #28] 802384a: 4618 mov r0, r3 802384c: f7f6 f8e1 bl 8019a12 8023850: 4603 mov r3, r0 8023852: 461a mov r2, r3 8023854: 4629 mov r1, r5 8023856: 4620 mov r0, r4 8023858: f000 f9bc bl 8023bd4 802385c: 4603 mov r3, r0 802385e: 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)); 8023860: 89b8 ldrh r0, [r7, #12] 8023862: 693b ldr r3, [r7, #16] 8023864: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023868: 2303 movs r3, #3 802386a: 2237 movs r2, #55 @ 0x37 802386c: f000 f926 bl 8023abc 8023870: 4603 mov r3, r0 8023872: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8023874: 2300 movs r3, #0 8023876: 77bb strb r3, [r7, #30] 8023878: e00e b.n 8023898 options_out_len = dhcp_option_byte(options_out_len, msg_out->options, dhcp_discover_request_options[i]); 802387a: 89b8 ldrh r0, [r7, #12] 802387c: 693b ldr r3, [r7, #16] 802387e: f103 01f0 add.w r1, r3, #240 @ 0xf0 8023882: 7fbb ldrb r3, [r7, #30] 8023884: 4a28 ldr r2, [pc, #160] @ (8023928 ) 8023886: 5cd3 ldrb r3, [r2, r3] 8023888: 461a mov r2, r3 802388a: f000 f94b bl 8023b24 802388e: 4603 mov r3, r0 8023890: 81bb strh r3, [r7, #12] for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { 8023892: 7fbb ldrb r3, [r7, #30] 8023894: 3301 adds r3, #1 8023896: 77bb strb r3, [r7, #30] 8023898: 7fbb ldrb r3, [r7, #30] 802389a: 2b02 cmp r3, #2 802389c: d9ed bls.n 802387a #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); 802389e: 89b8 ldrh r0, [r7, #12] 80238a0: 693b ldr r3, [r7, #16] 80238a2: 33f0 adds r3, #240 @ 0xf0 80238a4: 697a ldr r2, [r7, #20] 80238a6: 4619 mov r1, r3 80238a8: f000 fe5c bl 8024564 /* broadcast to server */ result = udp_sendto_if(dhcp_pcb, p_out, IP_ADDR_BROADCAST, LWIP_IANA_PORT_DHCP_SERVER, netif); 80238ac: 4b1f ldr r3, [pc, #124] @ (802392c ) 80238ae: 6818 ldr r0, [r3, #0] 80238b0: 687b ldr r3, [r7, #4] 80238b2: 9300 str r3, [sp, #0] 80238b4: 2343 movs r3, #67 @ 0x43 80238b6: 4a1e ldr r2, [pc, #120] @ (8023930 ) 80238b8: 6979 ldr r1, [r7, #20] 80238ba: f7fe fcbd bl 8022238 80238be: 4603 mov r3, r0 80238c0: 77fb strb r3, [r7, #31] pbuf_free(p_out); 80238c2: 6978 ldr r0, [r7, #20] 80238c4: f7f7 fd72 bl 801b3ac 80238c8: e001 b.n 80238ce 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; 80238ca: 23ff movs r3, #255 @ 0xff 80238cc: 77fb strb r3, [r7, #31] } if (dhcp->tries < 255) { 80238ce: 69bb ldr r3, [r7, #24] 80238d0: 799b ldrb r3, [r3, #6] 80238d2: 2bff cmp r3, #255 @ 0xff 80238d4: d005 beq.n 80238e2 dhcp->tries++; 80238d6: 69bb ldr r3, [r7, #24] 80238d8: 799b ldrb r3, [r3, #6] 80238da: 3301 adds r3, #1 80238dc: b2da uxtb r2, r3 80238de: 69bb ldr r3, [r7, #24] 80238e0: 719a strb r2, [r3, #6] } msecs = (u16_t)(dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000); 80238e2: 69bb ldr r3, [r7, #24] 80238e4: 799b ldrb r3, [r3, #6] 80238e6: 2b09 cmp r3, #9 80238e8: d809 bhi.n 80238fe 80238ea: 69bb ldr r3, [r7, #24] 80238ec: 799b ldrb r3, [r3, #6] 80238ee: 461a mov r2, r3 80238f0: 0152 lsls r2, r2, #5 80238f2: 1ad2 subs r2, r2, r3 80238f4: 0092 lsls r2, r2, #2 80238f6: 4413 add r3, r2 80238f8: 00db lsls r3, r3, #3 80238fa: b29b uxth r3, r3 80238fc: e001 b.n 8023902 80238fe: f242 7310 movw r3, #10000 @ 0x2710 8023902: 81fb strh r3, [r7, #14] dhcp->request_timeout = (u16_t)((msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS); 8023904: 89fb ldrh r3, [r7, #14] 8023906: f203 13f3 addw r3, r3, #499 @ 0x1f3 802390a: 4a0a ldr r2, [pc, #40] @ (8023934 ) 802390c: fb82 1203 smull r1, r2, r2, r3 8023910: 1152 asrs r2, r2, #5 8023912: 17db asrs r3, r3, #31 8023914: 1ad3 subs r3, r2, r3 8023916: b29a uxth r2, r3 8023918: 69bb ldr r3, [r7, #24] 802391a: 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; 802391c: f997 301f ldrsb.w r3, [r7, #31] } 8023920: 4618 mov r0, r3 8023922: 3720 adds r7, #32 8023924: 46bd mov sp, r7 8023926: bdb0 pop {r4, r5, r7, pc} 8023928: 24000058 .word 0x24000058 802392c: 2402b004 .word 0x2402b004 8023930: 08031cac .word 0x08031cac 8023934: 10624dd3 .word 0x10624dd3 08023938 : * * @param netif network interface */ void dhcp_release_and_stop(struct netif *netif) { 8023938: b5b0 push {r4, r5, r7, lr} 802393a: b08a sub sp, #40 @ 0x28 802393c: af02 add r7, sp, #8 802393e: 6078 str r0, [r7, #4] struct dhcp *dhcp = netif_dhcp_data(netif); 8023940: 687b ldr r3, [r7, #4] 8023942: 6a5b ldr r3, [r3, #36] @ 0x24 8023944: 61fb str r3, [r7, #28] ip_addr_t server_ip_addr; LWIP_ASSERT_CORE_LOCKED(); 8023946: f7ed fb7f bl 8011048 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release_and_stop()\n")); if (dhcp == NULL) { 802394a: 69fb ldr r3, [r7, #28] 802394c: 2b00 cmp r3, #0 802394e: f000 8084 beq.w 8023a5a return; } /* already off? -> nothing to do */ if (dhcp->state == DHCP_STATE_OFF) { 8023952: 69fb ldr r3, [r7, #28] 8023954: 795b ldrb r3, [r3, #5] 8023956: 2b00 cmp r3, #0 8023958: f000 8081 beq.w 8023a5e return; } ip_addr_copy(server_ip_addr, dhcp->server_ip_addr); 802395c: 69fb ldr r3, [r7, #28] 802395e: 699b ldr r3, [r3, #24] 8023960: 613b str r3, [r7, #16] /* clean old DHCP offer */ ip_addr_set_zero_ip4(&dhcp->server_ip_addr); 8023962: 69fb ldr r3, [r7, #28] 8023964: 2200 movs r2, #0 8023966: 619a str r2, [r3, #24] ip4_addr_set_zero(&dhcp->offered_ip_addr); 8023968: 69fb ldr r3, [r7, #28] 802396a: 2200 movs r2, #0 802396c: 61da str r2, [r3, #28] ip4_addr_set_zero(&dhcp->offered_sn_mask); 802396e: 69fb ldr r3, [r7, #28] 8023970: 2200 movs r2, #0 8023972: 621a str r2, [r3, #32] ip4_addr_set_zero(&dhcp->offered_gw_addr); 8023974: 69fb ldr r3, [r7, #28] 8023976: 2200 movs r2, #0 8023978: 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; 802397a: 69fb ldr r3, [r7, #28] 802397c: 2200 movs r2, #0 802397e: 631a str r2, [r3, #48] @ 0x30 8023980: 69fb ldr r3, [r7, #28] 8023982: 6b1a ldr r2, [r3, #48] @ 0x30 8023984: 69fb ldr r3, [r7, #28] 8023986: 62da str r2, [r3, #44] @ 0x2c 8023988: 69fb ldr r3, [r7, #28] 802398a: 6ada ldr r2, [r3, #44] @ 0x2c 802398c: 69fb ldr r3, [r7, #28] 802398e: 629a str r2, [r3, #40] @ 0x28 dhcp->t1_renew_time = dhcp->t2_rebind_time = dhcp->lease_used = dhcp->t0_timeout = 0; 8023990: 69fb ldr r3, [r7, #28] 8023992: 2200 movs r2, #0 8023994: 829a strh r2, [r3, #20] 8023996: 69fb ldr r3, [r7, #28] 8023998: 8a9a ldrh r2, [r3, #20] 802399a: 69fb ldr r3, [r7, #28] 802399c: 825a strh r2, [r3, #18] 802399e: 69fb ldr r3, [r7, #28] 80239a0: 8a5a ldrh r2, [r3, #18] 80239a2: 69fb ldr r3, [r7, #28] 80239a4: 821a strh r2, [r3, #16] 80239a6: 69fb ldr r3, [r7, #28] 80239a8: 8a1a ldrh r2, [r3, #16] 80239aa: 69fb ldr r3, [r7, #28] 80239ac: 81da strh r2, [r3, #14] /* send release message when current IP was assigned via DHCP */ if (dhcp_supplied_address(netif)) { 80239ae: 6878 ldr r0, [r7, #4] 80239b0: f000 fe06 bl 80245c0 80239b4: 4603 mov r3, r0 80239b6: 2b00 cmp r3, #0 80239b8: d03b beq.n 8023a32 /* 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); 80239ba: f107 030e add.w r3, r7, #14 80239be: 2207 movs r2, #7 80239c0: 69f9 ldr r1, [r7, #28] 80239c2: 6878 ldr r0, [r7, #4] 80239c4: f000 fcf8 bl 80243b8 80239c8: 61b8 str r0, [r7, #24] if (p_out != NULL) { 80239ca: 69bb ldr r3, [r7, #24] 80239cc: 2b00 cmp r3, #0 80239ce: d030 beq.n 8023a32 struct dhcp_msg *msg_out = (struct dhcp_msg *)p_out->payload; 80239d0: 69bb ldr r3, [r7, #24] 80239d2: 685b ldr r3, [r3, #4] 80239d4: 617b str r3, [r7, #20] options_out_len = dhcp_option(options_out_len, msg_out->options, DHCP_OPTION_SERVER_ID, 4); 80239d6: 89f8 ldrh r0, [r7, #14] 80239d8: 697b ldr r3, [r7, #20] 80239da: f103 01f0 add.w r1, r3, #240 @ 0xf0 80239de: 2304 movs r3, #4 80239e0: 2236 movs r2, #54 @ 0x36 80239e2: f000 f86b bl 8023abc 80239e6: 4603 mov r3, r0 80239e8: 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)))); 80239ea: 89fc ldrh r4, [r7, #14] 80239ec: 697b ldr r3, [r7, #20] 80239ee: f103 05f0 add.w r5, r3, #240 @ 0xf0 80239f2: 693b ldr r3, [r7, #16] 80239f4: 4618 mov r0, r3 80239f6: f7f6 f80c bl 8019a12 80239fa: 4603 mov r3, r0 80239fc: 461a mov r2, r3 80239fe: 4629 mov r1, r5 8023a00: 4620 mov r0, r4 8023a02: f000 f8e7 bl 8023bd4 8023a06: 4603 mov r3, r0 8023a08: 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); 8023a0a: 89f8 ldrh r0, [r7, #14] 8023a0c: 697b ldr r3, [r7, #20] 8023a0e: 33f0 adds r3, #240 @ 0xf0 8023a10: 69ba ldr r2, [r7, #24] 8023a12: 4619 mov r1, r3 8023a14: f000 fda6 bl 8024564 udp_sendto_if(dhcp_pcb, p_out, &server_ip_addr, LWIP_IANA_PORT_DHCP_SERVER, netif); 8023a18: 4b13 ldr r3, [pc, #76] @ (8023a68 ) 8023a1a: 6818 ldr r0, [r3, #0] 8023a1c: f107 0210 add.w r2, r7, #16 8023a20: 687b ldr r3, [r7, #4] 8023a22: 9300 str r3, [sp, #0] 8023a24: 2343 movs r3, #67 @ 0x43 8023a26: 69b9 ldr r1, [r7, #24] 8023a28: f7fe fc06 bl 8022238 pbuf_free(p_out); 8023a2c: 69b8 ldr r0, [r7, #24] 8023a2e: f7f7 fcbd bl 801b3ac 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); 8023a32: 4b0e ldr r3, [pc, #56] @ (8023a6c ) 8023a34: 4a0d ldr r2, [pc, #52] @ (8023a6c ) 8023a36: 490d ldr r1, [pc, #52] @ (8023a6c ) 8023a38: 6878 ldr r0, [r7, #4] 8023a3a: f7f6 ff6d bl 801a918 autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ dhcp_set_state(dhcp, DHCP_STATE_OFF); 8023a3e: 2100 movs r1, #0 8023a40: 69f8 ldr r0, [r7, #28] 8023a42: f000 f820 bl 8023a86 if (dhcp->pcb_allocated != 0) { 8023a46: 69fb ldr r3, [r7, #28] 8023a48: 791b ldrb r3, [r3, #4] 8023a4a: 2b00 cmp r3, #0 8023a4c: d008 beq.n 8023a60 dhcp_dec_pcb_refcount(); /* free DHCP PCB if not needed any more */ 8023a4e: f7fe ff83 bl 8022958 dhcp->pcb_allocated = 0; 8023a52: 69fb ldr r3, [r7, #28] 8023a54: 2200 movs r2, #0 8023a56: 711a strb r2, [r3, #4] 8023a58: e002 b.n 8023a60 return; 8023a5a: bf00 nop 8023a5c: e000 b.n 8023a60 return; 8023a5e: bf00 nop } } 8023a60: 3720 adds r7, #32 8023a62: 46bd mov sp, r7 8023a64: bdb0 pop {r4, r5, r7, pc} 8023a66: bf00 nop 8023a68: 2402b004 .word 0x2402b004 8023a6c: 08031ca8 .word 0x08031ca8 08023a70 : * This function calls dhcp_release_and_stop() internally. * @deprecated Use dhcp_release_and_stop() instead. */ void dhcp_stop(struct netif *netif) { 8023a70: b580 push {r7, lr} 8023a72: b082 sub sp, #8 8023a74: af00 add r7, sp, #0 8023a76: 6078 str r0, [r7, #4] dhcp_release_and_stop(netif); 8023a78: 6878 ldr r0, [r7, #4] 8023a7a: f7ff ff5d bl 8023938 } 8023a7e: bf00 nop 8023a80: 3708 adds r7, #8 8023a82: 46bd mov sp, r7 8023a84: bd80 pop {r7, pc} 08023a86 : * * If the state changed, reset the number of tries. */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { 8023a86: b480 push {r7} 8023a88: b083 sub sp, #12 8023a8a: af00 add r7, sp, #0 8023a8c: 6078 str r0, [r7, #4] 8023a8e: 460b mov r3, r1 8023a90: 70fb strb r3, [r7, #3] if (new_state != dhcp->state) { 8023a92: 687b ldr r3, [r7, #4] 8023a94: 795b ldrb r3, [r3, #5] 8023a96: 78fa ldrb r2, [r7, #3] 8023a98: 429a cmp r2, r3 8023a9a: d008 beq.n 8023aae dhcp->state = new_state; 8023a9c: 687b ldr r3, [r7, #4] 8023a9e: 78fa ldrb r2, [r7, #3] 8023aa0: 715a strb r2, [r3, #5] dhcp->tries = 0; 8023aa2: 687b ldr r3, [r7, #4] 8023aa4: 2200 movs r2, #0 8023aa6: 719a strb r2, [r3, #6] dhcp->request_timeout = 0; 8023aa8: 687b ldr r3, [r7, #4] 8023aaa: 2200 movs r2, #0 8023aac: 811a strh r2, [r3, #8] } } 8023aae: bf00 nop 8023ab0: 370c adds r7, #12 8023ab2: 46bd mov sp, r7 8023ab4: f85d 7b04 ldr.w r7, [sp], #4 8023ab8: 4770 bx lr ... 08023abc : * DHCP message. * */ static u16_t dhcp_option(u16_t options_out_len, u8_t *options, u8_t option_type, u8_t option_len) { 8023abc: b580 push {r7, lr} 8023abe: b082 sub sp, #8 8023ac0: af00 add r7, sp, #0 8023ac2: 6039 str r1, [r7, #0] 8023ac4: 4611 mov r1, r2 8023ac6: 461a mov r2, r3 8023ac8: 4603 mov r3, r0 8023aca: 80fb strh r3, [r7, #6] 8023acc: 460b mov r3, r1 8023ace: 717b strb r3, [r7, #5] 8023ad0: 4613 mov r3, r2 8023ad2: 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); 8023ad4: 88fa ldrh r2, [r7, #6] 8023ad6: 793b ldrb r3, [r7, #4] 8023ad8: 4413 add r3, r2 8023ada: 3302 adds r3, #2 8023adc: 2b44 cmp r3, #68 @ 0x44 8023ade: d906 bls.n 8023aee 8023ae0: 4b0d ldr r3, [pc, #52] @ (8023b18 ) 8023ae2: f240 529a movw r2, #1434 @ 0x59a 8023ae6: 490d ldr r1, [pc, #52] @ (8023b1c ) 8023ae8: 480d ldr r0, [pc, #52] @ (8023b20 ) 8023aea: f006 fed7 bl 802a89c options[options_out_len++] = option_type; 8023aee: 88fb ldrh r3, [r7, #6] 8023af0: 1c5a adds r2, r3, #1 8023af2: 80fa strh r2, [r7, #6] 8023af4: 461a mov r2, r3 8023af6: 683b ldr r3, [r7, #0] 8023af8: 4413 add r3, r2 8023afa: 797a ldrb r2, [r7, #5] 8023afc: 701a strb r2, [r3, #0] options[options_out_len++] = option_len; 8023afe: 88fb ldrh r3, [r7, #6] 8023b00: 1c5a adds r2, r3, #1 8023b02: 80fa strh r2, [r7, #6] 8023b04: 461a mov r2, r3 8023b06: 683b ldr r3, [r7, #0] 8023b08: 4413 add r3, r2 8023b0a: 793a ldrb r2, [r7, #4] 8023b0c: 701a strb r2, [r3, #0] return options_out_len; 8023b0e: 88fb ldrh r3, [r7, #6] } 8023b10: 4618 mov r0, r3 8023b12: 3708 adds r7, #8 8023b14: 46bd mov sp, r7 8023b16: bd80 pop {r7, pc} 8023b18: 08030e84 .word 0x08030e84 8023b1c: 08031018 .word 0x08031018 8023b20: 08030ee4 .word 0x08030ee4 08023b24 : * 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) { 8023b24: b580 push {r7, lr} 8023b26: b082 sub sp, #8 8023b28: af00 add r7, sp, #0 8023b2a: 4603 mov r3, r0 8023b2c: 6039 str r1, [r7, #0] 8023b2e: 80fb strh r3, [r7, #6] 8023b30: 4613 mov r3, r2 8023b32: 717b strb r3, [r7, #5] LWIP_ASSERT("dhcp_option_byte: options_out_len < DHCP_OPTIONS_LEN", options_out_len < DHCP_OPTIONS_LEN); 8023b34: 88fb ldrh r3, [r7, #6] 8023b36: 2b43 cmp r3, #67 @ 0x43 8023b38: d906 bls.n 8023b48 8023b3a: 4b0a ldr r3, [pc, #40] @ (8023b64 ) 8023b3c: f240 52a6 movw r2, #1446 @ 0x5a6 8023b40: 4909 ldr r1, [pc, #36] @ (8023b68 ) 8023b42: 480a ldr r0, [pc, #40] @ (8023b6c ) 8023b44: f006 feaa bl 802a89c options[options_out_len++] = value; 8023b48: 88fb ldrh r3, [r7, #6] 8023b4a: 1c5a adds r2, r3, #1 8023b4c: 80fa strh r2, [r7, #6] 8023b4e: 461a mov r2, r3 8023b50: 683b ldr r3, [r7, #0] 8023b52: 4413 add r3, r2 8023b54: 797a ldrb r2, [r7, #5] 8023b56: 701a strb r2, [r3, #0] return options_out_len; 8023b58: 88fb ldrh r3, [r7, #6] } 8023b5a: 4618 mov r0, r3 8023b5c: 3708 adds r7, #8 8023b5e: 46bd mov sp, r7 8023b60: bd80 pop {r7, pc} 8023b62: bf00 nop 8023b64: 08030e84 .word 0x08030e84 8023b68: 0803105c .word 0x0803105c 8023b6c: 08030ee4 .word 0x08030ee4 08023b70 : static u16_t dhcp_option_short(u16_t options_out_len, u8_t *options, u16_t value) { 8023b70: b580 push {r7, lr} 8023b72: b082 sub sp, #8 8023b74: af00 add r7, sp, #0 8023b76: 4603 mov r3, r0 8023b78: 6039 str r1, [r7, #0] 8023b7a: 80fb strh r3, [r7, #6] 8023b7c: 4613 mov r3, r2 8023b7e: 80bb strh r3, [r7, #4] LWIP_ASSERT("dhcp_option_short: options_out_len + 2 <= DHCP_OPTIONS_LEN", options_out_len + 2U <= DHCP_OPTIONS_LEN); 8023b80: 88fb ldrh r3, [r7, #6] 8023b82: 3302 adds r3, #2 8023b84: 2b44 cmp r3, #68 @ 0x44 8023b86: d906 bls.n 8023b96 8023b88: 4b0f ldr r3, [pc, #60] @ (8023bc8 ) 8023b8a: f240 52ae movw r2, #1454 @ 0x5ae 8023b8e: 490f ldr r1, [pc, #60] @ (8023bcc ) 8023b90: 480f ldr r0, [pc, #60] @ (8023bd0 ) 8023b92: f006 fe83 bl 802a89c options[options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 8023b96: 88bb ldrh r3, [r7, #4] 8023b98: 0a1b lsrs r3, r3, #8 8023b9a: b29a uxth r2, r3 8023b9c: 88fb ldrh r3, [r7, #6] 8023b9e: 1c59 adds r1, r3, #1 8023ba0: 80f9 strh r1, [r7, #6] 8023ba2: 4619 mov r1, r3 8023ba4: 683b ldr r3, [r7, #0] 8023ba6: 440b add r3, r1 8023ba8: b2d2 uxtb r2, r2 8023baa: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t) (value & 0x00ffU); 8023bac: 88fb ldrh r3, [r7, #6] 8023bae: 1c5a adds r2, r3, #1 8023bb0: 80fa strh r2, [r7, #6] 8023bb2: 461a mov r2, r3 8023bb4: 683b ldr r3, [r7, #0] 8023bb6: 4413 add r3, r2 8023bb8: 88ba ldrh r2, [r7, #4] 8023bba: b2d2 uxtb r2, r2 8023bbc: 701a strb r2, [r3, #0] return options_out_len; 8023bbe: 88fb ldrh r3, [r7, #6] } 8023bc0: 4618 mov r0, r3 8023bc2: 3708 adds r7, #8 8023bc4: 46bd mov sp, r7 8023bc6: bd80 pop {r7, pc} 8023bc8: 08030e84 .word 0x08030e84 8023bcc: 08031094 .word 0x08031094 8023bd0: 08030ee4 .word 0x08030ee4 08023bd4 : static u16_t dhcp_option_long(u16_t options_out_len, u8_t *options, u32_t value) { 8023bd4: b580 push {r7, lr} 8023bd6: b084 sub sp, #16 8023bd8: af00 add r7, sp, #0 8023bda: 4603 mov r3, r0 8023bdc: 60b9 str r1, [r7, #8] 8023bde: 607a str r2, [r7, #4] 8023be0: 81fb strh r3, [r7, #14] LWIP_ASSERT("dhcp_option_long: options_out_len + 4 <= DHCP_OPTIONS_LEN", options_out_len + 4U <= DHCP_OPTIONS_LEN); 8023be2: 89fb ldrh r3, [r7, #14] 8023be4: 3304 adds r3, #4 8023be6: 2b44 cmp r3, #68 @ 0x44 8023be8: d906 bls.n 8023bf8 8023bea: 4b19 ldr r3, [pc, #100] @ (8023c50 ) 8023bec: f240 52b7 movw r2, #1463 @ 0x5b7 8023bf0: 4918 ldr r1, [pc, #96] @ (8023c54 ) 8023bf2: 4819 ldr r0, [pc, #100] @ (8023c58 ) 8023bf4: f006 fe52 bl 802a89c options[options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 8023bf8: 687b ldr r3, [r7, #4] 8023bfa: 0e1a lsrs r2, r3, #24 8023bfc: 89fb ldrh r3, [r7, #14] 8023bfe: 1c59 adds r1, r3, #1 8023c00: 81f9 strh r1, [r7, #14] 8023c02: 4619 mov r1, r3 8023c04: 68bb ldr r3, [r7, #8] 8023c06: 440b add r3, r1 8023c08: b2d2 uxtb r2, r2 8023c0a: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 8023c0c: 687b ldr r3, [r7, #4] 8023c0e: 0c1a lsrs r2, r3, #16 8023c10: 89fb ldrh r3, [r7, #14] 8023c12: 1c59 adds r1, r3, #1 8023c14: 81f9 strh r1, [r7, #14] 8023c16: 4619 mov r1, r3 8023c18: 68bb ldr r3, [r7, #8] 8023c1a: 440b add r3, r1 8023c1c: b2d2 uxtb r2, r2 8023c1e: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 8023c20: 687b ldr r3, [r7, #4] 8023c22: 0a1a lsrs r2, r3, #8 8023c24: 89fb ldrh r3, [r7, #14] 8023c26: 1c59 adds r1, r3, #1 8023c28: 81f9 strh r1, [r7, #14] 8023c2a: 4619 mov r1, r3 8023c2c: 68bb ldr r3, [r7, #8] 8023c2e: 440b add r3, r1 8023c30: b2d2 uxtb r2, r2 8023c32: 701a strb r2, [r3, #0] options[options_out_len++] = (u8_t)((value & 0x000000ffUL)); 8023c34: 89fb ldrh r3, [r7, #14] 8023c36: 1c5a adds r2, r3, #1 8023c38: 81fa strh r2, [r7, #14] 8023c3a: 461a mov r2, r3 8023c3c: 68bb ldr r3, [r7, #8] 8023c3e: 4413 add r3, r2 8023c40: 687a ldr r2, [r7, #4] 8023c42: b2d2 uxtb r2, r2 8023c44: 701a strb r2, [r3, #0] return options_out_len; 8023c46: 89fb ldrh r3, [r7, #14] } 8023c48: 4618 mov r0, r3 8023c4a: 3710 adds r7, #16 8023c4c: 46bd mov sp, r7 8023c4e: bd80 pop {r7, pc} 8023c50: 08030e84 .word 0x08030e84 8023c54: 080310d0 .word 0x080310d0 8023c58: 08030ee4 .word 0x08030ee4 08023c5c : * use that further on. * */ static err_t dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp) { 8023c5c: b580 push {r7, lr} 8023c5e: b092 sub sp, #72 @ 0x48 8023c60: af00 add r7, sp, #0 8023c62: 6078 str r0, [r7, #4] 8023c64: 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; 8023c66: 2300 movs r3, #0 8023c68: 633b str r3, [r7, #48] @ 0x30 int parse_sname_as_options = 0; 8023c6a: 2300 movs r3, #0 8023c6c: 62fb str r3, [r7, #44] @ 0x2c #endif LWIP_UNUSED_ARG(dhcp); /* clear received options */ dhcp_clear_all_options(dhcp); 8023c6e: 2208 movs r2, #8 8023c70: 2100 movs r1, #0 8023c72: 48b8 ldr r0, [pc, #736] @ (8023f54 ) 8023c74: f006 ffa4 bl 802abc0 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 8023c78: 687b ldr r3, [r7, #4] 8023c7a: 895b ldrh r3, [r3, #10] 8023c7c: 2b2b cmp r3, #43 @ 0x2b 8023c7e: d802 bhi.n 8023c86 return ERR_BUF; 8023c80: f06f 0301 mvn.w r3, #1 8023c84: e2b8 b.n 80241f8 } msg_in = (struct dhcp_msg *)p->payload; 8023c86: 687b ldr r3, [r7, #4] 8023c88: 685b ldr r3, [r3, #4] 8023c8a: 61fb str r3, [r7, #28] #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 8023c8c: 23f0 movs r3, #240 @ 0xf0 8023c8e: 87bb strh r3, [r7, #60] @ 0x3c /* parse options to the end of the received packet */ options_idx_max = p->tot_len; 8023c90: 687b ldr r3, [r7, #4] 8023c92: 891b ldrh r3, [r3, #8] 8023c94: 877b strh r3, [r7, #58] @ 0x3a again: q = p; 8023c96: 687b ldr r3, [r7, #4] 8023c98: 637b str r3, [r7, #52] @ 0x34 while ((q != NULL) && (options_idx >= q->len)) { 8023c9a: e00c b.n 8023cb6 options_idx = (u16_t)(options_idx - q->len); 8023c9c: 6b7b ldr r3, [r7, #52] @ 0x34 8023c9e: 895b ldrh r3, [r3, #10] 8023ca0: 8fba ldrh r2, [r7, #60] @ 0x3c 8023ca2: 1ad3 subs r3, r2, r3 8023ca4: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = (u16_t)(options_idx_max - q->len); 8023ca6: 6b7b ldr r3, [r7, #52] @ 0x34 8023ca8: 895b ldrh r3, [r3, #10] 8023caa: 8f7a ldrh r2, [r7, #58] @ 0x3a 8023cac: 1ad3 subs r3, r2, r3 8023cae: 877b strh r3, [r7, #58] @ 0x3a q = q->next; 8023cb0: 6b7b ldr r3, [r7, #52] @ 0x34 8023cb2: 681b ldr r3, [r3, #0] 8023cb4: 637b str r3, [r7, #52] @ 0x34 while ((q != NULL) && (options_idx >= q->len)) { 8023cb6: 6b7b ldr r3, [r7, #52] @ 0x34 8023cb8: 2b00 cmp r3, #0 8023cba: d004 beq.n 8023cc6 8023cbc: 6b7b ldr r3, [r7, #52] @ 0x34 8023cbe: 895b ldrh r3, [r3, #10] 8023cc0: 8fba ldrh r2, [r7, #60] @ 0x3c 8023cc2: 429a cmp r2, r3 8023cc4: d2ea bcs.n 8023c9c } if (q == NULL) { 8023cc6: 6b7b ldr r3, [r7, #52] @ 0x34 8023cc8: 2b00 cmp r3, #0 8023cca: d102 bne.n 8023cd2 return ERR_BUF; 8023ccc: f06f 0301 mvn.w r3, #1 8023cd0: e292 b.n 80241f8 } offset = options_idx; 8023cd2: 8fbb ldrh r3, [r7, #60] @ 0x3c 8023cd4: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 offset_max = options_idx_max; 8023cd8: 8f7b ldrh r3, [r7, #58] @ 0x3a 8023cda: 87fb strh r3, [r7, #62] @ 0x3e options = (u8_t *)q->payload; 8023cdc: 6b7b ldr r3, [r7, #52] @ 0x34 8023cde: 685b ldr r3, [r3, #4] 8023ce0: 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)) { 8023ce2: e247 b.n 8024174 u8_t op = options[offset]; 8023ce4: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023ce8: 6c3a ldr r2, [r7, #64] @ 0x40 8023cea: 4413 add r3, r2 8023cec: 781b ldrb r3, [r3, #0] 8023cee: 76fb strb r3, [r7, #27] u8_t len; u8_t decode_len = 0; 8023cf0: 2300 movs r3, #0 8023cf2: f887 302a strb.w r3, [r7, #42] @ 0x2a int decode_idx = -1; 8023cf6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8023cfa: 627b str r3, [r7, #36] @ 0x24 u16_t val_offset = (u16_t)(offset + 2); 8023cfc: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023d00: 3302 adds r3, #2 8023d02: 847b strh r3, [r7, #34] @ 0x22 if (val_offset < offset) { 8023d04: 8c7a ldrh r2, [r7, #34] @ 0x22 8023d06: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023d0a: 429a cmp r2, r3 8023d0c: d202 bcs.n 8023d14 /* overflow */ return ERR_BUF; 8023d0e: f06f 0301 mvn.w r3, #1 8023d12: e271 b.n 80241f8 } /* len byte might be in the next pbuf */ if ((offset + 1) < q->len) { 8023d14: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023d18: 3301 adds r3, #1 8023d1a: 6b7a ldr r2, [r7, #52] @ 0x34 8023d1c: 8952 ldrh r2, [r2, #10] 8023d1e: 4293 cmp r3, r2 8023d20: da08 bge.n 8023d34 len = options[offset + 1]; 8023d22: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023d26: 3301 adds r3, #1 8023d28: 6c3a ldr r2, [r7, #64] @ 0x40 8023d2a: 4413 add r3, r2 8023d2c: 781b ldrb r3, [r3, #0] 8023d2e: f887 302b strb.w r3, [r7, #43] @ 0x2b 8023d32: e00b b.n 8023d4c } else { len = (q->next != NULL ? ((u8_t *)q->next->payload)[0] : 0); 8023d34: 6b7b ldr r3, [r7, #52] @ 0x34 8023d36: 681b ldr r3, [r3, #0] 8023d38: 2b00 cmp r3, #0 8023d3a: d004 beq.n 8023d46 8023d3c: 6b7b ldr r3, [r7, #52] @ 0x34 8023d3e: 681b ldr r3, [r3, #0] 8023d40: 685b ldr r3, [r3, #4] 8023d42: 781b ldrb r3, [r3, #0] 8023d44: e000 b.n 8023d48 8023d46: 2300 movs r3, #0 8023d48: 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; 8023d4c: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023d50: f887 302a strb.w r3, [r7, #42] @ 0x2a switch (op) { 8023d54: 7efb ldrb r3, [r7, #27] 8023d56: 2b3b cmp r3, #59 @ 0x3b 8023d58: f200 812c bhi.w 8023fb4 8023d5c: a201 add r2, pc, #4 @ (adr r2, 8023d64 ) 8023d5e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8023d62: bf00 nop 8023d64: 08023e55 .word 0x08023e55 8023d68: 08023e65 .word 0x08023e65 8023d6c: 08023fb5 .word 0x08023fb5 8023d70: 08023e87 .word 0x08023e87 8023d74: 08023fb5 .word 0x08023fb5 8023d78: 08023fb5 .word 0x08023fb5 8023d7c: 08023fb5 .word 0x08023fb5 8023d80: 08023fb5 .word 0x08023fb5 8023d84: 08023fb5 .word 0x08023fb5 8023d88: 08023fb5 .word 0x08023fb5 8023d8c: 08023fb5 .word 0x08023fb5 8023d90: 08023fb5 .word 0x08023fb5 8023d94: 08023fb5 .word 0x08023fb5 8023d98: 08023fb5 .word 0x08023fb5 8023d9c: 08023fb5 .word 0x08023fb5 8023da0: 08023fb5 .word 0x08023fb5 8023da4: 08023fb5 .word 0x08023fb5 8023da8: 08023fb5 .word 0x08023fb5 8023dac: 08023fb5 .word 0x08023fb5 8023db0: 08023fb5 .word 0x08023fb5 8023db4: 08023fb5 .word 0x08023fb5 8023db8: 08023fb5 .word 0x08023fb5 8023dbc: 08023fb5 .word 0x08023fb5 8023dc0: 08023fb5 .word 0x08023fb5 8023dc4: 08023fb5 .word 0x08023fb5 8023dc8: 08023fb5 .word 0x08023fb5 8023dcc: 08023fb5 .word 0x08023fb5 8023dd0: 08023fb5 .word 0x08023fb5 8023dd4: 08023fb5 .word 0x08023fb5 8023dd8: 08023fb5 .word 0x08023fb5 8023ddc: 08023fb5 .word 0x08023fb5 8023de0: 08023fb5 .word 0x08023fb5 8023de4: 08023fb5 .word 0x08023fb5 8023de8: 08023fb5 .word 0x08023fb5 8023dec: 08023fb5 .word 0x08023fb5 8023df0: 08023fb5 .word 0x08023fb5 8023df4: 08023fb5 .word 0x08023fb5 8023df8: 08023fb5 .word 0x08023fb5 8023dfc: 08023fb5 .word 0x08023fb5 8023e00: 08023fb5 .word 0x08023fb5 8023e04: 08023fb5 .word 0x08023fb5 8023e08: 08023fb5 .word 0x08023fb5 8023e0c: 08023fb5 .word 0x08023fb5 8023e10: 08023fb5 .word 0x08023fb5 8023e14: 08023fb5 .word 0x08023fb5 8023e18: 08023fb5 .word 0x08023fb5 8023e1c: 08023fb5 .word 0x08023fb5 8023e20: 08023fb5 .word 0x08023fb5 8023e24: 08023fb5 .word 0x08023fb5 8023e28: 08023fb5 .word 0x08023fb5 8023e2c: 08023fb5 .word 0x08023fb5 8023e30: 08023eb3 .word 0x08023eb3 8023e34: 08023ed5 .word 0x08023ed5 8023e38: 08023f11 .word 0x08023f11 8023e3c: 08023f33 .word 0x08023f33 8023e40: 08023fb5 .word 0x08023fb5 8023e44: 08023fb5 .word 0x08023fb5 8023e48: 08023fb5 .word 0x08023fb5 8023e4c: 08023f71 .word 0x08023f71 8023e50: 08023f93 .word 0x08023f93 /* case(DHCP_OPTION_END): handled above */ case (DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; 8023e54: 2300 movs r3, #0 8023e56: f887 302b strb.w r3, [r7, #43] @ 0x2b 8023e5a: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023e5e: f887 302a strb.w r3, [r7, #42] @ 0x2a /* will be increased below */ break; 8023e62: e0ab b.n 8023fbc case (DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023e64: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023e68: 2b04 cmp r3, #4 8023e6a: d009 beq.n 8023e80 8023e6c: 4b3a ldr r3, [pc, #232] @ (8023f58 ) 8023e6e: f240 622e movw r2, #1582 @ 0x62e 8023e72: 493a ldr r1, [pc, #232] @ (8023f5c ) 8023e74: 483a ldr r0, [pc, #232] @ (8023f60 ) 8023e76: f006 fd11 bl 802a89c 8023e7a: f06f 0305 mvn.w r3, #5 8023e7e: e1bb b.n 80241f8 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 8023e80: 2306 movs r3, #6 8023e82: 627b str r3, [r7, #36] @ 0x24 break; 8023e84: e09a b.n 8023fbc case (DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ 8023e86: 2304 movs r3, #4 8023e88: f887 302a strb.w r3, [r7, #42] @ 0x2a LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 8023e8c: f897 202b ldrb.w r2, [r7, #43] @ 0x2b 8023e90: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8023e94: 429a cmp r2, r3 8023e96: d209 bcs.n 8023eac 8023e98: 4b2f ldr r3, [pc, #188] @ (8023f58 ) 8023e9a: f240 6233 movw r2, #1587 @ 0x633 8023e9e: 4931 ldr r1, [pc, #196] @ (8023f64 ) 8023ea0: 482f ldr r0, [pc, #188] @ (8023f60 ) 8023ea2: f006 fcfb bl 802a89c 8023ea6: f06f 0305 mvn.w r3, #5 8023eaa: e1a5 b.n 80241f8 decode_idx = DHCP_OPTION_IDX_ROUTER; 8023eac: 2307 movs r3, #7 8023eae: 627b str r3, [r7, #36] @ 0x24 break; 8023eb0: e084 b.n 8023fbc 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;); 8023eb2: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023eb6: 2b04 cmp r3, #4 8023eb8: d009 beq.n 8023ece 8023eba: 4b27 ldr r3, [pc, #156] @ (8023f58 ) 8023ebc: f240 6241 movw r2, #1601 @ 0x641 8023ec0: 4926 ldr r1, [pc, #152] @ (8023f5c ) 8023ec2: 4827 ldr r0, [pc, #156] @ (8023f60 ) 8023ec4: f006 fcea bl 802a89c 8023ec8: f06f 0305 mvn.w r3, #5 8023ecc: e194 b.n 80241f8 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 8023ece: 2303 movs r3, #3 8023ed0: 627b str r3, [r7, #36] @ 0x24 break; 8023ed2: e073 b.n 8023fbc 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;); 8023ed4: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023ed8: 2b01 cmp r3, #1 8023eda: d009 beq.n 8023ef0 8023edc: 4b1e ldr r3, [pc, #120] @ (8023f58 ) 8023ede: f240 624f movw r2, #1615 @ 0x64f 8023ee2: 4921 ldr r1, [pc, #132] @ (8023f68 ) 8023ee4: 481e ldr r0, [pc, #120] @ (8023f60 ) 8023ee6: f006 fcd9 bl 802a89c 8023eea: f06f 0305 mvn.w r3, #5 8023eee: e183 b.n 80241f8 /* 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;); 8023ef0: 8fbb ldrh r3, [r7, #60] @ 0x3c 8023ef2: 2bf0 cmp r3, #240 @ 0xf0 8023ef4: d009 beq.n 8023f0a 8023ef6: 4b18 ldr r3, [pc, #96] @ (8023f58 ) 8023ef8: f240 6251 movw r2, #1617 @ 0x651 8023efc: 491b ldr r1, [pc, #108] @ (8023f6c ) 8023efe: 4818 ldr r0, [pc, #96] @ (8023f60 ) 8023f00: f006 fccc bl 802a89c 8023f04: f06f 0305 mvn.w r3, #5 8023f08: e176 b.n 80241f8 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 8023f0a: 2300 movs r3, #0 8023f0c: 627b str r3, [r7, #36] @ 0x24 break; 8023f0e: e055 b.n 8023fbc case (DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8023f10: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023f14: 2b01 cmp r3, #1 8023f16: d009 beq.n 8023f2c 8023f18: 4b0f ldr r3, [pc, #60] @ (8023f58 ) 8023f1a: f240 6255 movw r2, #1621 @ 0x655 8023f1e: 4912 ldr r1, [pc, #72] @ (8023f68 ) 8023f20: 480f ldr r0, [pc, #60] @ (8023f60 ) 8023f22: f006 fcbb bl 802a89c 8023f26: f06f 0305 mvn.w r3, #5 8023f2a: e165 b.n 80241f8 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; 8023f2c: 2301 movs r3, #1 8023f2e: 627b str r3, [r7, #36] @ 0x24 break; 8023f30: e044 b.n 8023fbc case (DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023f32: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023f36: 2b04 cmp r3, #4 8023f38: d009 beq.n 8023f4e 8023f3a: 4b07 ldr r3, [pc, #28] @ (8023f58 ) 8023f3c: f240 6259 movw r2, #1625 @ 0x659 8023f40: 4906 ldr r1, [pc, #24] @ (8023f5c ) 8023f42: 4807 ldr r0, [pc, #28] @ (8023f60 ) 8023f44: f006 fcaa bl 802a89c 8023f48: f06f 0305 mvn.w r3, #5 8023f4c: e154 b.n 80241f8 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 8023f4e: 2302 movs r3, #2 8023f50: 627b str r3, [r7, #36] @ 0x24 break; 8023f52: e033 b.n 8023fbc 8023f54: 2402affc .word 0x2402affc 8023f58: 08030e84 .word 0x08030e84 8023f5c: 0803110c .word 0x0803110c 8023f60: 08030ee4 .word 0x08030ee4 8023f64: 08031118 .word 0x08031118 8023f68: 0803112c .word 0x0803112c 8023f6c: 08031138 .word 0x08031138 case (DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023f70: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023f74: 2b04 cmp r3, #4 8023f76: d009 beq.n 8023f8c 8023f78: 4ba1 ldr r3, [pc, #644] @ (8024200 ) 8023f7a: f240 625d movw r2, #1629 @ 0x65d 8023f7e: 49a1 ldr r1, [pc, #644] @ (8024204 ) 8023f80: 48a1 ldr r0, [pc, #644] @ (8024208 ) 8023f82: f006 fc8b bl 802a89c 8023f86: f06f 0305 mvn.w r3, #5 8023f8a: e135 b.n 80241f8 decode_idx = DHCP_OPTION_IDX_T1; 8023f8c: 2304 movs r3, #4 8023f8e: 627b str r3, [r7, #36] @ 0x24 break; 8023f90: e014 b.n 8023fbc case (DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8023f92: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023f96: 2b04 cmp r3, #4 8023f98: d009 beq.n 8023fae 8023f9a: 4b99 ldr r3, [pc, #612] @ (8024200 ) 8023f9c: f240 6261 movw r2, #1633 @ 0x661 8023fa0: 4998 ldr r1, [pc, #608] @ (8024204 ) 8023fa2: 4899 ldr r0, [pc, #612] @ (8024208 ) 8023fa4: f006 fc7a bl 802a89c 8023fa8: f06f 0305 mvn.w r3, #5 8023fac: e124 b.n 80241f8 decode_idx = DHCP_OPTION_IDX_T2; 8023fae: 2305 movs r3, #5 8023fb0: 627b str r3, [r7, #36] @ 0x24 break; 8023fb2: e003 b.n 8023fbc default: decode_len = 0; 8023fb4: 2300 movs r3, #0 8023fb6: 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; 8023fba: bf00 nop } if (op == DHCP_OPTION_PAD) { 8023fbc: 7efb ldrb r3, [r7, #27] 8023fbe: 2b00 cmp r3, #0 8023fc0: d105 bne.n 8023fce offset++; 8023fc2: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023fc6: 3301 adds r3, #1 8023fc8: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 8023fcc: e0a4 b.n 8024118 } else { if (offset + len + 2 > 0xFFFF) { 8023fce: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8023fd2: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023fd6: 4413 add r3, r2 8023fd8: f64f 72fd movw r2, #65533 @ 0xfffd 8023fdc: 4293 cmp r3, r2 8023fde: dd02 ble.n 8023fe6 /* overflow */ return ERR_BUF; 8023fe0: f06f 0301 mvn.w r3, #1 8023fe4: e108 b.n 80241f8 } offset = (u16_t)(offset + len + 2); 8023fe6: f897 302b ldrb.w r3, [r7, #43] @ 0x2b 8023fea: b29a uxth r2, r3 8023fec: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8023ff0: 4413 add r3, r2 8023ff2: b29b uxth r3, r3 8023ff4: 3302 adds r3, #2 8023ff6: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 if (decode_len > 0) { 8023ffa: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8023ffe: 2b00 cmp r3, #0 8024000: f000 808a beq.w 8024118 u32_t value = 0; 8024004: 2300 movs r3, #0 8024006: 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); 8024008: 6a7b ldr r3, [r7, #36] @ 0x24 802400a: 2b00 cmp r3, #0 802400c: db02 blt.n 8024014 802400e: 6a7b ldr r3, [r7, #36] @ 0x24 8024010: 2b07 cmp r3, #7 8024012: dd06 ble.n 8024022 8024014: 4b7a ldr r3, [pc, #488] @ (8024200 ) 8024016: f44f 62cf mov.w r2, #1656 @ 0x678 802401a: 497c ldr r1, [pc, #496] @ (802420c ) 802401c: 487a ldr r0, [pc, #488] @ (8024208 ) 802401e: f006 fc3d bl 802a89c if (!dhcp_option_given(dhcp, decode_idx)) { 8024022: 4a7b ldr r2, [pc, #492] @ (8024210 ) 8024024: 6a7b ldr r3, [r7, #36] @ 0x24 8024026: 4413 add r3, r2 8024028: 781b ldrb r3, [r3, #0] 802402a: 2b00 cmp r3, #0 802402c: d174 bne.n 8024118 copy_len = LWIP_MIN(decode_len, 4); 802402e: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8024032: 2b04 cmp r3, #4 8024034: bf28 it cs 8024036: 2304 movcs r3, #4 8024038: b2db uxtb r3, r3 802403a: 833b strh r3, [r7, #24] if (pbuf_copy_partial(q, &value, copy_len, val_offset) != copy_len) { 802403c: 8c7b ldrh r3, [r7, #34] @ 0x22 802403e: 8b3a ldrh r2, [r7, #24] 8024040: f107 010c add.w r1, r7, #12 8024044: 6b78 ldr r0, [r7, #52] @ 0x34 8024046: f7f7 fbb7 bl 801b7b8 802404a: 4603 mov r3, r0 802404c: 461a mov r2, r3 802404e: 8b3b ldrh r3, [r7, #24] 8024050: 4293 cmp r3, r2 8024052: d002 beq.n 802405a return ERR_BUF; 8024054: f06f 0301 mvn.w r3, #1 8024058: e0ce b.n 80241f8 } if (decode_len > 4) { 802405a: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 802405e: 2b04 cmp r3, #4 8024060: d933 bls.n 80240ca /* decode more than one u32_t */ u16_t next_val_offset; LWIP_ERROR("decode_len %% 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 8024062: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 8024066: f003 0303 and.w r3, r3, #3 802406a: b2db uxtb r3, r3 802406c: 2b00 cmp r3, #0 802406e: d009 beq.n 8024084 8024070: 4b63 ldr r3, [pc, #396] @ (8024200 ) 8024072: f240 6281 movw r2, #1665 @ 0x681 8024076: 4967 ldr r1, [pc, #412] @ (8024214 ) 8024078: 4863 ldr r0, [pc, #396] @ (8024208 ) 802407a: f006 fc0f bl 802a89c 802407e: f06f 0305 mvn.w r3, #5 8024082: e0b9 b.n 80241f8 dhcp_got_option(dhcp, decode_idx); 8024084: 4a62 ldr r2, [pc, #392] @ (8024210 ) 8024086: 6a7b ldr r3, [r7, #36] @ 0x24 8024088: 4413 add r3, r2 802408a: 2201 movs r2, #1 802408c: 701a strb r2, [r3, #0] dhcp_set_option_value(dhcp, decode_idx, lwip_htonl(value)); 802408e: 68fb ldr r3, [r7, #12] 8024090: 4618 mov r0, r3 8024092: f7f5 fcbe bl 8019a12 8024096: 4602 mov r2, r0 8024098: 495f ldr r1, [pc, #380] @ (8024218 ) 802409a: 6a7b ldr r3, [r7, #36] @ 0x24 802409c: f841 2023 str.w r2, [r1, r3, lsl #2] decode_len = (u8_t)(decode_len - 4); 80240a0: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 80240a4: 3b04 subs r3, #4 80240a6: f887 302a strb.w r3, [r7, #42] @ 0x2a next_val_offset = (u16_t)(val_offset + 4); 80240aa: 8c7b ldrh r3, [r7, #34] @ 0x22 80240ac: 3304 adds r3, #4 80240ae: 82fb strh r3, [r7, #22] if (next_val_offset < val_offset) { 80240b0: 8afa ldrh r2, [r7, #22] 80240b2: 8c7b ldrh r3, [r7, #34] @ 0x22 80240b4: 429a cmp r2, r3 80240b6: d202 bcs.n 80240be /* overflow */ return ERR_BUF; 80240b8: f06f 0301 mvn.w r3, #1 80240bc: e09c b.n 80241f8 } val_offset = next_val_offset; 80240be: 8afb ldrh r3, [r7, #22] 80240c0: 847b strh r3, [r7, #34] @ 0x22 decode_idx++; 80240c2: 6a7b ldr r3, [r7, #36] @ 0x24 80240c4: 3301 adds r3, #1 80240c6: 627b str r3, [r7, #36] @ 0x24 goto decode_next; 80240c8: e79e b.n 8024008 } else if (decode_len == 4) { 80240ca: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 80240ce: 2b04 cmp r3, #4 80240d0: d106 bne.n 80240e0 value = lwip_ntohl(value); 80240d2: 68fb ldr r3, [r7, #12] 80240d4: 4618 mov r0, r3 80240d6: f7f5 fc9c bl 8019a12 80240da: 4603 mov r3, r0 80240dc: 60fb str r3, [r7, #12] 80240de: e011 b.n 8024104 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 80240e0: f897 302a ldrb.w r3, [r7, #42] @ 0x2a 80240e4: 2b01 cmp r3, #1 80240e6: d009 beq.n 80240fc 80240e8: 4b45 ldr r3, [pc, #276] @ (8024200 ) 80240ea: f44f 62d2 mov.w r2, #1680 @ 0x690 80240ee: 494b ldr r1, [pc, #300] @ (802421c ) 80240f0: 4845 ldr r0, [pc, #276] @ (8024208 ) 80240f2: f006 fbd3 bl 802a89c 80240f6: f06f 0305 mvn.w r3, #5 80240fa: e07d b.n 80241f8 value = ((u8_t *)&value)[0]; 80240fc: f107 030c add.w r3, r7, #12 8024100: 781b ldrb r3, [r3, #0] 8024102: 60fb str r3, [r7, #12] } dhcp_got_option(dhcp, decode_idx); 8024104: 4a42 ldr r2, [pc, #264] @ (8024210 ) 8024106: 6a7b ldr r3, [r7, #36] @ 0x24 8024108: 4413 add r3, r2 802410a: 2201 movs r2, #1 802410c: 701a strb r2, [r3, #0] dhcp_set_option_value(dhcp, decode_idx, value); 802410e: 68fa ldr r2, [r7, #12] 8024110: 4941 ldr r1, [pc, #260] @ (8024218 ) 8024112: 6a7b ldr r3, [r7, #36] @ 0x24 8024114: f841 2023 str.w r2, [r1, r3, lsl #2] } } } if (offset >= q->len) { 8024118: 6b7b ldr r3, [r7, #52] @ 0x34 802411a: 895b ldrh r3, [r3, #10] 802411c: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8024120: 429a cmp r2, r3 8024122: d327 bcc.n 8024174 offset = (u16_t)(offset - q->len); 8024124: 6b7b ldr r3, [r7, #52] @ 0x34 8024126: 895b ldrh r3, [r3, #10] 8024128: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 802412c: 1ad3 subs r3, r2, r3 802412e: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 offset_max = (u16_t)(offset_max - q->len); 8024132: 6b7b ldr r3, [r7, #52] @ 0x34 8024134: 895b ldrh r3, [r3, #10] 8024136: 8ffa ldrh r2, [r7, #62] @ 0x3e 8024138: 1ad3 subs r3, r2, r3 802413a: 87fb strh r3, [r7, #62] @ 0x3e if (offset < offset_max) { 802413c: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8024140: 8ffb ldrh r3, [r7, #62] @ 0x3e 8024142: 429a cmp r2, r3 8024144: d213 bcs.n 802416e q = q->next; 8024146: 6b7b ldr r3, [r7, #52] @ 0x34 8024148: 681b ldr r3, [r3, #0] 802414a: 637b str r3, [r7, #52] @ 0x34 LWIP_ERROR("next pbuf was null", q != NULL, return ERR_VAL;); 802414c: 6b7b ldr r3, [r7, #52] @ 0x34 802414e: 2b00 cmp r3, #0 8024150: d109 bne.n 8024166 8024152: 4b2b ldr r3, [pc, #172] @ (8024200 ) 8024154: f240 629d movw r2, #1693 @ 0x69d 8024158: 4931 ldr r1, [pc, #196] @ (8024220 ) 802415a: 482b ldr r0, [pc, #172] @ (8024208 ) 802415c: f006 fb9e bl 802a89c 8024160: f06f 0305 mvn.w r3, #5 8024164: e048 b.n 80241f8 options = (u8_t *)q->payload; 8024166: 6b7b ldr r3, [r7, #52] @ 0x34 8024168: 685b ldr r3, [r3, #4] 802416a: 643b str r3, [r7, #64] @ 0x40 802416c: e002 b.n 8024174 } else { /* We've run out of bytes, probably no end marker. Don't proceed. */ return ERR_BUF; 802416e: f06f 0301 mvn.w r3, #1 8024172: e041 b.n 80241f8 while ((q != NULL) && (offset < offset_max) && (options[offset] != DHCP_OPTION_END)) { 8024174: 6b7b ldr r3, [r7, #52] @ 0x34 8024176: 2b00 cmp r3, #0 8024178: d00c beq.n 8024194 802417a: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 802417e: 8ffb ldrh r3, [r7, #62] @ 0x3e 8024180: 429a cmp r2, r3 8024182: d207 bcs.n 8024194 8024184: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8024188: 6c3a ldr r2, [r7, #64] @ 0x40 802418a: 4413 add r3, r2 802418c: 781b ldrb r3, [r3, #0] 802418e: 2bff cmp r3, #255 @ 0xff 8024190: f47f ada8 bne.w 8023ce4 } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 8024194: 4b1e ldr r3, [pc, #120] @ (8024210 ) 8024196: 781b ldrb r3, [r3, #0] 8024198: 2b00 cmp r3, #0 802419a: d018 beq.n 80241ce u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 802419c: 4b1e ldr r3, [pc, #120] @ (8024218 ) 802419e: 681b ldr r3, [r3, #0] 80241a0: 613b str r3, [r7, #16] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80241a2: 4b1b ldr r3, [pc, #108] @ (8024210 ) 80241a4: 2200 movs r2, #0 80241a6: 701a strb r2, [r3, #0] if (overload == DHCP_OVERLOAD_FILE) { 80241a8: 693b ldr r3, [r7, #16] 80241aa: 2b01 cmp r3, #1 80241ac: d102 bne.n 80241b4 parse_file_as_options = 1; 80241ae: 2301 movs r3, #1 80241b0: 633b str r3, [r7, #48] @ 0x30 80241b2: e00c b.n 80241ce LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 80241b4: 693b ldr r3, [r7, #16] 80241b6: 2b02 cmp r3, #2 80241b8: d102 bne.n 80241c0 parse_sname_as_options = 1; 80241ba: 2301 movs r3, #1 80241bc: 62fb str r3, [r7, #44] @ 0x2c 80241be: e006 b.n 80241ce LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 80241c0: 693b ldr r3, [r7, #16] 80241c2: 2b03 cmp r3, #3 80241c4: d103 bne.n 80241ce parse_sname_as_options = 1; 80241c6: 2301 movs r3, #1 80241c8: 62fb str r3, [r7, #44] @ 0x2c parse_file_as_options = 1; 80241ca: 2301 movs r3, #1 80241cc: 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) { 80241ce: 6b3b ldr r3, [r7, #48] @ 0x30 80241d0: 2b00 cmp r3, #0 80241d2: d006 beq.n 80241e2 /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; 80241d4: 2300 movs r3, #0 80241d6: 633b str r3, [r7, #48] @ 0x30 options_idx = DHCP_FILE_OFS; 80241d8: 236c movs r3, #108 @ 0x6c 80241da: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; 80241dc: 23ec movs r3, #236 @ 0xec 80241de: 877b strh r3, [r7, #58] @ 0x3a #if LWIP_DHCP_BOOTP_FILE file_overloaded = 1; #endif goto again; 80241e0: e559 b.n 8023c96 } else if (parse_sname_as_options) { 80241e2: 6afb ldr r3, [r7, #44] @ 0x2c 80241e4: 2b00 cmp r3, #0 80241e6: d006 beq.n 80241f6 parse_sname_as_options = 0; 80241e8: 2300 movs r3, #0 80241ea: 62fb str r3, [r7, #44] @ 0x2c options_idx = DHCP_SNAME_OFS; 80241ec: 232c movs r3, #44 @ 0x2c 80241ee: 87bb strh r3, [r7, #60] @ 0x3c options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 80241f0: 236c movs r3, #108 @ 0x6c 80241f2: 877b strh r3, [r7, #58] @ 0x3a goto again; 80241f4: e54f b.n 8023c96 } /* 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; 80241f6: 2300 movs r3, #0 } 80241f8: 4618 mov r0, r3 80241fa: 3748 adds r7, #72 @ 0x48 80241fc: 46bd mov sp, r7 80241fe: bd80 pop {r7, pc} 8024200: 08030e84 .word 0x08030e84 8024204: 0803110c .word 0x0803110c 8024208: 08030ee4 .word 0x08030ee4 802420c: 08031150 .word 0x08031150 8024210: 2402affc .word 0x2402affc 8024214: 08031164 .word 0x08031164 8024218: 2402afdc .word 0x2402afdc 802421c: 0803117c .word 0x0803117c 8024220: 08031190 .word 0x08031190 08024224 : /** * 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) { 8024224: b580 push {r7, lr} 8024226: b08a sub sp, #40 @ 0x28 8024228: af00 add r7, sp, #0 802422a: 60f8 str r0, [r7, #12] 802422c: 60b9 str r1, [r7, #8] 802422e: 607a str r2, [r7, #4] 8024230: 603b str r3, [r7, #0] struct netif *netif = ip_current_input_netif(); 8024232: 4b5e ldr r3, [pc, #376] @ (80243ac ) 8024234: 685b ldr r3, [r3, #4] 8024236: 61fb str r3, [r7, #28] struct dhcp *dhcp = netif_dhcp_data(netif); 8024238: 69fb ldr r3, [r7, #28] 802423a: 6a5b ldr r3, [r3, #36] @ 0x24 802423c: 61bb str r3, [r7, #24] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802423e: 687b ldr r3, [r7, #4] 8024240: 685b ldr r3, [r3, #4] 8024242: 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)) { 8024244: 69bb ldr r3, [r7, #24] 8024246: 2b00 cmp r3, #0 8024248: f000 809a beq.w 8024380 802424c: 69bb ldr r3, [r7, #24] 802424e: 791b ldrb r3, [r3, #4] 8024250: 2b00 cmp r3, #0 8024252: f000 8095 beq.w 8024380 /* prevent warnings about unused arguments */ LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); if (p->len < DHCP_MIN_REPLY_LEN) { 8024256: 687b ldr r3, [r7, #4] 8024258: 895b ldrh r3, [r3, #10] 802425a: 2b2b cmp r3, #43 @ 0x2b 802425c: f240 8092 bls.w 8024384 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) { 8024260: 697b ldr r3, [r7, #20] 8024262: 781b ldrb r3, [r3, #0] 8024264: 2b02 cmp r3, #2 8024266: f040 808f bne.w 8024388 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++) { 802426a: 2300 movs r3, #0 802426c: 74fb strb r3, [r7, #19] 802426e: e00e b.n 802428e if (netif->hwaddr[i] != reply_msg->chaddr[i]) { 8024270: 7cfb ldrb r3, [r7, #19] 8024272: 69fa ldr r2, [r7, #28] 8024274: 4413 add r3, r2 8024276: f893 202a ldrb.w r2, [r3, #42] @ 0x2a 802427a: 7cfb ldrb r3, [r7, #19] 802427c: 6979 ldr r1, [r7, #20] 802427e: 440b add r3, r1 8024280: 7f1b ldrb r3, [r3, #28] 8024282: 429a cmp r2, r3 8024284: f040 8082 bne.w 802438c for (i = 0; i < netif->hwaddr_len && i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 8024288: 7cfb ldrb r3, [r7, #19] 802428a: 3301 adds r3, #1 802428c: 74fb strb r3, [r7, #19] 802428e: 69fb ldr r3, [r7, #28] 8024290: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8024294: 7cfa ldrb r2, [r7, #19] 8024296: 429a cmp r2, r3 8024298: d202 bcs.n 80242a0 802429a: 7cfb ldrb r3, [r7, #19] 802429c: 2b05 cmp r3, #5 802429e: d9e7 bls.n 8024270 (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) { 80242a0: 697b ldr r3, [r7, #20] 80242a2: 685b ldr r3, [r3, #4] 80242a4: 4618 mov r0, r3 80242a6: f7f5 fbb4 bl 8019a12 80242aa: 4602 mov r2, r0 80242ac: 69bb ldr r3, [r7, #24] 80242ae: 681b ldr r3, [r3, #0] 80242b0: 429a cmp r2, r3 80242b2: d16d bne.n 8024390 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) { 80242b4: 69b9 ldr r1, [r7, #24] 80242b6: 6878 ldr r0, [r7, #4] 80242b8: f7ff fcd0 bl 8023c5c 80242bc: 4603 mov r3, r0 80242be: 2b00 cmp r3, #0 80242c0: d168 bne.n 8024394 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)) { 80242c2: 4b3b ldr r3, [pc, #236] @ (80243b0 ) 80242c4: 785b ldrb r3, [r3, #1] 80242c6: 2b00 cmp r3, #0 80242c8: d066 beq.n 8024398 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; 80242ca: 687b ldr r3, [r7, #4] 80242cc: 685b ldr r3, [r3, #4] 80242ce: 627b str r3, [r7, #36] @ 0x24 /* read DHCP message type */ msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); 80242d0: 4b38 ldr r3, [pc, #224] @ (80243b4 ) 80242d2: 685b ldr r3, [r3, #4] 80242d4: f887 3023 strb.w r3, [r7, #35] @ 0x23 /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 80242d8: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 80242dc: 2b05 cmp r3, #5 80242de: d12a bne.n 8024336 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_STATE_REQUESTING) { 80242e0: 69bb ldr r3, [r7, #24] 80242e2: 795b ldrb r3, [r3, #5] 80242e4: 2b01 cmp r3, #1 80242e6: d112 bne.n 802430e dhcp_handle_ack(netif, msg_in); 80242e8: 6a79 ldr r1, [r7, #36] @ 0x24 80242ea: 69f8 ldr r0, [r7, #28] 80242ec: f7fe fe00 bl 8022ef0 #if DHCP_DOES_ARP_CHECK if ((netif->flags & NETIF_FLAG_ETHARP) != 0) { 80242f0: 69fb ldr r3, [r7, #28] 80242f2: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80242f6: f003 0308 and.w r3, r3, #8 80242fa: 2b00 cmp r3, #0 80242fc: d003 beq.n 8024306 /* check if the acknowledged lease address is already in use */ dhcp_check(netif); 80242fe: 69f8 ldr r0, [r7, #28] 8024300: f7fe fb6e bl 80229e0 8024304: e04b b.n 802439e } else { /* bind interface to the acknowledged lease address */ dhcp_bind(netif); 8024306: 69f8 ldr r0, [r7, #28] 8024308: f7ff f852 bl 80233b0 802430c: e047 b.n 802439e /* 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) || 802430e: 69bb ldr r3, [r7, #24] 8024310: 795b ldrb r3, [r3, #5] 8024312: 2b03 cmp r3, #3 8024314: d007 beq.n 8024326 8024316: 69bb ldr r3, [r7, #24] 8024318: 795b ldrb r3, [r3, #5] 802431a: 2b04 cmp r3, #4 802431c: d003 beq.n 8024326 (dhcp->state == DHCP_STATE_RENEWING)) { 802431e: 69bb ldr r3, [r7, #24] 8024320: 795b ldrb r3, [r3, #5] else if ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REBINDING) || 8024322: 2b05 cmp r3, #5 8024324: d13b bne.n 802439e dhcp_handle_ack(netif, msg_in); 8024326: 6a79 ldr r1, [r7, #36] @ 0x24 8024328: 69f8 ldr r0, [r7, #28] 802432a: f7fe fde1 bl 8022ef0 dhcp_bind(netif); 802432e: 69f8 ldr r0, [r7, #28] 8024330: f7ff f83e bl 80233b0 8024334: e033 b.n 802439e } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 8024336: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802433a: 2b06 cmp r3, #6 802433c: d113 bne.n 8024366 ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 802433e: 69bb ldr r3, [r7, #24] 8024340: 795b ldrb r3, [r3, #5] else if ((msg_type == DHCP_NAK) && 8024342: 2b03 cmp r3, #3 8024344: d00b beq.n 802435e ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8024346: 69bb ldr r3, [r7, #24] 8024348: 795b ldrb r3, [r3, #5] 802434a: 2b01 cmp r3, #1 802434c: d007 beq.n 802435e (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { 802434e: 69bb ldr r3, [r7, #24] 8024350: 795b ldrb r3, [r3, #5] ((dhcp->state == DHCP_STATE_REBOOTING) || (dhcp->state == DHCP_STATE_REQUESTING) || 8024352: 2b04 cmp r3, #4 8024354: d003 beq.n 802435e (dhcp->state == DHCP_STATE_REBINDING) || (dhcp->state == DHCP_STATE_RENEWING ))) { 8024356: 69bb ldr r3, [r7, #24] 8024358: 795b ldrb r3, [r3, #5] 802435a: 2b05 cmp r3, #5 802435c: d103 bne.n 8024366 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); dhcp_handle_nak(netif); 802435e: 69f8 ldr r0, [r7, #28] 8024360: f7fe fb24 bl 80229ac 8024364: e01b b.n 802439e } /* received a DHCP_OFFER in DHCP_STATE_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_STATE_SELECTING)) { 8024366: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 802436a: 2b02 cmp r3, #2 802436c: d116 bne.n 802439c 802436e: 69bb ldr r3, [r7, #24] 8024370: 795b ldrb r3, [r3, #5] 8024372: 2b06 cmp r3, #6 8024374: d112 bne.n 802439c 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); 8024376: 6a79 ldr r1, [r7, #36] @ 0x24 8024378: 69f8 ldr r0, [r7, #28] 802437a: f7fe fb65 bl 8022a48 802437e: e00e b.n 802439e goto free_pbuf_and_return; 8024380: bf00 nop 8024382: e00c b.n 802439e goto free_pbuf_and_return; 8024384: bf00 nop 8024386: e00a b.n 802439e goto free_pbuf_and_return; 8024388: bf00 nop 802438a: e008 b.n 802439e goto free_pbuf_and_return; 802438c: bf00 nop 802438e: e006 b.n 802439e goto free_pbuf_and_return; 8024390: bf00 nop 8024392: e004 b.n 802439e goto free_pbuf_and_return; 8024394: bf00 nop 8024396: e002 b.n 802439e goto free_pbuf_and_return; 8024398: bf00 nop 802439a: e000 b.n 802439e } free_pbuf_and_return: 802439c: bf00 nop pbuf_free(p); 802439e: 6878 ldr r0, [r7, #4] 80243a0: f7f7 f804 bl 801b3ac } 80243a4: bf00 nop 80243a6: 3728 adds r7, #40 @ 0x28 80243a8: 46bd mov sp, r7 80243aa: bd80 pop {r7, pc} 80243ac: 24024428 .word 0x24024428 80243b0: 2402affc .word 0x2402affc 80243b4: 2402afdc .word 0x2402afdc 080243b8 : * @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) { 80243b8: b580 push {r7, lr} 80243ba: b088 sub sp, #32 80243bc: af00 add r7, sp, #0 80243be: 60f8 str r0, [r7, #12] 80243c0: 60b9 str r1, [r7, #8] 80243c2: 603b str r3, [r7, #0] 80243c4: 4613 mov r3, r2 80243c6: 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;); 80243c8: 68fb ldr r3, [r7, #12] 80243ca: 2b00 cmp r3, #0 80243cc: d108 bne.n 80243e0 80243ce: 4b5f ldr r3, [pc, #380] @ (802454c ) 80243d0: f240 7269 movw r2, #1897 @ 0x769 80243d4: 495e ldr r1, [pc, #376] @ (8024550 ) 80243d6: 485f ldr r0, [pc, #380] @ (8024554 ) 80243d8: f006 fa60 bl 802a89c 80243dc: 2300 movs r3, #0 80243de: e0b1 b.n 8024544 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return NULL;); 80243e0: 68bb ldr r3, [r7, #8] 80243e2: 2b00 cmp r3, #0 80243e4: d108 bne.n 80243f8 80243e6: 4b59 ldr r3, [pc, #356] @ (802454c ) 80243e8: f240 726a movw r2, #1898 @ 0x76a 80243ec: 495a ldr r1, [pc, #360] @ (8024558 ) 80243ee: 4859 ldr r0, [pc, #356] @ (8024554 ) 80243f0: f006 fa54 bl 802a89c 80243f4: 2300 movs r3, #0 80243f6: e0a5 b.n 8024544 p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); 80243f8: f44f 7220 mov.w r2, #640 @ 0x280 80243fc: f44f 719a mov.w r1, #308 @ 0x134 8024400: 2036 movs r0, #54 @ 0x36 8024402: f7f6 fcbd bl 801ad80 8024406: 61b8 str r0, [r7, #24] if (p_out == NULL) { 8024408: 69bb ldr r3, [r7, #24] 802440a: 2b00 cmp r3, #0 802440c: d101 bne.n 8024412 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_create_msg(): could not allocate pbuf\n")); return NULL; 802440e: 2300 movs r3, #0 8024410: e098 b.n 8024544 } LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", 8024412: 69bb ldr r3, [r7, #24] 8024414: 895b ldrh r3, [r3, #10] 8024416: f5b3 7f9a cmp.w r3, #308 @ 0x134 802441a: d206 bcs.n 802442a 802441c: 4b4b ldr r3, [pc, #300] @ (802454c ) 802441e: f240 7271 movw r2, #1905 @ 0x771 8024422: 494e ldr r1, [pc, #312] @ (802455c ) 8024424: 484b ldr r0, [pc, #300] @ (8024554 ) 8024426: f006 fa39 bl 802a89c (p_out->len >= sizeof(struct dhcp_msg))); /* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */ if ((message_type != DHCP_REQUEST) || (dhcp->state == DHCP_STATE_REBOOTING)) { 802442a: 79fb ldrb r3, [r7, #7] 802442c: 2b03 cmp r3, #3 802442e: d103 bne.n 8024438 8024430: 68bb ldr r3, [r7, #8] 8024432: 795b ldrb r3, [r3, #5] 8024434: 2b03 cmp r3, #3 8024436: d10d bne.n 8024454 /* reuse transaction identifier in retransmissions */ if (dhcp->tries == 0) { 8024438: 68bb ldr r3, [r7, #8] 802443a: 799b ldrb r3, [r3, #6] 802443c: 2b00 cmp r3, #0 802443e: d105 bne.n 802444c #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); 8024440: f004 ff02 bl 8029248 8024444: 4603 mov r3, r0 8024446: 461a mov r2, r3 8024448: 4b45 ldr r3, [pc, #276] @ (8024560 ) 802444a: 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; 802444c: 4b44 ldr r3, [pc, #272] @ (8024560 ) 802444e: 681a ldr r2, [r3, #0] 8024450: 68bb ldr r3, [r7, #8] 8024452: 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; 8024454: 69bb ldr r3, [r7, #24] 8024456: 685b ldr r3, [r3, #4] 8024458: 617b str r3, [r7, #20] memset(msg_out, 0, sizeof(struct dhcp_msg)); 802445a: f44f 729a mov.w r2, #308 @ 0x134 802445e: 2100 movs r1, #0 8024460: 6978 ldr r0, [r7, #20] 8024462: f006 fbad bl 802abc0 msg_out->op = DHCP_BOOTREQUEST; 8024466: 697b ldr r3, [r7, #20] 8024468: 2201 movs r2, #1 802446a: 701a strb r2, [r3, #0] /* @todo: make link layer independent */ msg_out->htype = LWIP_IANA_HWTYPE_ETHERNET; 802446c: 697b ldr r3, [r7, #20] 802446e: 2201 movs r2, #1 8024470: 705a strb r2, [r3, #1] msg_out->hlen = netif->hwaddr_len; 8024472: 68fb ldr r3, [r7, #12] 8024474: f893 2030 ldrb.w r2, [r3, #48] @ 0x30 8024478: 697b ldr r3, [r7, #20] 802447a: 709a strb r2, [r3, #2] msg_out->xid = lwip_htonl(dhcp->xid); 802447c: 68bb ldr r3, [r7, #8] 802447e: 681b ldr r3, [r3, #0] 8024480: 4618 mov r0, r3 8024482: f7f5 fac6 bl 8019a12 8024486: 4602 mov r2, r0 8024488: 697b ldr r3, [r7, #20] 802448a: 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) || 802448c: 79fb ldrb r3, [r7, #7] 802448e: 2b08 cmp r3, #8 8024490: d010 beq.n 80244b4 8024492: 79fb ldrb r3, [r7, #7] 8024494: 2b04 cmp r3, #4 8024496: d00d beq.n 80244b4 8024498: 79fb ldrb r3, [r7, #7] 802449a: 2b07 cmp r3, #7 802449c: d00a beq.n 80244b4 802449e: 79fb ldrb r3, [r7, #7] 80244a0: 2b03 cmp r3, #3 80244a2: d10c bne.n 80244be ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { 80244a4: 68bb ldr r3, [r7, #8] 80244a6: 795b ldrb r3, [r3, #5] ((message_type == DHCP_REQUEST) && /* DHCP_STATE_BOUND not used for sending! */ 80244a8: 2b05 cmp r3, #5 80244aa: d003 beq.n 80244b4 ((dhcp->state == DHCP_STATE_RENEWING) || dhcp->state == DHCP_STATE_REBINDING))) { 80244ac: 68bb ldr r3, [r7, #8] 80244ae: 795b ldrb r3, [r3, #5] 80244b0: 2b04 cmp r3, #4 80244b2: d104 bne.n 80244be ip4_addr_copy(msg_out->ciaddr, *netif_ip4_addr(netif)); 80244b4: 68fb ldr r3, [r7, #12] 80244b6: 3304 adds r3, #4 80244b8: 681a ldr r2, [r3, #0] 80244ba: 697b ldr r3, [r7, #20] 80244bc: 60da str r2, [r3, #12] } for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 80244be: 2300 movs r3, #0 80244c0: 83fb strh r3, [r7, #30] 80244c2: e00c b.n 80244de /* copy netif hardware address (padded with zeroes through memset already) */ msg_out->chaddr[i] = netif->hwaddr[i]; 80244c4: 8bfa ldrh r2, [r7, #30] 80244c6: 8bfb ldrh r3, [r7, #30] 80244c8: 68f9 ldr r1, [r7, #12] 80244ca: 440a add r2, r1 80244cc: f892 102a ldrb.w r1, [r2, #42] @ 0x2a 80244d0: 697a ldr r2, [r7, #20] 80244d2: 4413 add r3, r2 80244d4: 460a mov r2, r1 80244d6: 771a strb r2, [r3, #28] for (i = 0; i < LWIP_MIN(DHCP_CHADDR_LEN, NETIF_MAX_HWADDR_LEN); i++) { 80244d8: 8bfb ldrh r3, [r7, #30] 80244da: 3301 adds r3, #1 80244dc: 83fb strh r3, [r7, #30] 80244de: 8bfb ldrh r3, [r7, #30] 80244e0: 2b05 cmp r3, #5 80244e2: d9ef bls.n 80244c4 } msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 80244e4: 697b ldr r3, [r7, #20] 80244e6: 2200 movs r2, #0 80244e8: f042 0263 orr.w r2, r2, #99 @ 0x63 80244ec: f883 20ec strb.w r2, [r3, #236] @ 0xec 80244f0: 2200 movs r2, #0 80244f2: f062 027d orn r2, r2, #125 @ 0x7d 80244f6: f883 20ed strb.w r2, [r3, #237] @ 0xed 80244fa: 2200 movs r2, #0 80244fc: f042 0253 orr.w r2, r2, #83 @ 0x53 8024500: f883 20ee strb.w r2, [r3, #238] @ 0xee 8024504: 2200 movs r2, #0 8024506: f042 0263 orr.w r2, r2, #99 @ 0x63 802450a: 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); 802450e: 697b ldr r3, [r7, #20] 8024510: f103 01f0 add.w r1, r3, #240 @ 0xf0 8024514: 2301 movs r3, #1 8024516: 2235 movs r2, #53 @ 0x35 8024518: 2000 movs r0, #0 802451a: f7ff facf bl 8023abc 802451e: 4603 mov r3, r0 8024520: 827b strh r3, [r7, #18] options_out_len_loc = dhcp_option_byte(options_out_len_loc, msg_out->options, message_type); 8024522: 697b ldr r3, [r7, #20] 8024524: f103 01f0 add.w r1, r3, #240 @ 0xf0 8024528: 79fa ldrb r2, [r7, #7] 802452a: 8a7b ldrh r3, [r7, #18] 802452c: 4618 mov r0, r3 802452e: f7ff faf9 bl 8023b24 8024532: 4603 mov r3, r0 8024534: 827b strh r3, [r7, #18] if (options_out_len) { 8024536: 683b ldr r3, [r7, #0] 8024538: 2b00 cmp r3, #0 802453a: d002 beq.n 8024542 *options_out_len = options_out_len_loc; 802453c: 683b ldr r3, [r7, #0] 802453e: 8a7a ldrh r2, [r7, #18] 8024540: 801a strh r2, [r3, #0] } return p_out; 8024542: 69bb ldr r3, [r7, #24] } 8024544: 4618 mov r0, r3 8024546: 3720 adds r7, #32 8024548: 46bd mov sp, r7 802454a: bd80 pop {r7, pc} 802454c: 08030e84 .word 0x08030e84 8024550: 080311a4 .word 0x080311a4 8024554: 08030ee4 .word 0x08030ee4 8024558: 080311c4 .word 0x080311c4 802455c: 080311e4 .word 0x080311e4 8024560: 2402b00c .word 0x2402b00c 08024564 : * 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) { 8024564: b580 push {r7, lr} 8024566: b084 sub sp, #16 8024568: af00 add r7, sp, #0 802456a: 4603 mov r3, r0 802456c: 60b9 str r1, [r7, #8] 802456e: 607a str r2, [r7, #4] 8024570: 81fb strh r3, [r7, #14] options[options_out_len++] = DHCP_OPTION_END; 8024572: 89fb ldrh r3, [r7, #14] 8024574: 1c5a adds r2, r3, #1 8024576: 81fa strh r2, [r7, #14] 8024578: 461a mov r2, r3 802457a: 68bb ldr r3, [r7, #8] 802457c: 4413 add r3, r2 802457e: 22ff movs r2, #255 @ 0xff 8024580: 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)) && 8024582: e007 b.n 8024594 (options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ options[options_out_len++] = 0; 8024584: 89fb ldrh r3, [r7, #14] 8024586: 1c5a adds r2, r3, #1 8024588: 81fa strh r2, [r7, #14] 802458a: 461a mov r2, r3 802458c: 68bb ldr r3, [r7, #8] 802458e: 4413 add r3, r2 8024590: 2200 movs r2, #0 8024592: 701a strb r2, [r3, #0] while (((options_out_len < DHCP_MIN_OPTIONS_LEN) || (options_out_len & 3)) && 8024594: 89fb ldrh r3, [r7, #14] 8024596: 2b43 cmp r3, #67 @ 0x43 8024598: d904 bls.n 80245a4 802459a: 89fb ldrh r3, [r7, #14] 802459c: f003 0303 and.w r3, r3, #3 80245a0: 2b00 cmp r3, #0 80245a2: d002 beq.n 80245aa 80245a4: 89fb ldrh r3, [r7, #14] 80245a6: 2b43 cmp r3, #67 @ 0x43 80245a8: d9ec bls.n 8024584 } /* shrink the pbuf to the actual content length */ pbuf_realloc(p_out, (u16_t)(sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + options_out_len)); 80245aa: 89fb ldrh r3, [r7, #14] 80245ac: 33f0 adds r3, #240 @ 0xf0 80245ae: b29b uxth r3, r3 80245b0: 4619 mov r1, r3 80245b2: 6878 ldr r0, [r7, #4] 80245b4: f7f6 fd44 bl 801b040 } 80245b8: bf00 nop 80245ba: 3710 adds r7, #16 80245bc: 46bd mov sp, r7 80245be: bd80 pop {r7, pc} 080245c0 : * @return 1 if DHCP supplied netif->ip_addr (states BOUND or RENEWING), * 0 otherwise */ u8_t dhcp_supplied_address(const struct netif *netif) { 80245c0: b480 push {r7} 80245c2: b085 sub sp, #20 80245c4: af00 add r7, sp, #0 80245c6: 6078 str r0, [r7, #4] if ((netif != NULL) && (netif_dhcp_data(netif) != NULL)) { 80245c8: 687b ldr r3, [r7, #4] 80245ca: 2b00 cmp r3, #0 80245cc: d017 beq.n 80245fe 80245ce: 687b ldr r3, [r7, #4] 80245d0: 6a5b ldr r3, [r3, #36] @ 0x24 80245d2: 2b00 cmp r3, #0 80245d4: d013 beq.n 80245fe struct dhcp *dhcp = netif_dhcp_data(netif); 80245d6: 687b ldr r3, [r7, #4] 80245d8: 6a5b ldr r3, [r3, #36] @ 0x24 80245da: 60fb str r3, [r7, #12] return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || 80245dc: 68fb ldr r3, [r7, #12] 80245de: 795b ldrb r3, [r3, #5] 80245e0: 2b0a cmp r3, #10 80245e2: d007 beq.n 80245f4 80245e4: 68fb ldr r3, [r7, #12] 80245e6: 795b ldrb r3, [r3, #5] 80245e8: 2b05 cmp r3, #5 80245ea: d003 beq.n 80245f4 (dhcp->state == DHCP_STATE_REBINDING); 80245ec: 68fb ldr r3, [r7, #12] 80245ee: 795b ldrb r3, [r3, #5] return (dhcp->state == DHCP_STATE_BOUND) || (dhcp->state == DHCP_STATE_RENEWING) || 80245f0: 2b04 cmp r3, #4 80245f2: d101 bne.n 80245f8 80245f4: 2301 movs r3, #1 80245f6: e000 b.n 80245fa 80245f8: 2300 movs r3, #0 80245fa: b2db uxtb r3, r3 80245fc: e000 b.n 8024600 } return 0; 80245fe: 2300 movs r3, #0 } 8024600: 4618 mov r0, r3 8024602: 3714 adds r7, #20 8024604: 46bd mov sp, r7 8024606: f85d 7b04 ldr.w r7, [sp], #4 802460a: 4770 bx lr 0802460c : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 802460c: b580 push {r7, lr} 802460e: b082 sub sp, #8 8024610: af00 add r7, sp, #0 8024612: 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) { 8024614: 492b ldr r1, [pc, #172] @ (80246c4 ) 8024616: 687a ldr r2, [r7, #4] 8024618: 4613 mov r3, r2 802461a: 005b lsls r3, r3, #1 802461c: 4413 add r3, r2 802461e: 00db lsls r3, r3, #3 8024620: 440b add r3, r1 8024622: 681b ldr r3, [r3, #0] 8024624: 2b00 cmp r3, #0 8024626: d013 beq.n 8024650 /* 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); 8024628: 4926 ldr r1, [pc, #152] @ (80246c4 ) 802462a: 687a ldr r2, [r7, #4] 802462c: 4613 mov r3, r2 802462e: 005b lsls r3, r3, #1 8024630: 4413 add r3, r2 8024632: 00db lsls r3, r3, #3 8024634: 440b add r3, r1 8024636: 681b ldr r3, [r3, #0] 8024638: 4618 mov r0, r3 802463a: f7f6 feb7 bl 801b3ac arp_table[i].q = NULL; 802463e: 4921 ldr r1, [pc, #132] @ (80246c4 ) 8024640: 687a ldr r2, [r7, #4] 8024642: 4613 mov r3, r2 8024644: 005b lsls r3, r3, #1 8024646: 4413 add r3, r2 8024648: 00db lsls r3, r3, #3 802464a: 440b add r3, r1 802464c: 2200 movs r2, #0 802464e: 601a str r2, [r3, #0] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 8024650: 491c ldr r1, [pc, #112] @ (80246c4 ) 8024652: 687a ldr r2, [r7, #4] 8024654: 4613 mov r3, r2 8024656: 005b lsls r3, r3, #1 8024658: 4413 add r3, r2 802465a: 00db lsls r3, r3, #3 802465c: 440b add r3, r1 802465e: 3314 adds r3, #20 8024660: 2200 movs r2, #0 8024662: 701a strb r2, [r3, #0] #ifdef LWIP_DEBUG /* for debugging, clean out the complete entry */ arp_table[i].ctime = 0; 8024664: 4917 ldr r1, [pc, #92] @ (80246c4 ) 8024666: 687a ldr r2, [r7, #4] 8024668: 4613 mov r3, r2 802466a: 005b lsls r3, r3, #1 802466c: 4413 add r3, r2 802466e: 00db lsls r3, r3, #3 8024670: 440b add r3, r1 8024672: 3312 adds r3, #18 8024674: 2200 movs r2, #0 8024676: 801a strh r2, [r3, #0] arp_table[i].netif = NULL; 8024678: 4912 ldr r1, [pc, #72] @ (80246c4 ) 802467a: 687a ldr r2, [r7, #4] 802467c: 4613 mov r3, r2 802467e: 005b lsls r3, r3, #1 8024680: 4413 add r3, r2 8024682: 00db lsls r3, r3, #3 8024684: 440b add r3, r1 8024686: 3308 adds r3, #8 8024688: 2200 movs r2, #0 802468a: 601a str r2, [r3, #0] ip4_addr_set_zero(&arp_table[i].ipaddr); 802468c: 490d ldr r1, [pc, #52] @ (80246c4 ) 802468e: 687a ldr r2, [r7, #4] 8024690: 4613 mov r3, r2 8024692: 005b lsls r3, r3, #1 8024694: 4413 add r3, r2 8024696: 00db lsls r3, r3, #3 8024698: 440b add r3, r1 802469a: 3304 adds r3, #4 802469c: 2200 movs r2, #0 802469e: 601a str r2, [r3, #0] arp_table[i].ethaddr = ethzero; 80246a0: 4908 ldr r1, [pc, #32] @ (80246c4 ) 80246a2: 687a ldr r2, [r7, #4] 80246a4: 4613 mov r3, r2 80246a6: 005b lsls r3, r3, #1 80246a8: 4413 add r3, r2 80246aa: 00db lsls r3, r3, #3 80246ac: 440b add r3, r1 80246ae: 3308 adds r3, #8 80246b0: 4a05 ldr r2, [pc, #20] @ (80246c8 ) 80246b2: 3304 adds r3, #4 80246b4: 6810 ldr r0, [r2, #0] 80246b6: 6018 str r0, [r3, #0] 80246b8: 8892 ldrh r2, [r2, #4] 80246ba: 809a strh r2, [r3, #4] #endif /* LWIP_DEBUG */ } 80246bc: bf00 nop 80246be: 3708 adds r7, #8 80246c0: 46bd mov sp, r7 80246c2: bd80 pop {r7, pc} 80246c4: 2402b010 .word 0x2402b010 80246c8: 08031cb8 .word 0x08031cb8 080246cc : * 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) { 80246cc: b580 push {r7, lr} 80246ce: b082 sub sp, #8 80246d0: 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) { 80246d2: 2300 movs r3, #0 80246d4: 607b str r3, [r7, #4] 80246d6: e096 b.n 8024806 u8_t state = arp_table[i].state; 80246d8: 494f ldr r1, [pc, #316] @ (8024818 ) 80246da: 687a ldr r2, [r7, #4] 80246dc: 4613 mov r3, r2 80246de: 005b lsls r3, r3, #1 80246e0: 4413 add r3, r2 80246e2: 00db lsls r3, r3, #3 80246e4: 440b add r3, r1 80246e6: 3314 adds r3, #20 80246e8: 781b ldrb r3, [r3, #0] 80246ea: 70fb strb r3, [r7, #3] if (state != ETHARP_STATE_EMPTY 80246ec: 78fb ldrb r3, [r7, #3] 80246ee: 2b00 cmp r3, #0 80246f0: f000 8086 beq.w 8024800 #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 80246f4: 4948 ldr r1, [pc, #288] @ (8024818 ) 80246f6: 687a ldr r2, [r7, #4] 80246f8: 4613 mov r3, r2 80246fa: 005b lsls r3, r3, #1 80246fc: 4413 add r3, r2 80246fe: 00db lsls r3, r3, #3 8024700: 440b add r3, r1 8024702: 3312 adds r3, #18 8024704: 881b ldrh r3, [r3, #0] 8024706: 3301 adds r3, #1 8024708: b298 uxth r0, r3 802470a: 4943 ldr r1, [pc, #268] @ (8024818 ) 802470c: 687a ldr r2, [r7, #4] 802470e: 4613 mov r3, r2 8024710: 005b lsls r3, r3, #1 8024712: 4413 add r3, r2 8024714: 00db lsls r3, r3, #3 8024716: 440b add r3, r1 8024718: 3312 adds r3, #18 802471a: 4602 mov r2, r0 802471c: 801a strh r2, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 802471e: 493e ldr r1, [pc, #248] @ (8024818 ) 8024720: 687a ldr r2, [r7, #4] 8024722: 4613 mov r3, r2 8024724: 005b lsls r3, r3, #1 8024726: 4413 add r3, r2 8024728: 00db lsls r3, r3, #3 802472a: 440b add r3, r1 802472c: 3312 adds r3, #18 802472e: 881b ldrh r3, [r3, #0] 8024730: f5b3 7f96 cmp.w r3, #300 @ 0x12c 8024734: d215 bcs.n 8024762 ((arp_table[i].state == ETHARP_STATE_PENDING) && 8024736: 4938 ldr r1, [pc, #224] @ (8024818 ) 8024738: 687a ldr r2, [r7, #4] 802473a: 4613 mov r3, r2 802473c: 005b lsls r3, r3, #1 802473e: 4413 add r3, r2 8024740: 00db lsls r3, r3, #3 8024742: 440b add r3, r1 8024744: 3314 adds r3, #20 8024746: 781b ldrb r3, [r3, #0] if ((arp_table[i].ctime >= ARP_MAXAGE) || 8024748: 2b01 cmp r3, #1 802474a: d10e bne.n 802476a (arp_table[i].ctime >= ARP_MAXPENDING))) { 802474c: 4932 ldr r1, [pc, #200] @ (8024818 ) 802474e: 687a ldr r2, [r7, #4] 8024750: 4613 mov r3, r2 8024752: 005b lsls r3, r3, #1 8024754: 4413 add r3, r2 8024756: 00db lsls r3, r3, #3 8024758: 440b add r3, r1 802475a: 3312 adds r3, #18 802475c: 881b ldrh r3, [r3, #0] ((arp_table[i].state == ETHARP_STATE_PENDING) && 802475e: 2b04 cmp r3, #4 8024760: d903 bls.n 802476a /* 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); 8024762: 6878 ldr r0, [r7, #4] 8024764: f7ff ff52 bl 802460c 8024768: e04a b.n 8024800 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_1) { 802476a: 492b ldr r1, [pc, #172] @ (8024818 ) 802476c: 687a ldr r2, [r7, #4] 802476e: 4613 mov r3, r2 8024770: 005b lsls r3, r3, #1 8024772: 4413 add r3, r2 8024774: 00db lsls r3, r3, #3 8024776: 440b add r3, r1 8024778: 3314 adds r3, #20 802477a: 781b ldrb r3, [r3, #0] 802477c: 2b03 cmp r3, #3 802477e: d10a bne.n 8024796 /* Don't send more than one request every 2 seconds. */ arp_table[i].state = ETHARP_STATE_STABLE_REREQUESTING_2; 8024780: 4925 ldr r1, [pc, #148] @ (8024818 ) 8024782: 687a ldr r2, [r7, #4] 8024784: 4613 mov r3, r2 8024786: 005b lsls r3, r3, #1 8024788: 4413 add r3, r2 802478a: 00db lsls r3, r3, #3 802478c: 440b add r3, r1 802478e: 3314 adds r3, #20 8024790: 2204 movs r2, #4 8024792: 701a strb r2, [r3, #0] 8024794: e034 b.n 8024800 } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING_2) { 8024796: 4920 ldr r1, [pc, #128] @ (8024818 ) 8024798: 687a ldr r2, [r7, #4] 802479a: 4613 mov r3, r2 802479c: 005b lsls r3, r3, #1 802479e: 4413 add r3, r2 80247a0: 00db lsls r3, r3, #3 80247a2: 440b add r3, r1 80247a4: 3314 adds r3, #20 80247a6: 781b ldrb r3, [r3, #0] 80247a8: 2b04 cmp r3, #4 80247aa: d10a bne.n 80247c2 /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 80247ac: 491a ldr r1, [pc, #104] @ (8024818 ) 80247ae: 687a ldr r2, [r7, #4] 80247b0: 4613 mov r3, r2 80247b2: 005b lsls r3, r3, #1 80247b4: 4413 add r3, r2 80247b6: 00db lsls r3, r3, #3 80247b8: 440b add r3, r1 80247ba: 3314 adds r3, #20 80247bc: 2202 movs r2, #2 80247be: 701a strb r2, [r3, #0] 80247c0: e01e b.n 8024800 } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 80247c2: 4915 ldr r1, [pc, #84] @ (8024818 ) 80247c4: 687a ldr r2, [r7, #4] 80247c6: 4613 mov r3, r2 80247c8: 005b lsls r3, r3, #1 80247ca: 4413 add r3, r2 80247cc: 00db lsls r3, r3, #3 80247ce: 440b add r3, r1 80247d0: 3314 adds r3, #20 80247d2: 781b ldrb r3, [r3, #0] 80247d4: 2b01 cmp r3, #1 80247d6: d113 bne.n 8024800 /* still pending, resend an ARP query */ etharp_request(arp_table[i].netif, &arp_table[i].ipaddr); 80247d8: 490f ldr r1, [pc, #60] @ (8024818 ) 80247da: 687a ldr r2, [r7, #4] 80247dc: 4613 mov r3, r2 80247de: 005b lsls r3, r3, #1 80247e0: 4413 add r3, r2 80247e2: 00db lsls r3, r3, #3 80247e4: 440b add r3, r1 80247e6: 3308 adds r3, #8 80247e8: 6818 ldr r0, [r3, #0] 80247ea: 687a ldr r2, [r7, #4] 80247ec: 4613 mov r3, r2 80247ee: 005b lsls r3, r3, #1 80247f0: 4413 add r3, r2 80247f2: 00db lsls r3, r3, #3 80247f4: 4a08 ldr r2, [pc, #32] @ (8024818 ) 80247f6: 4413 add r3, r2 80247f8: 3304 adds r3, #4 80247fa: 4619 mov r1, r3 80247fc: f000 fe76 bl 80254ec for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8024800: 687b ldr r3, [r7, #4] 8024802: 3301 adds r3, #1 8024804: 607b str r3, [r7, #4] 8024806: 687b ldr r3, [r7, #4] 8024808: 2b09 cmp r3, #9 802480a: f77f af65 ble.w 80246d8 } } } } 802480e: bf00 nop 8024810: bf00 nop 8024812: 3708 adds r7, #8 8024814: 46bd mov sp, r7 8024816: bd80 pop {r7, pc} 8024818: 2402b010 .word 0x2402b010 0802481c : * @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) { 802481c: b580 push {r7, lr} 802481e: b08a sub sp, #40 @ 0x28 8024820: af00 add r7, sp, #0 8024822: 60f8 str r0, [r7, #12] 8024824: 460b mov r3, r1 8024826: 607a str r2, [r7, #4] 8024828: 72fb strb r3, [r7, #11] s16_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; 802482a: 230a movs r3, #10 802482c: 843b strh r3, [r7, #32] 802482e: 230a movs r3, #10 8024830: 847b strh r3, [r7, #34] @ 0x22 s16_t empty = ARP_TABLE_SIZE; 8024832: 230a movs r3, #10 8024834: 84bb strh r3, [r7, #36] @ 0x24 s16_t i = 0; 8024836: 2300 movs r3, #0 8024838: 84fb strh r3, [r7, #38] @ 0x26 /* oldest entry with packets on queue */ s16_t old_queue = ARP_TABLE_SIZE; 802483a: 230a movs r3, #10 802483c: 83fb strh r3, [r7, #30] /* its age */ u16_t age_queue = 0, age_pending = 0, age_stable = 0; 802483e: 2300 movs r3, #0 8024840: 83bb strh r3, [r7, #28] 8024842: 2300 movs r3, #0 8024844: 837b strh r3, [r7, #26] 8024846: 2300 movs r3, #0 8024848: 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) { 802484a: 2300 movs r3, #0 802484c: 84fb strh r3, [r7, #38] @ 0x26 802484e: e0ae b.n 80249ae u8_t state = arp_table[i].state; 8024850: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024854: 49a6 ldr r1, [pc, #664] @ (8024af0 ) 8024856: 4613 mov r3, r2 8024858: 005b lsls r3, r3, #1 802485a: 4413 add r3, r2 802485c: 00db lsls r3, r3, #3 802485e: 440b add r3, r1 8024860: 3314 adds r3, #20 8024862: 781b ldrb r3, [r3, #0] 8024864: 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)) { 8024866: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 802486a: 2b0a cmp r3, #10 802486c: d105 bne.n 802487a 802486e: 7dfb ldrb r3, [r7, #23] 8024870: 2b00 cmp r3, #0 8024872: d102 bne.n 802487a LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %d\n", (int)i)); /* remember first empty entry */ empty = i; 8024874: 8cfb ldrh r3, [r7, #38] @ 0x26 8024876: 84bb strh r3, [r7, #36] @ 0x24 8024878: e095 b.n 80249a6 } else if (state != ETHARP_STATE_EMPTY) { 802487a: 7dfb ldrb r3, [r7, #23] 802487c: 2b00 cmp r3, #0 802487e: f000 8092 beq.w 80249a6 LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", 8024882: 7dfb ldrb r3, [r7, #23] 8024884: 2b01 cmp r3, #1 8024886: d009 beq.n 802489c 8024888: 7dfb ldrb r3, [r7, #23] 802488a: 2b01 cmp r3, #1 802488c: d806 bhi.n 802489c 802488e: 4b99 ldr r3, [pc, #612] @ (8024af4 ) 8024890: f240 1223 movw r2, #291 @ 0x123 8024894: 4998 ldr r1, [pc, #608] @ (8024af8 ) 8024896: 4899 ldr r0, [pc, #612] @ (8024afc ) 8024898: f006 f800 bl 802a89c 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) 802489c: 68fb ldr r3, [r7, #12] 802489e: 2b00 cmp r3, #0 80248a0: d020 beq.n 80248e4 80248a2: 68fb ldr r3, [r7, #12] 80248a4: 6819 ldr r1, [r3, #0] 80248a6: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80248aa: 4891 ldr r0, [pc, #580] @ (8024af0 ) 80248ac: 4613 mov r3, r2 80248ae: 005b lsls r3, r3, #1 80248b0: 4413 add r3, r2 80248b2: 00db lsls r3, r3, #3 80248b4: 4403 add r3, r0 80248b6: 3304 adds r3, #4 80248b8: 681b ldr r3, [r3, #0] 80248ba: 4299 cmp r1, r3 80248bc: d112 bne.n 80248e4 #if ETHARP_TABLE_MATCH_NETIF && ((netif == NULL) || (netif == arp_table[i].netif)) 80248be: 687b ldr r3, [r7, #4] 80248c0: 2b00 cmp r3, #0 80248c2: d00c beq.n 80248de 80248c4: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80248c8: 4989 ldr r1, [pc, #548] @ (8024af0 ) 80248ca: 4613 mov r3, r2 80248cc: 005b lsls r3, r3, #1 80248ce: 4413 add r3, r2 80248d0: 00db lsls r3, r3, #3 80248d2: 440b add r3, r1 80248d4: 3308 adds r3, #8 80248d6: 681b ldr r3, [r3, #0] 80248d8: 687a ldr r2, [r7, #4] 80248da: 429a cmp r2, r3 80248dc: d102 bne.n 80248e4 #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; 80248de: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 80248e2: e100 b.n 8024ae6 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 80248e4: 7dfb ldrb r3, [r7, #23] 80248e6: 2b01 cmp r3, #1 80248e8: d140 bne.n 802496c /* pending with queued packets? */ if (arp_table[i].q != NULL) { 80248ea: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80248ee: 4980 ldr r1, [pc, #512] @ (8024af0 ) 80248f0: 4613 mov r3, r2 80248f2: 005b lsls r3, r3, #1 80248f4: 4413 add r3, r2 80248f6: 00db lsls r3, r3, #3 80248f8: 440b add r3, r1 80248fa: 681b ldr r3, [r3, #0] 80248fc: 2b00 cmp r3, #0 80248fe: d01a beq.n 8024936 if (arp_table[i].ctime >= age_queue) { 8024900: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024904: 497a ldr r1, [pc, #488] @ (8024af0 ) 8024906: 4613 mov r3, r2 8024908: 005b lsls r3, r3, #1 802490a: 4413 add r3, r2 802490c: 00db lsls r3, r3, #3 802490e: 440b add r3, r1 8024910: 3312 adds r3, #18 8024912: 881b ldrh r3, [r3, #0] 8024914: 8bba ldrh r2, [r7, #28] 8024916: 429a cmp r2, r3 8024918: d845 bhi.n 80249a6 old_queue = i; 802491a: 8cfb ldrh r3, [r7, #38] @ 0x26 802491c: 83fb strh r3, [r7, #30] age_queue = arp_table[i].ctime; 802491e: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024922: 4973 ldr r1, [pc, #460] @ (8024af0 ) 8024924: 4613 mov r3, r2 8024926: 005b lsls r3, r3, #1 8024928: 4413 add r3, r2 802492a: 00db lsls r3, r3, #3 802492c: 440b add r3, r1 802492e: 3312 adds r3, #18 8024930: 881b ldrh r3, [r3, #0] 8024932: 83bb strh r3, [r7, #28] 8024934: e037 b.n 80249a6 } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 8024936: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 802493a: 496d ldr r1, [pc, #436] @ (8024af0 ) 802493c: 4613 mov r3, r2 802493e: 005b lsls r3, r3, #1 8024940: 4413 add r3, r2 8024942: 00db lsls r3, r3, #3 8024944: 440b add r3, r1 8024946: 3312 adds r3, #18 8024948: 881b ldrh r3, [r3, #0] 802494a: 8b7a ldrh r2, [r7, #26] 802494c: 429a cmp r2, r3 802494e: d82a bhi.n 80249a6 old_pending = i; 8024950: 8cfb ldrh r3, [r7, #38] @ 0x26 8024952: 843b strh r3, [r7, #32] age_pending = arp_table[i].ctime; 8024954: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024958: 4965 ldr r1, [pc, #404] @ (8024af0 ) 802495a: 4613 mov r3, r2 802495c: 005b lsls r3, r3, #1 802495e: 4413 add r3, r2 8024960: 00db lsls r3, r3, #3 8024962: 440b add r3, r1 8024964: 3312 adds r3, #18 8024966: 881b ldrh r3, [r3, #0] 8024968: 837b strh r3, [r7, #26] 802496a: e01c b.n 80249a6 } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 802496c: 7dfb ldrb r3, [r7, #23] 802496e: 2b01 cmp r3, #1 8024970: d919 bls.n 80249a6 /* 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) { 8024972: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024976: 495e ldr r1, [pc, #376] @ (8024af0 ) 8024978: 4613 mov r3, r2 802497a: 005b lsls r3, r3, #1 802497c: 4413 add r3, r2 802497e: 00db lsls r3, r3, #3 8024980: 440b add r3, r1 8024982: 3312 adds r3, #18 8024984: 881b ldrh r3, [r3, #0] 8024986: 8b3a ldrh r2, [r7, #24] 8024988: 429a cmp r2, r3 802498a: d80c bhi.n 80249a6 old_stable = i; 802498c: 8cfb ldrh r3, [r7, #38] @ 0x26 802498e: 847b strh r3, [r7, #34] @ 0x22 age_stable = arp_table[i].ctime; 8024990: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024994: 4956 ldr r1, [pc, #344] @ (8024af0 ) 8024996: 4613 mov r3, r2 8024998: 005b lsls r3, r3, #1 802499a: 4413 add r3, r2 802499c: 00db lsls r3, r3, #3 802499e: 440b add r3, r1 80249a0: 3312 adds r3, #18 80249a2: 881b ldrh r3, [r3, #0] 80249a4: 833b strh r3, [r7, #24] for (i = 0; i < ARP_TABLE_SIZE; ++i) { 80249a6: 8cfb ldrh r3, [r7, #38] @ 0x26 80249a8: 3301 adds r3, #1 80249aa: b29b uxth r3, r3 80249ac: 84fb strh r3, [r7, #38] @ 0x26 80249ae: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 80249b2: 2b09 cmp r3, #9 80249b4: f77f af4c ble.w 8024850 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 80249b8: 7afb ldrb r3, [r7, #11] 80249ba: f003 0302 and.w r3, r3, #2 80249be: 2b00 cmp r3, #0 80249c0: d108 bne.n 80249d4 80249c2: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 80249c6: 2b0a cmp r3, #10 80249c8: d107 bne.n 80249da /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 80249ca: 7afb ldrb r3, [r7, #11] 80249cc: f003 0301 and.w r3, r3, #1 80249d0: 2b00 cmp r3, #0 80249d2: d102 bne.n 80249da 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; 80249d4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80249d8: e085 b.n 8024ae6 * * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { 80249da: f9b7 3024 ldrsh.w r3, [r7, #36] @ 0x24 80249de: 2b09 cmp r3, #9 80249e0: dc02 bgt.n 80249e8 i = empty; 80249e2: 8cbb ldrh r3, [r7, #36] @ 0x24 80249e4: 84fb strh r3, [r7, #38] @ 0x26 80249e6: e039 b.n 8024a5c 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) { 80249e8: f9b7 3022 ldrsh.w r3, [r7, #34] @ 0x22 80249ec: 2b09 cmp r3, #9 80249ee: dc14 bgt.n 8024a1a /* recycle oldest stable*/ i = old_stable; 80249f0: 8c7b ldrh r3, [r7, #34] @ 0x22 80249f2: 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); 80249f4: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 80249f8: 493d ldr r1, [pc, #244] @ (8024af0 ) 80249fa: 4613 mov r3, r2 80249fc: 005b lsls r3, r3, #1 80249fe: 4413 add r3, r2 8024a00: 00db lsls r3, r3, #3 8024a02: 440b add r3, r1 8024a04: 681b ldr r3, [r3, #0] 8024a06: 2b00 cmp r3, #0 8024a08: d018 beq.n 8024a3c 8024a0a: 4b3a ldr r3, [pc, #232] @ (8024af4 ) 8024a0c: f240 126d movw r2, #365 @ 0x16d 8024a10: 493b ldr r1, [pc, #236] @ (8024b00 ) 8024a12: 483a ldr r0, [pc, #232] @ (8024afc ) 8024a14: f005 ff42 bl 802a89c 8024a18: e010 b.n 8024a3c /* 3) found recyclable pending entry without queued packets? */ } else if (old_pending < ARP_TABLE_SIZE) { 8024a1a: f9b7 3020 ldrsh.w r3, [r7, #32] 8024a1e: 2b09 cmp r3, #9 8024a20: dc02 bgt.n 8024a28 /* recycle oldest pending */ i = old_pending; 8024a22: 8c3b ldrh r3, [r7, #32] 8024a24: 84fb strh r3, [r7, #38] @ 0x26 8024a26: e009 b.n 8024a3c 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) { 8024a28: f9b7 301e ldrsh.w r3, [r7, #30] 8024a2c: 2b09 cmp r3, #9 8024a2e: dc02 bgt.n 8024a36 /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 8024a30: 8bfb ldrh r3, [r7, #30] 8024a32: 84fb strh r3, [r7, #38] @ 0x26 8024a34: e002 b.n 8024a3c 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; 8024a36: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8024a3a: e054 b.n 8024ae6 } /* { empty or recyclable entry found } */ LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 8024a3c: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8024a40: 2b09 cmp r3, #9 8024a42: dd06 ble.n 8024a52 8024a44: 4b2b ldr r3, [pc, #172] @ (8024af4 ) 8024a46: f240 127f movw r2, #383 @ 0x17f 8024a4a: 492e ldr r1, [pc, #184] @ (8024b04 ) 8024a4c: 482b ldr r0, [pc, #172] @ (8024afc ) 8024a4e: f005 ff25 bl 802a89c etharp_free_entry(i); 8024a52: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8024a56: 4618 mov r0, r3 8024a58: f7ff fdd8 bl 802460c } LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); 8024a5c: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 8024a60: 2b09 cmp r3, #9 8024a62: dd06 ble.n 8024a72 8024a64: 4b23 ldr r3, [pc, #140] @ (8024af4 ) 8024a66: f240 1283 movw r2, #387 @ 0x183 8024a6a: 4926 ldr r1, [pc, #152] @ (8024b04 ) 8024a6c: 4823 ldr r0, [pc, #140] @ (8024afc ) 8024a6e: f005 ff15 bl 802a89c LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", 8024a72: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024a76: 491e ldr r1, [pc, #120] @ (8024af0 ) 8024a78: 4613 mov r3, r2 8024a7a: 005b lsls r3, r3, #1 8024a7c: 4413 add r3, r2 8024a7e: 00db lsls r3, r3, #3 8024a80: 440b add r3, r1 8024a82: 3314 adds r3, #20 8024a84: 781b ldrb r3, [r3, #0] 8024a86: 2b00 cmp r3, #0 8024a88: d006 beq.n 8024a98 8024a8a: 4b1a ldr r3, [pc, #104] @ (8024af4 ) 8024a8c: f44f 72c2 mov.w r2, #388 @ 0x184 8024a90: 491d ldr r1, [pc, #116] @ (8024b08 ) 8024a92: 481a ldr r0, [pc, #104] @ (8024afc ) 8024a94: f005 ff02 bl 802a89c arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { 8024a98: 68fb ldr r3, [r7, #12] 8024a9a: 2b00 cmp r3, #0 8024a9c: d00b beq.n 8024ab6 /* set IP address */ ip4_addr_copy(arp_table[i].ipaddr, *ipaddr); 8024a9e: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024aa2: 68fb ldr r3, [r7, #12] 8024aa4: 6819 ldr r1, [r3, #0] 8024aa6: 4812 ldr r0, [pc, #72] @ (8024af0 ) 8024aa8: 4613 mov r3, r2 8024aaa: 005b lsls r3, r3, #1 8024aac: 4413 add r3, r2 8024aae: 00db lsls r3, r3, #3 8024ab0: 4403 add r3, r0 8024ab2: 3304 adds r3, #4 8024ab4: 6019 str r1, [r3, #0] } arp_table[i].ctime = 0; 8024ab6: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024aba: 490d ldr r1, [pc, #52] @ (8024af0 ) 8024abc: 4613 mov r3, r2 8024abe: 005b lsls r3, r3, #1 8024ac0: 4413 add r3, r2 8024ac2: 00db lsls r3, r3, #3 8024ac4: 440b add r3, r1 8024ac6: 3312 adds r3, #18 8024ac8: 2200 movs r2, #0 8024aca: 801a strh r2, [r3, #0] #if ETHARP_TABLE_MATCH_NETIF arp_table[i].netif = netif; 8024acc: f9b7 2026 ldrsh.w r2, [r7, #38] @ 0x26 8024ad0: 4907 ldr r1, [pc, #28] @ (8024af0 ) 8024ad2: 4613 mov r3, r2 8024ad4: 005b lsls r3, r3, #1 8024ad6: 4413 add r3, r2 8024ad8: 00db lsls r3, r3, #3 8024ada: 440b add r3, r1 8024adc: 3308 adds r3, #8 8024ade: 687a ldr r2, [r7, #4] 8024ae0: 601a str r2, [r3, #0] #endif /* ETHARP_TABLE_MATCH_NETIF */ return (s16_t)i; 8024ae2: f9b7 3026 ldrsh.w r3, [r7, #38] @ 0x26 } 8024ae6: 4618 mov r0, r3 8024ae8: 3728 adds r7, #40 @ 0x28 8024aea: 46bd mov sp, r7 8024aec: bd80 pop {r7, pc} 8024aee: bf00 nop 8024af0: 2402b010 .word 0x2402b010 8024af4: 08031224 .word 0x08031224 8024af8: 0803125c .word 0x0803125c 8024afc: 0803129c .word 0x0803129c 8024b00: 080312c4 .word 0x080312c4 8024b04: 080312dc .word 0x080312dc 8024b08: 080312f0 .word 0x080312f0 08024b0c : * * @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) { 8024b0c: b580 push {r7, lr} 8024b0e: b088 sub sp, #32 8024b10: af02 add r7, sp, #8 8024b12: 60f8 str r0, [r7, #12] 8024b14: 60b9 str r1, [r7, #8] 8024b16: 607a str r2, [r7, #4] 8024b18: 70fb strb r3, [r7, #3] s16_t i; LWIP_ASSERT("netif->hwaddr_len == ETH_HWADDR_LEN", netif->hwaddr_len == ETH_HWADDR_LEN); 8024b1a: 68fb ldr r3, [r7, #12] 8024b1c: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8024b20: 2b06 cmp r3, #6 8024b22: d006 beq.n 8024b32 8024b24: 4b48 ldr r3, [pc, #288] @ (8024c48 ) 8024b26: f240 12a9 movw r2, #425 @ 0x1a9 8024b2a: 4948 ldr r1, [pc, #288] @ (8024c4c ) 8024b2c: 4848 ldr r0, [pc, #288] @ (8024c50 ) 8024b2e: f005 feb5 bl 802a89c 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) || 8024b32: 68bb ldr r3, [r7, #8] 8024b34: 2b00 cmp r3, #0 8024b36: d012 beq.n 8024b5e 8024b38: 68bb ldr r3, [r7, #8] 8024b3a: 681b ldr r3, [r3, #0] 8024b3c: 2b00 cmp r3, #0 8024b3e: d00e beq.n 8024b5e ip4_addr_isbroadcast(ipaddr, netif) || 8024b40: 68bb ldr r3, [r7, #8] 8024b42: 681b ldr r3, [r3, #0] 8024b44: 68f9 ldr r1, [r7, #12] 8024b46: 4618 mov r0, r3 8024b48: f001 f952 bl 8025df0 8024b4c: 4603 mov r3, r0 if (ip4_addr_isany(ipaddr) || 8024b4e: 2b00 cmp r3, #0 8024b50: d105 bne.n 8024b5e ip4_addr_ismulticast(ipaddr)) { 8024b52: 68bb ldr r3, [r7, #8] 8024b54: 681b ldr r3, [r3, #0] 8024b56: f003 03f0 and.w r3, r3, #240 @ 0xf0 ip4_addr_isbroadcast(ipaddr, netif) || 8024b5a: 2be0 cmp r3, #224 @ 0xe0 8024b5c: d102 bne.n 8024b64 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; 8024b5e: f06f 030f mvn.w r3, #15 8024b62: e06c b.n 8024c3e } /* find or create ARP entry */ i = etharp_find_entry(ipaddr, flags, netif); 8024b64: 78fb ldrb r3, [r7, #3] 8024b66: 68fa ldr r2, [r7, #12] 8024b68: 4619 mov r1, r3 8024b6a: 68b8 ldr r0, [r7, #8] 8024b6c: f7ff fe56 bl 802481c 8024b70: 4603 mov r3, r0 8024b72: 82fb strh r3, [r7, #22] /* bail out if no entry could be found */ if (i < 0) { 8024b74: f9b7 3016 ldrsh.w r3, [r7, #22] 8024b78: 2b00 cmp r3, #0 8024b7a: da02 bge.n 8024b82 return (err_t)i; 8024b7c: 8afb ldrh r3, [r7, #22] 8024b7e: b25b sxtb r3, r3 8024b80: e05d b.n 8024c3e return ERR_VAL; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 8024b82: f9b7 2016 ldrsh.w r2, [r7, #22] 8024b86: 4933 ldr r1, [pc, #204] @ (8024c54 ) 8024b88: 4613 mov r3, r2 8024b8a: 005b lsls r3, r3, #1 8024b8c: 4413 add r3, r2 8024b8e: 00db lsls r3, r3, #3 8024b90: 440b add r3, r1 8024b92: 3314 adds r3, #20 8024b94: 2202 movs r2, #2 8024b96: 701a strb r2, [r3, #0] } /* record network interface */ arp_table[i].netif = netif; 8024b98: f9b7 2016 ldrsh.w r2, [r7, #22] 8024b9c: 492d ldr r1, [pc, #180] @ (8024c54 ) 8024b9e: 4613 mov r3, r2 8024ba0: 005b lsls r3, r3, #1 8024ba2: 4413 add r3, r2 8024ba4: 00db lsls r3, r3, #3 8024ba6: 440b add r3, r1 8024ba8: 3308 adds r3, #8 8024baa: 68fa ldr r2, [r7, #12] 8024bac: 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); 8024bae: f9b7 2016 ldrsh.w r2, [r7, #22] 8024bb2: 4613 mov r3, r2 8024bb4: 005b lsls r3, r3, #1 8024bb6: 4413 add r3, r2 8024bb8: 00db lsls r3, r3, #3 8024bba: 3308 adds r3, #8 8024bbc: 4a25 ldr r2, [pc, #148] @ (8024c54 ) 8024bbe: 4413 add r3, r2 8024bc0: 3304 adds r3, #4 8024bc2: 2206 movs r2, #6 8024bc4: 6879 ldr r1, [r7, #4] 8024bc6: 4618 mov r0, r3 8024bc8: f006 f8f1 bl 802adae /* reset time stamp */ arp_table[i].ctime = 0; 8024bcc: f9b7 2016 ldrsh.w r2, [r7, #22] 8024bd0: 4920 ldr r1, [pc, #128] @ (8024c54 ) 8024bd2: 4613 mov r3, r2 8024bd4: 005b lsls r3, r3, #1 8024bd6: 4413 add r3, r2 8024bd8: 00db lsls r3, r3, #3 8024bda: 440b add r3, r1 8024bdc: 3312 adds r3, #18 8024bde: 2200 movs r2, #0 8024be0: 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) { 8024be2: f9b7 2016 ldrsh.w r2, [r7, #22] 8024be6: 491b ldr r1, [pc, #108] @ (8024c54 ) 8024be8: 4613 mov r3, r2 8024bea: 005b lsls r3, r3, #1 8024bec: 4413 add r3, r2 8024bee: 00db lsls r3, r3, #3 8024bf0: 440b add r3, r1 8024bf2: 681b ldr r3, [r3, #0] 8024bf4: 2b00 cmp r3, #0 8024bf6: d021 beq.n 8024c3c struct pbuf *p = arp_table[i].q; 8024bf8: f9b7 2016 ldrsh.w r2, [r7, #22] 8024bfc: 4915 ldr r1, [pc, #84] @ (8024c54 ) 8024bfe: 4613 mov r3, r2 8024c00: 005b lsls r3, r3, #1 8024c02: 4413 add r3, r2 8024c04: 00db lsls r3, r3, #3 8024c06: 440b add r3, r1 8024c08: 681b ldr r3, [r3, #0] 8024c0a: 613b str r3, [r7, #16] arp_table[i].q = NULL; 8024c0c: f9b7 2016 ldrsh.w r2, [r7, #22] 8024c10: 4910 ldr r1, [pc, #64] @ (8024c54 ) 8024c12: 4613 mov r3, r2 8024c14: 005b lsls r3, r3, #1 8024c16: 4413 add r3, r2 8024c18: 00db lsls r3, r3, #3 8024c1a: 440b add r3, r1 8024c1c: 2200 movs r2, #0 8024c1e: 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); 8024c20: 68fb ldr r3, [r7, #12] 8024c22: f103 022a add.w r2, r3, #42 @ 0x2a 8024c26: f44f 6300 mov.w r3, #2048 @ 0x800 8024c2a: 9300 str r3, [sp, #0] 8024c2c: 687b ldr r3, [r7, #4] 8024c2e: 6939 ldr r1, [r7, #16] 8024c30: 68f8 ldr r0, [r7, #12] 8024c32: f002 f9bb bl 8026fac /* free the queued IP packet */ pbuf_free(p); 8024c36: 6938 ldr r0, [r7, #16] 8024c38: f7f6 fbb8 bl 801b3ac } return ERR_OK; 8024c3c: 2300 movs r3, #0 } 8024c3e: 4618 mov r0, r3 8024c40: 3718 adds r7, #24 8024c42: 46bd mov sp, r7 8024c44: bd80 pop {r7, pc} 8024c46: bf00 nop 8024c48: 08031224 .word 0x08031224 8024c4c: 0803131c .word 0x0803131c 8024c50: 0803129c .word 0x0803129c 8024c54: 2402b010 .word 0x2402b010 08024c58 : * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 8024c58: b580 push {r7, lr} 8024c5a: b084 sub sp, #16 8024c5c: af00 add r7, sp, #0 8024c5e: 6078 str r0, [r7, #4] int i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8024c60: 2300 movs r3, #0 8024c62: 60fb str r3, [r7, #12] 8024c64: e01e b.n 8024ca4 u8_t state = arp_table[i].state; 8024c66: 4913 ldr r1, [pc, #76] @ (8024cb4 ) 8024c68: 68fa ldr r2, [r7, #12] 8024c6a: 4613 mov r3, r2 8024c6c: 005b lsls r3, r3, #1 8024c6e: 4413 add r3, r2 8024c70: 00db lsls r3, r3, #3 8024c72: 440b add r3, r1 8024c74: 3314 adds r3, #20 8024c76: 781b ldrb r3, [r3, #0] 8024c78: 72fb strb r3, [r7, #11] if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { 8024c7a: 7afb ldrb r3, [r7, #11] 8024c7c: 2b00 cmp r3, #0 8024c7e: d00e beq.n 8024c9e 8024c80: 490c ldr r1, [pc, #48] @ (8024cb4 ) 8024c82: 68fa ldr r2, [r7, #12] 8024c84: 4613 mov r3, r2 8024c86: 005b lsls r3, r3, #1 8024c88: 4413 add r3, r2 8024c8a: 00db lsls r3, r3, #3 8024c8c: 440b add r3, r1 8024c8e: 3308 adds r3, #8 8024c90: 681b ldr r3, [r3, #0] 8024c92: 687a ldr r2, [r7, #4] 8024c94: 429a cmp r2, r3 8024c96: d102 bne.n 8024c9e etharp_free_entry(i); 8024c98: 68f8 ldr r0, [r7, #12] 8024c9a: f7ff fcb7 bl 802460c for (i = 0; i < ARP_TABLE_SIZE; ++i) { 8024c9e: 68fb ldr r3, [r7, #12] 8024ca0: 3301 adds r3, #1 8024ca2: 60fb str r3, [r7, #12] 8024ca4: 68fb ldr r3, [r7, #12] 8024ca6: 2b09 cmp r3, #9 8024ca8: dddd ble.n 8024c66 } } } 8024caa: bf00 nop 8024cac: bf00 nop 8024cae: 3710 adds r7, #16 8024cb0: 46bd mov sp, r7 8024cb2: bd80 pop {r7, pc} 8024cb4: 2402b010 .word 0x2402b010 08024cb8 : * * @see pbuf_free() */ void etharp_input(struct pbuf *p, struct netif *netif) { 8024cb8: b5b0 push {r4, r5, r7, lr} 8024cba: b08a sub sp, #40 @ 0x28 8024cbc: af04 add r7, sp, #16 8024cbe: 6078 str r0, [r7, #4] 8024cc0: 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(); 8024cc2: f7ec f9c1 bl 8011048 LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8024cc6: 683b ldr r3, [r7, #0] 8024cc8: 2b00 cmp r3, #0 8024cca: d107 bne.n 8024cdc 8024ccc: 4b3f ldr r3, [pc, #252] @ (8024dcc ) 8024cce: f240 228a movw r2, #650 @ 0x28a 8024cd2: 493f ldr r1, [pc, #252] @ (8024dd0 ) 8024cd4: 483f ldr r0, [pc, #252] @ (8024dd4 ) 8024cd6: f005 fde1 bl 802a89c 8024cda: e074 b.n 8024dc6 hdr = (struct etharp_hdr *)p->payload; 8024cdc: 687b ldr r3, [r7, #4] 8024cde: 685b ldr r3, [r3, #4] 8024ce0: 617b str r3, [r7, #20] /* RFC 826 "Packet Reception": */ if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8024ce2: 697b ldr r3, [r7, #20] 8024ce4: 881b ldrh r3, [r3, #0] 8024ce6: b29b uxth r3, r3 8024ce8: f5b3 7f80 cmp.w r3, #256 @ 0x100 8024cec: d10c bne.n 8024d08 (hdr->hwlen != ETH_HWADDR_LEN) || 8024cee: 697b ldr r3, [r7, #20] 8024cf0: 791b ldrb r3, [r3, #4] if ((hdr->hwtype != PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET)) || 8024cf2: 2b06 cmp r3, #6 8024cf4: d108 bne.n 8024d08 (hdr->protolen != sizeof(ip4_addr_t)) || 8024cf6: 697b ldr r3, [r7, #20] 8024cf8: 795b ldrb r3, [r3, #5] (hdr->hwlen != ETH_HWADDR_LEN) || 8024cfa: 2b04 cmp r3, #4 8024cfc: d104 bne.n 8024d08 (hdr->proto != PP_HTONS(ETHTYPE_IP))) { 8024cfe: 697b ldr r3, [r7, #20] 8024d00: 885b ldrh r3, [r3, #2] 8024d02: b29b uxth r3, r3 (hdr->protolen != sizeof(ip4_addr_t)) || 8024d04: 2b08 cmp r3, #8 8024d06: d003 beq.n 8024d10 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); 8024d08: 6878 ldr r0, [r7, #4] 8024d0a: f7f6 fb4f bl 801b3ac return; 8024d0e: e05a b.n 8024dc6 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); 8024d10: 697b ldr r3, [r7, #20] 8024d12: 330e adds r3, #14 8024d14: 681b ldr r3, [r3, #0] 8024d16: 60fb str r3, [r7, #12] IPADDR_WORDALIGNED_COPY_TO_IP4_ADDR_T(&dipaddr, &hdr->dipaddr); 8024d18: 697b ldr r3, [r7, #20] 8024d1a: 3318 adds r3, #24 8024d1c: 681b ldr r3, [r3, #0] 8024d1e: 60bb str r3, [r7, #8] /* this interface is not configured? */ if (ip4_addr_isany_val(*netif_ip4_addr(netif))) { 8024d20: 683b ldr r3, [r7, #0] 8024d22: 3304 adds r3, #4 8024d24: 681b ldr r3, [r3, #0] 8024d26: 2b00 cmp r3, #0 8024d28: d102 bne.n 8024d30 for_us = 0; 8024d2a: 2300 movs r3, #0 8024d2c: 74fb strb r3, [r7, #19] 8024d2e: e009 b.n 8024d44 } else { /* ARP packet directed to us? */ for_us = (u8_t)ip4_addr_cmp(&dipaddr, netif_ip4_addr(netif)); 8024d30: 68ba ldr r2, [r7, #8] 8024d32: 683b ldr r3, [r7, #0] 8024d34: 3304 adds r3, #4 8024d36: 681b ldr r3, [r3, #0] 8024d38: 429a cmp r2, r3 8024d3a: bf0c ite eq 8024d3c: 2301 moveq r3, #1 8024d3e: 2300 movne r3, #0 8024d40: b2db uxtb r3, r3 8024d42: 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), 8024d44: 697b ldr r3, [r7, #20] 8024d46: f103 0208 add.w r2, r3, #8 8024d4a: 7cfb ldrb r3, [r7, #19] 8024d4c: 2b00 cmp r3, #0 8024d4e: d001 beq.n 8024d54 8024d50: 2301 movs r3, #1 8024d52: e000 b.n 8024d56 8024d54: 2302 movs r3, #2 8024d56: f107 010c add.w r1, r7, #12 8024d5a: 6838 ldr r0, [r7, #0] 8024d5c: f7ff fed6 bl 8024b0c for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); /* now act on the message itself */ switch (hdr->opcode) { 8024d60: 697b ldr r3, [r7, #20] 8024d62: 88db ldrh r3, [r3, #6] 8024d64: b29b uxth r3, r3 8024d66: f5b3 7f80 cmp.w r3, #256 @ 0x100 8024d6a: d003 beq.n 8024d74 8024d6c: f5b3 7f00 cmp.w r3, #512 @ 0x200 8024d70: d01e beq.n 8024db0 #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; 8024d72: e025 b.n 8024dc0 if (for_us) { 8024d74: 7cfb ldrb r3, [r7, #19] 8024d76: 2b00 cmp r3, #0 8024d78: d021 beq.n 8024dbe (struct eth_addr *)netif->hwaddr, &hdr->shwaddr, 8024d7a: 683b ldr r3, [r7, #0] 8024d7c: f103 002a add.w r0, r3, #42 @ 0x2a 8024d80: 697b ldr r3, [r7, #20] 8024d82: f103 0408 add.w r4, r3, #8 (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), 8024d86: 683b ldr r3, [r7, #0] 8024d88: f103 052a add.w r5, r3, #42 @ 0x2a 8024d8c: 683b ldr r3, [r7, #0] 8024d8e: 3304 adds r3, #4 &hdr->shwaddr, &sipaddr, 8024d90: 697a ldr r2, [r7, #20] 8024d92: 3208 adds r2, #8 etharp_raw(netif, 8024d94: 2102 movs r1, #2 8024d96: 9103 str r1, [sp, #12] 8024d98: f107 010c add.w r1, r7, #12 8024d9c: 9102 str r1, [sp, #8] 8024d9e: 9201 str r2, [sp, #4] 8024da0: 9300 str r3, [sp, #0] 8024da2: 462b mov r3, r5 8024da4: 4622 mov r2, r4 8024da6: 4601 mov r1, r0 8024da8: 6838 ldr r0, [r7, #0] 8024daa: f000 faf1 bl 8025390 break; 8024dae: e006 b.n 8024dbe dhcp_arp_reply(netif, &sipaddr); 8024db0: f107 030c add.w r3, r7, #12 8024db4: 4619 mov r1, r3 8024db6: 6838 ldr r0, [r7, #0] 8024db8: f7fe f9b6 bl 8023128 break; 8024dbc: e000 b.n 8024dc0 break; 8024dbe: bf00 nop } /* free ARP packet */ pbuf_free(p); 8024dc0: 6878 ldr r0, [r7, #4] 8024dc2: f7f6 faf3 bl 801b3ac } 8024dc6: 3718 adds r7, #24 8024dc8: 46bd mov sp, r7 8024dca: bdb0 pop {r4, r5, r7, pc} 8024dcc: 08031224 .word 0x08031224 8024dd0: 08031374 .word 0x08031374 8024dd4: 0803129c .word 0x0803129c 08024dd8 : /** 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) { 8024dd8: b580 push {r7, lr} 8024dda: b086 sub sp, #24 8024ddc: af02 add r7, sp, #8 8024dde: 60f8 str r0, [r7, #12] 8024de0: 60b9 str r1, [r7, #8] 8024de2: 4613 mov r3, r2 8024de4: 71fb strb r3, [r7, #7] LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", 8024de6: 79fa ldrb r2, [r7, #7] 8024de8: 4944 ldr r1, [pc, #272] @ (8024efc ) 8024dea: 4613 mov r3, r2 8024dec: 005b lsls r3, r3, #1 8024dee: 4413 add r3, r2 8024df0: 00db lsls r3, r3, #3 8024df2: 440b add r3, r1 8024df4: 3314 adds r3, #20 8024df6: 781b ldrb r3, [r3, #0] 8024df8: 2b01 cmp r3, #1 8024dfa: d806 bhi.n 8024e0a 8024dfc: 4b40 ldr r3, [pc, #256] @ (8024f00 ) 8024dfe: f240 22ee movw r2, #750 @ 0x2ee 8024e02: 4940 ldr r1, [pc, #256] @ (8024f04 ) 8024e04: 4840 ldr r0, [pc, #256] @ (8024f08 ) 8024e06: f005 fd49 bl 802a89c 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) { 8024e0a: 79fa ldrb r2, [r7, #7] 8024e0c: 493b ldr r1, [pc, #236] @ (8024efc ) 8024e0e: 4613 mov r3, r2 8024e10: 005b lsls r3, r3, #1 8024e12: 4413 add r3, r2 8024e14: 00db lsls r3, r3, #3 8024e16: 440b add r3, r1 8024e18: 3314 adds r3, #20 8024e1a: 781b ldrb r3, [r3, #0] 8024e1c: 2b02 cmp r3, #2 8024e1e: d153 bne.n 8024ec8 if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_BROADCAST) { 8024e20: 79fa ldrb r2, [r7, #7] 8024e22: 4936 ldr r1, [pc, #216] @ (8024efc ) 8024e24: 4613 mov r3, r2 8024e26: 005b lsls r3, r3, #1 8024e28: 4413 add r3, r2 8024e2a: 00db lsls r3, r3, #3 8024e2c: 440b add r3, r1 8024e2e: 3312 adds r3, #18 8024e30: 881b ldrh r3, [r3, #0] 8024e32: f5b3 7f8e cmp.w r3, #284 @ 0x11c 8024e36: d919 bls.n 8024e6c /* issue a standard request using broadcast */ if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 8024e38: 79fa ldrb r2, [r7, #7] 8024e3a: 4613 mov r3, r2 8024e3c: 005b lsls r3, r3, #1 8024e3e: 4413 add r3, r2 8024e40: 00db lsls r3, r3, #3 8024e42: 4a2e ldr r2, [pc, #184] @ (8024efc ) 8024e44: 4413 add r3, r2 8024e46: 3304 adds r3, #4 8024e48: 4619 mov r1, r3 8024e4a: 68f8 ldr r0, [r7, #12] 8024e4c: f000 fb4e bl 80254ec 8024e50: 4603 mov r3, r0 8024e52: 2b00 cmp r3, #0 8024e54: d138 bne.n 8024ec8 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 8024e56: 79fa ldrb r2, [r7, #7] 8024e58: 4928 ldr r1, [pc, #160] @ (8024efc ) 8024e5a: 4613 mov r3, r2 8024e5c: 005b lsls r3, r3, #1 8024e5e: 4413 add r3, r2 8024e60: 00db lsls r3, r3, #3 8024e62: 440b add r3, r1 8024e64: 3314 adds r3, #20 8024e66: 2203 movs r2, #3 8024e68: 701a strb r2, [r3, #0] 8024e6a: e02d b.n 8024ec8 } } else if (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED_UNICAST) { 8024e6c: 79fa ldrb r2, [r7, #7] 8024e6e: 4923 ldr r1, [pc, #140] @ (8024efc ) 8024e70: 4613 mov r3, r2 8024e72: 005b lsls r3, r3, #1 8024e74: 4413 add r3, r2 8024e76: 00db lsls r3, r3, #3 8024e78: 440b add r3, r1 8024e7a: 3312 adds r3, #18 8024e7c: 881b ldrh r3, [r3, #0] 8024e7e: f5b3 7f87 cmp.w r3, #270 @ 0x10e 8024e82: d321 bcc.n 8024ec8 /* 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) { 8024e84: 79fa ldrb r2, [r7, #7] 8024e86: 4613 mov r3, r2 8024e88: 005b lsls r3, r3, #1 8024e8a: 4413 add r3, r2 8024e8c: 00db lsls r3, r3, #3 8024e8e: 4a1b ldr r2, [pc, #108] @ (8024efc ) 8024e90: 4413 add r3, r2 8024e92: 1d19 adds r1, r3, #4 8024e94: 79fa ldrb r2, [r7, #7] 8024e96: 4613 mov r3, r2 8024e98: 005b lsls r3, r3, #1 8024e9a: 4413 add r3, r2 8024e9c: 00db lsls r3, r3, #3 8024e9e: 3308 adds r3, #8 8024ea0: 4a16 ldr r2, [pc, #88] @ (8024efc ) 8024ea2: 4413 add r3, r2 8024ea4: 3304 adds r3, #4 8024ea6: 461a mov r2, r3 8024ea8: 68f8 ldr r0, [r7, #12] 8024eaa: f000 fafd bl 80254a8 8024eae: 4603 mov r3, r0 8024eb0: 2b00 cmp r3, #0 8024eb2: d109 bne.n 8024ec8 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING_1; 8024eb4: 79fa ldrb r2, [r7, #7] 8024eb6: 4911 ldr r1, [pc, #68] @ (8024efc ) 8024eb8: 4613 mov r3, r2 8024eba: 005b lsls r3, r3, #1 8024ebc: 4413 add r3, r2 8024ebe: 00db lsls r3, r3, #3 8024ec0: 440b add r3, r1 8024ec2: 3314 adds r3, #20 8024ec4: 2203 movs r2, #3 8024ec6: 701a strb r2, [r3, #0] } } } return ethernet_output(netif, q, (struct eth_addr *)(netif->hwaddr), &arp_table[arp_idx].ethaddr, ETHTYPE_IP); 8024ec8: 68fb ldr r3, [r7, #12] 8024eca: f103 012a add.w r1, r3, #42 @ 0x2a 8024ece: 79fa ldrb r2, [r7, #7] 8024ed0: 4613 mov r3, r2 8024ed2: 005b lsls r3, r3, #1 8024ed4: 4413 add r3, r2 8024ed6: 00db lsls r3, r3, #3 8024ed8: 3308 adds r3, #8 8024eda: 4a08 ldr r2, [pc, #32] @ (8024efc ) 8024edc: 4413 add r3, r2 8024ede: 3304 adds r3, #4 8024ee0: f44f 6200 mov.w r2, #2048 @ 0x800 8024ee4: 9200 str r2, [sp, #0] 8024ee6: 460a mov r2, r1 8024ee8: 68b9 ldr r1, [r7, #8] 8024eea: 68f8 ldr r0, [r7, #12] 8024eec: f002 f85e bl 8026fac 8024ef0: 4603 mov r3, r0 } 8024ef2: 4618 mov r0, r3 8024ef4: 3710 adds r7, #16 8024ef6: 46bd mov sp, r7 8024ef8: bd80 pop {r7, pc} 8024efa: bf00 nop 8024efc: 2402b010 .word 0x2402b010 8024f00: 08031224 .word 0x08031224 8024f04: 08031394 .word 0x08031394 8024f08: 0803129c .word 0x0803129c 08024f0c : * - 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) { 8024f0c: b580 push {r7, lr} 8024f0e: b08a sub sp, #40 @ 0x28 8024f10: af02 add r7, sp, #8 8024f12: 60f8 str r0, [r7, #12] 8024f14: 60b9 str r1, [r7, #8] 8024f16: 607a str r2, [r7, #4] const struct eth_addr *dest; struct eth_addr mcastaddr; const ip4_addr_t *dst_addr = ipaddr; 8024f18: 687b ldr r3, [r7, #4] 8024f1a: 61bb str r3, [r7, #24] LWIP_ASSERT_CORE_LOCKED(); 8024f1c: f7ec f894 bl 8011048 LWIP_ASSERT("netif != NULL", netif != NULL); 8024f20: 68fb ldr r3, [r7, #12] 8024f22: 2b00 cmp r3, #0 8024f24: d106 bne.n 8024f34 8024f26: 4b73 ldr r3, [pc, #460] @ (80250f4 ) 8024f28: f240 321e movw r2, #798 @ 0x31e 8024f2c: 4972 ldr r1, [pc, #456] @ (80250f8 ) 8024f2e: 4873 ldr r0, [pc, #460] @ (80250fc ) 8024f30: f005 fcb4 bl 802a89c LWIP_ASSERT("q != NULL", q != NULL); 8024f34: 68bb ldr r3, [r7, #8] 8024f36: 2b00 cmp r3, #0 8024f38: d106 bne.n 8024f48 8024f3a: 4b6e ldr r3, [pc, #440] @ (80250f4 ) 8024f3c: f240 321f movw r2, #799 @ 0x31f 8024f40: 496f ldr r1, [pc, #444] @ (8025100 ) 8024f42: 486e ldr r0, [pc, #440] @ (80250fc ) 8024f44: f005 fcaa bl 802a89c LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); 8024f48: 687b ldr r3, [r7, #4] 8024f4a: 2b00 cmp r3, #0 8024f4c: d106 bne.n 8024f5c 8024f4e: 4b69 ldr r3, [pc, #420] @ (80250f4 ) 8024f50: f44f 7248 mov.w r2, #800 @ 0x320 8024f54: 496b ldr r1, [pc, #428] @ (8025104 ) 8024f56: 4869 ldr r0, [pc, #420] @ (80250fc ) 8024f58: f005 fca0 bl 802a89c /* 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)) { 8024f5c: 687b ldr r3, [r7, #4] 8024f5e: 681b ldr r3, [r3, #0] 8024f60: 68f9 ldr r1, [r7, #12] 8024f62: 4618 mov r0, r3 8024f64: f000 ff44 bl 8025df0 8024f68: 4603 mov r3, r0 8024f6a: 2b00 cmp r3, #0 8024f6c: d002 beq.n 8024f74 /* broadcast on Ethernet also */ dest = (const struct eth_addr *)ðbroadcast; 8024f6e: 4b66 ldr r3, [pc, #408] @ (8025108 ) 8024f70: 61fb str r3, [r7, #28] 8024f72: e0af b.n 80250d4 /* multicast destination IP address? */ } else if (ip4_addr_ismulticast(ipaddr)) { 8024f74: 687b ldr r3, [r7, #4] 8024f76: 681b ldr r3, [r3, #0] 8024f78: f003 03f0 and.w r3, r3, #240 @ 0xf0 8024f7c: 2be0 cmp r3, #224 @ 0xe0 8024f7e: d118 bne.n 8024fb2 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_IP4_MULTICAST_ADDR_0; 8024f80: 2301 movs r3, #1 8024f82: 743b strb r3, [r7, #16] mcastaddr.addr[1] = LL_IP4_MULTICAST_ADDR_1; 8024f84: 2300 movs r3, #0 8024f86: 747b strb r3, [r7, #17] mcastaddr.addr[2] = LL_IP4_MULTICAST_ADDR_2; 8024f88: 235e movs r3, #94 @ 0x5e 8024f8a: 74bb strb r3, [r7, #18] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 8024f8c: 687b ldr r3, [r7, #4] 8024f8e: 3301 adds r3, #1 8024f90: 781b ldrb r3, [r3, #0] 8024f92: f003 037f and.w r3, r3, #127 @ 0x7f 8024f96: b2db uxtb r3, r3 8024f98: 74fb strb r3, [r7, #19] mcastaddr.addr[4] = ip4_addr3(ipaddr); 8024f9a: 687b ldr r3, [r7, #4] 8024f9c: 3302 adds r3, #2 8024f9e: 781b ldrb r3, [r3, #0] 8024fa0: 753b strb r3, [r7, #20] mcastaddr.addr[5] = ip4_addr4(ipaddr); 8024fa2: 687b ldr r3, [r7, #4] 8024fa4: 3303 adds r3, #3 8024fa6: 781b ldrb r3, [r3, #0] 8024fa8: 757b strb r3, [r7, #21] /* destination Ethernet address is multicast */ dest = &mcastaddr; 8024faa: f107 0310 add.w r3, r7, #16 8024fae: 61fb str r3, [r7, #28] 8024fb0: e090 b.n 80250d4 /* 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)) && 8024fb2: 687b ldr r3, [r7, #4] 8024fb4: 681a ldr r2, [r3, #0] 8024fb6: 68fb ldr r3, [r7, #12] 8024fb8: 3304 adds r3, #4 8024fba: 681b ldr r3, [r3, #0] 8024fbc: 405a eors r2, r3 8024fbe: 68fb ldr r3, [r7, #12] 8024fc0: 3308 adds r3, #8 8024fc2: 681b ldr r3, [r3, #0] 8024fc4: 4013 ands r3, r2 8024fc6: 2b00 cmp r3, #0 8024fc8: d012 beq.n 8024ff0 !ip4_addr_islinklocal(ipaddr)) { 8024fca: 687b ldr r3, [r7, #4] 8024fcc: 681b ldr r3, [r3, #0] 8024fce: b29b uxth r3, r3 if (!ip4_addr_netcmp(ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) && 8024fd0: f64f 62a9 movw r2, #65193 @ 0xfea9 8024fd4: 4293 cmp r3, r2 8024fd6: d00b beq.n 8024ff0 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))) { 8024fd8: 68fb ldr r3, [r7, #12] 8024fda: 330c adds r3, #12 8024fdc: 681b ldr r3, [r3, #0] 8024fde: 2b00 cmp r3, #0 8024fe0: d003 beq.n 8024fea /* send to hardware address of default gateway IP address */ dst_addr = netif_ip4_gw(netif); 8024fe2: 68fb ldr r3, [r7, #12] 8024fe4: 330c adds r3, #12 8024fe6: 61bb str r3, [r7, #24] 8024fe8: e002 b.n 8024ff0 /* no default gateway available */ } else { /* no route to destination error (default gateway missing) */ return ERR_RTE; 8024fea: f06f 0303 mvn.w r3, #3 8024fee: e07d b.n 80250ec 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) && 8024ff0: 4b46 ldr r3, [pc, #280] @ (802510c ) 8024ff2: 781b ldrb r3, [r3, #0] 8024ff4: 4619 mov r1, r3 8024ff6: 4a46 ldr r2, [pc, #280] @ (8025110 ) 8024ff8: 460b mov r3, r1 8024ffa: 005b lsls r3, r3, #1 8024ffc: 440b add r3, r1 8024ffe: 00db lsls r3, r3, #3 8025000: 4413 add r3, r2 8025002: 3314 adds r3, #20 8025004: 781b ldrb r3, [r3, #0] 8025006: 2b01 cmp r3, #1 8025008: d925 bls.n 8025056 #if ETHARP_TABLE_MATCH_NETIF (arp_table[etharp_cached_entry].netif == netif) && 802500a: 4b40 ldr r3, [pc, #256] @ (802510c ) 802500c: 781b ldrb r3, [r3, #0] 802500e: 4619 mov r1, r3 8025010: 4a3f ldr r2, [pc, #252] @ (8025110 ) 8025012: 460b mov r3, r1 8025014: 005b lsls r3, r3, #1 8025016: 440b add r3, r1 8025018: 00db lsls r3, r3, #3 802501a: 4413 add r3, r2 802501c: 3308 adds r3, #8 802501e: 681b ldr r3, [r3, #0] if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 8025020: 68fa ldr r2, [r7, #12] 8025022: 429a cmp r2, r3 8025024: d117 bne.n 8025056 #endif (ip4_addr_cmp(dst_addr, &arp_table[etharp_cached_entry].ipaddr))) { 8025026: 69bb ldr r3, [r7, #24] 8025028: 681a ldr r2, [r3, #0] 802502a: 4b38 ldr r3, [pc, #224] @ (802510c ) 802502c: 781b ldrb r3, [r3, #0] 802502e: 4618 mov r0, r3 8025030: 4937 ldr r1, [pc, #220] @ (8025110 ) 8025032: 4603 mov r3, r0 8025034: 005b lsls r3, r3, #1 8025036: 4403 add r3, r0 8025038: 00db lsls r3, r3, #3 802503a: 440b add r3, r1 802503c: 3304 adds r3, #4 802503e: 681b ldr r3, [r3, #0] (arp_table[etharp_cached_entry].netif == netif) && 8025040: 429a cmp r2, r3 8025042: d108 bne.n 8025056 /* 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); 8025044: 4b31 ldr r3, [pc, #196] @ (802510c ) 8025046: 781b ldrb r3, [r3, #0] 8025048: 461a mov r2, r3 802504a: 68b9 ldr r1, [r7, #8] 802504c: 68f8 ldr r0, [r7, #12] 802504e: f7ff fec3 bl 8024dd8 8025052: 4603 mov r3, r0 8025054: e04a b.n 80250ec } #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++) { 8025056: 2300 movs r3, #0 8025058: 75fb strb r3, [r7, #23] 802505a: e031 b.n 80250c0 if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 802505c: 7dfa ldrb r2, [r7, #23] 802505e: 492c ldr r1, [pc, #176] @ (8025110 ) 8025060: 4613 mov r3, r2 8025062: 005b lsls r3, r3, #1 8025064: 4413 add r3, r2 8025066: 00db lsls r3, r3, #3 8025068: 440b add r3, r1 802506a: 3314 adds r3, #20 802506c: 781b ldrb r3, [r3, #0] 802506e: 2b01 cmp r3, #1 8025070: d923 bls.n 80250ba #if ETHARP_TABLE_MATCH_NETIF (arp_table[i].netif == netif) && 8025072: 7dfa ldrb r2, [r7, #23] 8025074: 4926 ldr r1, [pc, #152] @ (8025110 ) 8025076: 4613 mov r3, r2 8025078: 005b lsls r3, r3, #1 802507a: 4413 add r3, r2 802507c: 00db lsls r3, r3, #3 802507e: 440b add r3, r1 8025080: 3308 adds r3, #8 8025082: 681b ldr r3, [r3, #0] if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 8025084: 68fa ldr r2, [r7, #12] 8025086: 429a cmp r2, r3 8025088: d117 bne.n 80250ba #endif (ip4_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { 802508a: 69bb ldr r3, [r7, #24] 802508c: 6819 ldr r1, [r3, #0] 802508e: 7dfa ldrb r2, [r7, #23] 8025090: 481f ldr r0, [pc, #124] @ (8025110 ) 8025092: 4613 mov r3, r2 8025094: 005b lsls r3, r3, #1 8025096: 4413 add r3, r2 8025098: 00db lsls r3, r3, #3 802509a: 4403 add r3, r0 802509c: 3304 adds r3, #4 802509e: 681b ldr r3, [r3, #0] (arp_table[i].netif == netif) && 80250a0: 4299 cmp r1, r3 80250a2: d10a bne.n 80250ba /* found an existing, stable entry */ ETHARP_SET_ADDRHINT(netif, i); 80250a4: 4a19 ldr r2, [pc, #100] @ (802510c ) 80250a6: 7dfb ldrb r3, [r7, #23] 80250a8: 7013 strb r3, [r2, #0] return etharp_output_to_arp_index(netif, q, i); 80250aa: 7dfb ldrb r3, [r7, #23] 80250ac: 461a mov r2, r3 80250ae: 68b9 ldr r1, [r7, #8] 80250b0: 68f8 ldr r0, [r7, #12] 80250b2: f7ff fe91 bl 8024dd8 80250b6: 4603 mov r3, r0 80250b8: e018 b.n 80250ec for (i = 0; i < ARP_TABLE_SIZE; i++) { 80250ba: 7dfb ldrb r3, [r7, #23] 80250bc: 3301 adds r3, #1 80250be: 75fb strb r3, [r7, #23] 80250c0: 7dfb ldrb r3, [r7, #23] 80250c2: 2b09 cmp r3, #9 80250c4: d9ca bls.n 802505c } } /* no stable entry found, use the (slower) query function: queue on destination Ethernet address belonging to ipaddr */ return etharp_query(netif, dst_addr, q); 80250c6: 68ba ldr r2, [r7, #8] 80250c8: 69b9 ldr r1, [r7, #24] 80250ca: 68f8 ldr r0, [r7, #12] 80250cc: f000 f822 bl 8025114 80250d0: 4603 mov r3, r0 80250d2: e00b b.n 80250ec } /* 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); 80250d4: 68fb ldr r3, [r7, #12] 80250d6: f103 022a add.w r2, r3, #42 @ 0x2a 80250da: f44f 6300 mov.w r3, #2048 @ 0x800 80250de: 9300 str r3, [sp, #0] 80250e0: 69fb ldr r3, [r7, #28] 80250e2: 68b9 ldr r1, [r7, #8] 80250e4: 68f8 ldr r0, [r7, #12] 80250e6: f001 ff61 bl 8026fac 80250ea: 4603 mov r3, r0 } 80250ec: 4618 mov r0, r3 80250ee: 3720 adds r7, #32 80250f0: 46bd mov sp, r7 80250f2: bd80 pop {r7, pc} 80250f4: 08031224 .word 0x08031224 80250f8: 08031374 .word 0x08031374 80250fc: 0803129c .word 0x0803129c 8025100: 080313c4 .word 0x080313c4 8025104: 08031364 .word 0x08031364 8025108: 08031cb0 .word 0x08031cb0 802510c: 2402b100 .word 0x2402b100 8025110: 2402b010 .word 0x2402b010 08025114 : * - 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) { 8025114: b580 push {r7, lr} 8025116: b08c sub sp, #48 @ 0x30 8025118: af02 add r7, sp, #8 802511a: 60f8 str r0, [r7, #12] 802511c: 60b9 str r1, [r7, #8] 802511e: 607a str r2, [r7, #4] struct eth_addr *srcaddr = (struct eth_addr *)netif->hwaddr; 8025120: 68fb ldr r3, [r7, #12] 8025122: 332a adds r3, #42 @ 0x2a 8025124: 617b str r3, [r7, #20] err_t result = ERR_MEM; 8025126: 23ff movs r3, #255 @ 0xff 8025128: f887 3027 strb.w r3, [r7, #39] @ 0x27 int is_new_entry = 0; 802512c: 2300 movs r3, #0 802512e: 623b str r3, [r7, #32] s16_t i_err; netif_addr_idx_t i; /* non-unicast address? */ if (ip4_addr_isbroadcast(ipaddr, netif) || 8025130: 68bb ldr r3, [r7, #8] 8025132: 681b ldr r3, [r3, #0] 8025134: 68f9 ldr r1, [r7, #12] 8025136: 4618 mov r0, r3 8025138: f000 fe5a bl 8025df0 802513c: 4603 mov r3, r0 802513e: 2b00 cmp r3, #0 8025140: d10c bne.n 802515c ip4_addr_ismulticast(ipaddr) || 8025142: 68bb ldr r3, [r7, #8] 8025144: 681b ldr r3, [r3, #0] 8025146: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (ip4_addr_isbroadcast(ipaddr, netif) || 802514a: 2be0 cmp r3, #224 @ 0xe0 802514c: d006 beq.n 802515c ip4_addr_ismulticast(ipaddr) || 802514e: 68bb ldr r3, [r7, #8] 8025150: 2b00 cmp r3, #0 8025152: d003 beq.n 802515c ip4_addr_isany(ipaddr)) { 8025154: 68bb ldr r3, [r7, #8] 8025156: 681b ldr r3, [r3, #0] 8025158: 2b00 cmp r3, #0 802515a: d102 bne.n 8025162 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; 802515c: f06f 030f mvn.w r3, #15 8025160: e101 b.n 8025366 } /* find entry in ARP cache, ask to create entry if queueing packet */ i_err = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD, netif); 8025162: 68fa ldr r2, [r7, #12] 8025164: 2101 movs r1, #1 8025166: 68b8 ldr r0, [r7, #8] 8025168: f7ff fb58 bl 802481c 802516c: 4603 mov r3, r0 802516e: 827b strh r3, [r7, #18] /* could not find or create entry? */ if (i_err < 0) { 8025170: f9b7 3012 ldrsh.w r3, [r7, #18] 8025174: 2b00 cmp r3, #0 8025176: da02 bge.n 802517e 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; 8025178: 8a7b ldrh r3, [r7, #18] 802517a: b25b sxtb r3, r3 802517c: e0f3 b.n 8025366 } LWIP_ASSERT("type overflow", (size_t)i_err < NETIF_ADDR_IDX_MAX); 802517e: 8a7b ldrh r3, [r7, #18] 8025180: 2b7e cmp r3, #126 @ 0x7e 8025182: d906 bls.n 8025192 8025184: 4b7a ldr r3, [pc, #488] @ (8025370 ) 8025186: f240 32c1 movw r2, #961 @ 0x3c1 802518a: 497a ldr r1, [pc, #488] @ (8025374 ) 802518c: 487a ldr r0, [pc, #488] @ (8025378 ) 802518e: f005 fb85 bl 802a89c i = (netif_addr_idx_t)i_err; 8025192: 8a7b ldrh r3, [r7, #18] 8025194: 747b strb r3, [r7, #17] /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 8025196: 7c7a ldrb r2, [r7, #17] 8025198: 4978 ldr r1, [pc, #480] @ (802537c ) 802519a: 4613 mov r3, r2 802519c: 005b lsls r3, r3, #1 802519e: 4413 add r3, r2 80251a0: 00db lsls r3, r3, #3 80251a2: 440b add r3, r1 80251a4: 3314 adds r3, #20 80251a6: 781b ldrb r3, [r3, #0] 80251a8: 2b00 cmp r3, #0 80251aa: d115 bne.n 80251d8 is_new_entry = 1; 80251ac: 2301 movs r3, #1 80251ae: 623b str r3, [r7, #32] arp_table[i].state = ETHARP_STATE_PENDING; 80251b0: 7c7a ldrb r2, [r7, #17] 80251b2: 4972 ldr r1, [pc, #456] @ (802537c ) 80251b4: 4613 mov r3, r2 80251b6: 005b lsls r3, r3, #1 80251b8: 4413 add r3, r2 80251ba: 00db lsls r3, r3, #3 80251bc: 440b add r3, r1 80251be: 3314 adds r3, #20 80251c0: 2201 movs r2, #1 80251c2: 701a strb r2, [r3, #0] /* record network interface for re-sending arp request in etharp_tmr */ arp_table[i].netif = netif; 80251c4: 7c7a ldrb r2, [r7, #17] 80251c6: 496d ldr r1, [pc, #436] @ (802537c ) 80251c8: 4613 mov r3, r2 80251ca: 005b lsls r3, r3, #1 80251cc: 4413 add r3, r2 80251ce: 00db lsls r3, r3, #3 80251d0: 440b add r3, r1 80251d2: 3308 adds r3, #8 80251d4: 68fa ldr r2, [r7, #12] 80251d6: 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", 80251d8: 7c7a ldrb r2, [r7, #17] 80251da: 4968 ldr r1, [pc, #416] @ (802537c ) 80251dc: 4613 mov r3, r2 80251de: 005b lsls r3, r3, #1 80251e0: 4413 add r3, r2 80251e2: 00db lsls r3, r3, #3 80251e4: 440b add r3, r1 80251e6: 3314 adds r3, #20 80251e8: 781b ldrb r3, [r3, #0] 80251ea: 2b01 cmp r3, #1 80251ec: d011 beq.n 8025212 80251ee: 7c7a ldrb r2, [r7, #17] 80251f0: 4962 ldr r1, [pc, #392] @ (802537c ) 80251f2: 4613 mov r3, r2 80251f4: 005b lsls r3, r3, #1 80251f6: 4413 add r3, r2 80251f8: 00db lsls r3, r3, #3 80251fa: 440b add r3, r1 80251fc: 3314 adds r3, #20 80251fe: 781b ldrb r3, [r3, #0] 8025200: 2b01 cmp r3, #1 8025202: d806 bhi.n 8025212 8025204: 4b5a ldr r3, [pc, #360] @ (8025370 ) 8025206: f240 32cd movw r2, #973 @ 0x3cd 802520a: 495d ldr r1, [pc, #372] @ (8025380 ) 802520c: 485a ldr r0, [pc, #360] @ (8025378 ) 802520e: f005 fb45 bl 802a89c ((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)) { 8025212: 6a3b ldr r3, [r7, #32] 8025214: 2b00 cmp r3, #0 8025216: d102 bne.n 802521e 8025218: 687b ldr r3, [r7, #4] 802521a: 2b00 cmp r3, #0 802521c: d10c bne.n 8025238 /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 802521e: 68b9 ldr r1, [r7, #8] 8025220: 68f8 ldr r0, [r7, #12] 8025222: f000 f963 bl 80254ec 8025226: 4603 mov r3, r0 8025228: 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) { 802522c: 687b ldr r3, [r7, #4] 802522e: 2b00 cmp r3, #0 8025230: d102 bne.n 8025238 return result; 8025232: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 8025236: e096 b.n 8025366 } } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); 8025238: 687b ldr r3, [r7, #4] 802523a: 2b00 cmp r3, #0 802523c: d106 bne.n 802524c 802523e: 4b4c ldr r3, [pc, #304] @ (8025370 ) 8025240: f240 32e1 movw r2, #993 @ 0x3e1 8025244: 494f ldr r1, [pc, #316] @ (8025384 ) 8025246: 484c ldr r0, [pc, #304] @ (8025378 ) 8025248: f005 fb28 bl 802a89c /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 802524c: 7c7a ldrb r2, [r7, #17] 802524e: 494b ldr r1, [pc, #300] @ (802537c ) 8025250: 4613 mov r3, r2 8025252: 005b lsls r3, r3, #1 8025254: 4413 add r3, r2 8025256: 00db lsls r3, r3, #3 8025258: 440b add r3, r1 802525a: 3314 adds r3, #20 802525c: 781b ldrb r3, [r3, #0] 802525e: 2b01 cmp r3, #1 8025260: d917 bls.n 8025292 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_ADDRHINT(netif, i); 8025262: 4a49 ldr r2, [pc, #292] @ (8025388 ) 8025264: 7c7b ldrb r3, [r7, #17] 8025266: 7013 strb r3, [r2, #0] /* send the packet */ result = ethernet_output(netif, q, srcaddr, &(arp_table[i].ethaddr), ETHTYPE_IP); 8025268: 7c7a ldrb r2, [r7, #17] 802526a: 4613 mov r3, r2 802526c: 005b lsls r3, r3, #1 802526e: 4413 add r3, r2 8025270: 00db lsls r3, r3, #3 8025272: 3308 adds r3, #8 8025274: 4a41 ldr r2, [pc, #260] @ (802537c ) 8025276: 4413 add r3, r2 8025278: 3304 adds r3, #4 802527a: f44f 6200 mov.w r2, #2048 @ 0x800 802527e: 9200 str r2, [sp, #0] 8025280: 697a ldr r2, [r7, #20] 8025282: 6879 ldr r1, [r7, #4] 8025284: 68f8 ldr r0, [r7, #12] 8025286: f001 fe91 bl 8026fac 802528a: 4603 mov r3, r0 802528c: f887 3027 strb.w r3, [r7, #39] @ 0x27 8025290: e067 b.n 8025362 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 8025292: 7c7a ldrb r2, [r7, #17] 8025294: 4939 ldr r1, [pc, #228] @ (802537c ) 8025296: 4613 mov r3, r2 8025298: 005b lsls r3, r3, #1 802529a: 4413 add r3, r2 802529c: 00db lsls r3, r3, #3 802529e: 440b add r3, r1 80252a0: 3314 adds r3, #20 80252a2: 781b ldrb r3, [r3, #0] 80252a4: 2b01 cmp r3, #1 80252a6: d15c bne.n 8025362 /* entry is still pending, queue the given packet 'q' */ struct pbuf *p; int copy_needed = 0; 80252a8: 2300 movs r3, #0 80252aa: 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; 80252ac: 687b ldr r3, [r7, #4] 80252ae: 61fb str r3, [r7, #28] while (p) { 80252b0: e01c b.n 80252ec LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); 80252b2: 69fb ldr r3, [r7, #28] 80252b4: 895a ldrh r2, [r3, #10] 80252b6: 69fb ldr r3, [r7, #28] 80252b8: 891b ldrh r3, [r3, #8] 80252ba: 429a cmp r2, r3 80252bc: d10a bne.n 80252d4 80252be: 69fb ldr r3, [r7, #28] 80252c0: 681b ldr r3, [r3, #0] 80252c2: 2b00 cmp r3, #0 80252c4: d006 beq.n 80252d4 80252c6: 4b2a ldr r3, [pc, #168] @ (8025370 ) 80252c8: f240 32f1 movw r2, #1009 @ 0x3f1 80252cc: 492f ldr r1, [pc, #188] @ (802538c ) 80252ce: 482a ldr r0, [pc, #168] @ (8025378 ) 80252d0: f005 fae4 bl 802a89c if (PBUF_NEEDS_COPY(p)) { 80252d4: 69fb ldr r3, [r7, #28] 80252d6: 7b1b ldrb r3, [r3, #12] 80252d8: f003 0340 and.w r3, r3, #64 @ 0x40 80252dc: 2b00 cmp r3, #0 80252de: d002 beq.n 80252e6 copy_needed = 1; 80252e0: 2301 movs r3, #1 80252e2: 61bb str r3, [r7, #24] break; 80252e4: e005 b.n 80252f2 } p = p->next; 80252e6: 69fb ldr r3, [r7, #28] 80252e8: 681b ldr r3, [r3, #0] 80252ea: 61fb str r3, [r7, #28] while (p) { 80252ec: 69fb ldr r3, [r7, #28] 80252ee: 2b00 cmp r3, #0 80252f0: d1df bne.n 80252b2 } if (copy_needed) { 80252f2: 69bb ldr r3, [r7, #24] 80252f4: 2b00 cmp r3, #0 80252f6: d007 beq.n 8025308 /* copy the whole packet into new pbufs */ p = pbuf_clone(PBUF_LINK, PBUF_RAM, q); 80252f8: 687a ldr r2, [r7, #4] 80252fa: f44f 7120 mov.w r1, #640 @ 0x280 80252fe: 200e movs r0, #14 8025300: f7f6 facc bl 801b89c 8025304: 61f8 str r0, [r7, #28] 8025306: e004 b.n 8025312 } else { /* referencing the old pbuf is enough */ p = q; 8025308: 687b ldr r3, [r7, #4] 802530a: 61fb str r3, [r7, #28] pbuf_ref(p); 802530c: 69f8 ldr r0, [r7, #28] 802530e: f7f6 f8f3 bl 801b4f8 } /* packet could be taken over? */ if (p != NULL) { 8025312: 69fb ldr r3, [r7, #28] 8025314: 2b00 cmp r3, #0 8025316: d021 beq.n 802535c 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) { 8025318: 7c7a ldrb r2, [r7, #17] 802531a: 4918 ldr r1, [pc, #96] @ (802537c ) 802531c: 4613 mov r3, r2 802531e: 005b lsls r3, r3, #1 8025320: 4413 add r3, r2 8025322: 00db lsls r3, r3, #3 8025324: 440b add r3, r1 8025326: 681b ldr r3, [r3, #0] 8025328: 2b00 cmp r3, #0 802532a: d00a beq.n 8025342 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); 802532c: 7c7a ldrb r2, [r7, #17] 802532e: 4913 ldr r1, [pc, #76] @ (802537c ) 8025330: 4613 mov r3, r2 8025332: 005b lsls r3, r3, #1 8025334: 4413 add r3, r2 8025336: 00db lsls r3, r3, #3 8025338: 440b add r3, r1 802533a: 681b ldr r3, [r3, #0] 802533c: 4618 mov r0, r3 802533e: f7f6 f835 bl 801b3ac } arp_table[i].q = p; 8025342: 7c7a ldrb r2, [r7, #17] 8025344: 490d ldr r1, [pc, #52] @ (802537c ) 8025346: 4613 mov r3, r2 8025348: 005b lsls r3, r3, #1 802534a: 4413 add r3, r2 802534c: 00db lsls r3, r3, #3 802534e: 440b add r3, r1 8025350: 69fa ldr r2, [r7, #28] 8025352: 601a str r2, [r3, #0] result = ERR_OK; 8025354: 2300 movs r3, #0 8025356: f887 3027 strb.w r3, [r7, #39] @ 0x27 802535a: e002 b.n 8025362 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; 802535c: 23ff movs r3, #255 @ 0xff 802535e: f887 3027 strb.w r3, [r7, #39] @ 0x27 } } return result; 8025362: f997 3027 ldrsb.w r3, [r7, #39] @ 0x27 } 8025366: 4618 mov r0, r3 8025368: 3728 adds r7, #40 @ 0x28 802536a: 46bd mov sp, r7 802536c: bd80 pop {r7, pc} 802536e: bf00 nop 8025370: 08031224 .word 0x08031224 8025374: 080313d0 .word 0x080313d0 8025378: 0803129c .word 0x0803129c 802537c: 2402b010 .word 0x2402b010 8025380: 080313e0 .word 0x080313e0 8025384: 080313c4 .word 0x080313c4 8025388: 2402b100 .word 0x2402b100 802538c: 08031408 .word 0x08031408 08025390 : 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) { 8025390: b580 push {r7, lr} 8025392: b08a sub sp, #40 @ 0x28 8025394: af02 add r7, sp, #8 8025396: 60f8 str r0, [r7, #12] 8025398: 60b9 str r1, [r7, #8] 802539a: 607a str r2, [r7, #4] 802539c: 603b str r3, [r7, #0] struct pbuf *p; err_t result = ERR_OK; 802539e: 2300 movs r3, #0 80253a0: 77fb strb r3, [r7, #31] struct etharp_hdr *hdr; LWIP_ASSERT("netif != NULL", netif != NULL); 80253a2: 68fb ldr r3, [r7, #12] 80253a4: 2b00 cmp r3, #0 80253a6: d106 bne.n 80253b6 80253a8: 4b3a ldr r3, [pc, #232] @ (8025494 ) 80253aa: f240 4257 movw r2, #1111 @ 0x457 80253ae: 493a ldr r1, [pc, #232] @ (8025498 ) 80253b0: 483a ldr r0, [pc, #232] @ (802549c ) 80253b2: f005 fa73 bl 802a89c /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_LINK, SIZEOF_ETHARP_HDR, PBUF_RAM); 80253b6: f44f 7220 mov.w r2, #640 @ 0x280 80253ba: 211c movs r1, #28 80253bc: 200e movs r0, #14 80253be: f7f5 fcdf bl 801ad80 80253c2: 61b8 str r0, [r7, #24] /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 80253c4: 69bb ldr r3, [r7, #24] 80253c6: 2b00 cmp r3, #0 80253c8: d102 bne.n 80253d0 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; 80253ca: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80253ce: e05d b.n 802548c } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", 80253d0: 69bb ldr r3, [r7, #24] 80253d2: 895b ldrh r3, [r3, #10] 80253d4: 2b1b cmp r3, #27 80253d6: d806 bhi.n 80253e6 80253d8: 4b2e ldr r3, [pc, #184] @ (8025494 ) 80253da: f240 4262 movw r2, #1122 @ 0x462 80253de: 4930 ldr r1, [pc, #192] @ (80254a0 ) 80253e0: 482e ldr r0, [pc, #184] @ (802549c ) 80253e2: f005 fa5b bl 802a89c (p->len >= SIZEOF_ETHARP_HDR)); hdr = (struct etharp_hdr *)p->payload; 80253e6: 69bb ldr r3, [r7, #24] 80253e8: 685b ldr r3, [r3, #4] 80253ea: 617b str r3, [r7, #20] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = lwip_htons(opcode); 80253ec: 8ebb ldrh r3, [r7, #52] @ 0x34 80253ee: 4618 mov r0, r3 80253f0: f7f4 fafa bl 80199e8 80253f4: 4603 mov r3, r0 80253f6: 461a mov r2, r3 80253f8: 697b ldr r3, [r7, #20] 80253fa: 80da strh r2, [r3, #6] LWIP_ASSERT("netif->hwaddr_len must be the same as ETH_HWADDR_LEN for etharp!", 80253fc: 68fb ldr r3, [r7, #12] 80253fe: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8025402: 2b06 cmp r3, #6 8025404: d006 beq.n 8025414 8025406: 4b23 ldr r3, [pc, #140] @ (8025494 ) 8025408: f240 4269 movw r2, #1129 @ 0x469 802540c: 4925 ldr r1, [pc, #148] @ (80254a4 ) 802540e: 4823 ldr r0, [pc, #140] @ (802549c ) 8025410: f005 fa44 bl 802a89c (netif->hwaddr_len == ETH_HWADDR_LEN)); /* Write the ARP MAC-Addresses */ SMEMCPY(&hdr->shwaddr, hwsrc_addr, ETH_HWADDR_LEN); 8025414: 697b ldr r3, [r7, #20] 8025416: 3308 adds r3, #8 8025418: 2206 movs r2, #6 802541a: 6839 ldr r1, [r7, #0] 802541c: 4618 mov r0, r3 802541e: f005 fcc6 bl 802adae SMEMCPY(&hdr->dhwaddr, hwdst_addr, ETH_HWADDR_LEN); 8025422: 697b ldr r3, [r7, #20] 8025424: 3312 adds r3, #18 8025426: 2206 movs r2, #6 8025428: 6af9 ldr r1, [r7, #44] @ 0x2c 802542a: 4618 mov r0, r3 802542c: f005 fcbf bl 802adae /* 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); 8025430: 697b ldr r3, [r7, #20] 8025432: 330e adds r3, #14 8025434: 6aba ldr r2, [r7, #40] @ 0x28 8025436: 6812 ldr r2, [r2, #0] 8025438: 601a str r2, [r3, #0] IPADDR_WORDALIGNED_COPY_FROM_IP4_ADDR_T(&hdr->dipaddr, ipdst_addr); 802543a: 697b ldr r3, [r7, #20] 802543c: 3318 adds r3, #24 802543e: 6b3a ldr r2, [r7, #48] @ 0x30 8025440: 6812 ldr r2, [r2, #0] 8025442: 601a str r2, [r3, #0] hdr->hwtype = PP_HTONS(LWIP_IANA_HWTYPE_ETHERNET); 8025444: 697b ldr r3, [r7, #20] 8025446: 2200 movs r2, #0 8025448: 701a strb r2, [r3, #0] 802544a: 2200 movs r2, #0 802544c: f042 0201 orr.w r2, r2, #1 8025450: 705a strb r2, [r3, #1] hdr->proto = PP_HTONS(ETHTYPE_IP); 8025452: 697b ldr r3, [r7, #20] 8025454: 2200 movs r2, #0 8025456: f042 0208 orr.w r2, r2, #8 802545a: 709a strb r2, [r3, #2] 802545c: 2200 movs r2, #0 802545e: 70da strb r2, [r3, #3] /* set hwlen and protolen */ hdr->hwlen = ETH_HWADDR_LEN; 8025460: 697b ldr r3, [r7, #20] 8025462: 2206 movs r2, #6 8025464: 711a strb r2, [r3, #4] hdr->protolen = sizeof(ip4_addr_t); 8025466: 697b ldr r3, [r7, #20] 8025468: 2204 movs r2, #4 802546a: 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); 802546c: f640 0306 movw r3, #2054 @ 0x806 8025470: 9300 str r3, [sp, #0] 8025472: 687b ldr r3, [r7, #4] 8025474: 68ba ldr r2, [r7, #8] 8025476: 69b9 ldr r1, [r7, #24] 8025478: 68f8 ldr r0, [r7, #12] 802547a: f001 fd97 bl 8026fac } ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 802547e: 69b8 ldr r0, [r7, #24] 8025480: f7f5 ff94 bl 801b3ac p = NULL; 8025484: 2300 movs r3, #0 8025486: 61bb str r3, [r7, #24] /* could not allocate pbuf for ARP request */ return result; 8025488: f997 301f ldrsb.w r3, [r7, #31] } 802548c: 4618 mov r0, r3 802548e: 3720 adds r7, #32 8025490: 46bd mov sp, r7 8025492: bd80 pop {r7, pc} 8025494: 08031224 .word 0x08031224 8025498: 08031374 .word 0x08031374 802549c: 0803129c .word 0x0803129c 80254a0: 08031424 .word 0x08031424 80254a4: 08031458 .word 0x08031458 080254a8 : * 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) { 80254a8: b580 push {r7, lr} 80254aa: b088 sub sp, #32 80254ac: af04 add r7, sp, #16 80254ae: 60f8 str r0, [r7, #12] 80254b0: 60b9 str r1, [r7, #8] 80254b2: 607a str r2, [r7, #4] return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 80254b4: 68fb ldr r3, [r7, #12] 80254b6: f103 012a add.w r1, r3, #42 @ 0x2a (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif), ðzero, 80254ba: 68fb ldr r3, [r7, #12] 80254bc: f103 002a add.w r0, r3, #42 @ 0x2a 80254c0: 68fb ldr r3, [r7, #12] 80254c2: 3304 adds r3, #4 return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, hw_dst_addr, 80254c4: 2201 movs r2, #1 80254c6: 9203 str r2, [sp, #12] 80254c8: 68ba ldr r2, [r7, #8] 80254ca: 9202 str r2, [sp, #8] 80254cc: 4a06 ldr r2, [pc, #24] @ (80254e8 ) 80254ce: 9201 str r2, [sp, #4] 80254d0: 9300 str r3, [sp, #0] 80254d2: 4603 mov r3, r0 80254d4: 687a ldr r2, [r7, #4] 80254d6: 68f8 ldr r0, [r7, #12] 80254d8: f7ff ff5a bl 8025390 80254dc: 4603 mov r3, r0 ipaddr, ARP_REQUEST); } 80254de: 4618 mov r0, r3 80254e0: 3710 adds r7, #16 80254e2: 46bd mov sp, r7 80254e4: bd80 pop {r7, pc} 80254e6: bf00 nop 80254e8: 08031cb8 .word 0x08031cb8 080254ec : * 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) { 80254ec: b580 push {r7, lr} 80254ee: b082 sub sp, #8 80254f0: af00 add r7, sp, #0 80254f2: 6078 str r0, [r7, #4] 80254f4: 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); 80254f6: 4a05 ldr r2, [pc, #20] @ (802550c ) 80254f8: 6839 ldr r1, [r7, #0] 80254fa: 6878 ldr r0, [r7, #4] 80254fc: f7ff ffd4 bl 80254a8 8025500: 4603 mov r3, r0 } 8025502: 4618 mov r0, r3 8025504: 3708 adds r7, #8 8025506: 46bd mov sp, r7 8025508: bd80 pop {r7, pc} 802550a: bf00 nop 802550c: 08031cb0 .word 0x08031cb0 08025510 : * @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) { 8025510: b580 push {r7, lr} 8025512: b08e sub sp, #56 @ 0x38 8025514: af04 add r7, sp, #16 8025516: 6078 str r0, [r7, #4] 8025518: 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(); 802551a: 4b89 ldr r3, [pc, #548] @ (8025740 ) 802551c: 689b ldr r3, [r3, #8] 802551e: 627b str r3, [r7, #36] @ 0x24 hlen = IPH_HL_BYTES(iphdr_in); 8025520: 6a7b ldr r3, [r7, #36] @ 0x24 8025522: 781b ldrb r3, [r3, #0] 8025524: f003 030f and.w r3, r3, #15 8025528: b2db uxtb r3, r3 802552a: 009b lsls r3, r3, #2 802552c: b2db uxtb r3, r3 802552e: 847b strh r3, [r7, #34] @ 0x22 if (hlen < IP_HLEN) { 8025530: 8c7b ldrh r3, [r7, #34] @ 0x22 8025532: 2b13 cmp r3, #19 8025534: f240 80ed bls.w 8025712 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short IP header (%"S16_F" bytes) received\n", hlen)); goto lenerr; } if (p->len < sizeof(u16_t) * 2) { 8025538: 687b ldr r3, [r7, #4] 802553a: 895b ldrh r3, [r3, #10] 802553c: 2b03 cmp r3, #3 802553e: f240 80ea bls.w 8025716 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 8025542: 687b ldr r3, [r7, #4] 8025544: 685b ldr r3, [r3, #4] 8025546: 781b ldrb r3, [r3, #0] 8025548: f887 3021 strb.w r3, [r7, #33] @ 0x21 #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload) + 1); 802554c: 687b ldr r3, [r7, #4] 802554e: 685b ldr r3, [r3, #4] 8025550: 785b ldrb r3, [r3, #1] 8025552: 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) { 8025556: f897 3021 ldrb.w r3, [r7, #33] @ 0x21 802555a: 2b00 cmp r3, #0 802555c: f000 80d2 beq.w 8025704 8025560: 2b08 cmp r3, #8 8025562: f040 80d2 bne.w 802570a (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(); 8025566: 4b77 ldr r3, [pc, #476] @ (8025744 ) 8025568: 61fb str r3, [r7, #28] /* multicast destination address? */ if (ip4_addr_ismulticast(ip4_current_dest_addr())) { 802556a: 4b75 ldr r3, [pc, #468] @ (8025740 ) 802556c: 695b ldr r3, [r3, #20] 802556e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8025572: 2be0 cmp r3, #224 @ 0xe0 8025574: f000 80d6 beq.w 8025724 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())) { 8025578: 4b71 ldr r3, [pc, #452] @ (8025740 ) 802557a: 695b ldr r3, [r3, #20] 802557c: 4a70 ldr r2, [pc, #448] @ (8025740 ) 802557e: 6812 ldr r2, [r2, #0] 8025580: 4611 mov r1, r2 8025582: 4618 mov r0, r3 8025584: f000 fc34 bl 8025df0 8025588: 4603 mov r3, r0 802558a: 2b00 cmp r3, #0 802558c: f040 80cc bne.w 8025728 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)) { 8025590: 687b ldr r3, [r7, #4] 8025592: 891b ldrh r3, [r3, #8] 8025594: 2b07 cmp r3, #7 8025596: f240 80c0 bls.w 802571a 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) { 802559a: 6878 ldr r0, [r7, #4] 802559c: f7f4 fac1 bl 8019b22 80255a0: 4603 mov r3, r0 80255a2: 2b00 cmp r3, #0 80255a4: d003 beq.n 80255ae LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: checksum failed for received ICMP echo\n")); pbuf_free(p); 80255a6: 6878 ldr r0, [r7, #4] 80255a8: f7f5 ff00 bl 801b3ac ICMP_STATS_INC(icmp.chkerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 80255ac: e0c5 b.n 802573a } } #endif #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_add_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 80255ae: 8c7b ldrh r3, [r7, #34] @ 0x22 80255b0: 330e adds r3, #14 80255b2: 4619 mov r1, r3 80255b4: 6878 ldr r0, [r7, #4] 80255b6: f7f5 fe31 bl 801b21c 80255ba: 4603 mov r3, r0 80255bc: 2b00 cmp r3, #0 80255be: d04b beq.n 8025658 /* 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); 80255c0: 687b ldr r3, [r7, #4] 80255c2: 891a ldrh r2, [r3, #8] 80255c4: 8c7b ldrh r3, [r7, #34] @ 0x22 80255c6: 4413 add r3, r2 80255c8: 837b strh r3, [r7, #26] if (alloc_len < p->tot_len) { 80255ca: 687b ldr r3, [r7, #4] 80255cc: 891b ldrh r3, [r3, #8] 80255ce: 8b7a ldrh r2, [r7, #26] 80255d0: 429a cmp r2, r3 80255d2: f0c0 80ab bcc.w 802572c 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); 80255d6: 8b7b ldrh r3, [r7, #26] 80255d8: f44f 7220 mov.w r2, #640 @ 0x280 80255dc: 4619 mov r1, r3 80255de: 200e movs r0, #14 80255e0: f7f5 fbce bl 801ad80 80255e4: 6178 str r0, [r7, #20] if (r == NULL) { 80255e6: 697b ldr r3, [r7, #20] 80255e8: 2b00 cmp r3, #0 80255ea: f000 80a1 beq.w 8025730 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: allocating new pbuf failed\n")); goto icmperr; } if (r->len < hlen + sizeof(struct icmp_echo_hdr)) { 80255ee: 697b ldr r3, [r7, #20] 80255f0: 895b ldrh r3, [r3, #10] 80255f2: 461a mov r2, r3 80255f4: 8c7b ldrh r3, [r7, #34] @ 0x22 80255f6: 3308 adds r3, #8 80255f8: 429a cmp r2, r3 80255fa: d203 bcs.n 8025604 LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("first pbuf cannot hold the ICMP header")); pbuf_free(r); 80255fc: 6978 ldr r0, [r7, #20] 80255fe: f7f5 fed5 bl 801b3ac goto icmperr; 8025602: e096 b.n 8025732 } /* copy the ip header */ MEMCPY(r->payload, iphdr_in, hlen); 8025604: 697b ldr r3, [r7, #20] 8025606: 685b ldr r3, [r3, #4] 8025608: 8c7a ldrh r2, [r7, #34] @ 0x22 802560a: 6a79 ldr r1, [r7, #36] @ 0x24 802560c: 4618 mov r0, r3 802560e: f005 fbce bl 802adae /* switch r->payload back to icmp header (cannot fail) */ if (pbuf_remove_header(r, hlen)) { 8025612: 8c7b ldrh r3, [r7, #34] @ 0x22 8025614: 4619 mov r1, r3 8025616: 6978 ldr r0, [r7, #20] 8025618: f7f5 fe10 bl 801b23c 802561c: 4603 mov r3, r0 802561e: 2b00 cmp r3, #0 8025620: d009 beq.n 8025636 LWIP_ASSERT("icmp_input: moving r->payload to icmp header failed\n", 0); 8025622: 4b49 ldr r3, [pc, #292] @ (8025748 ) 8025624: 22b6 movs r2, #182 @ 0xb6 8025626: 4949 ldr r1, [pc, #292] @ (802574c ) 8025628: 4849 ldr r0, [pc, #292] @ (8025750 ) 802562a: f005 f937 bl 802a89c pbuf_free(r); 802562e: 6978 ldr r0, [r7, #20] 8025630: f7f5 febc bl 801b3ac goto icmperr; 8025634: e07d b.n 8025732 } /* copy the rest of the packet without ip header */ if (pbuf_copy(r, p) != ERR_OK) { 8025636: 6879 ldr r1, [r7, #4] 8025638: 6978 ldr r0, [r7, #20] 802563a: f7f5 ffeb bl 801b614 802563e: 4603 mov r3, r0 8025640: 2b00 cmp r3, #0 8025642: d003 beq.n 802564c LWIP_DEBUGF(ICMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("icmp_input: copying to new pbuf failed")); pbuf_free(r); 8025644: 6978 ldr r0, [r7, #20] 8025646: f7f5 feb1 bl 801b3ac goto icmperr; 802564a: e072 b.n 8025732 } /* free the original p */ pbuf_free(p); 802564c: 6878 ldr r0, [r7, #4] 802564e: f7f5 fead bl 801b3ac /* we now have an identical copy of p that has room for link headers */ p = r; 8025652: 697b ldr r3, [r7, #20] 8025654: 607b str r3, [r7, #4] 8025656: e00f b.n 8025678 } else { /* restore p->payload to point to icmp header (cannot fail) */ if (pbuf_remove_header(p, hlen + PBUF_LINK_HLEN + PBUF_LINK_ENCAPSULATION_HLEN)) { 8025658: 8c7b ldrh r3, [r7, #34] @ 0x22 802565a: 330e adds r3, #14 802565c: 4619 mov r1, r3 802565e: 6878 ldr r0, [r7, #4] 8025660: f7f5 fdec bl 801b23c 8025664: 4603 mov r3, r0 8025666: 2b00 cmp r3, #0 8025668: d006 beq.n 8025678 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); 802566a: 4b37 ldr r3, [pc, #220] @ (8025748 ) 802566c: 22c7 movs r2, #199 @ 0xc7 802566e: 4939 ldr r1, [pc, #228] @ (8025754 ) 8025670: 4837 ldr r0, [pc, #220] @ (8025750 ) 8025672: f005 f913 bl 802a89c goto icmperr; 8025676: e05c b.n 8025732 } #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; 8025678: 687b ldr r3, [r7, #4] 802567a: 685b ldr r3, [r3, #4] 802567c: 613b str r3, [r7, #16] if (pbuf_add_header(p, hlen)) { 802567e: 8c7b ldrh r3, [r7, #34] @ 0x22 8025680: 4619 mov r1, r3 8025682: 6878 ldr r0, [r7, #4] 8025684: f7f5 fdca bl 801b21c 8025688: 4603 mov r3, r0 802568a: 2b00 cmp r3, #0 802568c: d13c bne.n 8025708 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; 802568e: 687b ldr r3, [r7, #4] 8025690: 685b ldr r3, [r3, #4] 8025692: 60fb str r3, [r7, #12] ip4_addr_copy(iphdr->src, *src); 8025694: 69fb ldr r3, [r7, #28] 8025696: 681a ldr r2, [r3, #0] 8025698: 68fb ldr r3, [r7, #12] 802569a: 60da str r2, [r3, #12] ip4_addr_copy(iphdr->dest, *ip4_current_src_addr()); 802569c: 4b28 ldr r3, [pc, #160] @ (8025740 ) 802569e: 691a ldr r2, [r3, #16] 80256a0: 68fb ldr r3, [r7, #12] 80256a2: 611a str r2, [r3, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 80256a4: 693b ldr r3, [r7, #16] 80256a6: 2200 movs r2, #0 80256a8: 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))) { 80256aa: 693b ldr r3, [r7, #16] 80256ac: 885b ldrh r3, [r3, #2] 80256ae: b29b uxth r3, r3 80256b0: f64f 72f7 movw r2, #65527 @ 0xfff7 80256b4: 4293 cmp r3, r2 80256b6: d907 bls.n 80256c8 iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS((u16_t)(ICMP_ECHO << 8)) + 1); 80256b8: 693b ldr r3, [r7, #16] 80256ba: 885b ldrh r3, [r3, #2] 80256bc: b29b uxth r3, r3 80256be: 3309 adds r3, #9 80256c0: b29a uxth r2, r3 80256c2: 693b ldr r3, [r7, #16] 80256c4: 805a strh r2, [r3, #2] 80256c6: e006 b.n 80256d6 } else { iecho->chksum = (u16_t)(iecho->chksum + PP_HTONS(ICMP_ECHO << 8)); 80256c8: 693b ldr r3, [r7, #16] 80256ca: 885b ldrh r3, [r3, #2] 80256cc: b29b uxth r3, r3 80256ce: 3308 adds r3, #8 80256d0: b29a uxth r2, r3 80256d2: 693b ldr r3, [r7, #16] 80256d4: 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); 80256d6: 68fb ldr r3, [r7, #12] 80256d8: 22ff movs r2, #255 @ 0xff 80256da: 721a strb r2, [r3, #8] IPH_CHKSUM_SET(iphdr, 0); 80256dc: 68fb ldr r3, [r7, #12] 80256de: 2200 movs r2, #0 80256e0: 729a strb r2, [r3, #10] 80256e2: 2200 movs r2, #0 80256e4: 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, 80256e6: 683b ldr r3, [r7, #0] 80256e8: 9302 str r3, [sp, #8] 80256ea: 2301 movs r3, #1 80256ec: 9301 str r3, [sp, #4] 80256ee: 2300 movs r3, #0 80256f0: 9300 str r3, [sp, #0] 80256f2: 23ff movs r3, #255 @ 0xff 80256f4: 2200 movs r2, #0 80256f6: 69f9 ldr r1, [r7, #28] 80256f8: 6878 ldr r0, [r7, #4] 80256fa: f000 fa9f bl 8025c3c 80256fe: 4603 mov r3, r0 8025700: 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; 8025702: e001 b.n 8025708 break; 8025704: bf00 nop 8025706: e000 b.n 802570a break; 8025708: 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); 802570a: 6878 ldr r0, [r7, #4] 802570c: f7f5 fe4e bl 801b3ac return; 8025710: e013 b.n 802573a goto lenerr; 8025712: bf00 nop 8025714: e002 b.n 802571c goto lenerr; 8025716: bf00 nop 8025718: e000 b.n 802571c goto lenerr; 802571a: bf00 nop lenerr: pbuf_free(p); 802571c: 6878 ldr r0, [r7, #4] 802571e: f7f5 fe45 bl 801b3ac ICMP_STATS_INC(icmp.lenerr); MIB2_STATS_INC(mib2.icmpinerrors); return; 8025722: e00a b.n 802573a goto icmperr; 8025724: bf00 nop 8025726: e004 b.n 8025732 goto icmperr; 8025728: bf00 nop 802572a: e002 b.n 8025732 goto icmperr; 802572c: bf00 nop 802572e: e000 b.n 8025732 goto icmperr; 8025730: bf00 nop #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING icmperr: pbuf_free(p); 8025732: 6878 ldr r0, [r7, #4] 8025734: f7f5 fe3a bl 801b3ac ICMP_STATS_INC(icmp.err); MIB2_STATS_INC(mib2.icmpinerrors); return; 8025738: bf00 nop #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN || !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ } 802573a: 3728 adds r7, #40 @ 0x28 802573c: 46bd mov sp, r7 802573e: bd80 pop {r7, pc} 8025740: 24024428 .word 0x24024428 8025744: 2402443c .word 0x2402443c 8025748: 0803149c .word 0x0803149c 802574c: 080314d4 .word 0x080314d4 8025750: 0803150c .word 0x0803150c 8025754: 08031534 .word 0x08031534 08025758 : * 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) { 8025758: b580 push {r7, lr} 802575a: b082 sub sp, #8 802575c: af00 add r7, sp, #0 802575e: 6078 str r0, [r7, #4] 8025760: 460b mov r3, r1 8025762: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpoutdestunreachs); icmp_send_response(p, ICMP_DUR, t); 8025764: 78fb ldrb r3, [r7, #3] 8025766: 461a mov r2, r3 8025768: 2103 movs r1, #3 802576a: 6878 ldr r0, [r7, #4] 802576c: f000 f814 bl 8025798 } 8025770: bf00 nop 8025772: 3708 adds r7, #8 8025774: 46bd mov sp, r7 8025776: bd80 pop {r7, pc} 08025778 : * 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) { 8025778: b580 push {r7, lr} 802577a: b082 sub sp, #8 802577c: af00 add r7, sp, #0 802577e: 6078 str r0, [r7, #4] 8025780: 460b mov r3, r1 8025782: 70fb strb r3, [r7, #3] MIB2_STATS_INC(mib2.icmpouttimeexcds); icmp_send_response(p, ICMP_TE, t); 8025784: 78fb ldrb r3, [r7, #3] 8025786: 461a mov r2, r3 8025788: 210b movs r1, #11 802578a: 6878 ldr r0, [r7, #4] 802578c: f000 f804 bl 8025798 } 8025790: bf00 nop 8025792: 3708 adds r7, #8 8025794: 46bd mov sp, r7 8025796: bd80 pop {r7, pc} 08025798 : * @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) { 8025798: b580 push {r7, lr} 802579a: b08c sub sp, #48 @ 0x30 802579c: af04 add r7, sp, #16 802579e: 6078 str r0, [r7, #4] 80257a0: 460b mov r3, r1 80257a2: 70fb strb r3, [r7, #3] 80257a4: 4613 mov r3, r2 80257a6: 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, 80257a8: f44f 7220 mov.w r2, #640 @ 0x280 80257ac: 2124 movs r1, #36 @ 0x24 80257ae: 2022 movs r0, #34 @ 0x22 80257b0: f7f5 fae6 bl 801ad80 80257b4: 61b8 str r0, [r7, #24] PBUF_RAM); if (q == NULL) { 80257b6: 69bb ldr r3, [r7, #24] 80257b8: 2b00 cmp r3, #0 80257ba: d056 beq.n 802586a 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", 80257bc: 69bb ldr r3, [r7, #24] 80257be: 895b ldrh r3, [r3, #10] 80257c0: 2b23 cmp r3, #35 @ 0x23 80257c2: d806 bhi.n 80257d2 80257c4: 4b2b ldr r3, [pc, #172] @ (8025874 ) 80257c6: f44f 72b4 mov.w r2, #360 @ 0x168 80257ca: 492b ldr r1, [pc, #172] @ (8025878 ) 80257cc: 482b ldr r0, [pc, #172] @ (802587c ) 80257ce: f005 f865 bl 802a89c (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; 80257d2: 687b ldr r3, [r7, #4] 80257d4: 685b ldr r3, [r3, #4] 80257d6: 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; 80257d8: 69bb ldr r3, [r7, #24] 80257da: 685b ldr r3, [r3, #4] 80257dc: 613b str r3, [r7, #16] icmphdr->type = type; 80257de: 693b ldr r3, [r7, #16] 80257e0: 78fa ldrb r2, [r7, #3] 80257e2: 701a strb r2, [r3, #0] icmphdr->code = code; 80257e4: 693b ldr r3, [r7, #16] 80257e6: 78ba ldrb r2, [r7, #2] 80257e8: 705a strb r2, [r3, #1] icmphdr->id = 0; 80257ea: 693b ldr r3, [r7, #16] 80257ec: 2200 movs r2, #0 80257ee: 711a strb r2, [r3, #4] 80257f0: 2200 movs r2, #0 80257f2: 715a strb r2, [r3, #5] icmphdr->seqno = 0; 80257f4: 693b ldr r3, [r7, #16] 80257f6: 2200 movs r2, #0 80257f8: 719a strb r2, [r3, #6] 80257fa: 2200 movs r2, #0 80257fc: 71da strb r2, [r3, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 80257fe: 69bb ldr r3, [r7, #24] 8025800: 685b ldr r3, [r3, #4] 8025802: f103 0008 add.w r0, r3, #8 8025806: 687b ldr r3, [r7, #4] 8025808: 685b ldr r3, [r3, #4] 802580a: 221c movs r2, #28 802580c: 4619 mov r1, r3 802580e: f005 face bl 802adae IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); ip4_addr_copy(iphdr_src, iphdr->src); 8025812: 697b ldr r3, [r7, #20] 8025814: 68db ldr r3, [r3, #12] 8025816: 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); 8025818: f107 030c add.w r3, r7, #12 802581c: 4618 mov r0, r3 802581e: f000 f82f bl 8025880 8025822: 61f8 str r0, [r7, #28] #endif if (netif != NULL) { 8025824: 69fb ldr r3, [r7, #28] 8025826: 2b00 cmp r3, #0 8025828: d01b beq.n 8025862 /* calculate checksum */ icmphdr->chksum = 0; 802582a: 693b ldr r3, [r7, #16] 802582c: 2200 movs r2, #0 802582e: 709a strb r2, [r3, #2] 8025830: 2200 movs r2, #0 8025832: 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); 8025834: 69bb ldr r3, [r7, #24] 8025836: 895b ldrh r3, [r3, #10] 8025838: 4619 mov r1, r3 802583a: 6938 ldr r0, [r7, #16] 802583c: f7f4 f95f bl 8019afe 8025840: 4603 mov r3, r0 8025842: 461a mov r2, r3 8025844: 693b ldr r3, [r7, #16] 8025846: 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); 8025848: f107 020c add.w r2, r7, #12 802584c: 69fb ldr r3, [r7, #28] 802584e: 9302 str r3, [sp, #8] 8025850: 2301 movs r3, #1 8025852: 9301 str r3, [sp, #4] 8025854: 2300 movs r3, #0 8025856: 9300 str r3, [sp, #0] 8025858: 23ff movs r3, #255 @ 0xff 802585a: 2100 movs r1, #0 802585c: 69b8 ldr r0, [r7, #24] 802585e: f000 f9ed bl 8025c3c } pbuf_free(q); 8025862: 69b8 ldr r0, [r7, #24] 8025864: f7f5 fda2 bl 801b3ac 8025868: e000 b.n 802586c return; 802586a: bf00 nop } 802586c: 3720 adds r7, #32 802586e: 46bd mov sp, r7 8025870: bd80 pop {r7, pc} 8025872: bf00 nop 8025874: 0803149c .word 0x0803149c 8025878: 08031568 .word 0x08031568 802587c: 0803150c .word 0x0803150c 08025880 : * @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) { 8025880: b580 push {r7, lr} 8025882: b084 sub sp, #16 8025884: af00 add r7, sp, #0 8025886: 6078 str r0, [r7, #4] #if !LWIP_SINGLE_NETIF struct netif *netif; LWIP_ASSERT_CORE_LOCKED(); 8025888: f7eb fbde bl 8011048 /* 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) { 802588c: 4b32 ldr r3, [pc, #200] @ (8025958 ) 802588e: 681b ldr r3, [r3, #0] 8025890: 60fb str r3, [r7, #12] 8025892: e036 b.n 8025902 /* 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))) { 8025894: 68fb ldr r3, [r7, #12] 8025896: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 802589a: f003 0301 and.w r3, r3, #1 802589e: b2db uxtb r3, r3 80258a0: 2b00 cmp r3, #0 80258a2: d02b beq.n 80258fc 80258a4: 68fb ldr r3, [r7, #12] 80258a6: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80258aa: 089b lsrs r3, r3, #2 80258ac: f003 0301 and.w r3, r3, #1 80258b0: b2db uxtb r3, r3 80258b2: 2b00 cmp r3, #0 80258b4: d022 beq.n 80258fc 80258b6: 68fb ldr r3, [r7, #12] 80258b8: 3304 adds r3, #4 80258ba: 681b ldr r3, [r3, #0] 80258bc: 2b00 cmp r3, #0 80258be: d01d beq.n 80258fc /* network mask matches? */ if (ip4_addr_netcmp(dest, netif_ip4_addr(netif), netif_ip4_netmask(netif))) { 80258c0: 687b ldr r3, [r7, #4] 80258c2: 681a ldr r2, [r3, #0] 80258c4: 68fb ldr r3, [r7, #12] 80258c6: 3304 adds r3, #4 80258c8: 681b ldr r3, [r3, #0] 80258ca: 405a eors r2, r3 80258cc: 68fb ldr r3, [r7, #12] 80258ce: 3308 adds r3, #8 80258d0: 681b ldr r3, [r3, #0] 80258d2: 4013 ands r3, r2 80258d4: 2b00 cmp r3, #0 80258d6: d101 bne.n 80258dc /* return netif on which to forward IP packet */ return netif; 80258d8: 68fb ldr r3, [r7, #12] 80258da: e038 b.n 802594e } /* 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))) { 80258dc: 68fb ldr r3, [r7, #12] 80258de: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 80258e2: f003 0302 and.w r3, r3, #2 80258e6: 2b00 cmp r3, #0 80258e8: d108 bne.n 80258fc 80258ea: 687b ldr r3, [r7, #4] 80258ec: 681a ldr r2, [r3, #0] 80258ee: 68fb ldr r3, [r7, #12] 80258f0: 330c adds r3, #12 80258f2: 681b ldr r3, [r3, #0] 80258f4: 429a cmp r2, r3 80258f6: d101 bne.n 80258fc /* return netif on which to forward IP packet */ return netif; 80258f8: 68fb ldr r3, [r7, #12] 80258fa: e028 b.n 802594e NETIF_FOREACH(netif) { 80258fc: 68fb ldr r3, [r7, #12] 80258fe: 681b ldr r3, [r3, #0] 8025900: 60fb str r3, [r7, #12] 8025902: 68fb ldr r3, [r7, #12] 8025904: 2b00 cmp r3, #0 8025906: d1c5 bne.n 8025894 return netif; } #endif #endif /* !LWIP_SINGLE_NETIF */ if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 8025908: 4b14 ldr r3, [pc, #80] @ (802595c ) 802590a: 681b ldr r3, [r3, #0] 802590c: 2b00 cmp r3, #0 802590e: d01a beq.n 8025946 8025910: 4b12 ldr r3, [pc, #72] @ (802595c ) 8025912: 681b ldr r3, [r3, #0] 8025914: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8025918: f003 0301 and.w r3, r3, #1 802591c: 2b00 cmp r3, #0 802591e: d012 beq.n 8025946 8025920: 4b0e ldr r3, [pc, #56] @ (802595c ) 8025922: 681b ldr r3, [r3, #0] 8025924: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8025928: f003 0304 and.w r3, r3, #4 802592c: 2b00 cmp r3, #0 802592e: d00a beq.n 8025946 ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 8025930: 4b0a ldr r3, [pc, #40] @ (802595c ) 8025932: 681b ldr r3, [r3, #0] 8025934: 3304 adds r3, #4 8025936: 681b ldr r3, [r3, #0] if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || 8025938: 2b00 cmp r3, #0 802593a: d004 beq.n 8025946 ip4_addr_isany_val(*netif_ip4_addr(netif_default)) || ip4_addr_isloopback(dest)) { 802593c: 687b ldr r3, [r7, #4] 802593e: 681b ldr r3, [r3, #0] 8025940: b2db uxtb r3, r3 8025942: 2b7f cmp r3, #127 @ 0x7f 8025944: d101 bne.n 802594a 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; 8025946: 2300 movs r3, #0 8025948: e001 b.n 802594e } return netif_default; 802594a: 4b04 ldr r3, [pc, #16] @ (802595c ) 802594c: 681b ldr r3, [r3, #0] } 802594e: 4618 mov r0, r3 8025950: 3710 adds r7, #16 8025952: 46bd mov sp, r7 8025954: bd80 pop {r7, pc} 8025956: bf00 nop 8025958: 2402af6c .word 0x2402af6c 802595c: 2402af70 .word 0x2402af70 08025960 : #endif /* IP_FORWARD */ /** Return true if the current input packet should be accepted on this netif */ static int ip4_input_accept(struct netif *netif) { 8025960: b580 push {r7, lr} 8025962: b082 sub sp, #8 8025964: af00 add r7, sp, #0 8025966: 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)))) { 8025968: 687b ldr r3, [r7, #4] 802596a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 802596e: f003 0301 and.w r3, r3, #1 8025972: b2db uxtb r3, r3 8025974: 2b00 cmp r3, #0 8025976: d016 beq.n 80259a6 8025978: 687b ldr r3, [r7, #4] 802597a: 3304 adds r3, #4 802597c: 681b ldr r3, [r3, #0] 802597e: 2b00 cmp r3, #0 8025980: d011 beq.n 80259a6 /* unicast to this interface address? */ if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 8025982: 4b0b ldr r3, [pc, #44] @ (80259b0 ) 8025984: 695a ldr r2, [r3, #20] 8025986: 687b ldr r3, [r7, #4] 8025988: 3304 adds r3, #4 802598a: 681b ldr r3, [r3, #0] 802598c: 429a cmp r2, r3 802598e: d008 beq.n 80259a2 /* or broadcast on this interface network address? */ ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) 8025990: 4b07 ldr r3, [pc, #28] @ (80259b0 ) 8025992: 695b ldr r3, [r3, #20] 8025994: 6879 ldr r1, [r7, #4] 8025996: 4618 mov r0, r3 8025998: f000 fa2a bl 8025df0 802599c: 4603 mov r3, r0 if (ip4_addr_cmp(ip4_current_dest_addr(), netif_ip4_addr(netif)) || 802599e: 2b00 cmp r3, #0 80259a0: d001 beq.n 80259a6 #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; 80259a2: 2301 movs r3, #1 80259a4: e000 b.n 80259a8 /* accept on this netif */ return 1; } #endif /* LWIP_AUTOIP */ } return 0; 80259a6: 2300 movs r3, #0 } 80259a8: 4618 mov r0, r3 80259aa: 3708 adds r7, #8 80259ac: 46bd mov sp, r7 80259ae: bd80 pop {r7, pc} 80259b0: 24024428 .word 0x24024428 080259b4 : * @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) { 80259b4: b580 push {r7, lr} 80259b6: b088 sub sp, #32 80259b8: af00 add r7, sp, #0 80259ba: 6078 str r0, [r7, #4] 80259bc: 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; 80259be: 2301 movs r3, #1 80259c0: 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(); 80259c2: f7eb fb41 bl 8011048 IP_STATS_INC(ip.recv); MIB2_STATS_INC(mib2.ipinreceives); /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 80259c6: 687b ldr r3, [r7, #4] 80259c8: 685b ldr r3, [r3, #4] 80259ca: 613b str r3, [r7, #16] if (IPH_V(iphdr) != 4) { 80259cc: 693b ldr r3, [r7, #16] 80259ce: 781b ldrb r3, [r3, #0] 80259d0: 091b lsrs r3, r3, #4 80259d2: b2db uxtb r3, r3 80259d4: 2b04 cmp r3, #4 80259d6: d004 beq.n 80259e2 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); 80259d8: 6878 ldr r0, [r7, #4] 80259da: f7f5 fce7 bl 801b3ac IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinhdrerrors); return ERR_OK; 80259de: 2300 movs r3, #0 80259e0: e123 b.n 8025c2a return ERR_OK; } #endif /* obtain IP header length in bytes */ iphdr_hlen = IPH_HL_BYTES(iphdr); 80259e2: 693b ldr r3, [r7, #16] 80259e4: 781b ldrb r3, [r3, #0] 80259e6: f003 030f and.w r3, r3, #15 80259ea: b2db uxtb r3, r3 80259ec: 009b lsls r3, r3, #2 80259ee: b2db uxtb r3, r3 80259f0: 81fb strh r3, [r7, #14] /* obtain ip length in bytes */ iphdr_len = lwip_ntohs(IPH_LEN(iphdr)); 80259f2: 693b ldr r3, [r7, #16] 80259f4: 885b ldrh r3, [r3, #2] 80259f6: b29b uxth r3, r3 80259f8: 4618 mov r0, r3 80259fa: f7f3 fff5 bl 80199e8 80259fe: 4603 mov r3, r0 8025a00: 837b strh r3, [r7, #26] /* Trim pbuf. This is especially required for packets < 60 bytes. */ if (iphdr_len < p->tot_len) { 8025a02: 687b ldr r3, [r7, #4] 8025a04: 891b ldrh r3, [r3, #8] 8025a06: 8b7a ldrh r2, [r7, #26] 8025a08: 429a cmp r2, r3 8025a0a: d204 bcs.n 8025a16 pbuf_realloc(p, iphdr_len); 8025a0c: 8b7b ldrh r3, [r7, #26] 8025a0e: 4619 mov r1, r3 8025a10: 6878 ldr r0, [r7, #4] 8025a12: f7f5 fb15 bl 801b040 } /* 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)) { 8025a16: 687b ldr r3, [r7, #4] 8025a18: 895b ldrh r3, [r3, #10] 8025a1a: 89fa ldrh r2, [r7, #14] 8025a1c: 429a cmp r2, r3 8025a1e: d807 bhi.n 8025a30 8025a20: 687b ldr r3, [r7, #4] 8025a22: 891b ldrh r3, [r3, #8] 8025a24: 8b7a ldrh r2, [r7, #26] 8025a26: 429a cmp r2, r3 8025a28: d802 bhi.n 8025a30 8025a2a: 89fb ldrh r3, [r7, #14] 8025a2c: 2b13 cmp r3, #19 8025a2e: d804 bhi.n 8025a3a 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); 8025a30: 6878 ldr r0, [r7, #4] 8025a32: f7f5 fcbb bl 801b3ac IP_STATS_INC(ip.lenerr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 8025a36: 2300 movs r3, #0 8025a38: e0f7 b.n 8025c2a } } #endif /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy_from_ip4(ip_data.current_iphdr_dest, iphdr->dest); 8025a3a: 693b ldr r3, [r7, #16] 8025a3c: 691b ldr r3, [r3, #16] 8025a3e: 4a7d ldr r2, [pc, #500] @ (8025c34 ) 8025a40: 6153 str r3, [r2, #20] ip_addr_copy_from_ip4(ip_data.current_iphdr_src, iphdr->src); 8025a42: 693b ldr r3, [r7, #16] 8025a44: 68db ldr r3, [r3, #12] 8025a46: 4a7b ldr r2, [pc, #492] @ (8025c34 ) 8025a48: 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())) { 8025a4a: 4b7a ldr r3, [pc, #488] @ (8025c34 ) 8025a4c: 695b ldr r3, [r3, #20] 8025a4e: f003 03f0 and.w r3, r3, #240 @ 0xf0 8025a52: 2be0 cmp r3, #224 @ 0xe0 8025a54: d112 bne.n 8025a7c netif = inp; } else { netif = NULL; } #else /* LWIP_IGMP */ if ((netif_is_up(inp)) && (!ip4_addr_isany_val(*netif_ip4_addr(inp)))) { 8025a56: 683b ldr r3, [r7, #0] 8025a58: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8025a5c: f003 0301 and.w r3, r3, #1 8025a60: b2db uxtb r3, r3 8025a62: 2b00 cmp r3, #0 8025a64: d007 beq.n 8025a76 8025a66: 683b ldr r3, [r7, #0] 8025a68: 3304 adds r3, #4 8025a6a: 681b ldr r3, [r3, #0] 8025a6c: 2b00 cmp r3, #0 8025a6e: d002 beq.n 8025a76 netif = inp; 8025a70: 683b ldr r3, [r7, #0] 8025a72: 61fb str r3, [r7, #28] 8025a74: e02a b.n 8025acc } else { netif = NULL; 8025a76: 2300 movs r3, #0 8025a78: 61fb str r3, [r7, #28] 8025a7a: e027 b.n 8025acc } #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)) { 8025a7c: 6838 ldr r0, [r7, #0] 8025a7e: f7ff ff6f bl 8025960 8025a82: 4603 mov r3, r0 8025a84: 2b00 cmp r3, #0 8025a86: d002 beq.n 8025a8e netif = inp; 8025a88: 683b ldr r3, [r7, #0] 8025a8a: 61fb str r3, [r7, #28] 8025a8c: e01e b.n 8025acc } else { netif = NULL; 8025a8e: 2300 movs r3, #0 8025a90: 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())) 8025a92: 4b68 ldr r3, [pc, #416] @ (8025c34 ) 8025a94: 695b ldr r3, [r3, #20] 8025a96: b2db uxtb r3, r3 8025a98: 2b7f cmp r3, #127 @ 0x7f 8025a9a: d017 beq.n 8025acc #endif /* !LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF */ { #if !LWIP_SINGLE_NETIF NETIF_FOREACH(netif) { 8025a9c: 4b66 ldr r3, [pc, #408] @ (8025c38 ) 8025a9e: 681b ldr r3, [r3, #0] 8025aa0: 61fb str r3, [r7, #28] 8025aa2: e00e b.n 8025ac2 if (netif == inp) { 8025aa4: 69fa ldr r2, [r7, #28] 8025aa6: 683b ldr r3, [r7, #0] 8025aa8: 429a cmp r2, r3 8025aaa: d006 beq.n 8025aba /* we checked that before already */ continue; } if (ip4_input_accept(netif)) { 8025aac: 69f8 ldr r0, [r7, #28] 8025aae: f7ff ff57 bl 8025960 8025ab2: 4603 mov r3, r0 8025ab4: 2b00 cmp r3, #0 8025ab6: d108 bne.n 8025aca 8025ab8: e000 b.n 8025abc continue; 8025aba: bf00 nop NETIF_FOREACH(netif) { 8025abc: 69fb ldr r3, [r7, #28] 8025abe: 681b ldr r3, [r3, #0] 8025ac0: 61fb str r3, [r7, #28] 8025ac2: 69fb ldr r3, [r7, #28] 8025ac4: 2b00 cmp r3, #0 8025ac6: d1ed bne.n 8025aa4 8025ac8: e000 b.n 8025acc break; 8025aca: 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) { 8025acc: 69fb ldr r3, [r7, #28] 8025ace: 2b00 cmp r3, #0 8025ad0: d111 bne.n 8025af6 /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { 8025ad2: 693b ldr r3, [r7, #16] 8025ad4: 7a5b ldrb r3, [r3, #9] 8025ad6: 2b11 cmp r3, #17 8025ad8: d10d bne.n 8025af6 const struct udp_hdr *udphdr = (const struct udp_hdr *)((const u8_t *)iphdr + iphdr_hlen); 8025ada: 89fb ldrh r3, [r7, #14] 8025adc: 693a ldr r2, [r7, #16] 8025ade: 4413 add r3, r2 8025ae0: 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)) { 8025ae2: 68bb ldr r3, [r7, #8] 8025ae4: 885b ldrh r3, [r3, #2] 8025ae6: b29b uxth r3, r3 8025ae8: f5b3 4f88 cmp.w r3, #17408 @ 0x4400 8025aec: d103 bne.n 8025af6 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip4_input: DHCP packet accepted.\n")); netif = inp; 8025aee: 683b ldr r3, [r7, #0] 8025af0: 61fb str r3, [r7, #28] check_ip_src = 0; 8025af2: 2300 movs r3, #0 8025af4: 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 8025af6: 697b ldr r3, [r7, #20] 8025af8: 2b00 cmp r3, #0 8025afa: d017 beq.n 8025b2c #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()) 8025afc: 4b4d ldr r3, [pc, #308] @ (8025c34 ) 8025afe: 691b ldr r3, [r3, #16] 8025b00: 2b00 cmp r3, #0 8025b02: d013 beq.n 8025b2c #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ ) #endif /* LWIP_IGMP || IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 8025b04: 4b4b ldr r3, [pc, #300] @ (8025c34 ) 8025b06: 691b ldr r3, [r3, #16] 8025b08: 6839 ldr r1, [r7, #0] 8025b0a: 4618 mov r0, r3 8025b0c: f000 f970 bl 8025df0 8025b10: 4603 mov r3, r0 8025b12: 2b00 cmp r3, #0 8025b14: d105 bne.n 8025b22 (ip4_addr_ismulticast(ip4_current_src_addr()))) { 8025b16: 4b47 ldr r3, [pc, #284] @ (8025c34 ) 8025b18: 691b ldr r3, [r3, #16] 8025b1a: f003 03f0 and.w r3, r3, #240 @ 0xf0 if ((ip4_addr_isbroadcast(ip4_current_src_addr(), inp)) || 8025b1e: 2be0 cmp r3, #224 @ 0xe0 8025b20: d104 bne.n 8025b2c /* 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); 8025b22: 6878 ldr r0, [r7, #4] 8025b24: f7f5 fc42 bl 801b3ac IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); return ERR_OK; 8025b28: 2300 movs r3, #0 8025b2a: e07e b.n 8025c2a } } /* packet not for us? */ if (netif == NULL) { 8025b2c: 69fb ldr r3, [r7, #28] 8025b2e: 2b00 cmp r3, #0 8025b30: d104 bne.n 8025b3c { IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinaddrerrors); MIB2_STATS_INC(mib2.ipindiscards); } pbuf_free(p); 8025b32: 6878 ldr r0, [r7, #4] 8025b34: f7f5 fc3a bl 801b3ac return ERR_OK; 8025b38: 2300 movs r3, #0 8025b3a: e076 b.n 8025c2a } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 8025b3c: 693b ldr r3, [r7, #16] 8025b3e: 88db ldrh r3, [r3, #6] 8025b40: b29b uxth r3, r3 8025b42: 461a mov r2, r3 8025b44: f64f 733f movw r3, #65343 @ 0xff3f 8025b48: 4013 ands r3, r2 8025b4a: 2b00 cmp r3, #0 8025b4c: d00b beq.n 8025b66 #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); 8025b4e: 6878 ldr r0, [r7, #4] 8025b50: f000 fe62 bl 8026818 8025b54: 6078 str r0, [r7, #4] /* packet not fully reassembled yet? */ if (p == NULL) { 8025b56: 687b ldr r3, [r7, #4] 8025b58: 2b00 cmp r3, #0 8025b5a: d101 bne.n 8025b60 return ERR_OK; 8025b5c: 2300 movs r3, #0 8025b5e: e064 b.n 8025c2a } iphdr = (const struct ip_hdr *)p->payload; 8025b60: 687b ldr r3, [r7, #4] 8025b62: 685b ldr r3, [r3, #4] 8025b64: 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; 8025b66: 4a33 ldr r2, [pc, #204] @ (8025c34 ) 8025b68: 69fb ldr r3, [r7, #28] 8025b6a: 6013 str r3, [r2, #0] ip_data.current_input_netif = inp; 8025b6c: 4a31 ldr r2, [pc, #196] @ (8025c34 ) 8025b6e: 683b ldr r3, [r7, #0] 8025b70: 6053 str r3, [r2, #4] ip_data.current_ip4_header = iphdr; 8025b72: 4a30 ldr r2, [pc, #192] @ (8025c34 ) 8025b74: 693b ldr r3, [r7, #16] 8025b76: 6093 str r3, [r2, #8] ip_data.current_ip_header_tot_len = IPH_HL_BYTES(iphdr); 8025b78: 693b ldr r3, [r7, #16] 8025b7a: 781b ldrb r3, [r3, #0] 8025b7c: f003 030f and.w r3, r3, #15 8025b80: b2db uxtb r3, r3 8025b82: 009b lsls r3, r3, #2 8025b84: b2db uxtb r3, r3 8025b86: 461a mov r2, r3 8025b88: 4b2a ldr r3, [pc, #168] @ (8025c34 ) 8025b8a: 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. */ 8025b8c: 89fb ldrh r3, [r7, #14] 8025b8e: 4619 mov r1, r3 8025b90: 6878 ldr r0, [r7, #4] 8025b92: f7f5 fb53 bl 801b23c switch (IPH_PROTO(iphdr)) { 8025b96: 693b ldr r3, [r7, #16] 8025b98: 7a5b ldrb r3, [r3, #9] 8025b9a: 2b11 cmp r3, #17 8025b9c: d006 beq.n 8025bac 8025b9e: 2b11 cmp r3, #17 8025ba0: dc13 bgt.n 8025bca 8025ba2: 2b01 cmp r3, #1 8025ba4: d00c beq.n 8025bc0 8025ba6: 2b06 cmp r3, #6 8025ba8: d005 beq.n 8025bb6 8025baa: e00e b.n 8025bca case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ MIB2_STATS_INC(mib2.ipindelivers); udp_input(p, inp); 8025bac: 6839 ldr r1, [r7, #0] 8025bae: 6878 ldr r0, [r7, #4] 8025bb0: f7fc f99c bl 8021eec break; 8025bb4: e026 b.n 8025c04 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: MIB2_STATS_INC(mib2.ipindelivers); tcp_input(p, inp); 8025bb6: 6839 ldr r1, [r7, #0] 8025bb8: 6878 ldr r0, [r7, #4] 8025bba: f7f7 fcdd bl 801d578 break; 8025bbe: e021 b.n 8025c04 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: MIB2_STATS_INC(mib2.ipindelivers); icmp_input(p, inp); 8025bc0: 6839 ldr r1, [r7, #0] 8025bc2: 6878 ldr r0, [r7, #4] 8025bc4: f7ff fca4 bl 8025510 break; 8025bc8: e01c b.n 8025c04 } 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) && 8025bca: 4b1a ldr r3, [pc, #104] @ (8025c34 ) 8025bcc: 695b ldr r3, [r3, #20] 8025bce: 69f9 ldr r1, [r7, #28] 8025bd0: 4618 mov r0, r3 8025bd2: f000 f90d bl 8025df0 8025bd6: 4603 mov r3, r0 8025bd8: 2b00 cmp r3, #0 8025bda: d10f bne.n 8025bfc !ip4_addr_ismulticast(ip4_current_dest_addr())) { 8025bdc: 4b15 ldr r3, [pc, #84] @ (8025c34 ) 8025bde: 695b ldr r3, [r3, #20] 8025be0: f003 03f0 and.w r3, r3, #240 @ 0xf0 if (!ip4_addr_isbroadcast(ip4_current_dest_addr(), netif) && 8025be4: 2be0 cmp r3, #224 @ 0xe0 8025be6: d009 beq.n 8025bfc pbuf_header_force(p, (s16_t)iphdr_hlen); /* Move to ip header, no check necessary. */ 8025be8: f9b7 300e ldrsh.w r3, [r7, #14] 8025bec: 4619 mov r1, r3 8025bee: 6878 ldr r0, [r7, #4] 8025bf0: f7f5 fb97 bl 801b322 icmp_dest_unreach(p, ICMP_DUR_PROTO); 8025bf4: 2102 movs r1, #2 8025bf6: 6878 ldr r0, [r7, #4] 8025bf8: f7ff fdae bl 8025758 IP_STATS_INC(ip.proterr); IP_STATS_INC(ip.drop); MIB2_STATS_INC(mib2.ipinunknownprotos); } pbuf_free(p); 8025bfc: 6878 ldr r0, [r7, #4] 8025bfe: f7f5 fbd5 bl 801b3ac break; 8025c02: bf00 nop } } /* @todo: this is not really necessary... */ ip_data.current_netif = NULL; 8025c04: 4b0b ldr r3, [pc, #44] @ (8025c34 ) 8025c06: 2200 movs r2, #0 8025c08: 601a str r2, [r3, #0] ip_data.current_input_netif = NULL; 8025c0a: 4b0a ldr r3, [pc, #40] @ (8025c34 ) 8025c0c: 2200 movs r2, #0 8025c0e: 605a str r2, [r3, #4] ip_data.current_ip4_header = NULL; 8025c10: 4b08 ldr r3, [pc, #32] @ (8025c34 ) 8025c12: 2200 movs r2, #0 8025c14: 609a str r2, [r3, #8] ip_data.current_ip_header_tot_len = 0; 8025c16: 4b07 ldr r3, [pc, #28] @ (8025c34 ) 8025c18: 2200 movs r2, #0 8025c1a: 819a strh r2, [r3, #12] ip4_addr_set_any(ip4_current_src_addr()); 8025c1c: 4b05 ldr r3, [pc, #20] @ (8025c34 ) 8025c1e: 2200 movs r2, #0 8025c20: 611a str r2, [r3, #16] ip4_addr_set_any(ip4_current_dest_addr()); 8025c22: 4b04 ldr r3, [pc, #16] @ (8025c34 ) 8025c24: 2200 movs r2, #0 8025c26: 615a str r2, [r3, #20] return ERR_OK; 8025c28: 2300 movs r3, #0 } 8025c2a: 4618 mov r0, r3 8025c2c: 3720 adds r7, #32 8025c2e: 46bd mov sp, r7 8025c30: bd80 pop {r7, pc} 8025c32: bf00 nop 8025c34: 24024428 .word 0x24024428 8025c38: 2402af6c .word 0x2402af6c 08025c3c : */ 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) { 8025c3c: b580 push {r7, lr} 8025c3e: b08a sub sp, #40 @ 0x28 8025c40: af04 add r7, sp, #16 8025c42: 60f8 str r0, [r7, #12] 8025c44: 60b9 str r1, [r7, #8] 8025c46: 607a str r2, [r7, #4] 8025c48: 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; 8025c4a: 68bb ldr r3, [r7, #8] 8025c4c: 617b str r3, [r7, #20] if (dest != LWIP_IP_HDRINCL) { 8025c4e: 687b ldr r3, [r7, #4] 8025c50: 2b00 cmp r3, #0 8025c52: d009 beq.n 8025c68 if (ip4_addr_isany(src)) { 8025c54: 68bb ldr r3, [r7, #8] 8025c56: 2b00 cmp r3, #0 8025c58: d003 beq.n 8025c62 8025c5a: 68bb ldr r3, [r7, #8] 8025c5c: 681b ldr r3, [r3, #0] 8025c5e: 2b00 cmp r3, #0 8025c60: d102 bne.n 8025c68 src_used = netif_ip4_addr(netif); 8025c62: 6abb ldr r3, [r7, #40] @ 0x28 8025c64: 3304 adds r3, #4 8025c66: 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); 8025c68: 78fa ldrb r2, [r7, #3] 8025c6a: 6abb ldr r3, [r7, #40] @ 0x28 8025c6c: 9302 str r3, [sp, #8] 8025c6e: f897 3024 ldrb.w r3, [r7, #36] @ 0x24 8025c72: 9301 str r3, [sp, #4] 8025c74: f897 3020 ldrb.w r3, [r7, #32] 8025c78: 9300 str r3, [sp, #0] 8025c7a: 4613 mov r3, r2 8025c7c: 687a ldr r2, [r7, #4] 8025c7e: 6979 ldr r1, [r7, #20] 8025c80: 68f8 ldr r0, [r7, #12] 8025c82: f000 f805 bl 8025c90 8025c86: 4603 mov r3, r0 #endif /* IP_OPTIONS_SEND */ } 8025c88: 4618 mov r0, r3 8025c8a: 3718 adds r7, #24 8025c8c: 46bd mov sp, r7 8025c8e: bd80 pop {r7, pc} 08025c90 : */ 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) { 8025c90: b580 push {r7, lr} 8025c92: b088 sub sp, #32 8025c94: af00 add r7, sp, #0 8025c96: 60f8 str r0, [r7, #12] 8025c98: 60b9 str r1, [r7, #8] 8025c9a: 607a str r2, [r7, #4] 8025c9c: 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(); 8025c9e: f7eb f9d3 bl 8011048 LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p); 8025ca2: 68fb ldr r3, [r7, #12] 8025ca4: 7b9b ldrb r3, [r3, #14] 8025ca6: 2b01 cmp r3, #1 8025ca8: d006 beq.n 8025cb8 8025caa: 4b4b ldr r3, [pc, #300] @ (8025dd8 ) 8025cac: f44f 7255 mov.w r2, #852 @ 0x354 8025cb0: 494a ldr r1, [pc, #296] @ (8025ddc ) 8025cb2: 484b ldr r0, [pc, #300] @ (8025de0 ) 8025cb4: f004 fdf2 bl 802a89c MIB2_STATS_INC(mib2.ipoutrequests); /* Should the IP header be generated or is it already included in p? */ if (dest != LWIP_IP_HDRINCL) { 8025cb8: 687b ldr r3, [r7, #4] 8025cba: 2b00 cmp r3, #0 8025cbc: d060 beq.n 8025d80 u16_t ip_hlen = IP_HLEN; 8025cbe: 2314 movs r3, #20 8025cc0: 837b strh r3, [r7, #26] } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_add_header(p, IP_HLEN)) { 8025cc2: 2114 movs r1, #20 8025cc4: 68f8 ldr r0, [r7, #12] 8025cc6: f7f5 faa9 bl 801b21c 8025cca: 4603 mov r3, r0 8025ccc: 2b00 cmp r3, #0 8025cce: d002 beq.n 8025cd6 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; 8025cd0: f06f 0301 mvn.w r3, #1 8025cd4: e07c b.n 8025dd0 } iphdr = (struct ip_hdr *)p->payload; 8025cd6: 68fb ldr r3, [r7, #12] 8025cd8: 685b ldr r3, [r3, #4] 8025cda: 61fb str r3, [r7, #28] LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", 8025cdc: 68fb ldr r3, [r7, #12] 8025cde: 895b ldrh r3, [r3, #10] 8025ce0: 2b13 cmp r3, #19 8025ce2: d806 bhi.n 8025cf2 8025ce4: 4b3c ldr r3, [pc, #240] @ (8025dd8 ) 8025ce6: f44f 7262 mov.w r2, #904 @ 0x388 8025cea: 493e ldr r1, [pc, #248] @ (8025de4 ) 8025cec: 483c ldr r0, [pc, #240] @ (8025de0 ) 8025cee: f004 fdd5 bl 802a89c (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); 8025cf2: 69fb ldr r3, [r7, #28] 8025cf4: 78fa ldrb r2, [r7, #3] 8025cf6: 721a strb r2, [r3, #8] IPH_PROTO_SET(iphdr, proto); 8025cf8: 69fb ldr r3, [r7, #28] 8025cfa: f897 202c ldrb.w r2, [r7, #44] @ 0x2c 8025cfe: 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); 8025d00: 687b ldr r3, [r7, #4] 8025d02: 681a ldr r2, [r3, #0] 8025d04: 69fb ldr r3, [r7, #28] 8025d06: 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); 8025d08: 8b7b ldrh r3, [r7, #26] 8025d0a: 089b lsrs r3, r3, #2 8025d0c: b29b uxth r3, r3 8025d0e: b2db uxtb r3, r3 8025d10: f043 0340 orr.w r3, r3, #64 @ 0x40 8025d14: b2da uxtb r2, r3 8025d16: 69fb ldr r3, [r7, #28] 8025d18: 701a strb r2, [r3, #0] IPH_TOS_SET(iphdr, tos); 8025d1a: 69fb ldr r3, [r7, #28] 8025d1c: f897 2028 ldrb.w r2, [r7, #40] @ 0x28 8025d20: 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)); 8025d22: 68fb ldr r3, [r7, #12] 8025d24: 891b ldrh r3, [r3, #8] 8025d26: 4618 mov r0, r3 8025d28: f7f3 fe5e bl 80199e8 8025d2c: 4603 mov r3, r0 8025d2e: 461a mov r2, r3 8025d30: 69fb ldr r3, [r7, #28] 8025d32: 805a strh r2, [r3, #2] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 8025d34: 69fb ldr r3, [r7, #28] 8025d36: 2200 movs r2, #0 8025d38: 719a strb r2, [r3, #6] 8025d3a: 2200 movs r2, #0 8025d3c: 71da strb r2, [r3, #7] IPH_ID_SET(iphdr, lwip_htons(ip_id)); 8025d3e: 4b2a ldr r3, [pc, #168] @ (8025de8 ) 8025d40: 881b ldrh r3, [r3, #0] 8025d42: 4618 mov r0, r3 8025d44: f7f3 fe50 bl 80199e8 8025d48: 4603 mov r3, r0 8025d4a: 461a mov r2, r3 8025d4c: 69fb ldr r3, [r7, #28] 8025d4e: 809a strh r2, [r3, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 8025d50: 4b25 ldr r3, [pc, #148] @ (8025de8 ) 8025d52: 881b ldrh r3, [r3, #0] 8025d54: 3301 adds r3, #1 8025d56: b29a uxth r2, r3 8025d58: 4b23 ldr r3, [pc, #140] @ (8025de8 ) 8025d5a: 801a strh r2, [r3, #0] if (src == NULL) { 8025d5c: 68bb ldr r3, [r7, #8] 8025d5e: 2b00 cmp r3, #0 8025d60: d104 bne.n 8025d6c ip4_addr_copy(iphdr->src, *IP4_ADDR_ANY4); 8025d62: 4b22 ldr r3, [pc, #136] @ (8025dec ) 8025d64: 681a ldr r2, [r3, #0] 8025d66: 69fb ldr r3, [r7, #28] 8025d68: 60da str r2, [r3, #12] 8025d6a: e003 b.n 8025d74 } else { /* src cannot be NULL here */ ip4_addr_copy(iphdr->src, *src); 8025d6c: 68bb ldr r3, [r7, #8] 8025d6e: 681a ldr r2, [r3, #0] 8025d70: 69fb ldr r3, [r7, #28] 8025d72: 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); 8025d74: 69fb ldr r3, [r7, #28] 8025d76: 2200 movs r2, #0 8025d78: 729a strb r2, [r3, #10] 8025d7a: 2200 movs r2, #0 8025d7c: 72da strb r2, [r3, #11] 8025d7e: e00f b.n 8025da0 } #endif /* CHECKSUM_GEN_IP */ #endif /* CHECKSUM_GEN_IP_INLINE */ } else { /* IP header already included in p */ if (p->len < IP_HLEN) { 8025d80: 68fb ldr r3, [r7, #12] 8025d82: 895b ldrh r3, [r3, #10] 8025d84: 2b13 cmp r3, #19 8025d86: d802 bhi.n 8025d8e 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; 8025d88: f06f 0301 mvn.w r3, #1 8025d8c: e020 b.n 8025dd0 } iphdr = (struct ip_hdr *)p->payload; 8025d8e: 68fb ldr r3, [r7, #12] 8025d90: 685b ldr r3, [r3, #4] 8025d92: 61fb str r3, [r7, #28] ip4_addr_copy(dest_addr, iphdr->dest); 8025d94: 69fb ldr r3, [r7, #28] 8025d96: 691b ldr r3, [r3, #16] 8025d98: 617b str r3, [r7, #20] dest = &dest_addr; 8025d9a: f107 0314 add.w r3, r7, #20 8025d9e: 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)) { 8025da0: 6b3b ldr r3, [r7, #48] @ 0x30 8025da2: 8d1b ldrh r3, [r3, #40] @ 0x28 8025da4: 2b00 cmp r3, #0 8025da6: d00c beq.n 8025dc2 8025da8: 68fb ldr r3, [r7, #12] 8025daa: 891a ldrh r2, [r3, #8] 8025dac: 6b3b ldr r3, [r7, #48] @ 0x30 8025dae: 8d1b ldrh r3, [r3, #40] @ 0x28 8025db0: 429a cmp r2, r3 8025db2: d906 bls.n 8025dc2 return ip4_frag(p, netif, dest); 8025db4: 687a ldr r2, [r7, #4] 8025db6: 6b39 ldr r1, [r7, #48] @ 0x30 8025db8: 68f8 ldr r0, [r7, #12] 8025dba: f000 ff21 bl 8026c00 8025dbe: 4603 mov r3, r0 8025dc0: e006 b.n 8025dd0 } #endif /* IP_FRAG */ LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n")); return netif->output(netif, p, dest); 8025dc2: 6b3b ldr r3, [r7, #48] @ 0x30 8025dc4: 695b ldr r3, [r3, #20] 8025dc6: 687a ldr r2, [r7, #4] 8025dc8: 68f9 ldr r1, [r7, #12] 8025dca: 6b38 ldr r0, [r7, #48] @ 0x30 8025dcc: 4798 blx r3 8025dce: 4603 mov r3, r0 } 8025dd0: 4618 mov r0, r3 8025dd2: 3720 adds r7, #32 8025dd4: 46bd mov sp, r7 8025dd6: bd80 pop {r7, pc} 8025dd8: 08031594 .word 0x08031594 8025ddc: 080315c8 .word 0x080315c8 8025de0: 080315d4 .word 0x080315d4 8025de4: 080315fc .word 0x080315fc 8025de8: 2402b102 .word 0x2402b102 8025dec: 08031ca8 .word 0x08031ca8 08025df0 : * @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) { 8025df0: b480 push {r7} 8025df2: b085 sub sp, #20 8025df4: af00 add r7, sp, #0 8025df6: 6078 str r0, [r7, #4] 8025df8: 6039 str r1, [r7, #0] ip4_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); 8025dfa: 687b ldr r3, [r7, #4] 8025dfc: 60fb str r3, [r7, #12] /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 8025dfe: 687b ldr r3, [r7, #4] 8025e00: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8025e04: d002 beq.n 8025e0c 8025e06: 687b ldr r3, [r7, #4] 8025e08: 2b00 cmp r3, #0 8025e0a: d101 bne.n 8025e10 (addr == IPADDR_ANY)) { return 1; 8025e0c: 2301 movs r3, #1 8025e0e: e02a b.n 8025e66 /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 8025e10: 683b ldr r3, [r7, #0] 8025e12: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8025e16: f003 0302 and.w r3, r3, #2 8025e1a: 2b00 cmp r3, #0 8025e1c: d101 bne.n 8025e22 /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; 8025e1e: 2300 movs r3, #0 8025e20: e021 b.n 8025e66 /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(netif_ip4_addr(netif))) { 8025e22: 683b ldr r3, [r7, #0] 8025e24: 3304 adds r3, #4 8025e26: 681b ldr r3, [r3, #0] 8025e28: 687a ldr r2, [r7, #4] 8025e2a: 429a cmp r2, r3 8025e2c: d101 bne.n 8025e32 return 0; 8025e2e: 2300 movs r3, #0 8025e30: e019 b.n 8025e66 /* on the same (sub) network... */ } else if (ip4_addr_netcmp(&ipaddr, netif_ip4_addr(netif), netif_ip4_netmask(netif)) 8025e32: 68fa ldr r2, [r7, #12] 8025e34: 683b ldr r3, [r7, #0] 8025e36: 3304 adds r3, #4 8025e38: 681b ldr r3, [r3, #0] 8025e3a: 405a eors r2, r3 8025e3c: 683b ldr r3, [r7, #0] 8025e3e: 3308 adds r3, #8 8025e40: 681b ldr r3, [r3, #0] 8025e42: 4013 ands r3, r2 8025e44: 2b00 cmp r3, #0 8025e46: d10d bne.n 8025e64 /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 8025e48: 683b ldr r3, [r7, #0] 8025e4a: 3308 adds r3, #8 8025e4c: 681b ldr r3, [r3, #0] 8025e4e: 43da mvns r2, r3 8025e50: 687b ldr r3, [r7, #4] 8025e52: 401a ands r2, r3 (IPADDR_BROADCAST & ~ip4_addr_get_u32(netif_ip4_netmask(netif))))) { 8025e54: 683b ldr r3, [r7, #0] 8025e56: 3308 adds r3, #8 8025e58: 681b ldr r3, [r3, #0] 8025e5a: 43db mvns r3, r3 && ((addr & ~ip4_addr_get_u32(netif_ip4_netmask(netif))) == 8025e5c: 429a cmp r2, r3 8025e5e: d101 bne.n 8025e64 /* => network broadcast address */ return 1; 8025e60: 2301 movs r3, #1 8025e62: e000 b.n 8025e66 } else { return 0; 8025e64: 2300 movs r3, #0 } } 8025e66: 4618 mov r0, r3 8025e68: 3714 adds r7, #20 8025e6a: 46bd mov sp, r7 8025e6c: f85d 7b04 ldr.w r7, [sp], #4 8025e70: 4770 bx lr 08025e72 : * @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) { 8025e72: b580 push {r7, lr} 8025e74: b084 sub sp, #16 8025e76: af00 add r7, sp, #0 8025e78: 6078 str r0, [r7, #4] ip4_addr_t val; if (ip4addr_aton(cp, &val)) { 8025e7a: f107 030c add.w r3, r7, #12 8025e7e: 4619 mov r1, r3 8025e80: 6878 ldr r0, [r7, #4] 8025e82: f000 f80b bl 8025e9c 8025e86: 4603 mov r3, r0 8025e88: 2b00 cmp r3, #0 8025e8a: d001 beq.n 8025e90 return ip4_addr_get_u32(&val); 8025e8c: 68fb ldr r3, [r7, #12] 8025e8e: e001 b.n 8025e94 } return (IPADDR_NONE); 8025e90: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8025e94: 4618 mov r0, r3 8025e96: 3710 adds r7, #16 8025e98: 46bd mov sp, r7 8025e9a: bd80 pop {r7, pc} 08025e9c : * @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) { 8025e9c: b580 push {r7, lr} 8025e9e: b08a sub sp, #40 @ 0x28 8025ea0: af00 add r7, sp, #0 8025ea2: 6078 str r0, [r7, #4] 8025ea4: 6039 str r1, [r7, #0] u32_t val; u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; 8025ea6: f107 030c add.w r3, r7, #12 8025eaa: 61fb str r3, [r7, #28] c = *cp; 8025eac: 687b ldr r3, [r7, #4] 8025eae: 781b ldrb r3, [r3, #0] 8025eb0: 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)) { 8025eb4: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025eb8: 3301 adds r3, #1 8025eba: 4a89 ldr r2, [pc, #548] @ (80260e0 ) 8025ebc: 4413 add r3, r2 8025ebe: 781b ldrb r3, [r3, #0] 8025ec0: f003 0304 and.w r3, r3, #4 8025ec4: 2b00 cmp r3, #0 8025ec6: d101 bne.n 8025ecc return 0; 8025ec8: 2300 movs r3, #0 8025eca: e105 b.n 80260d8 } val = 0; 8025ecc: 2300 movs r3, #0 8025ece: 627b str r3, [r7, #36] @ 0x24 base = 10; 8025ed0: 230a movs r3, #10 8025ed2: f887 3023 strb.w r3, [r7, #35] @ 0x23 if (c == '0') { 8025ed6: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025eda: 2b30 cmp r3, #48 @ 0x30 8025edc: d11c bne.n 8025f18 c = *++cp; 8025ede: 687b ldr r3, [r7, #4] 8025ee0: 3301 adds r3, #1 8025ee2: 607b str r3, [r7, #4] 8025ee4: 687b ldr r3, [r7, #4] 8025ee6: 781b ldrb r3, [r3, #0] 8025ee8: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (c == 'x' || c == 'X') { 8025eec: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025ef0: 2b78 cmp r3, #120 @ 0x78 8025ef2: d003 beq.n 8025efc 8025ef4: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025ef8: 2b58 cmp r3, #88 @ 0x58 8025efa: d10a bne.n 8025f12 base = 16; 8025efc: 2310 movs r3, #16 8025efe: f887 3023 strb.w r3, [r7, #35] @ 0x23 c = *++cp; 8025f02: 687b ldr r3, [r7, #4] 8025f04: 3301 adds r3, #1 8025f06: 607b str r3, [r7, #4] 8025f08: 687b ldr r3, [r7, #4] 8025f0a: 781b ldrb r3, [r3, #0] 8025f0c: f887 3022 strb.w r3, [r7, #34] @ 0x22 8025f10: e002 b.n 8025f18 } else { base = 8; 8025f12: 2308 movs r3, #8 8025f14: f887 3023 strb.w r3, [r7, #35] @ 0x23 } } for (;;) { if (lwip_isdigit(c)) { 8025f18: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025f1c: 3301 adds r3, #1 8025f1e: 4a70 ldr r2, [pc, #448] @ (80260e0 ) 8025f20: 4413 add r3, r2 8025f22: 781b ldrb r3, [r3, #0] 8025f24: f003 0304 and.w r3, r3, #4 8025f28: 2b00 cmp r3, #0 8025f2a: d011 beq.n 8025f50 val = (val * base) + (u32_t)(c - '0'); 8025f2c: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8025f30: 6a7a ldr r2, [r7, #36] @ 0x24 8025f32: fb03 f202 mul.w r2, r3, r2 8025f36: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025f3a: 4413 add r3, r2 8025f3c: 3b30 subs r3, #48 @ 0x30 8025f3e: 627b str r3, [r7, #36] @ 0x24 c = *++cp; 8025f40: 687b ldr r3, [r7, #4] 8025f42: 3301 adds r3, #1 8025f44: 607b str r3, [r7, #4] 8025f46: 687b ldr r3, [r7, #4] 8025f48: 781b ldrb r3, [r3, #0] 8025f4a: f887 3022 strb.w r3, [r7, #34] @ 0x22 8025f4e: e7e3 b.n 8025f18 } else if (base == 16 && lwip_isxdigit(c)) { 8025f50: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8025f54: 2b10 cmp r3, #16 8025f56: d127 bne.n 8025fa8 8025f58: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025f5c: 3301 adds r3, #1 8025f5e: 4a60 ldr r2, [pc, #384] @ (80260e0 ) 8025f60: 4413 add r3, r2 8025f62: 781b ldrb r3, [r3, #0] 8025f64: f003 0344 and.w r3, r3, #68 @ 0x44 8025f68: 2b00 cmp r3, #0 8025f6a: d01d beq.n 8025fa8 val = (val << 4) | (u32_t)(c + 10 - (lwip_islower(c) ? 'a' : 'A')); 8025f6c: 6a7b ldr r3, [r7, #36] @ 0x24 8025f6e: 011b lsls r3, r3, #4 8025f70: f897 2022 ldrb.w r2, [r7, #34] @ 0x22 8025f74: f102 010a add.w r1, r2, #10 8025f78: f897 2022 ldrb.w r2, [r7, #34] @ 0x22 8025f7c: 3201 adds r2, #1 8025f7e: 4858 ldr r0, [pc, #352] @ (80260e0 ) 8025f80: 4402 add r2, r0 8025f82: 7812 ldrb r2, [r2, #0] 8025f84: f002 0203 and.w r2, r2, #3 8025f88: 2a02 cmp r2, #2 8025f8a: d101 bne.n 8025f90 8025f8c: 2261 movs r2, #97 @ 0x61 8025f8e: e000 b.n 8025f92 8025f90: 2241 movs r2, #65 @ 0x41 8025f92: 1a8a subs r2, r1, r2 8025f94: 4313 orrs r3, r2 8025f96: 627b str r3, [r7, #36] @ 0x24 c = *++cp; 8025f98: 687b ldr r3, [r7, #4] 8025f9a: 3301 adds r3, #1 8025f9c: 607b str r3, [r7, #4] 8025f9e: 687b ldr r3, [r7, #4] 8025fa0: 781b ldrb r3, [r3, #0] 8025fa2: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (lwip_isdigit(c)) { 8025fa6: e7b7 b.n 8025f18 } else { break; } } if (c == '.') { 8025fa8: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025fac: 2b2e cmp r3, #46 @ 0x2e 8025fae: d114 bne.n 8025fda * 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) { 8025fb0: f107 030c add.w r3, r7, #12 8025fb4: 330c adds r3, #12 8025fb6: 69fa ldr r2, [r7, #28] 8025fb8: 429a cmp r2, r3 8025fba: d301 bcc.n 8025fc0 return 0; 8025fbc: 2300 movs r3, #0 8025fbe: e08b b.n 80260d8 } *pp++ = val; 8025fc0: 69fb ldr r3, [r7, #28] 8025fc2: 1d1a adds r2, r3, #4 8025fc4: 61fa str r2, [r7, #28] 8025fc6: 6a7a ldr r2, [r7, #36] @ 0x24 8025fc8: 601a str r2, [r3, #0] c = *++cp; 8025fca: 687b ldr r3, [r7, #4] 8025fcc: 3301 adds r3, #1 8025fce: 607b str r3, [r7, #4] 8025fd0: 687b ldr r3, [r7, #4] 8025fd2: 781b ldrb r3, [r3, #0] 8025fd4: f887 3022 strb.w r3, [r7, #34] @ 0x22 if (!lwip_isdigit(c)) { 8025fd8: e76c b.n 8025eb4 } else { break; 8025fda: bf00 nop } } /* * Check for trailing characters. */ if (c != '\0' && !lwip_isspace(c)) { 8025fdc: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025fe0: 2b00 cmp r3, #0 8025fe2: d00b beq.n 8025ffc 8025fe4: f897 3022 ldrb.w r3, [r7, #34] @ 0x22 8025fe8: 3301 adds r3, #1 8025fea: 4a3d ldr r2, [pc, #244] @ (80260e0 ) 8025fec: 4413 add r3, r2 8025fee: 781b ldrb r3, [r3, #0] 8025ff0: f003 0308 and.w r3, r3, #8 8025ff4: 2b00 cmp r3, #0 8025ff6: d101 bne.n 8025ffc return 0; 8025ff8: 2300 movs r3, #0 8025ffa: e06d b.n 80260d8 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 8025ffc: f107 030c add.w r3, r7, #12 8026000: 69fa ldr r2, [r7, #28] 8026002: 1ad3 subs r3, r2, r3 8026004: 109b asrs r3, r3, #2 8026006: 3301 adds r3, #1 8026008: 2b04 cmp r3, #4 802600a: d853 bhi.n 80260b4 802600c: a201 add r2, pc, #4 @ (adr r2, 8026014 ) 802600e: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8026012: bf00 nop 8026014: 08026029 .word 0x08026029 8026018: 080260c3 .word 0x080260c3 802601c: 0802602d .word 0x0802602d 8026020: 0802604f .word 0x0802604f 8026024: 0802607d .word 0x0802607d case 0: return 0; /* initial nondigit */ 8026028: 2300 movs r3, #0 802602a: e055 b.n 80260d8 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 802602c: 6a7b ldr r3, [r7, #36] @ 0x24 802602e: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 8026032: d301 bcc.n 8026038 return 0; 8026034: 2300 movs r3, #0 8026036: e04f b.n 80260d8 } if (parts[0] > 0xff) { 8026038: 68fb ldr r3, [r7, #12] 802603a: 2bff cmp r3, #255 @ 0xff 802603c: d901 bls.n 8026042 return 0; 802603e: 2300 movs r3, #0 8026040: e04a b.n 80260d8 } val |= parts[0] << 24; 8026042: 68fb ldr r3, [r7, #12] 8026044: 061b lsls r3, r3, #24 8026046: 6a7a ldr r2, [r7, #36] @ 0x24 8026048: 4313 orrs r3, r2 802604a: 627b str r3, [r7, #36] @ 0x24 break; 802604c: e03a b.n 80260c4 case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 802604e: 6a7b ldr r3, [r7, #36] @ 0x24 8026050: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 8026054: d301 bcc.n 802605a return 0; 8026056: 2300 movs r3, #0 8026058: e03e b.n 80260d8 } if ((parts[0] > 0xff) || (parts[1] > 0xff)) { 802605a: 68fb ldr r3, [r7, #12] 802605c: 2bff cmp r3, #255 @ 0xff 802605e: d802 bhi.n 8026066 8026060: 693b ldr r3, [r7, #16] 8026062: 2bff cmp r3, #255 @ 0xff 8026064: d901 bls.n 802606a return 0; 8026066: 2300 movs r3, #0 8026068: e036 b.n 80260d8 } val |= (parts[0] << 24) | (parts[1] << 16); 802606a: 68fb ldr r3, [r7, #12] 802606c: 061a lsls r2, r3, #24 802606e: 693b ldr r3, [r7, #16] 8026070: 041b lsls r3, r3, #16 8026072: 4313 orrs r3, r2 8026074: 6a7a ldr r2, [r7, #36] @ 0x24 8026076: 4313 orrs r3, r2 8026078: 627b str r3, [r7, #36] @ 0x24 break; 802607a: e023 b.n 80260c4 case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 802607c: 6a7b ldr r3, [r7, #36] @ 0x24 802607e: 2bff cmp r3, #255 @ 0xff 8026080: d901 bls.n 8026086 return 0; 8026082: 2300 movs r3, #0 8026084: e028 b.n 80260d8 } if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) { 8026086: 68fb ldr r3, [r7, #12] 8026088: 2bff cmp r3, #255 @ 0xff 802608a: d805 bhi.n 8026098 802608c: 693b ldr r3, [r7, #16] 802608e: 2bff cmp r3, #255 @ 0xff 8026090: d802 bhi.n 8026098 8026092: 697b ldr r3, [r7, #20] 8026094: 2bff cmp r3, #255 @ 0xff 8026096: d901 bls.n 802609c return 0; 8026098: 2300 movs r3, #0 802609a: e01d b.n 80260d8 } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 802609c: 68fb ldr r3, [r7, #12] 802609e: 061a lsls r2, r3, #24 80260a0: 693b ldr r3, [r7, #16] 80260a2: 041b lsls r3, r3, #16 80260a4: 431a orrs r2, r3 80260a6: 697b ldr r3, [r7, #20] 80260a8: 021b lsls r3, r3, #8 80260aa: 4313 orrs r3, r2 80260ac: 6a7a ldr r2, [r7, #36] @ 0x24 80260ae: 4313 orrs r3, r2 80260b0: 627b str r3, [r7, #36] @ 0x24 break; 80260b2: e007 b.n 80260c4 default: LWIP_ASSERT("unhandled", 0); 80260b4: 4b0b ldr r3, [pc, #44] @ (80260e4 ) 80260b6: 22f9 movs r2, #249 @ 0xf9 80260b8: 490b ldr r1, [pc, #44] @ (80260e8 ) 80260ba: 480c ldr r0, [pc, #48] @ (80260ec ) 80260bc: f004 fbee bl 802a89c break; 80260c0: e000 b.n 80260c4 break; 80260c2: bf00 nop } if (addr) { 80260c4: 683b ldr r3, [r7, #0] 80260c6: 2b00 cmp r3, #0 80260c8: d005 beq.n 80260d6 ip4_addr_set_u32(addr, lwip_htonl(val)); 80260ca: 6a78 ldr r0, [r7, #36] @ 0x24 80260cc: f7f3 fca1 bl 8019a12 80260d0: 4602 mov r2, r0 80260d2: 683b ldr r3, [r7, #0] 80260d4: 601a str r2, [r3, #0] } return 1; 80260d6: 2301 movs r3, #1 } 80260d8: 4618 mov r0, r3 80260da: 3728 adds r7, #40 @ 0x28 80260dc: 46bd mov sp, r7 80260de: bd80 pop {r7, pc} 80260e0: 08031d80 .word 0x08031d80 80260e4: 0803162c .word 0x0803162c 80260e8: 08031668 .word 0x08031668 80260ec: 08031674 .word 0x08031674 080260f0 : * @return pointer to a global static (!) buffer that holds the ASCII * representation of addr */ char * ip4addr_ntoa(const ip4_addr_t *addr) { 80260f0: b580 push {r7, lr} 80260f2: b082 sub sp, #8 80260f4: af00 add r7, sp, #0 80260f6: 6078 str r0, [r7, #4] static char str[IP4ADDR_STRLEN_MAX]; return ip4addr_ntoa_r(addr, str, IP4ADDR_STRLEN_MAX); 80260f8: 2210 movs r2, #16 80260fa: 4904 ldr r1, [pc, #16] @ (802610c ) 80260fc: 6878 ldr r0, [r7, #4] 80260fe: f000 f807 bl 8026110 8026102: 4603 mov r3, r0 } 8026104: 4618 mov r0, r3 8026106: 3708 adds r7, #8 8026108: 46bd mov sp, r7 802610a: bd80 pop {r7, pc} 802610c: 2402b104 .word 0x2402b104 08026110 : * @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) { 8026110: b480 push {r7} 8026112: b08d sub sp, #52 @ 0x34 8026114: af00 add r7, sp, #0 8026116: 60f8 str r0, [r7, #12] 8026118: 60b9 str r1, [r7, #8] 802611a: 607a str r2, [r7, #4] char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 802611c: 2300 movs r3, #0 802611e: 623b str r3, [r7, #32] s_addr = ip4_addr_get_u32(addr); 8026120: 68fb ldr r3, [r7, #12] 8026122: 681b ldr r3, [r3, #0] 8026124: 61bb str r3, [r7, #24] rp = buf; 8026126: 68bb ldr r3, [r7, #8] 8026128: 62fb str r3, [r7, #44] @ 0x2c ap = (u8_t *)&s_addr; 802612a: f107 0318 add.w r3, r7, #24 802612e: 62bb str r3, [r7, #40] @ 0x28 for (n = 0; n < 4; n++) { 8026130: 2300 movs r3, #0 8026132: f887 3027 strb.w r3, [r7, #39] @ 0x27 8026136: e058 b.n 80261ea i = 0; 8026138: 2300 movs r3, #0 802613a: f887 3026 strb.w r3, [r7, #38] @ 0x26 do { rem = *ap % (u8_t)10; 802613e: 6abb ldr r3, [r7, #40] @ 0x28 8026140: 781a ldrb r2, [r3, #0] 8026142: 4b32 ldr r3, [pc, #200] @ (802620c ) 8026144: fba3 1302 umull r1, r3, r3, r2 8026148: 08d9 lsrs r1, r3, #3 802614a: 460b mov r3, r1 802614c: 009b lsls r3, r3, #2 802614e: 440b add r3, r1 8026150: 005b lsls r3, r3, #1 8026152: 1ad3 subs r3, r2, r3 8026154: 77fb strb r3, [r7, #31] *ap /= (u8_t)10; 8026156: 6abb ldr r3, [r7, #40] @ 0x28 8026158: 781b ldrb r3, [r3, #0] 802615a: 4a2c ldr r2, [pc, #176] @ (802620c ) 802615c: fba2 2303 umull r2, r3, r2, r3 8026160: 08db lsrs r3, r3, #3 8026162: b2da uxtb r2, r3 8026164: 6abb ldr r3, [r7, #40] @ 0x28 8026166: 701a strb r2, [r3, #0] inv[i++] = (char)('0' + rem); 8026168: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 802616c: 1c5a adds r2, r3, #1 802616e: f887 2026 strb.w r2, [r7, #38] @ 0x26 8026172: 4619 mov r1, r3 8026174: 7ffb ldrb r3, [r7, #31] 8026176: 3330 adds r3, #48 @ 0x30 8026178: b2da uxtb r2, r3 802617a: f101 0330 add.w r3, r1, #48 @ 0x30 802617e: 443b add r3, r7 8026180: f803 2c1c strb.w r2, [r3, #-28] } while (*ap); 8026184: 6abb ldr r3, [r7, #40] @ 0x28 8026186: 781b ldrb r3, [r3, #0] 8026188: 2b00 cmp r3, #0 802618a: d1d8 bne.n 802613e while (i--) { 802618c: e011 b.n 80261b2 if (len++ >= buflen) { 802618e: 6a3b ldr r3, [r7, #32] 8026190: 1c5a adds r2, r3, #1 8026192: 623a str r2, [r7, #32] 8026194: 687a ldr r2, [r7, #4] 8026196: 429a cmp r2, r3 8026198: dc01 bgt.n 802619e return NULL; 802619a: 2300 movs r3, #0 802619c: e030 b.n 8026200 } *rp++ = inv[i]; 802619e: f897 2026 ldrb.w r2, [r7, #38] @ 0x26 80261a2: 6afb ldr r3, [r7, #44] @ 0x2c 80261a4: 1c59 adds r1, r3, #1 80261a6: 62f9 str r1, [r7, #44] @ 0x2c 80261a8: 3230 adds r2, #48 @ 0x30 80261aa: 443a add r2, r7 80261ac: f812 2c1c ldrb.w r2, [r2, #-28] 80261b0: 701a strb r2, [r3, #0] while (i--) { 80261b2: f897 3026 ldrb.w r3, [r7, #38] @ 0x26 80261b6: 1e5a subs r2, r3, #1 80261b8: f887 2026 strb.w r2, [r7, #38] @ 0x26 80261bc: 2b00 cmp r3, #0 80261be: d1e6 bne.n 802618e } if (len++ >= buflen) { 80261c0: 6a3b ldr r3, [r7, #32] 80261c2: 1c5a adds r2, r3, #1 80261c4: 623a str r2, [r7, #32] 80261c6: 687a ldr r2, [r7, #4] 80261c8: 429a cmp r2, r3 80261ca: dc01 bgt.n 80261d0 return NULL; 80261cc: 2300 movs r3, #0 80261ce: e017 b.n 8026200 } *rp++ = '.'; 80261d0: 6afb ldr r3, [r7, #44] @ 0x2c 80261d2: 1c5a adds r2, r3, #1 80261d4: 62fa str r2, [r7, #44] @ 0x2c 80261d6: 222e movs r2, #46 @ 0x2e 80261d8: 701a strb r2, [r3, #0] ap++; 80261da: 6abb ldr r3, [r7, #40] @ 0x28 80261dc: 3301 adds r3, #1 80261de: 62bb str r3, [r7, #40] @ 0x28 for (n = 0; n < 4; n++) { 80261e0: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 80261e4: 3301 adds r3, #1 80261e6: f887 3027 strb.w r3, [r7, #39] @ 0x27 80261ea: f897 3027 ldrb.w r3, [r7, #39] @ 0x27 80261ee: 2b03 cmp r3, #3 80261f0: d9a2 bls.n 8026138 } *--rp = 0; 80261f2: 6afb ldr r3, [r7, #44] @ 0x2c 80261f4: 3b01 subs r3, #1 80261f6: 62fb str r3, [r7, #44] @ 0x2c 80261f8: 6afb ldr r3, [r7, #44] @ 0x2c 80261fa: 2200 movs r2, #0 80261fc: 701a strb r2, [r3, #0] return buf; 80261fe: 68bb ldr r3, [r7, #8] } 8026200: 4618 mov r0, r3 8026202: 3734 adds r7, #52 @ 0x34 8026204: 46bd mov sp, r7 8026206: f85d 7b04 ldr.w r7, [sp], #4 802620a: 4770 bx lr 802620c: cccccccd .word 0xcccccccd 08026210 : * * Should be called every 1000 msec (defined by IP_TMR_INTERVAL). */ void ip_reass_tmr(void) { 8026210: b580 push {r7, lr} 8026212: b084 sub sp, #16 8026214: af00 add r7, sp, #0 struct ip_reassdata *r, *prev = NULL; 8026216: 2300 movs r3, #0 8026218: 60bb str r3, [r7, #8] r = reassdatagrams; 802621a: 4b12 ldr r3, [pc, #72] @ (8026264 ) 802621c: 681b ldr r3, [r3, #0] 802621e: 60fb str r3, [r7, #12] while (r != NULL) { 8026220: e018 b.n 8026254 /* Decrement the timer. Once it reaches 0, * clean up the incomplete fragment assembly */ if (r->timer > 0) { 8026222: 68fb ldr r3, [r7, #12] 8026224: 7fdb ldrb r3, [r3, #31] 8026226: 2b00 cmp r3, #0 8026228: d00b beq.n 8026242 r->timer--; 802622a: 68fb ldr r3, [r7, #12] 802622c: 7fdb ldrb r3, [r3, #31] 802622e: 3b01 subs r3, #1 8026230: b2da uxtb r2, r3 8026232: 68fb ldr r3, [r7, #12] 8026234: 77da strb r2, [r3, #31] LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer)); prev = r; 8026236: 68fb ldr r3, [r7, #12] 8026238: 60bb str r3, [r7, #8] r = r->next; 802623a: 68fb ldr r3, [r7, #12] 802623c: 681b ldr r3, [r3, #0] 802623e: 60fb str r3, [r7, #12] 8026240: e008 b.n 8026254 } else { /* reassembly timed out */ struct ip_reassdata *tmp; LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); tmp = r; 8026242: 68fb ldr r3, [r7, #12] 8026244: 607b str r3, [r7, #4] /* get the next pointer before freeing */ r = r->next; 8026246: 68fb ldr r3, [r7, #12] 8026248: 681b ldr r3, [r3, #0] 802624a: 60fb str r3, [r7, #12] /* free the helper struct and all enqueued pbufs */ ip_reass_free_complete_datagram(tmp, prev); 802624c: 68b9 ldr r1, [r7, #8] 802624e: 6878 ldr r0, [r7, #4] 8026250: f000 f80a bl 8026268 while (r != NULL) { 8026254: 68fb ldr r3, [r7, #12] 8026256: 2b00 cmp r3, #0 8026258: d1e3 bne.n 8026222 } } } 802625a: bf00 nop 802625c: bf00 nop 802625e: 3710 adds r7, #16 8026260: 46bd mov sp, r7 8026262: bd80 pop {r7, pc} 8026264: 2402b114 .word 0x2402b114 08026268 : * @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) { 8026268: b580 push {r7, lr} 802626a: b088 sub sp, #32 802626c: af00 add r7, sp, #0 802626e: 6078 str r0, [r7, #4] 8026270: 6039 str r1, [r7, #0] u16_t pbufs_freed = 0; 8026272: 2300 movs r3, #0 8026274: 83fb strh r3, [r7, #30] u16_t clen; struct pbuf *p; struct ip_reass_helper *iprh; LWIP_ASSERT("prev != ipr", prev != ipr); 8026276: 683a ldr r2, [r7, #0] 8026278: 687b ldr r3, [r7, #4] 802627a: 429a cmp r2, r3 802627c: d105 bne.n 802628a 802627e: 4b45 ldr r3, [pc, #276] @ (8026394 ) 8026280: 22ab movs r2, #171 @ 0xab 8026282: 4945 ldr r1, [pc, #276] @ (8026398 ) 8026284: 4845 ldr r0, [pc, #276] @ (802639c ) 8026286: f004 fb09 bl 802a89c if (prev != NULL) { 802628a: 683b ldr r3, [r7, #0] 802628c: 2b00 cmp r3, #0 802628e: d00a beq.n 80262a6 LWIP_ASSERT("prev->next == ipr", prev->next == ipr); 8026290: 683b ldr r3, [r7, #0] 8026292: 681b ldr r3, [r3, #0] 8026294: 687a ldr r2, [r7, #4] 8026296: 429a cmp r2, r3 8026298: d005 beq.n 80262a6 802629a: 4b3e ldr r3, [pc, #248] @ (8026394 ) 802629c: 22ad movs r2, #173 @ 0xad 802629e: 4940 ldr r1, [pc, #256] @ (80263a0 ) 80262a0: 483e ldr r0, [pc, #248] @ (802639c ) 80262a2: f004 fafb bl 802a89c } MIB2_STATS_INC(mib2.ipreasmfails); #if LWIP_ICMP iprh = (struct ip_reass_helper *)ipr->p->payload; 80262a6: 687b ldr r3, [r7, #4] 80262a8: 685b ldr r3, [r3, #4] 80262aa: 685b ldr r3, [r3, #4] 80262ac: 617b str r3, [r7, #20] if (iprh->start == 0) { 80262ae: 697b ldr r3, [r7, #20] 80262b0: 889b ldrh r3, [r3, #4] 80262b2: b29b uxth r3, r3 80262b4: 2b00 cmp r3, #0 80262b6: d12a bne.n 802630e /* The first fragment was received, send ICMP time exceeded. */ /* First, de-queue the first pbuf from r->p. */ p = ipr->p; 80262b8: 687b ldr r3, [r7, #4] 80262ba: 685b ldr r3, [r3, #4] 80262bc: 61bb str r3, [r7, #24] ipr->p = iprh->next_pbuf; 80262be: 697b ldr r3, [r7, #20] 80262c0: 681a ldr r2, [r3, #0] 80262c2: 687b ldr r3, [r7, #4] 80262c4: 605a str r2, [r3, #4] /* Then, copy the original header into it. */ SMEMCPY(p->payload, &ipr->iphdr, IP_HLEN); 80262c6: 69bb ldr r3, [r7, #24] 80262c8: 6858 ldr r0, [r3, #4] 80262ca: 687b ldr r3, [r7, #4] 80262cc: 3308 adds r3, #8 80262ce: 2214 movs r2, #20 80262d0: 4619 mov r1, r3 80262d2: f004 fd6c bl 802adae icmp_time_exceeded(p, ICMP_TE_FRAG); 80262d6: 2101 movs r1, #1 80262d8: 69b8 ldr r0, [r7, #24] 80262da: f7ff fa4d bl 8025778 clen = pbuf_clen(p); 80262de: 69b8 ldr r0, [r7, #24] 80262e0: f7f5 f8f2 bl 801b4c8 80262e4: 4603 mov r3, r0 80262e6: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 80262e8: 8bfa ldrh r2, [r7, #30] 80262ea: 8a7b ldrh r3, [r7, #18] 80262ec: 4413 add r3, r2 80262ee: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 80262f2: db05 blt.n 8026300 80262f4: 4b27 ldr r3, [pc, #156] @ (8026394 ) 80262f6: 22bc movs r2, #188 @ 0xbc 80262f8: 492a ldr r1, [pc, #168] @ (80263a4 ) 80262fa: 4828 ldr r0, [pc, #160] @ (802639c ) 80262fc: f004 face bl 802a89c pbufs_freed = (u16_t)(pbufs_freed + clen); 8026300: 8bfa ldrh r2, [r7, #30] 8026302: 8a7b ldrh r3, [r7, #18] 8026304: 4413 add r3, r2 8026306: 83fb strh r3, [r7, #30] pbuf_free(p); 8026308: 69b8 ldr r0, [r7, #24] 802630a: f7f5 f84f bl 801b3ac } #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; 802630e: 687b ldr r3, [r7, #4] 8026310: 685b ldr r3, [r3, #4] 8026312: 61bb str r3, [r7, #24] while (p != NULL) { 8026314: e01f b.n 8026356 struct pbuf *pcur; iprh = (struct ip_reass_helper *)p->payload; 8026316: 69bb ldr r3, [r7, #24] 8026318: 685b ldr r3, [r3, #4] 802631a: 617b str r3, [r7, #20] pcur = p; 802631c: 69bb ldr r3, [r7, #24] 802631e: 60fb str r3, [r7, #12] /* get the next pointer before freeing */ p = iprh->next_pbuf; 8026320: 697b ldr r3, [r7, #20] 8026322: 681b ldr r3, [r3, #0] 8026324: 61bb str r3, [r7, #24] clen = pbuf_clen(pcur); 8026326: 68f8 ldr r0, [r7, #12] 8026328: f7f5 f8ce bl 801b4c8 802632c: 4603 mov r3, r0 802632e: 827b strh r3, [r7, #18] LWIP_ASSERT("pbufs_freed + clen <= 0xffff", pbufs_freed + clen <= 0xffff); 8026330: 8bfa ldrh r2, [r7, #30] 8026332: 8a7b ldrh r3, [r7, #18] 8026334: 4413 add r3, r2 8026336: f5b3 3f80 cmp.w r3, #65536 @ 0x10000 802633a: db05 blt.n 8026348 802633c: 4b15 ldr r3, [pc, #84] @ (8026394 ) 802633e: 22cc movs r2, #204 @ 0xcc 8026340: 4918 ldr r1, [pc, #96] @ (80263a4 ) 8026342: 4816 ldr r0, [pc, #88] @ (802639c ) 8026344: f004 faaa bl 802a89c pbufs_freed = (u16_t)(pbufs_freed + clen); 8026348: 8bfa ldrh r2, [r7, #30] 802634a: 8a7b ldrh r3, [r7, #18] 802634c: 4413 add r3, r2 802634e: 83fb strh r3, [r7, #30] pbuf_free(pcur); 8026350: 68f8 ldr r0, [r7, #12] 8026352: f7f5 f82b bl 801b3ac while (p != NULL) { 8026356: 69bb ldr r3, [r7, #24] 8026358: 2b00 cmp r3, #0 802635a: d1dc bne.n 8026316 } /* Then, unchain the struct ip_reassdata from the list and free it. */ ip_reass_dequeue_datagram(ipr, prev); 802635c: 6839 ldr r1, [r7, #0] 802635e: 6878 ldr r0, [r7, #4] 8026360: f000 f8c2 bl 80264e8 LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); 8026364: 4b10 ldr r3, [pc, #64] @ (80263a8 ) 8026366: 881b ldrh r3, [r3, #0] 8026368: 8bfa ldrh r2, [r7, #30] 802636a: 429a cmp r2, r3 802636c: d905 bls.n 802637a 802636e: 4b09 ldr r3, [pc, #36] @ (8026394 ) 8026370: 22d2 movs r2, #210 @ 0xd2 8026372: 490e ldr r1, [pc, #56] @ (80263ac ) 8026374: 4809 ldr r0, [pc, #36] @ (802639c ) 8026376: f004 fa91 bl 802a89c ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); 802637a: 4b0b ldr r3, [pc, #44] @ (80263a8 ) 802637c: 881a ldrh r2, [r3, #0] 802637e: 8bfb ldrh r3, [r7, #30] 8026380: 1ad3 subs r3, r2, r3 8026382: b29a uxth r2, r3 8026384: 4b08 ldr r3, [pc, #32] @ (80263a8 ) 8026386: 801a strh r2, [r3, #0] return pbufs_freed; 8026388: 8bfb ldrh r3, [r7, #30] } 802638a: 4618 mov r0, r3 802638c: 3720 adds r7, #32 802638e: 46bd mov sp, r7 8026390: bd80 pop {r7, pc} 8026392: bf00 nop 8026394: 0803169c .word 0x0803169c 8026398: 080316d8 .word 0x080316d8 802639c: 080316e4 .word 0x080316e4 80263a0: 0803170c .word 0x0803170c 80263a4: 08031720 .word 0x08031720 80263a8: 2402b118 .word 0x2402b118 80263ac: 08031740 .word 0x08031740 080263b0 : * (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) { 80263b0: b580 push {r7, lr} 80263b2: b08a sub sp, #40 @ 0x28 80263b4: af00 add r7, sp, #0 80263b6: 6078 str r0, [r7, #4] 80263b8: 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; 80263ba: 2300 movs r3, #0 80263bc: 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; 80263be: 2300 movs r3, #0 80263c0: 623b str r3, [r7, #32] prev = NULL; 80263c2: 2300 movs r3, #0 80263c4: 61fb str r3, [r7, #28] oldest_prev = NULL; 80263c6: 2300 movs r3, #0 80263c8: 61bb str r3, [r7, #24] other_datagrams = 0; 80263ca: 2300 movs r3, #0 80263cc: 613b str r3, [r7, #16] r = reassdatagrams; 80263ce: 4b28 ldr r3, [pc, #160] @ (8026470 ) 80263d0: 681b ldr r3, [r3, #0] 80263d2: 627b str r3, [r7, #36] @ 0x24 while (r != NULL) { 80263d4: e030 b.n 8026438 if (!IP_ADDRESSES_AND_ID_MATCH(&r->iphdr, fraghdr)) { 80263d6: 6a7b ldr r3, [r7, #36] @ 0x24 80263d8: 695a ldr r2, [r3, #20] 80263da: 687b ldr r3, [r7, #4] 80263dc: 68db ldr r3, [r3, #12] 80263de: 429a cmp r2, r3 80263e0: d10c bne.n 80263fc 80263e2: 6a7b ldr r3, [r7, #36] @ 0x24 80263e4: 699a ldr r2, [r3, #24] 80263e6: 687b ldr r3, [r7, #4] 80263e8: 691b ldr r3, [r3, #16] 80263ea: 429a cmp r2, r3 80263ec: d106 bne.n 80263fc 80263ee: 6a7b ldr r3, [r7, #36] @ 0x24 80263f0: 899a ldrh r2, [r3, #12] 80263f2: 687b ldr r3, [r7, #4] 80263f4: 889b ldrh r3, [r3, #4] 80263f6: b29b uxth r3, r3 80263f8: 429a cmp r2, r3 80263fa: d014 beq.n 8026426 /* Not the same datagram as fraghdr */ other_datagrams++; 80263fc: 693b ldr r3, [r7, #16] 80263fe: 3301 adds r3, #1 8026400: 613b str r3, [r7, #16] if (oldest == NULL) { 8026402: 6a3b ldr r3, [r7, #32] 8026404: 2b00 cmp r3, #0 8026406: d104 bne.n 8026412 oldest = r; 8026408: 6a7b ldr r3, [r7, #36] @ 0x24 802640a: 623b str r3, [r7, #32] oldest_prev = prev; 802640c: 69fb ldr r3, [r7, #28] 802640e: 61bb str r3, [r7, #24] 8026410: e009 b.n 8026426 } else if (r->timer <= oldest->timer) { 8026412: 6a7b ldr r3, [r7, #36] @ 0x24 8026414: 7fda ldrb r2, [r3, #31] 8026416: 6a3b ldr r3, [r7, #32] 8026418: 7fdb ldrb r3, [r3, #31] 802641a: 429a cmp r2, r3 802641c: d803 bhi.n 8026426 /* older than the previous oldest */ oldest = r; 802641e: 6a7b ldr r3, [r7, #36] @ 0x24 8026420: 623b str r3, [r7, #32] oldest_prev = prev; 8026422: 69fb ldr r3, [r7, #28] 8026424: 61bb str r3, [r7, #24] } } if (r->next != NULL) { 8026426: 6a7b ldr r3, [r7, #36] @ 0x24 8026428: 681b ldr r3, [r3, #0] 802642a: 2b00 cmp r3, #0 802642c: d001 beq.n 8026432 prev = r; 802642e: 6a7b ldr r3, [r7, #36] @ 0x24 8026430: 61fb str r3, [r7, #28] } r = r->next; 8026432: 6a7b ldr r3, [r7, #36] @ 0x24 8026434: 681b ldr r3, [r3, #0] 8026436: 627b str r3, [r7, #36] @ 0x24 while (r != NULL) { 8026438: 6a7b ldr r3, [r7, #36] @ 0x24 802643a: 2b00 cmp r3, #0 802643c: d1cb bne.n 80263d6 } if (oldest != NULL) { 802643e: 6a3b ldr r3, [r7, #32] 8026440: 2b00 cmp r3, #0 8026442: d008 beq.n 8026456 pbufs_freed_current = ip_reass_free_complete_datagram(oldest, oldest_prev); 8026444: 69b9 ldr r1, [r7, #24] 8026446: 6a38 ldr r0, [r7, #32] 8026448: f7ff ff0e bl 8026268 802644c: 60f8 str r0, [r7, #12] pbufs_freed += pbufs_freed_current; 802644e: 697a ldr r2, [r7, #20] 8026450: 68fb ldr r3, [r7, #12] 8026452: 4413 add r3, r2 8026454: 617b str r3, [r7, #20] } } while ((pbufs_freed < pbufs_needed) && (other_datagrams > 1)); 8026456: 697a ldr r2, [r7, #20] 8026458: 683b ldr r3, [r7, #0] 802645a: 429a cmp r2, r3 802645c: da02 bge.n 8026464 802645e: 693b ldr r3, [r7, #16] 8026460: 2b01 cmp r3, #1 8026462: dcac bgt.n 80263be return pbufs_freed; 8026464: 697b ldr r3, [r7, #20] } 8026466: 4618 mov r0, r3 8026468: 3728 adds r7, #40 @ 0x28 802646a: 46bd mov sp, r7 802646c: bd80 pop {r7, pc} 802646e: bf00 nop 8026470: 2402b114 .word 0x2402b114 08026474 : * @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) { 8026474: b580 push {r7, lr} 8026476: b084 sub sp, #16 8026478: af00 add r7, sp, #0 802647a: 6078 str r0, [r7, #4] 802647c: 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); 802647e: 2004 movs r0, #4 8026480: f7f4 f830 bl 801a4e4 8026484: 60f8 str r0, [r7, #12] if (ipr == NULL) { 8026486: 68fb ldr r3, [r7, #12] 8026488: 2b00 cmp r3, #0 802648a: d110 bne.n 80264ae #if IP_REASS_FREE_OLDEST if (ip_reass_remove_oldest_datagram(fraghdr, clen) >= clen) { 802648c: 6839 ldr r1, [r7, #0] 802648e: 6878 ldr r0, [r7, #4] 8026490: f7ff ff8e bl 80263b0 8026494: 4602 mov r2, r0 8026496: 683b ldr r3, [r7, #0] 8026498: 4293 cmp r3, r2 802649a: dc03 bgt.n 80264a4 ipr = (struct ip_reassdata *)memp_malloc(MEMP_REASSDATA); 802649c: 2004 movs r0, #4 802649e: f7f4 f821 bl 801a4e4 80264a2: 60f8 str r0, [r7, #12] } if (ipr == NULL) 80264a4: 68fb ldr r3, [r7, #12] 80264a6: 2b00 cmp r3, #0 80264a8: d101 bne.n 80264ae #endif /* IP_REASS_FREE_OLDEST */ { IPFRAG_STATS_INC(ip_frag.memerr); LWIP_DEBUGF(IP_REASS_DEBUG, ("Failed to alloc reassdata struct\n")); return NULL; 80264aa: 2300 movs r3, #0 80264ac: e016 b.n 80264dc } } memset(ipr, 0, sizeof(struct ip_reassdata)); 80264ae: 2220 movs r2, #32 80264b0: 2100 movs r1, #0 80264b2: 68f8 ldr r0, [r7, #12] 80264b4: f004 fb84 bl 802abc0 ipr->timer = IP_REASS_MAXAGE; 80264b8: 68fb ldr r3, [r7, #12] 80264ba: 220f movs r2, #15 80264bc: 77da strb r2, [r3, #31] /* enqueue the new structure to the front of the list */ ipr->next = reassdatagrams; 80264be: 4b09 ldr r3, [pc, #36] @ (80264e4 ) 80264c0: 681a ldr r2, [r3, #0] 80264c2: 68fb ldr r3, [r7, #12] 80264c4: 601a str r2, [r3, #0] reassdatagrams = ipr; 80264c6: 4a07 ldr r2, [pc, #28] @ (80264e4 ) 80264c8: 68fb ldr r3, [r7, #12] 80264ca: 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); 80264cc: 68fb ldr r3, [r7, #12] 80264ce: 3308 adds r3, #8 80264d0: 2214 movs r2, #20 80264d2: 6879 ldr r1, [r7, #4] 80264d4: 4618 mov r0, r3 80264d6: f004 fc6a bl 802adae return ipr; 80264da: 68fb ldr r3, [r7, #12] } 80264dc: 4618 mov r0, r3 80264de: 3710 adds r7, #16 80264e0: 46bd mov sp, r7 80264e2: bd80 pop {r7, pc} 80264e4: 2402b114 .word 0x2402b114 080264e8 : * 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) { 80264e8: b580 push {r7, lr} 80264ea: b082 sub sp, #8 80264ec: af00 add r7, sp, #0 80264ee: 6078 str r0, [r7, #4] 80264f0: 6039 str r1, [r7, #0] /* dequeue the reass struct */ if (reassdatagrams == ipr) { 80264f2: 4b10 ldr r3, [pc, #64] @ (8026534 ) 80264f4: 681b ldr r3, [r3, #0] 80264f6: 687a ldr r2, [r7, #4] 80264f8: 429a cmp r2, r3 80264fa: d104 bne.n 8026506 /* it was the first in the list */ reassdatagrams = ipr->next; 80264fc: 687b ldr r3, [r7, #4] 80264fe: 681b ldr r3, [r3, #0] 8026500: 4a0c ldr r2, [pc, #48] @ (8026534 ) 8026502: 6013 str r3, [r2, #0] 8026504: e00d b.n 8026522 } else { /* it wasn't the first, so it must have a valid 'prev' */ LWIP_ASSERT("sanity check linked list", prev != NULL); 8026506: 683b ldr r3, [r7, #0] 8026508: 2b00 cmp r3, #0 802650a: d106 bne.n 802651a 802650c: 4b0a ldr r3, [pc, #40] @ (8026538 ) 802650e: f240 1245 movw r2, #325 @ 0x145 8026512: 490a ldr r1, [pc, #40] @ (802653c ) 8026514: 480a ldr r0, [pc, #40] @ (8026540 ) 8026516: f004 f9c1 bl 802a89c prev->next = ipr->next; 802651a: 687b ldr r3, [r7, #4] 802651c: 681a ldr r2, [r3, #0] 802651e: 683b ldr r3, [r7, #0] 8026520: 601a str r2, [r3, #0] } /* now we can free the ip_reassdata struct */ memp_free(MEMP_REASSDATA, ipr); 8026522: 6879 ldr r1, [r7, #4] 8026524: 2004 movs r0, #4 8026526: f7f4 f853 bl 801a5d0 } 802652a: bf00 nop 802652c: 3708 adds r7, #8 802652e: 46bd mov sp, r7 8026530: bd80 pop {r7, pc} 8026532: bf00 nop 8026534: 2402b114 .word 0x2402b114 8026538: 0803169c .word 0x0803169c 802653c: 08031764 .word 0x08031764 8026540: 080316e4 .word 0x080316e4 08026544 : * @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) { 8026544: b580 push {r7, lr} 8026546: b08c sub sp, #48 @ 0x30 8026548: af00 add r7, sp, #0 802654a: 60f8 str r0, [r7, #12] 802654c: 60b9 str r1, [r7, #8] 802654e: 607a str r2, [r7, #4] struct ip_reass_helper *iprh, *iprh_tmp, *iprh_prev = NULL; 8026550: 2300 movs r3, #0 8026552: 62bb str r3, [r7, #40] @ 0x28 struct pbuf *q; u16_t offset, len; u8_t hlen; struct ip_hdr *fraghdr; int valid = 1; 8026554: 2301 movs r3, #1 8026556: 623b str r3, [r7, #32] /* Extract length and fragment offset from current fragment */ fraghdr = (struct ip_hdr *)new_p->payload; 8026558: 68bb ldr r3, [r7, #8] 802655a: 685b ldr r3, [r3, #4] 802655c: 61fb str r3, [r7, #28] len = lwip_ntohs(IPH_LEN(fraghdr)); 802655e: 69fb ldr r3, [r7, #28] 8026560: 885b ldrh r3, [r3, #2] 8026562: b29b uxth r3, r3 8026564: 4618 mov r0, r3 8026566: f7f3 fa3f bl 80199e8 802656a: 4603 mov r3, r0 802656c: 837b strh r3, [r7, #26] hlen = IPH_HL_BYTES(fraghdr); 802656e: 69fb ldr r3, [r7, #28] 8026570: 781b ldrb r3, [r3, #0] 8026572: f003 030f and.w r3, r3, #15 8026576: b2db uxtb r3, r3 8026578: 009b lsls r3, r3, #2 802657a: 767b strb r3, [r7, #25] if (hlen > len) { 802657c: 7e7b ldrb r3, [r7, #25] 802657e: b29b uxth r3, r3 8026580: 8b7a ldrh r2, [r7, #26] 8026582: 429a cmp r2, r3 8026584: d202 bcs.n 802658c /* invalid datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8026586: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802658a: e135 b.n 80267f8 } len = (u16_t)(len - hlen); 802658c: 7e7b ldrb r3, [r7, #25] 802658e: b29b uxth r3, r3 8026590: 8b7a ldrh r2, [r7, #26] 8026592: 1ad3 subs r3, r2, r3 8026594: 837b strh r3, [r7, #26] offset = IPH_OFFSET_BYTES(fraghdr); 8026596: 69fb ldr r3, [r7, #28] 8026598: 88db ldrh r3, [r3, #6] 802659a: b29b uxth r3, r3 802659c: 4618 mov r0, r3 802659e: f7f3 fa23 bl 80199e8 80265a2: 4603 mov r3, r0 80265a4: f3c3 030c ubfx r3, r3, #0, #13 80265a8: b29b uxth r3, r3 80265aa: 00db lsls r3, r3, #3 80265ac: 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; 80265ae: 68bb ldr r3, [r7, #8] 80265b0: 685b ldr r3, [r3, #4] 80265b2: 62fb str r3, [r7, #44] @ 0x2c iprh->next_pbuf = NULL; 80265b4: 6afb ldr r3, [r7, #44] @ 0x2c 80265b6: 2200 movs r2, #0 80265b8: 701a strb r2, [r3, #0] 80265ba: 2200 movs r2, #0 80265bc: 705a strb r2, [r3, #1] 80265be: 2200 movs r2, #0 80265c0: 709a strb r2, [r3, #2] 80265c2: 2200 movs r2, #0 80265c4: 70da strb r2, [r3, #3] iprh->start = offset; 80265c6: 6afb ldr r3, [r7, #44] @ 0x2c 80265c8: 8afa ldrh r2, [r7, #22] 80265ca: 809a strh r2, [r3, #4] iprh->end = (u16_t)(offset + len); 80265cc: 8afa ldrh r2, [r7, #22] 80265ce: 8b7b ldrh r3, [r7, #26] 80265d0: 4413 add r3, r2 80265d2: b29a uxth r2, r3 80265d4: 6afb ldr r3, [r7, #44] @ 0x2c 80265d6: 80da strh r2, [r3, #6] if (iprh->end < offset) { 80265d8: 6afb ldr r3, [r7, #44] @ 0x2c 80265da: 88db ldrh r3, [r3, #6] 80265dc: b29b uxth r3, r3 80265de: 8afa ldrh r2, [r7, #22] 80265e0: 429a cmp r2, r3 80265e2: d902 bls.n 80265ea /* u16_t overflow, cannot handle this */ return IP_REASS_VALIDATE_PBUF_DROPPED; 80265e4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80265e8: e106 b.n 80267f8 } /* 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;) { 80265ea: 68fb ldr r3, [r7, #12] 80265ec: 685b ldr r3, [r3, #4] 80265ee: 627b str r3, [r7, #36] @ 0x24 80265f0: e068 b.n 80266c4 iprh_tmp = (struct ip_reass_helper *)q->payload; 80265f2: 6a7b ldr r3, [r7, #36] @ 0x24 80265f4: 685b ldr r3, [r3, #4] 80265f6: 613b str r3, [r7, #16] if (iprh->start < iprh_tmp->start) { 80265f8: 6afb ldr r3, [r7, #44] @ 0x2c 80265fa: 889b ldrh r3, [r3, #4] 80265fc: b29a uxth r2, r3 80265fe: 693b ldr r3, [r7, #16] 8026600: 889b ldrh r3, [r3, #4] 8026602: b29b uxth r3, r3 8026604: 429a cmp r2, r3 8026606: d235 bcs.n 8026674 /* the new pbuf should be inserted before this */ iprh->next_pbuf = q; 8026608: 6afb ldr r3, [r7, #44] @ 0x2c 802660a: 6a7a ldr r2, [r7, #36] @ 0x24 802660c: 601a str r2, [r3, #0] if (iprh_prev != NULL) { 802660e: 6abb ldr r3, [r7, #40] @ 0x28 8026610: 2b00 cmp r3, #0 8026612: d020 beq.n 8026656 /* not the fragment with the lowest offset */ #if IP_REASS_CHECK_OVERLAP if ((iprh->start < iprh_prev->end) || (iprh->end > iprh_tmp->start)) { 8026614: 6afb ldr r3, [r7, #44] @ 0x2c 8026616: 889b ldrh r3, [r3, #4] 8026618: b29a uxth r2, r3 802661a: 6abb ldr r3, [r7, #40] @ 0x28 802661c: 88db ldrh r3, [r3, #6] 802661e: b29b uxth r3, r3 8026620: 429a cmp r2, r3 8026622: d307 bcc.n 8026634 8026624: 6afb ldr r3, [r7, #44] @ 0x2c 8026626: 88db ldrh r3, [r3, #6] 8026628: b29a uxth r2, r3 802662a: 693b ldr r3, [r7, #16] 802662c: 889b ldrh r3, [r3, #4] 802662e: b29b uxth r3, r3 8026630: 429a cmp r2, r3 8026632: d902 bls.n 802663a /* fragment overlaps with previous or following, throw away */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8026634: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026638: e0de b.n 80267f8 } #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 802663a: 6abb ldr r3, [r7, #40] @ 0x28 802663c: 68ba ldr r2, [r7, #8] 802663e: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 8026640: 6abb ldr r3, [r7, #40] @ 0x28 8026642: 88db ldrh r3, [r3, #6] 8026644: b29a uxth r2, r3 8026646: 6afb ldr r3, [r7, #44] @ 0x2c 8026648: 889b ldrh r3, [r3, #4] 802664a: b29b uxth r3, r3 802664c: 429a cmp r2, r3 802664e: d03d beq.n 80266cc /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 8026650: 2300 movs r3, #0 8026652: 623b str r3, [r7, #32] } #endif /* IP_REASS_CHECK_OVERLAP */ /* fragment with the lowest offset */ ipr->p = new_p; } break; 8026654: e03a b.n 80266cc if (iprh->end > iprh_tmp->start) { 8026656: 6afb ldr r3, [r7, #44] @ 0x2c 8026658: 88db ldrh r3, [r3, #6] 802665a: b29a uxth r2, r3 802665c: 693b ldr r3, [r7, #16] 802665e: 889b ldrh r3, [r3, #4] 8026660: b29b uxth r3, r3 8026662: 429a cmp r2, r3 8026664: d902 bls.n 802666c return IP_REASS_VALIDATE_PBUF_DROPPED; 8026666: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802666a: e0c5 b.n 80267f8 ipr->p = new_p; 802666c: 68fb ldr r3, [r7, #12] 802666e: 68ba ldr r2, [r7, #8] 8026670: 605a str r2, [r3, #4] break; 8026672: e02b b.n 80266cc } else if (iprh->start == iprh_tmp->start) { 8026674: 6afb ldr r3, [r7, #44] @ 0x2c 8026676: 889b ldrh r3, [r3, #4] 8026678: b29a uxth r2, r3 802667a: 693b ldr r3, [r7, #16] 802667c: 889b ldrh r3, [r3, #4] 802667e: b29b uxth r3, r3 8026680: 429a cmp r2, r3 8026682: d102 bne.n 802668a /* received the same datagram twice: no need to keep the datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 8026684: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8026688: e0b6 b.n 80267f8 #if IP_REASS_CHECK_OVERLAP } else if (iprh->start < iprh_tmp->end) { 802668a: 6afb ldr r3, [r7, #44] @ 0x2c 802668c: 889b ldrh r3, [r3, #4] 802668e: b29a uxth r2, r3 8026690: 693b ldr r3, [r7, #16] 8026692: 88db ldrh r3, [r3, #6] 8026694: b29b uxth r3, r3 8026696: 429a cmp r2, r3 8026698: d202 bcs.n 80266a0 /* overlap: no need to keep the new datagram */ return IP_REASS_VALIDATE_PBUF_DROPPED; 802669a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802669e: e0ab b.n 80267f8 #endif /* IP_REASS_CHECK_OVERLAP */ } else { /* Check if the fragments received so far have no holes. */ if (iprh_prev != NULL) { 80266a0: 6abb ldr r3, [r7, #40] @ 0x28 80266a2: 2b00 cmp r3, #0 80266a4: d009 beq.n 80266ba if (iprh_prev->end != iprh_tmp->start) { 80266a6: 6abb ldr r3, [r7, #40] @ 0x28 80266a8: 88db ldrh r3, [r3, #6] 80266aa: b29a uxth r2, r3 80266ac: 693b ldr r3, [r7, #16] 80266ae: 889b ldrh r3, [r3, #4] 80266b0: b29b uxth r3, r3 80266b2: 429a cmp r2, r3 80266b4: d001 beq.n 80266ba /* There is a fragment missing between the current * and the previous fragment */ valid = 0; 80266b6: 2300 movs r3, #0 80266b8: 623b str r3, [r7, #32] } } } q = iprh_tmp->next_pbuf; 80266ba: 693b ldr r3, [r7, #16] 80266bc: 681b ldr r3, [r3, #0] 80266be: 627b str r3, [r7, #36] @ 0x24 iprh_prev = iprh_tmp; 80266c0: 693b ldr r3, [r7, #16] 80266c2: 62bb str r3, [r7, #40] @ 0x28 for (q = ipr->p; q != NULL;) { 80266c4: 6a7b ldr r3, [r7, #36] @ 0x24 80266c6: 2b00 cmp r3, #0 80266c8: d193 bne.n 80265f2 80266ca: e000 b.n 80266ce break; 80266cc: bf00 nop } /* If q is NULL, then we made it to the end of the list. Determine what to do now */ if (q == NULL) { 80266ce: 6a7b ldr r3, [r7, #36] @ 0x24 80266d0: 2b00 cmp r3, #0 80266d2: d12d bne.n 8026730 if (iprh_prev != NULL) { 80266d4: 6abb ldr r3, [r7, #40] @ 0x28 80266d6: 2b00 cmp r3, #0 80266d8: d01c beq.n 8026714 /* 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); 80266da: 6abb ldr r3, [r7, #40] @ 0x28 80266dc: 88db ldrh r3, [r3, #6] 80266de: b29a uxth r2, r3 80266e0: 6afb ldr r3, [r7, #44] @ 0x2c 80266e2: 889b ldrh r3, [r3, #4] 80266e4: b29b uxth r3, r3 80266e6: 429a cmp r2, r3 80266e8: d906 bls.n 80266f8 80266ea: 4b45 ldr r3, [pc, #276] @ (8026800 ) 80266ec: f44f 72db mov.w r2, #438 @ 0x1b6 80266f0: 4944 ldr r1, [pc, #272] @ (8026804 ) 80266f2: 4845 ldr r0, [pc, #276] @ (8026808 ) 80266f4: f004 f8d2 bl 802a89c #endif /* IP_REASS_CHECK_OVERLAP */ iprh_prev->next_pbuf = new_p; 80266f8: 6abb ldr r3, [r7, #40] @ 0x28 80266fa: 68ba ldr r2, [r7, #8] 80266fc: 601a str r2, [r3, #0] if (iprh_prev->end != iprh->start) { 80266fe: 6abb ldr r3, [r7, #40] @ 0x28 8026700: 88db ldrh r3, [r3, #6] 8026702: b29a uxth r2, r3 8026704: 6afb ldr r3, [r7, #44] @ 0x2c 8026706: 889b ldrh r3, [r3, #4] 8026708: b29b uxth r3, r3 802670a: 429a cmp r2, r3 802670c: d010 beq.n 8026730 valid = 0; 802670e: 2300 movs r3, #0 8026710: 623b str r3, [r7, #32] 8026712: e00d b.n 8026730 } } else { #if IP_REASS_CHECK_OVERLAP LWIP_ASSERT("no previous fragment, this must be the first fragment!", 8026714: 68fb ldr r3, [r7, #12] 8026716: 685b ldr r3, [r3, #4] 8026718: 2b00 cmp r3, #0 802671a: d006 beq.n 802672a 802671c: 4b38 ldr r3, [pc, #224] @ (8026800 ) 802671e: f44f 72df mov.w r2, #446 @ 0x1be 8026722: 493a ldr r1, [pc, #232] @ (802680c ) 8026724: 4838 ldr r0, [pc, #224] @ (8026808 ) 8026726: f004 f8b9 bl 802a89c ipr->p == NULL); #endif /* IP_REASS_CHECK_OVERLAP */ /* this is the first fragment we ever received for this ip datagram */ ipr->p = new_p; 802672a: 68fb ldr r3, [r7, #12] 802672c: 68ba ldr r2, [r7, #8] 802672e: 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)) { 8026730: 687b ldr r3, [r7, #4] 8026732: 2b00 cmp r3, #0 8026734: d105 bne.n 8026742 8026736: 68fb ldr r3, [r7, #12] 8026738: 7f9b ldrb r3, [r3, #30] 802673a: f003 0301 and.w r3, r3, #1 802673e: 2b00 cmp r3, #0 8026740: d059 beq.n 80267f6 /* and had no holes so far */ if (valid) { 8026742: 6a3b ldr r3, [r7, #32] 8026744: 2b00 cmp r3, #0 8026746: d04f beq.n 80267e8 /* 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)) { 8026748: 68fb ldr r3, [r7, #12] 802674a: 685b ldr r3, [r3, #4] 802674c: 2b00 cmp r3, #0 802674e: d006 beq.n 802675e 8026750: 68fb ldr r3, [r7, #12] 8026752: 685b ldr r3, [r3, #4] 8026754: 685b ldr r3, [r3, #4] 8026756: 889b ldrh r3, [r3, #4] 8026758: b29b uxth r3, r3 802675a: 2b00 cmp r3, #0 802675c: d002 beq.n 8026764 valid = 0; 802675e: 2300 movs r3, #0 8026760: 623b str r3, [r7, #32] 8026762: e041 b.n 80267e8 } else { /* and check that there are no holes after this datagram */ iprh_prev = iprh; 8026764: 6afb ldr r3, [r7, #44] @ 0x2c 8026766: 62bb str r3, [r7, #40] @ 0x28 q = iprh->next_pbuf; 8026768: 6afb ldr r3, [r7, #44] @ 0x2c 802676a: 681b ldr r3, [r3, #0] 802676c: 627b str r3, [r7, #36] @ 0x24 while (q != NULL) { 802676e: e012 b.n 8026796 iprh = (struct ip_reass_helper *)q->payload; 8026770: 6a7b ldr r3, [r7, #36] @ 0x24 8026772: 685b ldr r3, [r3, #4] 8026774: 62fb str r3, [r7, #44] @ 0x2c if (iprh_prev->end != iprh->start) { 8026776: 6abb ldr r3, [r7, #40] @ 0x28 8026778: 88db ldrh r3, [r3, #6] 802677a: b29a uxth r2, r3 802677c: 6afb ldr r3, [r7, #44] @ 0x2c 802677e: 889b ldrh r3, [r3, #4] 8026780: b29b uxth r3, r3 8026782: 429a cmp r2, r3 8026784: d002 beq.n 802678c valid = 0; 8026786: 2300 movs r3, #0 8026788: 623b str r3, [r7, #32] break; 802678a: e007 b.n 802679c } iprh_prev = iprh; 802678c: 6afb ldr r3, [r7, #44] @ 0x2c 802678e: 62bb str r3, [r7, #40] @ 0x28 q = iprh->next_pbuf; 8026790: 6afb ldr r3, [r7, #44] @ 0x2c 8026792: 681b ldr r3, [r3, #0] 8026794: 627b str r3, [r7, #36] @ 0x24 while (q != NULL) { 8026796: 6a7b ldr r3, [r7, #36] @ 0x24 8026798: 2b00 cmp r3, #0 802679a: d1e9 bne.n 8026770 } /* if still valid, all fragments are received * (because to the MF==0 already arrived */ if (valid) { 802679c: 6a3b ldr r3, [r7, #32] 802679e: 2b00 cmp r3, #0 80267a0: d022 beq.n 80267e8 LWIP_ASSERT("sanity check", ipr->p != NULL); 80267a2: 68fb ldr r3, [r7, #12] 80267a4: 685b ldr r3, [r3, #4] 80267a6: 2b00 cmp r3, #0 80267a8: d106 bne.n 80267b8 80267aa: 4b15 ldr r3, [pc, #84] @ (8026800 ) 80267ac: f240 12df movw r2, #479 @ 0x1df 80267b0: 4917 ldr r1, [pc, #92] @ (8026810 ) 80267b2: 4815 ldr r0, [pc, #84] @ (8026808 ) 80267b4: f004 f872 bl 802a89c LWIP_ASSERT("sanity check", 80267b8: 68fb ldr r3, [r7, #12] 80267ba: 685b ldr r3, [r3, #4] 80267bc: 685b ldr r3, [r3, #4] 80267be: 6afa ldr r2, [r7, #44] @ 0x2c 80267c0: 429a cmp r2, r3 80267c2: d106 bne.n 80267d2 80267c4: 4b0e ldr r3, [pc, #56] @ (8026800 ) 80267c6: f44f 72f0 mov.w r2, #480 @ 0x1e0 80267ca: 4911 ldr r1, [pc, #68] @ (8026810 ) 80267cc: 480e ldr r0, [pc, #56] @ (8026808 ) 80267ce: f004 f865 bl 802a89c ((struct ip_reass_helper *)ipr->p->payload) != iprh); LWIP_ASSERT("validate_datagram:next_pbuf!=NULL", 80267d2: 6afb ldr r3, [r7, #44] @ 0x2c 80267d4: 681b ldr r3, [r3, #0] 80267d6: 2b00 cmp r3, #0 80267d8: d006 beq.n 80267e8 80267da: 4b09 ldr r3, [pc, #36] @ (8026800 ) 80267dc: f44f 72f1 mov.w r2, #482 @ 0x1e2 80267e0: 490c ldr r1, [pc, #48] @ (8026814 ) 80267e2: 4809 ldr r0, [pc, #36] @ (8026808 ) 80267e4: f004 f85a bl 802a89c } } /* 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; 80267e8: 6a3b ldr r3, [r7, #32] 80267ea: 2b00 cmp r3, #0 80267ec: bf14 ite ne 80267ee: 2301 movne r3, #1 80267f0: 2300 moveq r3, #0 80267f2: b2db uxtb r3, r3 80267f4: e000 b.n 80267f8 } /* If we come here, not all fragments were received, yet! */ return IP_REASS_VALIDATE_PBUF_QUEUED; /* not yet valid! */ 80267f6: 2300 movs r3, #0 } 80267f8: 4618 mov r0, r3 80267fa: 3730 adds r7, #48 @ 0x30 80267fc: 46bd mov sp, r7 80267fe: bd80 pop {r7, pc} 8026800: 0803169c .word 0x0803169c 8026804: 08031780 .word 0x08031780 8026808: 080316e4 .word 0x080316e4 802680c: 080317a0 .word 0x080317a0 8026810: 080317d8 .word 0x080317d8 8026814: 080317e8 .word 0x080317e8 08026818 : * @param p points to a pbuf chain of the fragment * @return NULL if reassembly is incomplete, ? otherwise */ struct pbuf * ip4_reass(struct pbuf *p) { 8026818: b580 push {r7, lr} 802681a: b08e sub sp, #56 @ 0x38 802681c: af00 add r7, sp, #0 802681e: 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; 8026820: 687b ldr r3, [r7, #4] 8026822: 685b ldr r3, [r3, #4] 8026824: 62bb str r3, [r7, #40] @ 0x28 if (IPH_HL_BYTES(fraghdr) != IP_HLEN) { 8026826: 6abb ldr r3, [r7, #40] @ 0x28 8026828: 781b ldrb r3, [r3, #0] 802682a: f003 030f and.w r3, r3, #15 802682e: b2db uxtb r3, r3 8026830: 009b lsls r3, r3, #2 8026832: b2db uxtb r3, r3 8026834: 2b14 cmp r3, #20 8026836: f040 8171 bne.w 8026b1c 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); 802683a: 6abb ldr r3, [r7, #40] @ 0x28 802683c: 88db ldrh r3, [r3, #6] 802683e: b29b uxth r3, r3 8026840: 4618 mov r0, r3 8026842: f7f3 f8d1 bl 80199e8 8026846: 4603 mov r3, r0 8026848: f3c3 030c ubfx r3, r3, #0, #13 802684c: b29b uxth r3, r3 802684e: 00db lsls r3, r3, #3 8026850: 84fb strh r3, [r7, #38] @ 0x26 len = lwip_ntohs(IPH_LEN(fraghdr)); 8026852: 6abb ldr r3, [r7, #40] @ 0x28 8026854: 885b ldrh r3, [r3, #2] 8026856: b29b uxth r3, r3 8026858: 4618 mov r0, r3 802685a: f7f3 f8c5 bl 80199e8 802685e: 4603 mov r3, r0 8026860: 84bb strh r3, [r7, #36] @ 0x24 hlen = IPH_HL_BYTES(fraghdr); 8026862: 6abb ldr r3, [r7, #40] @ 0x28 8026864: 781b ldrb r3, [r3, #0] 8026866: f003 030f and.w r3, r3, #15 802686a: b2db uxtb r3, r3 802686c: 009b lsls r3, r3, #2 802686e: f887 3023 strb.w r3, [r7, #35] @ 0x23 if (hlen > len) { 8026872: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8026876: b29b uxth r3, r3 8026878: 8cba ldrh r2, [r7, #36] @ 0x24 802687a: 429a cmp r2, r3 802687c: f0c0 8150 bcc.w 8026b20 /* invalid datagram */ goto nullreturn; } len = (u16_t)(len - hlen); 8026880: f897 3023 ldrb.w r3, [r7, #35] @ 0x23 8026884: b29b uxth r3, r3 8026886: 8cba ldrh r2, [r7, #36] @ 0x24 8026888: 1ad3 subs r3, r2, r3 802688a: 84bb strh r3, [r7, #36] @ 0x24 /* Check if we are allowed to enqueue more datagrams. */ clen = pbuf_clen(p); 802688c: 6878 ldr r0, [r7, #4] 802688e: f7f4 fe1b bl 801b4c8 8026892: 4603 mov r3, r0 8026894: 843b strh r3, [r7, #32] if ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS) { 8026896: 4b8c ldr r3, [pc, #560] @ (8026ac8 ) 8026898: 881b ldrh r3, [r3, #0] 802689a: 461a mov r2, r3 802689c: 8c3b ldrh r3, [r7, #32] 802689e: 4413 add r3, r2 80268a0: 2b0a cmp r3, #10 80268a2: dd10 ble.n 80268c6 #if IP_REASS_FREE_OLDEST if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 80268a4: 8c3b ldrh r3, [r7, #32] 80268a6: 4619 mov r1, r3 80268a8: 6ab8 ldr r0, [r7, #40] @ 0x28 80268aa: f7ff fd81 bl 80263b0 80268ae: 4603 mov r3, r0 80268b0: 2b00 cmp r3, #0 80268b2: f000 8137 beq.w 8026b24 ((ip_reass_pbufcount + clen) > IP_REASS_MAX_PBUFS)) 80268b6: 4b84 ldr r3, [pc, #528] @ (8026ac8 ) 80268b8: 881b ldrh r3, [r3, #0] 80268ba: 461a mov r2, r3 80268bc: 8c3b ldrh r3, [r7, #32] 80268be: 4413 add r3, r2 if (!ip_reass_remove_oldest_datagram(fraghdr, clen) || 80268c0: 2b0a cmp r3, #10 80268c2: f300 812f bgt.w 8026b24 } } /* 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) { 80268c6: 4b81 ldr r3, [pc, #516] @ (8026acc ) 80268c8: 681b ldr r3, [r3, #0] 80268ca: 633b str r3, [r7, #48] @ 0x30 80268cc: e015 b.n 80268fa /* 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)) { 80268ce: 6b3b ldr r3, [r7, #48] @ 0x30 80268d0: 695a ldr r2, [r3, #20] 80268d2: 6abb ldr r3, [r7, #40] @ 0x28 80268d4: 68db ldr r3, [r3, #12] 80268d6: 429a cmp r2, r3 80268d8: d10c bne.n 80268f4 80268da: 6b3b ldr r3, [r7, #48] @ 0x30 80268dc: 699a ldr r2, [r3, #24] 80268de: 6abb ldr r3, [r7, #40] @ 0x28 80268e0: 691b ldr r3, [r3, #16] 80268e2: 429a cmp r2, r3 80268e4: d106 bne.n 80268f4 80268e6: 6b3b ldr r3, [r7, #48] @ 0x30 80268e8: 899a ldrh r2, [r3, #12] 80268ea: 6abb ldr r3, [r7, #40] @ 0x28 80268ec: 889b ldrh r3, [r3, #4] 80268ee: b29b uxth r3, r3 80268f0: 429a cmp r2, r3 80268f2: d006 beq.n 8026902 for (ipr = reassdatagrams; ipr != NULL; ipr = ipr->next) { 80268f4: 6b3b ldr r3, [r7, #48] @ 0x30 80268f6: 681b ldr r3, [r3, #0] 80268f8: 633b str r3, [r7, #48] @ 0x30 80268fa: 6b3b ldr r3, [r7, #48] @ 0x30 80268fc: 2b00 cmp r3, #0 80268fe: d1e6 bne.n 80268ce 8026900: e000 b.n 8026904 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; 8026902: bf00 nop } } if (ipr == NULL) { 8026904: 6b3b ldr r3, [r7, #48] @ 0x30 8026906: 2b00 cmp r3, #0 8026908: d109 bne.n 802691e /* Enqueue a new datagram into the datagram queue */ ipr = ip_reass_enqueue_new_datagram(fraghdr, clen); 802690a: 8c3b ldrh r3, [r7, #32] 802690c: 4619 mov r1, r3 802690e: 6ab8 ldr r0, [r7, #40] @ 0x28 8026910: f7ff fdb0 bl 8026474 8026914: 6338 str r0, [r7, #48] @ 0x30 /* Bail if unable to enqueue */ if (ipr == NULL) { 8026916: 6b3b ldr r3, [r7, #48] @ 0x30 8026918: 2b00 cmp r3, #0 802691a: d11c bne.n 8026956 goto nullreturn; 802691c: e105 b.n 8026b2a } } else { if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 802691e: 6abb ldr r3, [r7, #40] @ 0x28 8026920: 88db ldrh r3, [r3, #6] 8026922: b29b uxth r3, r3 8026924: 4618 mov r0, r3 8026926: f7f3 f85f bl 80199e8 802692a: 4603 mov r3, r0 802692c: f3c3 030c ubfx r3, r3, #0, #13 8026930: 2b00 cmp r3, #0 8026932: d110 bne.n 8026956 ((lwip_ntohs(IPH_OFFSET(&ipr->iphdr)) & IP_OFFMASK) != 0)) { 8026934: 6b3b ldr r3, [r7, #48] @ 0x30 8026936: 89db ldrh r3, [r3, #14] 8026938: 4618 mov r0, r3 802693a: f7f3 f855 bl 80199e8 802693e: 4603 mov r3, r0 8026940: f3c3 030c ubfx r3, r3, #0, #13 if (((lwip_ntohs(IPH_OFFSET(fraghdr)) & IP_OFFMASK) == 0) && 8026944: 2b00 cmp r3, #0 8026946: d006 beq.n 8026956 /* 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); 8026948: 6b3b ldr r3, [r7, #48] @ 0x30 802694a: 3308 adds r3, #8 802694c: 2214 movs r2, #20 802694e: 6ab9 ldr r1, [r7, #40] @ 0x28 8026950: 4618 mov r0, r3 8026952: f004 fa2c bl 802adae /* 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; 8026956: 6abb ldr r3, [r7, #40] @ 0x28 8026958: 88db ldrh r3, [r3, #6] 802695a: b29b uxth r3, r3 802695c: f003 0320 and.w r3, r3, #32 8026960: 2b00 cmp r3, #0 8026962: bf0c ite eq 8026964: 2301 moveq r3, #1 8026966: 2300 movne r3, #0 8026968: b2db uxtb r3, r3 802696a: 61fb str r3, [r7, #28] if (is_last) { 802696c: 69fb ldr r3, [r7, #28] 802696e: 2b00 cmp r3, #0 8026970: d00e beq.n 8026990 u16_t datagram_len = (u16_t)(offset + len); 8026972: 8cfa ldrh r2, [r7, #38] @ 0x26 8026974: 8cbb ldrh r3, [r7, #36] @ 0x24 8026976: 4413 add r3, r2 8026978: 837b strh r3, [r7, #26] if ((datagram_len < offset) || (datagram_len > (0xFFFF - IP_HLEN))) { 802697a: 8b7a ldrh r2, [r7, #26] 802697c: 8cfb ldrh r3, [r7, #38] @ 0x26 802697e: 429a cmp r2, r3 8026980: f0c0 80a0 bcc.w 8026ac4 8026984: 8b7b ldrh r3, [r7, #26] 8026986: f64f 72eb movw r2, #65515 @ 0xffeb 802698a: 4293 cmp r3, r2 802698c: f200 809a bhi.w 8026ac4 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); 8026990: 69fa ldr r2, [r7, #28] 8026992: 6879 ldr r1, [r7, #4] 8026994: 6b38 ldr r0, [r7, #48] @ 0x30 8026996: f7ff fdd5 bl 8026544 802699a: 6178 str r0, [r7, #20] if (valid == IP_REASS_VALIDATE_PBUF_DROPPED) { 802699c: 697b ldr r3, [r7, #20] 802699e: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 80269a2: f000 809b beq.w 8026adc /* 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); 80269a6: 4b48 ldr r3, [pc, #288] @ (8026ac8 ) 80269a8: 881a ldrh r2, [r3, #0] 80269aa: 8c3b ldrh r3, [r7, #32] 80269ac: 4413 add r3, r2 80269ae: b29a uxth r2, r3 80269b0: 4b45 ldr r3, [pc, #276] @ (8026ac8 ) 80269b2: 801a strh r2, [r3, #0] if (is_last) { 80269b4: 69fb ldr r3, [r7, #28] 80269b6: 2b00 cmp r3, #0 80269b8: d00d beq.n 80269d6 u16_t datagram_len = (u16_t)(offset + len); 80269ba: 8cfa ldrh r2, [r7, #38] @ 0x26 80269bc: 8cbb ldrh r3, [r7, #36] @ 0x24 80269be: 4413 add r3, r2 80269c0: 827b strh r3, [r7, #18] ipr->datagram_len = datagram_len; 80269c2: 6b3b ldr r3, [r7, #48] @ 0x30 80269c4: 8a7a ldrh r2, [r7, #18] 80269c6: 839a strh r2, [r3, #28] ipr->flags |= IP_REASS_FLAG_LASTFRAG; 80269c8: 6b3b ldr r3, [r7, #48] @ 0x30 80269ca: 7f9b ldrb r3, [r3, #30] 80269cc: f043 0301 orr.w r3, r3, #1 80269d0: b2da uxtb r2, r3 80269d2: 6b3b ldr r3, [r7, #48] @ 0x30 80269d4: 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) { 80269d6: 697b ldr r3, [r7, #20] 80269d8: 2b01 cmp r3, #1 80269da: d171 bne.n 8026ac0 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); 80269dc: 6b3b ldr r3, [r7, #48] @ 0x30 80269de: 8b9b ldrh r3, [r3, #28] 80269e0: 3314 adds r3, #20 80269e2: 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; 80269e4: 6b3b ldr r3, [r7, #48] @ 0x30 80269e6: 685b ldr r3, [r3, #4] 80269e8: 685b ldr r3, [r3, #4] 80269ea: 681b ldr r3, [r3, #0] 80269ec: 62fb str r3, [r7, #44] @ 0x2c /* copy the original ip header back to the first pbuf */ fraghdr = (struct ip_hdr *)(ipr->p->payload); 80269ee: 6b3b ldr r3, [r7, #48] @ 0x30 80269f0: 685b ldr r3, [r3, #4] 80269f2: 685b ldr r3, [r3, #4] 80269f4: 62bb str r3, [r7, #40] @ 0x28 SMEMCPY(fraghdr, &ipr->iphdr, IP_HLEN); 80269f6: 6b3b ldr r3, [r7, #48] @ 0x30 80269f8: 3308 adds r3, #8 80269fa: 2214 movs r2, #20 80269fc: 4619 mov r1, r3 80269fe: 6ab8 ldr r0, [r7, #40] @ 0x28 8026a00: f004 f9d5 bl 802adae IPH_LEN_SET(fraghdr, lwip_htons(datagram_len)); 8026a04: 8a3b ldrh r3, [r7, #16] 8026a06: 4618 mov r0, r3 8026a08: f7f2 ffee bl 80199e8 8026a0c: 4603 mov r3, r0 8026a0e: 461a mov r2, r3 8026a10: 6abb ldr r3, [r7, #40] @ 0x28 8026a12: 805a strh r2, [r3, #2] IPH_OFFSET_SET(fraghdr, 0); 8026a14: 6abb ldr r3, [r7, #40] @ 0x28 8026a16: 2200 movs r2, #0 8026a18: 719a strb r2, [r3, #6] 8026a1a: 2200 movs r2, #0 8026a1c: 71da strb r2, [r3, #7] IPH_CHKSUM_SET(fraghdr, 0); 8026a1e: 6abb ldr r3, [r7, #40] @ 0x28 8026a20: 2200 movs r2, #0 8026a22: 729a strb r2, [r3, #10] 8026a24: 2200 movs r2, #0 8026a26: 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; 8026a28: 6b3b ldr r3, [r7, #48] @ 0x30 8026a2a: 685b ldr r3, [r3, #4] 8026a2c: 607b str r3, [r7, #4] /* chain together the pbufs contained within the reass_data list. */ while (r != NULL) { 8026a2e: e00d b.n 8026a4c iprh = (struct ip_reass_helper *)r->payload; 8026a30: 6afb ldr r3, [r7, #44] @ 0x2c 8026a32: 685b ldr r3, [r3, #4] 8026a34: 60fb str r3, [r7, #12] /* hide the ip header for every succeeding fragment */ pbuf_remove_header(r, IP_HLEN); 8026a36: 2114 movs r1, #20 8026a38: 6af8 ldr r0, [r7, #44] @ 0x2c 8026a3a: f7f4 fbff bl 801b23c pbuf_cat(p, r); 8026a3e: 6af9 ldr r1, [r7, #44] @ 0x2c 8026a40: 6878 ldr r0, [r7, #4] 8026a42: f7f4 fd81 bl 801b548 r = iprh->next_pbuf; 8026a46: 68fb ldr r3, [r7, #12] 8026a48: 681b ldr r3, [r3, #0] 8026a4a: 62fb str r3, [r7, #44] @ 0x2c while (r != NULL) { 8026a4c: 6afb ldr r3, [r7, #44] @ 0x2c 8026a4e: 2b00 cmp r3, #0 8026a50: d1ee bne.n 8026a30 } /* find the previous entry in the linked list */ if (ipr == reassdatagrams) { 8026a52: 4b1e ldr r3, [pc, #120] @ (8026acc ) 8026a54: 681b ldr r3, [r3, #0] 8026a56: 6b3a ldr r2, [r7, #48] @ 0x30 8026a58: 429a cmp r2, r3 8026a5a: d102 bne.n 8026a62 ipr_prev = NULL; 8026a5c: 2300 movs r3, #0 8026a5e: 637b str r3, [r7, #52] @ 0x34 8026a60: e010 b.n 8026a84 } else { for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 8026a62: 4b1a ldr r3, [pc, #104] @ (8026acc ) 8026a64: 681b ldr r3, [r3, #0] 8026a66: 637b str r3, [r7, #52] @ 0x34 8026a68: e007 b.n 8026a7a if (ipr_prev->next == ipr) { 8026a6a: 6b7b ldr r3, [r7, #52] @ 0x34 8026a6c: 681b ldr r3, [r3, #0] 8026a6e: 6b3a ldr r2, [r7, #48] @ 0x30 8026a70: 429a cmp r2, r3 8026a72: d006 beq.n 8026a82 for (ipr_prev = reassdatagrams; ipr_prev != NULL; ipr_prev = ipr_prev->next) { 8026a74: 6b7b ldr r3, [r7, #52] @ 0x34 8026a76: 681b ldr r3, [r3, #0] 8026a78: 637b str r3, [r7, #52] @ 0x34 8026a7a: 6b7b ldr r3, [r7, #52] @ 0x34 8026a7c: 2b00 cmp r3, #0 8026a7e: d1f4 bne.n 8026a6a 8026a80: e000 b.n 8026a84 break; 8026a82: bf00 nop } } } /* release the sources allocate for the fragment queue entry */ ip_reass_dequeue_datagram(ipr, ipr_prev); 8026a84: 6b79 ldr r1, [r7, #52] @ 0x34 8026a86: 6b38 ldr r0, [r7, #48] @ 0x30 8026a88: f7ff fd2e bl 80264e8 /* and adjust the number of pbufs currently queued for reassembly. */ clen = pbuf_clen(p); 8026a8c: 6878 ldr r0, [r7, #4] 8026a8e: f7f4 fd1b bl 801b4c8 8026a92: 4603 mov r3, r0 8026a94: 843b strh r3, [r7, #32] LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); 8026a96: 4b0c ldr r3, [pc, #48] @ (8026ac8 ) 8026a98: 881b ldrh r3, [r3, #0] 8026a9a: 8c3a ldrh r2, [r7, #32] 8026a9c: 429a cmp r2, r3 8026a9e: d906 bls.n 8026aae 8026aa0: 4b0b ldr r3, [pc, #44] @ (8026ad0 ) 8026aa2: f240 229b movw r2, #667 @ 0x29b 8026aa6: 490b ldr r1, [pc, #44] @ (8026ad4 ) 8026aa8: 480b ldr r0, [pc, #44] @ (8026ad8 ) 8026aaa: f003 fef7 bl 802a89c ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - clen); 8026aae: 4b06 ldr r3, [pc, #24] @ (8026ac8 ) 8026ab0: 881a ldrh r2, [r3, #0] 8026ab2: 8c3b ldrh r3, [r7, #32] 8026ab4: 1ad3 subs r3, r2, r3 8026ab6: b29a uxth r2, r3 8026ab8: 4b03 ldr r3, [pc, #12] @ (8026ac8 ) 8026aba: 801a strh r2, [r3, #0] MIB2_STATS_INC(mib2.ipreasmoks); /* Return the pbuf chain */ return p; 8026abc: 687b ldr r3, [r7, #4] 8026abe: e038 b.n 8026b32 } /* the datagram is not (yet?) reassembled completely */ LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_pbufcount: %d out\n", ip_reass_pbufcount)); return NULL; 8026ac0: 2300 movs r3, #0 8026ac2: e036 b.n 8026b32 goto nullreturn_ipr; 8026ac4: bf00 nop 8026ac6: e00a b.n 8026ade 8026ac8: 2402b118 .word 0x2402b118 8026acc: 2402b114 .word 0x2402b114 8026ad0: 0803169c .word 0x0803169c 8026ad4: 0803180c .word 0x0803180c 8026ad8: 080316e4 .word 0x080316e4 goto nullreturn_ipr; 8026adc: bf00 nop nullreturn_ipr: LWIP_ASSERT("ipr != NULL", ipr != NULL); 8026ade: 6b3b ldr r3, [r7, #48] @ 0x30 8026ae0: 2b00 cmp r3, #0 8026ae2: d106 bne.n 8026af2 8026ae4: 4b15 ldr r3, [pc, #84] @ (8026b3c ) 8026ae6: f44f 722a mov.w r2, #680 @ 0x2a8 8026aea: 4915 ldr r1, [pc, #84] @ (8026b40 ) 8026aec: 4815 ldr r0, [pc, #84] @ (8026b44 ) 8026aee: f003 fed5 bl 802a89c if (ipr->p == NULL) { 8026af2: 6b3b ldr r3, [r7, #48] @ 0x30 8026af4: 685b ldr r3, [r3, #4] 8026af6: 2b00 cmp r3, #0 8026af8: d116 bne.n 8026b28 /* dropped pbuf after creating a new datagram entry: remove the entry, too */ LWIP_ASSERT("not firstalthough just enqueued", ipr == reassdatagrams); 8026afa: 4b13 ldr r3, [pc, #76] @ (8026b48 ) 8026afc: 681b ldr r3, [r3, #0] 8026afe: 6b3a ldr r2, [r7, #48] @ 0x30 8026b00: 429a cmp r2, r3 8026b02: d006 beq.n 8026b12 8026b04: 4b0d ldr r3, [pc, #52] @ (8026b3c ) 8026b06: f240 22ab movw r2, #683 @ 0x2ab 8026b0a: 4910 ldr r1, [pc, #64] @ (8026b4c ) 8026b0c: 480d ldr r0, [pc, #52] @ (8026b44 ) 8026b0e: f003 fec5 bl 802a89c ip_reass_dequeue_datagram(ipr, NULL); 8026b12: 2100 movs r1, #0 8026b14: 6b38 ldr r0, [r7, #48] @ 0x30 8026b16: f7ff fce7 bl 80264e8 8026b1a: e006 b.n 8026b2a goto nullreturn; 8026b1c: bf00 nop 8026b1e: e004 b.n 8026b2a goto nullreturn; 8026b20: bf00 nop 8026b22: e002 b.n 8026b2a goto nullreturn; 8026b24: bf00 nop 8026b26: e000 b.n 8026b2a } nullreturn: 8026b28: bf00 nop LWIP_DEBUGF(IP_REASS_DEBUG, ("ip4_reass: nullreturn\n")); IPFRAG_STATS_INC(ip_frag.drop); pbuf_free(p); 8026b2a: 6878 ldr r0, [r7, #4] 8026b2c: f7f4 fc3e bl 801b3ac return NULL; 8026b30: 2300 movs r3, #0 } 8026b32: 4618 mov r0, r3 8026b34: 3738 adds r7, #56 @ 0x38 8026b36: 46bd mov sp, r7 8026b38: bd80 pop {r7, pc} 8026b3a: bf00 nop 8026b3c: 0803169c .word 0x0803169c 8026b40: 08031828 .word 0x08031828 8026b44: 080316e4 .word 0x080316e4 8026b48: 2402b114 .word 0x2402b114 8026b4c: 08031834 .word 0x08031834 08026b50 : #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) { 8026b50: b580 push {r7, lr} 8026b52: af00 add r7, sp, #0 return (struct pbuf_custom_ref *)memp_malloc(MEMP_FRAG_PBUF); 8026b54: 2005 movs r0, #5 8026b56: f7f3 fcc5 bl 801a4e4 8026b5a: 4603 mov r3, r0 } 8026b5c: 4618 mov r0, r3 8026b5e: bd80 pop {r7, pc} 08026b60 : /** Free a struct pbuf_custom_ref */ static void ip_frag_free_pbuf_custom_ref(struct pbuf_custom_ref *p) { 8026b60: b580 push {r7, lr} 8026b62: b082 sub sp, #8 8026b64: af00 add r7, sp, #0 8026b66: 6078 str r0, [r7, #4] LWIP_ASSERT("p != NULL", p != NULL); 8026b68: 687b ldr r3, [r7, #4] 8026b6a: 2b00 cmp r3, #0 8026b6c: d106 bne.n 8026b7c 8026b6e: 4b07 ldr r3, [pc, #28] @ (8026b8c ) 8026b70: f44f 7231 mov.w r2, #708 @ 0x2c4 8026b74: 4906 ldr r1, [pc, #24] @ (8026b90 ) 8026b76: 4807 ldr r0, [pc, #28] @ (8026b94 ) 8026b78: f003 fe90 bl 802a89c memp_free(MEMP_FRAG_PBUF, p); 8026b7c: 6879 ldr r1, [r7, #4] 8026b7e: 2005 movs r0, #5 8026b80: f7f3 fd26 bl 801a5d0 } 8026b84: bf00 nop 8026b86: 3708 adds r7, #8 8026b88: 46bd mov sp, r7 8026b8a: bd80 pop {r7, pc} 8026b8c: 0803169c .word 0x0803169c 8026b90: 08031854 .word 0x08031854 8026b94: 080316e4 .word 0x080316e4 08026b98 : /** Free-callback function to free a 'struct pbuf_custom_ref', called by * pbuf_free. */ static void ipfrag_free_pbuf_custom(struct pbuf *p) { 8026b98: b580 push {r7, lr} 8026b9a: b084 sub sp, #16 8026b9c: af00 add r7, sp, #0 8026b9e: 6078 str r0, [r7, #4] struct pbuf_custom_ref *pcr = (struct pbuf_custom_ref *)p; 8026ba0: 687b ldr r3, [r7, #4] 8026ba2: 60fb str r3, [r7, #12] LWIP_ASSERT("pcr != NULL", pcr != NULL); 8026ba4: 68fb ldr r3, [r7, #12] 8026ba6: 2b00 cmp r3, #0 8026ba8: d106 bne.n 8026bb8 8026baa: 4b11 ldr r3, [pc, #68] @ (8026bf0 ) 8026bac: f240 22ce movw r2, #718 @ 0x2ce 8026bb0: 4910 ldr r1, [pc, #64] @ (8026bf4 ) 8026bb2: 4811 ldr r0, [pc, #68] @ (8026bf8 ) 8026bb4: f003 fe72 bl 802a89c LWIP_ASSERT("pcr == p", (void *)pcr == (void *)p); 8026bb8: 68fa ldr r2, [r7, #12] 8026bba: 687b ldr r3, [r7, #4] 8026bbc: 429a cmp r2, r3 8026bbe: d006 beq.n 8026bce 8026bc0: 4b0b ldr r3, [pc, #44] @ (8026bf0 ) 8026bc2: f240 22cf movw r2, #719 @ 0x2cf 8026bc6: 490d ldr r1, [pc, #52] @ (8026bfc ) 8026bc8: 480b ldr r0, [pc, #44] @ (8026bf8 ) 8026bca: f003 fe67 bl 802a89c if (pcr->original != NULL) { 8026bce: 68fb ldr r3, [r7, #12] 8026bd0: 695b ldr r3, [r3, #20] 8026bd2: 2b00 cmp r3, #0 8026bd4: d004 beq.n 8026be0 pbuf_free(pcr->original); 8026bd6: 68fb ldr r3, [r7, #12] 8026bd8: 695b ldr r3, [r3, #20] 8026bda: 4618 mov r0, r3 8026bdc: f7f4 fbe6 bl 801b3ac } ip_frag_free_pbuf_custom_ref(pcr); 8026be0: 68f8 ldr r0, [r7, #12] 8026be2: f7ff ffbd bl 8026b60 } 8026be6: bf00 nop 8026be8: 3710 adds r7, #16 8026bea: 46bd mov sp, r7 8026bec: bd80 pop {r7, pc} 8026bee: bf00 nop 8026bf0: 0803169c .word 0x0803169c 8026bf4: 08031860 .word 0x08031860 8026bf8: 080316e4 .word 0x080316e4 8026bfc: 0803186c .word 0x0803186c 08026c00 : * * @return ERR_OK if sent successfully, err_t otherwise */ err_t ip4_frag(struct pbuf *p, struct netif *netif, const ip4_addr_t *dest) { 8026c00: b580 push {r7, lr} 8026c02: b094 sub sp, #80 @ 0x50 8026c04: af02 add r7, sp, #8 8026c06: 60f8 str r0, [r7, #12] 8026c08: 60b9 str r1, [r7, #8] 8026c0a: 607a str r2, [r7, #4] struct pbuf *rambuf; #if !LWIP_NETIF_TX_SINGLE_PBUF struct pbuf *newpbuf; u16_t newpbuflen = 0; 8026c0c: 2300 movs r3, #0 8026c0e: 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); 8026c12: 68bb ldr r3, [r7, #8] 8026c14: 8d1b ldrh r3, [r3, #40] @ 0x28 8026c16: 3b14 subs r3, #20 8026c18: 2b00 cmp r3, #0 8026c1a: da00 bge.n 8026c1e 8026c1c: 3307 adds r3, #7 8026c1e: 10db asrs r3, r3, #3 8026c20: 877b strh r3, [r7, #58] @ 0x3a u16_t left, fragsize; u16_t ofo; int last; u16_t poff = IP_HLEN; 8026c22: 2314 movs r3, #20 8026c24: 87fb strh r3, [r7, #62] @ 0x3e u16_t tmp; int mf_set; original_iphdr = (struct ip_hdr *)p->payload; 8026c26: 68fb ldr r3, [r7, #12] 8026c28: 685b ldr r3, [r3, #4] 8026c2a: 637b str r3, [r7, #52] @ 0x34 iphdr = original_iphdr; 8026c2c: 6b7b ldr r3, [r7, #52] @ 0x34 8026c2e: 633b str r3, [r7, #48] @ 0x30 if (IPH_HL_BYTES(iphdr) != IP_HLEN) { 8026c30: 6b3b ldr r3, [r7, #48] @ 0x30 8026c32: 781b ldrb r3, [r3, #0] 8026c34: f003 030f and.w r3, r3, #15 8026c38: b2db uxtb r3, r3 8026c3a: 009b lsls r3, r3, #2 8026c3c: b2db uxtb r3, r3 8026c3e: 2b14 cmp r3, #20 8026c40: d002 beq.n 8026c48 /* ip4_frag() does not support IP options */ return ERR_VAL; 8026c42: f06f 0305 mvn.w r3, #5 8026c46: e110 b.n 8026e6a } LWIP_ERROR("ip4_frag(): pbuf too short", p->len >= IP_HLEN, return ERR_VAL); 8026c48: 68fb ldr r3, [r7, #12] 8026c4a: 895b ldrh r3, [r3, #10] 8026c4c: 2b13 cmp r3, #19 8026c4e: d809 bhi.n 8026c64 8026c50: 4b88 ldr r3, [pc, #544] @ (8026e74 ) 8026c52: f44f 723f mov.w r2, #764 @ 0x2fc 8026c56: 4988 ldr r1, [pc, #544] @ (8026e78 ) 8026c58: 4888 ldr r0, [pc, #544] @ (8026e7c ) 8026c5a: f003 fe1f bl 802a89c 8026c5e: f06f 0305 mvn.w r3, #5 8026c62: e102 b.n 8026e6a /* Save original offset */ tmp = lwip_ntohs(IPH_OFFSET(iphdr)); 8026c64: 6b3b ldr r3, [r7, #48] @ 0x30 8026c66: 88db ldrh r3, [r3, #6] 8026c68: b29b uxth r3, r3 8026c6a: 4618 mov r0, r3 8026c6c: f7f2 febc bl 80199e8 8026c70: 4603 mov r3, r0 8026c72: 87bb strh r3, [r7, #60] @ 0x3c ofo = tmp & IP_OFFMASK; 8026c74: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026c76: f3c3 030c ubfx r3, r3, #0, #13 8026c7a: 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; 8026c7e: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026c80: f403 5300 and.w r3, r3, #8192 @ 0x2000 8026c84: 62fb str r3, [r7, #44] @ 0x2c left = (u16_t)(p->tot_len - IP_HLEN); 8026c86: 68fb ldr r3, [r7, #12] 8026c88: 891b ldrh r3, [r3, #8] 8026c8a: 3b14 subs r3, #20 8026c8c: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 while (left) { 8026c90: e0e1 b.n 8026e56 /* Fill this fragment */ fragsize = LWIP_MIN(left, (u16_t)(nfb * 8)); 8026c92: 8f7b ldrh r3, [r7, #58] @ 0x3a 8026c94: 00db lsls r3, r3, #3 8026c96: b29b uxth r3, r3 8026c98: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 8026c9c: 4293 cmp r3, r2 8026c9e: bf28 it cs 8026ca0: 4613 movcs r3, r2 8026ca2: 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); 8026ca4: f44f 7220 mov.w r2, #640 @ 0x280 8026ca8: 2114 movs r1, #20 8026caa: 200e movs r0, #14 8026cac: f7f4 f868 bl 801ad80 8026cb0: 6278 str r0, [r7, #36] @ 0x24 if (rambuf == NULL) { 8026cb2: 6a7b ldr r3, [r7, #36] @ 0x24 8026cb4: 2b00 cmp r3, #0 8026cb6: f000 80d5 beq.w 8026e64 goto memerr; } LWIP_ASSERT("this needs a pbuf in one piece!", 8026cba: 6a7b ldr r3, [r7, #36] @ 0x24 8026cbc: 895b ldrh r3, [r3, #10] 8026cbe: 2b13 cmp r3, #19 8026cc0: d806 bhi.n 8026cd0 8026cc2: 4b6c ldr r3, [pc, #432] @ (8026e74 ) 8026cc4: f44f 7249 mov.w r2, #804 @ 0x324 8026cc8: 496d ldr r1, [pc, #436] @ (8026e80 ) 8026cca: 486c ldr r0, [pc, #432] @ (8026e7c ) 8026ccc: f003 fde6 bl 802a89c (rambuf->len >= (IP_HLEN))); SMEMCPY(rambuf->payload, original_iphdr, IP_HLEN); 8026cd0: 6a7b ldr r3, [r7, #36] @ 0x24 8026cd2: 685b ldr r3, [r3, #4] 8026cd4: 2214 movs r2, #20 8026cd6: 6b79 ldr r1, [r7, #52] @ 0x34 8026cd8: 4618 mov r0, r3 8026cda: f004 f868 bl 802adae iphdr = (struct ip_hdr *)rambuf->payload; 8026cde: 6a7b ldr r3, [r7, #36] @ 0x24 8026ce0: 685b ldr r3, [r3, #4] 8026ce2: 633b str r3, [r7, #48] @ 0x30 left_to_copy = fragsize; 8026ce4: 8d7b ldrh r3, [r7, #42] @ 0x2a 8026ce6: f8a7 3044 strh.w r3, [r7, #68] @ 0x44 while (left_to_copy) { 8026cea: e064 b.n 8026db6 struct pbuf_custom_ref *pcr; u16_t plen = (u16_t)(p->len - poff); 8026cec: 68fb ldr r3, [r7, #12] 8026cee: 895a ldrh r2, [r3, #10] 8026cf0: 8ffb ldrh r3, [r7, #62] @ 0x3e 8026cf2: 1ad3 subs r3, r2, r3 8026cf4: 83fb strh r3, [r7, #30] LWIP_ASSERT("p->len >= poff", p->len >= poff); 8026cf6: 68fb ldr r3, [r7, #12] 8026cf8: 895b ldrh r3, [r3, #10] 8026cfa: 8ffa ldrh r2, [r7, #62] @ 0x3e 8026cfc: 429a cmp r2, r3 8026cfe: d906 bls.n 8026d0e 8026d00: 4b5c ldr r3, [pc, #368] @ (8026e74 ) 8026d02: f240 322d movw r2, #813 @ 0x32d 8026d06: 495f ldr r1, [pc, #380] @ (8026e84 ) 8026d08: 485c ldr r0, [pc, #368] @ (8026e7c ) 8026d0a: f003 fdc7 bl 802a89c newpbuflen = LWIP_MIN(left_to_copy, plen); 8026d0e: 8bfa ldrh r2, [r7, #30] 8026d10: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8026d14: 4293 cmp r3, r2 8026d16: bf28 it cs 8026d18: 4613 movcs r3, r2 8026d1a: f8a7 3046 strh.w r3, [r7, #70] @ 0x46 /* Is this pbuf already empty? */ if (!newpbuflen) { 8026d1e: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8026d22: 2b00 cmp r3, #0 8026d24: d105 bne.n 8026d32 poff = 0; 8026d26: 2300 movs r3, #0 8026d28: 87fb strh r3, [r7, #62] @ 0x3e p = p->next; 8026d2a: 68fb ldr r3, [r7, #12] 8026d2c: 681b ldr r3, [r3, #0] 8026d2e: 60fb str r3, [r7, #12] continue; 8026d30: e041 b.n 8026db6 } pcr = ip_frag_alloc_pbuf_custom_ref(); 8026d32: f7ff ff0d bl 8026b50 8026d36: 61b8 str r0, [r7, #24] if (pcr == NULL) { 8026d38: 69bb ldr r3, [r7, #24] 8026d3a: 2b00 cmp r3, #0 8026d3c: d103 bne.n 8026d46 pbuf_free(rambuf); 8026d3e: 6a78 ldr r0, [r7, #36] @ 0x24 8026d40: f7f4 fb34 bl 801b3ac goto memerr; 8026d44: e08f b.n 8026e66 } /* Mirror this pbuf, although we might not need all of it. */ newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 8026d46: 69b8 ldr r0, [r7, #24] (u8_t *)p->payload + poff, newpbuflen); 8026d48: 68fb ldr r3, [r7, #12] 8026d4a: 685a ldr r2, [r3, #4] newpbuf = pbuf_alloced_custom(PBUF_RAW, newpbuflen, PBUF_REF, &pcr->pc, 8026d4c: 8ffb ldrh r3, [r7, #62] @ 0x3e 8026d4e: 4413 add r3, r2 8026d50: f8b7 1046 ldrh.w r1, [r7, #70] @ 0x46 8026d54: f8b7 2046 ldrh.w r2, [r7, #70] @ 0x46 8026d58: 9201 str r2, [sp, #4] 8026d5a: 9300 str r3, [sp, #0] 8026d5c: 4603 mov r3, r0 8026d5e: 2241 movs r2, #65 @ 0x41 8026d60: 2000 movs r0, #0 8026d62: f7f4 f939 bl 801afd8 8026d66: 6178 str r0, [r7, #20] if (newpbuf == NULL) { 8026d68: 697b ldr r3, [r7, #20] 8026d6a: 2b00 cmp r3, #0 8026d6c: d106 bne.n 8026d7c ip_frag_free_pbuf_custom_ref(pcr); 8026d6e: 69b8 ldr r0, [r7, #24] 8026d70: f7ff fef6 bl 8026b60 pbuf_free(rambuf); 8026d74: 6a78 ldr r0, [r7, #36] @ 0x24 8026d76: f7f4 fb19 bl 801b3ac goto memerr; 8026d7a: e074 b.n 8026e66 } pbuf_ref(p); 8026d7c: 68f8 ldr r0, [r7, #12] 8026d7e: f7f4 fbbb bl 801b4f8 pcr->original = p; 8026d82: 69bb ldr r3, [r7, #24] 8026d84: 68fa ldr r2, [r7, #12] 8026d86: 615a str r2, [r3, #20] pcr->pc.custom_free_function = ipfrag_free_pbuf_custom; 8026d88: 69bb ldr r3, [r7, #24] 8026d8a: 4a3f ldr r2, [pc, #252] @ (8026e88 ) 8026d8c: 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); 8026d8e: 6979 ldr r1, [r7, #20] 8026d90: 6a78 ldr r0, [r7, #36] @ 0x24 8026d92: f7f4 fbd9 bl 801b548 left_to_copy = (u16_t)(left_to_copy - newpbuflen); 8026d96: f8b7 2044 ldrh.w r2, [r7, #68] @ 0x44 8026d9a: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8026d9e: 1ad3 subs r3, r2, r3 8026da0: f8a7 3044 strh.w r3, [r7, #68] @ 0x44 if (left_to_copy) { 8026da4: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8026da8: 2b00 cmp r3, #0 8026daa: d004 beq.n 8026db6 poff = 0; 8026dac: 2300 movs r3, #0 8026dae: 87fb strh r3, [r7, #62] @ 0x3e p = p->next; 8026db0: 68fb ldr r3, [r7, #12] 8026db2: 681b ldr r3, [r3, #0] 8026db4: 60fb str r3, [r7, #12] while (left_to_copy) { 8026db6: f8b7 3044 ldrh.w r3, [r7, #68] @ 0x44 8026dba: 2b00 cmp r3, #0 8026dbc: d196 bne.n 8026cec } } poff = (u16_t)(poff + newpbuflen); 8026dbe: 8ffa ldrh r2, [r7, #62] @ 0x3e 8026dc0: f8b7 3046 ldrh.w r3, [r7, #70] @ 0x46 8026dc4: 4413 add r3, r2 8026dc6: 87fb strh r3, [r7, #62] @ 0x3e #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /* Correct header */ last = (left <= netif->mtu - IP_HLEN); 8026dc8: 68bb ldr r3, [r7, #8] 8026dca: 8d1b ldrh r3, [r3, #40] @ 0x28 8026dcc: f1a3 0213 sub.w r2, r3, #19 8026dd0: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 8026dd4: 429a cmp r2, r3 8026dd6: bfcc ite gt 8026dd8: 2301 movgt r3, #1 8026dda: 2300 movle r3, #0 8026ddc: b2db uxtb r3, r3 8026dde: 623b str r3, [r7, #32] /* Set new offset and MF flag */ tmp = (IP_OFFMASK & (ofo)); 8026de0: f8b7 3040 ldrh.w r3, [r7, #64] @ 0x40 8026de4: f3c3 030c ubfx r3, r3, #0, #13 8026de8: 87bb strh r3, [r7, #60] @ 0x3c if (!last || mf_set) { 8026dea: 6a3b ldr r3, [r7, #32] 8026dec: 2b00 cmp r3, #0 8026dee: d002 beq.n 8026df6 8026df0: 6afb ldr r3, [r7, #44] @ 0x2c 8026df2: 2b00 cmp r3, #0 8026df4: d003 beq.n 8026dfe /* the last fragment has MF set if the input frame had it */ tmp = tmp | IP_MF; 8026df6: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026df8: f443 5300 orr.w r3, r3, #8192 @ 0x2000 8026dfc: 87bb strh r3, [r7, #60] @ 0x3c } IPH_OFFSET_SET(iphdr, lwip_htons(tmp)); 8026dfe: 8fbb ldrh r3, [r7, #60] @ 0x3c 8026e00: 4618 mov r0, r3 8026e02: f7f2 fdf1 bl 80199e8 8026e06: 4603 mov r3, r0 8026e08: 461a mov r2, r3 8026e0a: 6b3b ldr r3, [r7, #48] @ 0x30 8026e0c: 80da strh r2, [r3, #6] IPH_LEN_SET(iphdr, lwip_htons((u16_t)(fragsize + IP_HLEN))); 8026e0e: 8d7b ldrh r3, [r7, #42] @ 0x2a 8026e10: 3314 adds r3, #20 8026e12: b29b uxth r3, r3 8026e14: 4618 mov r0, r3 8026e16: f7f2 fde7 bl 80199e8 8026e1a: 4603 mov r3, r0 8026e1c: 461a mov r2, r3 8026e1e: 6b3b ldr r3, [r7, #48] @ 0x30 8026e20: 805a strh r2, [r3, #2] IPH_CHKSUM_SET(iphdr, 0); 8026e22: 6b3b ldr r3, [r7, #48] @ 0x30 8026e24: 2200 movs r2, #0 8026e26: 729a strb r2, [r3, #10] 8026e28: 2200 movs r2, #0 8026e2a: 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); 8026e2c: 68bb ldr r3, [r7, #8] 8026e2e: 695b ldr r3, [r3, #20] 8026e30: 687a ldr r2, [r7, #4] 8026e32: 6a79 ldr r1, [r7, #36] @ 0x24 8026e34: 68b8 ldr r0, [r7, #8] 8026e36: 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); 8026e38: 6a78 ldr r0, [r7, #36] @ 0x24 8026e3a: f7f4 fab7 bl 801b3ac left = (u16_t)(left - fragsize); 8026e3e: f8b7 2042 ldrh.w r2, [r7, #66] @ 0x42 8026e42: 8d7b ldrh r3, [r7, #42] @ 0x2a 8026e44: 1ad3 subs r3, r2, r3 8026e46: f8a7 3042 strh.w r3, [r7, #66] @ 0x42 ofo = (u16_t)(ofo + nfb); 8026e4a: f8b7 2040 ldrh.w r2, [r7, #64] @ 0x40 8026e4e: 8f7b ldrh r3, [r7, #58] @ 0x3a 8026e50: 4413 add r3, r2 8026e52: f8a7 3040 strh.w r3, [r7, #64] @ 0x40 while (left) { 8026e56: f8b7 3042 ldrh.w r3, [r7, #66] @ 0x42 8026e5a: 2b00 cmp r3, #0 8026e5c: f47f af19 bne.w 8026c92 } MIB2_STATS_INC(mib2.ipfragoks); return ERR_OK; 8026e60: 2300 movs r3, #0 8026e62: e002 b.n 8026e6a goto memerr; 8026e64: bf00 nop memerr: MIB2_STATS_INC(mib2.ipfragfails); return ERR_MEM; 8026e66: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } 8026e6a: 4618 mov r0, r3 8026e6c: 3748 adds r7, #72 @ 0x48 8026e6e: 46bd mov sp, r7 8026e70: bd80 pop {r7, pc} 8026e72: bf00 nop 8026e74: 0803169c .word 0x0803169c 8026e78: 08031878 .word 0x08031878 8026e7c: 080316e4 .word 0x080316e4 8026e80: 08031894 .word 0x08031894 8026e84: 080318b4 .word 0x080318b4 8026e88: 08026b99 .word 0x08026b99 08026e8c : * @see ETHARP_SUPPORT_VLAN * @see LWIP_HOOK_VLAN_CHECK */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 8026e8c: b580 push {r7, lr} 8026e8e: b086 sub sp, #24 8026e90: af00 add r7, sp, #0 8026e92: 6078 str r0, [r7, #4] 8026e94: 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; 8026e96: 230e movs r3, #14 8026e98: 82fb strh r3, [r7, #22] #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ LWIP_ASSERT_CORE_LOCKED(); 8026e9a: f7ea f8d5 bl 8011048 if (p->len <= SIZEOF_ETH_HDR) { 8026e9e: 687b ldr r3, [r7, #4] 8026ea0: 895b ldrh r3, [r3, #10] 8026ea2: 2b0e cmp r3, #14 8026ea4: d96e bls.n 8026f84 ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinerrors); goto free_and_return; } if (p->if_idx == NETIF_NO_INDEX) { 8026ea6: 687b ldr r3, [r7, #4] 8026ea8: 7bdb ldrb r3, [r3, #15] 8026eaa: 2b00 cmp r3, #0 8026eac: d106 bne.n 8026ebc p->if_idx = netif_get_index(netif); 8026eae: 683b ldr r3, [r7, #0] 8026eb0: f893 3034 ldrb.w r3, [r3, #52] @ 0x34 8026eb4: 3301 adds r3, #1 8026eb6: b2da uxtb r2, r3 8026eb8: 687b ldr r3, [r7, #4] 8026eba: 73da strb r2, [r3, #15] } /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; 8026ebc: 687b ldr r3, [r7, #4] 8026ebe: 685b ldr r3, [r3, #4] 8026ec0: 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; 8026ec2: 693b ldr r3, [r7, #16] 8026ec4: 7b1a ldrb r2, [r3, #12] 8026ec6: 7b5b ldrb r3, [r3, #13] 8026ec8: 021b lsls r3, r3, #8 8026eca: 4313 orrs r3, r2 8026ecc: 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) { 8026ece: 693b ldr r3, [r7, #16] 8026ed0: 781b ldrb r3, [r3, #0] 8026ed2: f003 0301 and.w r3, r3, #1 8026ed6: 2b00 cmp r3, #0 8026ed8: d023 beq.n 8026f22 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_IP4_MULTICAST_ADDR_0) { 8026eda: 693b ldr r3, [r7, #16] 8026edc: 781b ldrb r3, [r3, #0] 8026ede: 2b01 cmp r3, #1 8026ee0: d10f bne.n 8026f02 #if LWIP_IPV4 if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8026ee2: 693b ldr r3, [r7, #16] 8026ee4: 785b ldrb r3, [r3, #1] 8026ee6: 2b00 cmp r3, #0 8026ee8: d11b bne.n 8026f22 (ethhdr->dest.addr[2] == LL_IP4_MULTICAST_ADDR_2)) { 8026eea: 693b ldr r3, [r7, #16] 8026eec: 789b ldrb r3, [r3, #2] if ((ethhdr->dest.addr[1] == LL_IP4_MULTICAST_ADDR_1) && 8026eee: 2b5e cmp r3, #94 @ 0x5e 8026ef0: d117 bne.n 8026f22 /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 8026ef2: 687b ldr r3, [r7, #4] 8026ef4: 7b5b ldrb r3, [r3, #13] 8026ef6: f043 0310 orr.w r3, r3, #16 8026efa: b2da uxtb r2, r3 8026efc: 687b ldr r3, [r7, #4] 8026efe: 735a strb r2, [r3, #13] 8026f00: e00f b.n 8026f22 (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)) { 8026f02: 693b ldr r3, [r7, #16] 8026f04: 2206 movs r2, #6 8026f06: 4928 ldr r1, [pc, #160] @ (8026fa8 ) 8026f08: 4618 mov r0, r3 8026f0a: f003 fe2f bl 802ab6c 8026f0e: 4603 mov r3, r0 8026f10: 2b00 cmp r3, #0 8026f12: d106 bne.n 8026f22 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 8026f14: 687b ldr r3, [r7, #4] 8026f16: 7b5b ldrb r3, [r3, #13] 8026f18: f043 0308 orr.w r3, r3, #8 8026f1c: b2da uxtb r2, r3 8026f1e: 687b ldr r3, [r7, #4] 8026f20: 735a strb r2, [r3, #13] } } switch (type) { 8026f22: 89fb ldrh r3, [r7, #14] 8026f24: 2b08 cmp r3, #8 8026f26: d003 beq.n 8026f30 8026f28: f5b3 6fc1 cmp.w r3, #1544 @ 0x608 8026f2c: d014 beq.n 8026f58 } #endif ETHARP_STATS_INC(etharp.proterr); ETHARP_STATS_INC(etharp.drop); MIB2_STATS_NETIF_INC(netif, ifinunknownprotos); goto free_and_return; 8026f2e: e032 b.n 8026f96 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8026f30: 683b ldr r3, [r7, #0] 8026f32: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8026f36: f003 0308 and.w r3, r3, #8 8026f3a: 2b00 cmp r3, #0 8026f3c: d024 beq.n 8026f88 if (pbuf_remove_header(p, next_hdr_offset)) { 8026f3e: 8afb ldrh r3, [r7, #22] 8026f40: 4619 mov r1, r3 8026f42: 6878 ldr r0, [r7, #4] 8026f44: f7f4 f97a bl 801b23c 8026f48: 4603 mov r3, r0 8026f4a: 2b00 cmp r3, #0 8026f4c: d11e bne.n 8026f8c ip4_input(p, netif); 8026f4e: 6839 ldr r1, [r7, #0] 8026f50: 6878 ldr r0, [r7, #4] 8026f52: f7fe fd2f bl 80259b4 break; 8026f56: e013 b.n 8026f80 if (!(netif->flags & NETIF_FLAG_ETHARP)) { 8026f58: 683b ldr r3, [r7, #0] 8026f5a: f893 3031 ldrb.w r3, [r3, #49] @ 0x31 8026f5e: f003 0308 and.w r3, r3, #8 8026f62: 2b00 cmp r3, #0 8026f64: d014 beq.n 8026f90 if (pbuf_remove_header(p, next_hdr_offset)) { 8026f66: 8afb ldrh r3, [r7, #22] 8026f68: 4619 mov r1, r3 8026f6a: 6878 ldr r0, [r7, #4] 8026f6c: f7f4 f966 bl 801b23c 8026f70: 4603 mov r3, r0 8026f72: 2b00 cmp r3, #0 8026f74: d10e bne.n 8026f94 etharp_input(p, netif); 8026f76: 6839 ldr r1, [r7, #0] 8026f78: 6878 ldr r0, [r7, #4] 8026f7a: f7fd fe9d bl 8024cb8 break; 8026f7e: bf00 nop } /* This means the pbuf is freed or consumed, so the caller doesn't have to free it again */ return ERR_OK; 8026f80: 2300 movs r3, #0 8026f82: e00c b.n 8026f9e goto free_and_return; 8026f84: bf00 nop 8026f86: e006 b.n 8026f96 goto free_and_return; 8026f88: bf00 nop 8026f8a: e004 b.n 8026f96 goto free_and_return; 8026f8c: bf00 nop 8026f8e: e002 b.n 8026f96 goto free_and_return; 8026f90: bf00 nop 8026f92: e000 b.n 8026f96 goto free_and_return; 8026f94: bf00 nop free_and_return: pbuf_free(p); 8026f96: 6878 ldr r0, [r7, #4] 8026f98: f7f4 fa08 bl 801b3ac return ERR_OK; 8026f9c: 2300 movs r3, #0 } 8026f9e: 4618 mov r0, r3 8026fa0: 3718 adds r7, #24 8026fa2: 46bd mov sp, r7 8026fa4: bd80 pop {r7, pc} 8026fa6: bf00 nop 8026fa8: 08031cb0 .word 0x08031cb0 08026fac : * @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) { 8026fac: b580 push {r7, lr} 8026fae: b086 sub sp, #24 8026fb0: af00 add r7, sp, #0 8026fb2: 60f8 str r0, [r7, #12] 8026fb4: 60b9 str r1, [r7, #8] 8026fb6: 607a str r2, [r7, #4] 8026fb8: 603b str r3, [r7, #0] struct eth_hdr *ethhdr; u16_t eth_type_be = lwip_htons(eth_type); 8026fba: 8c3b ldrh r3, [r7, #32] 8026fbc: 4618 mov r0, r3 8026fbe: f7f2 fd13 bl 80199e8 8026fc2: 4603 mov r3, r0 8026fc4: 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) { 8026fc6: 210e movs r1, #14 8026fc8: 68b8 ldr r0, [r7, #8] 8026fca: f7f4 f927 bl 801b21c 8026fce: 4603 mov r3, r0 8026fd0: 2b00 cmp r3, #0 8026fd2: d127 bne.n 8027024 goto pbuf_header_failed; } } LWIP_ASSERT_CORE_LOCKED(); 8026fd4: f7ea f838 bl 8011048 ethhdr = (struct eth_hdr *)p->payload; 8026fd8: 68bb ldr r3, [r7, #8] 8026fda: 685b ldr r3, [r3, #4] 8026fdc: 613b str r3, [r7, #16] ethhdr->type = eth_type_be; 8026fde: 693b ldr r3, [r7, #16] 8026fe0: 8afa ldrh r2, [r7, #22] 8026fe2: 819a strh r2, [r3, #12] SMEMCPY(ðhdr->dest, dst, ETH_HWADDR_LEN); 8026fe4: 693b ldr r3, [r7, #16] 8026fe6: 2206 movs r2, #6 8026fe8: 6839 ldr r1, [r7, #0] 8026fea: 4618 mov r0, r3 8026fec: f003 fedf bl 802adae SMEMCPY(ðhdr->src, src, ETH_HWADDR_LEN); 8026ff0: 693b ldr r3, [r7, #16] 8026ff2: 3306 adds r3, #6 8026ff4: 2206 movs r2, #6 8026ff6: 6879 ldr r1, [r7, #4] 8026ff8: 4618 mov r0, r3 8026ffa: f003 fed8 bl 802adae LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!", 8026ffe: 68fb ldr r3, [r7, #12] 8027000: f893 3030 ldrb.w r3, [r3, #48] @ 0x30 8027004: 2b06 cmp r3, #6 8027006: d006 beq.n 8027016 8027008: 4b0a ldr r3, [pc, #40] @ (8027034 ) 802700a: f44f 7299 mov.w r2, #306 @ 0x132 802700e: 490a ldr r1, [pc, #40] @ (8027038 ) 8027010: 480a ldr r0, [pc, #40] @ (802703c ) 8027012: f003 fc43 bl 802a89c (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); 8027016: 68fb ldr r3, [r7, #12] 8027018: 699b ldr r3, [r3, #24] 802701a: 68b9 ldr r1, [r7, #8] 802701c: 68f8 ldr r0, [r7, #12] 802701e: 4798 blx r3 8027020: 4603 mov r3, r0 8027022: e002 b.n 802702a goto pbuf_header_failed; 8027024: 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; 8027026: f06f 0301 mvn.w r3, #1 } 802702a: 4618 mov r0, r3 802702c: 3718 adds r7, #24 802702e: 46bd mov sp, r7 8027030: bd80 pop {r7, pc} 8027032: bf00 nop 8027034: 080318c4 .word 0x080318c4 8027038: 080318fc .word 0x080318fc 802703c: 08031930 .word 0x08031930 08027040 : #endif /*-----------------------------------------------------------------------------------*/ // Creates an empty mailbox. err_t sys_mbox_new(sys_mbox_t *mbox, int size) { 8027040: b580 push {r7, lr} 8027042: b082 sub sp, #8 8027044: af00 add r7, sp, #0 8027046: 6078 str r0, [r7, #4] 8027048: 6039 str r1, [r7, #0] #if (osCMSIS < 0x20000U) osMessageQDef(QUEUE, size, void *); *mbox = osMessageCreate(osMessageQ(QUEUE), NULL); #else *mbox = osMessageQueueNew(size, sizeof(void *), NULL); 802704a: 683b ldr r3, [r7, #0] 802704c: 2200 movs r2, #0 802704e: 2104 movs r1, #4 8027050: 4618 mov r0, r3 8027052: f7ea fd85 bl 8011b60 8027056: 4602 mov r2, r0 8027058: 687b ldr r3, [r7, #4] 802705a: 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) 802705c: 687b ldr r3, [r7, #4] 802705e: 681b ldr r3, [r3, #0] 8027060: 2b00 cmp r3, #0 8027062: d102 bne.n 802706a return ERR_MEM; 8027064: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027068: e000 b.n 802706c return ERR_OK; 802706a: 2300 movs r3, #0 } 802706c: 4618 mov r0, r3 802706e: 3708 adds r7, #8 8027070: 46bd mov sp, r7 8027072: bd80 pop {r7, pc} 08027074 : 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) { 8027074: b580 push {r7, lr} 8027076: b082 sub sp, #8 8027078: af00 add r7, sp, #0 802707a: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) if(osMessageWaiting(*mbox)) #else if(osMessageQueueGetCount(*mbox)) 802707c: 687b ldr r3, [r7, #4] 802707e: 681b ldr r3, [r3, #0] 8027080: 4618 mov r0, r3 8027082: f7ea fe9f bl 8011dc4 } #if (osCMSIS < 0x20000U) osMessageDelete(*mbox); #else osMessageQueueDelete(*mbox); 8027086: 687b ldr r3, [r7, #4] 8027088: 681b ldr r3, [r3, #0] 802708a: 4618 mov r0, r3 802708c: f7ea feba bl 8011e04 #endif #if SYS_STATS --lwip_stats.sys.mbox.used; #endif /* SYS_STATS */ } 8027090: bf00 nop 8027092: 3708 adds r7, #8 8027094: 46bd mov sp, r7 8027096: bd80 pop {r7, pc} 08027098 : /*-----------------------------------------------------------------------------------*/ // Try to post the "msg" to the mailbox. err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg) { 8027098: b580 push {r7, lr} 802709a: b084 sub sp, #16 802709c: af00 add r7, sp, #0 802709e: 6078 str r0, [r7, #4] 80270a0: 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) 80270a2: 687b ldr r3, [r7, #4] 80270a4: 6818 ldr r0, [r3, #0] 80270a6: 4639 mov r1, r7 80270a8: 2300 movs r3, #0 80270aa: 2200 movs r2, #0 80270ac: f7ea fdcc bl 8011c48 80270b0: 4603 mov r3, r0 80270b2: 2b00 cmp r3, #0 80270b4: d102 bne.n 80270bc #endif { result = ERR_OK; 80270b6: 2300 movs r3, #0 80270b8: 73fb strb r3, [r7, #15] 80270ba: e001 b.n 80270c0 } else { // could not post, queue must be full result = ERR_MEM; 80270bc: 23ff movs r3, #255 @ 0xff 80270be: 73fb strb r3, [r7, #15] #if SYS_STATS lwip_stats.sys.mbox.err++; #endif /* SYS_STATS */ } return result; 80270c0: f997 300f ldrsb.w r3, [r7, #15] } 80270c4: 4618 mov r0, r3 80270c6: 3710 adds r7, #16 80270c8: 46bd mov sp, r7 80270ca: bd80 pop {r7, pc} 080270cc : 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) { 80270cc: b580 push {r7, lr} 80270ce: b086 sub sp, #24 80270d0: af00 add r7, sp, #0 80270d2: 60f8 str r0, [r7, #12] 80270d4: 60b9 str r1, [r7, #8] 80270d6: 607a str r2, [r7, #4] #if (osCMSIS < 0x20000U) osEvent event; uint32_t starttime = osKernelSysTick(); #else osStatus_t status; uint32_t starttime = osKernelGetTickCount(); 80270d8: f7ea f92c bl 8011334 80270dc: 6178 str r0, [r7, #20] #endif if(timeout != 0) 80270de: 687b ldr r3, [r7, #4] 80270e0: 2b00 cmp r3, #0 80270e2: d013 beq.n 802710c { *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); } #else status = osMessageQueueGet(*mbox, msg, 0, timeout); 80270e4: 68fb ldr r3, [r7, #12] 80270e6: 6818 ldr r0, [r3, #0] 80270e8: 687b ldr r3, [r7, #4] 80270ea: 2200 movs r2, #0 80270ec: 68b9 ldr r1, [r7, #8] 80270ee: f7ea fe0b bl 8011d08 80270f2: 6138 str r0, [r7, #16] if (status == osOK) 80270f4: 693b ldr r3, [r7, #16] 80270f6: 2b00 cmp r3, #0 80270f8: d105 bne.n 8027106 { return (osKernelGetTickCount() - starttime); 80270fa: f7ea f91b bl 8011334 80270fe: 4602 mov r2, r0 8027100: 697b ldr r3, [r7, #20] 8027102: 1ad3 subs r3, r2, r3 8027104: e00f b.n 8027126 } #endif else { return SYS_ARCH_TIMEOUT; 8027106: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802710a: e00c b.n 8027126 #if (osCMSIS < 0x20000U) event = osMessageGet (*mbox, osWaitForever); *msg = (void *)event.value.v; return (osKernelSysTick() - starttime); #else osMessageQueueGet(*mbox, msg, 0, osWaitForever ); 802710c: 68fb ldr r3, [r7, #12] 802710e: 6818 ldr r0, [r3, #0] 8027110: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027114: 2200 movs r2, #0 8027116: 68b9 ldr r1, [r7, #8] 8027118: f7ea fdf6 bl 8011d08 return (osKernelGetTickCount() - starttime); 802711c: f7ea f90a bl 8011334 8027120: 4602 mov r2, r0 8027122: 697b ldr r3, [r7, #20] 8027124: 1ad3 subs r3, r2, r3 #endif } } 8027126: 4618 mov r0, r3 8027128: 3718 adds r7, #24 802712a: 46bd mov sp, r7 802712c: bd80 pop {r7, pc} 0802712e : /* 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) { 802712e: b580 push {r7, lr} 8027130: b082 sub sp, #8 8027132: af00 add r7, sp, #0 8027134: 6078 str r0, [r7, #4] 8027136: 6039 str r1, [r7, #0] if(event.status == osEventMessage) { *msg = (void *)event.value.v; #else if (osMessageQueueGet(*mbox, msg, 0, 0) == osOK) 8027138: 687b ldr r3, [r7, #4] 802713a: 6818 ldr r0, [r3, #0] 802713c: 2300 movs r3, #0 802713e: 2200 movs r2, #0 8027140: 6839 ldr r1, [r7, #0] 8027142: f7ea fde1 bl 8011d08 8027146: 4603 mov r3, r0 8027148: 2b00 cmp r3, #0 802714a: d101 bne.n 8027150 { #endif return ERR_OK; 802714c: 2300 movs r3, #0 802714e: e001 b.n 8027154 } else { return SYS_MBOX_EMPTY; 8027150: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff } } 8027154: 4618 mov r0, r3 8027156: 3708 adds r7, #8 8027158: 46bd mov sp, r7 802715a: bd80 pop {r7, pc} 0802715c : /*----------------------------------------------------------------------------------*/ int sys_mbox_valid(sys_mbox_t *mbox) { 802715c: b480 push {r7} 802715e: b083 sub sp, #12 8027160: af00 add r7, sp, #0 8027162: 6078 str r0, [r7, #4] if (*mbox == SYS_MBOX_NULL) 8027164: 687b ldr r3, [r7, #4] 8027166: 681b ldr r3, [r3, #0] 8027168: 2b00 cmp r3, #0 802716a: d101 bne.n 8027170 return 0; 802716c: 2300 movs r3, #0 802716e: e000 b.n 8027172 else return 1; 8027170: 2301 movs r3, #1 } 8027172: 4618 mov r0, r3 8027174: 370c adds r7, #12 8027176: 46bd mov sp, r7 8027178: f85d 7b04 ldr.w r7, [sp], #4 802717c: 4770 bx lr 0802717e : /*-----------------------------------------------------------------------------------*/ void sys_mbox_set_invalid(sys_mbox_t *mbox) { 802717e: b480 push {r7} 8027180: b083 sub sp, #12 8027182: af00 add r7, sp, #0 8027184: 6078 str r0, [r7, #4] *mbox = SYS_MBOX_NULL; 8027186: 687b ldr r3, [r7, #4] 8027188: 2200 movs r2, #0 802718a: 601a str r2, [r3, #0] } 802718c: bf00 nop 802718e: 370c adds r7, #12 8027190: 46bd mov sp, r7 8027192: f85d 7b04 ldr.w r7, [sp], #4 8027196: 4770 bx lr 08027198 : /*-----------------------------------------------------------------------------------*/ // 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) { 8027198: b580 push {r7, lr} 802719a: b082 sub sp, #8 802719c: af00 add r7, sp, #0 802719e: 6078 str r0, [r7, #4] 80271a0: 460b mov r3, r1 80271a2: 70fb strb r3, [r7, #3] #if (osCMSIS < 0x20000U) osSemaphoreDef(SEM); *sem = osSemaphoreCreate (osSemaphore(SEM), 1); #else *sem = osSemaphoreNew(UINT16_MAX, count, NULL); 80271a4: 78fb ldrb r3, [r7, #3] 80271a6: 2200 movs r2, #0 80271a8: 4619 mov r1, r3 80271aa: f64f 70ff movw r0, #65535 @ 0xffff 80271ae: f7ea fb94 bl 80118da 80271b2: 4602 mov r2, r0 80271b4: 687b ldr r3, [r7, #4] 80271b6: 601a str r2, [r3, #0] #endif if(*sem == NULL) 80271b8: 687b ldr r3, [r7, #4] 80271ba: 681b ldr r3, [r3, #0] 80271bc: 2b00 cmp r3, #0 80271be: d102 bne.n 80271c6 { #if SYS_STATS ++lwip_stats.sys.sem.err; #endif /* SYS_STATS */ return ERR_MEM; 80271c0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80271c4: e009 b.n 80271da } if(count == 0) // Means it can't be taken 80271c6: 78fb ldrb r3, [r7, #3] 80271c8: 2b00 cmp r3, #0 80271ca: d105 bne.n 80271d8 { #if (osCMSIS < 0x20000U) osSemaphoreWait(*sem, 0); #else osSemaphoreAcquire(*sem, 0); 80271cc: 687b ldr r3, [r7, #4] 80271ce: 681b ldr r3, [r3, #0] 80271d0: 2100 movs r1, #0 80271d2: 4618 mov r0, r3 80271d4: f7ea fc0a bl 80119ec 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; 80271d8: 2300 movs r3, #0 } 80271da: 4618 mov r0, r3 80271dc: 3708 adds r7, #8 80271de: 46bd mov sp, r7 80271e0: bd80 pop {r7, pc} 080271e2 : 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) { 80271e2: b580 push {r7, lr} 80271e4: b084 sub sp, #16 80271e6: af00 add r7, sp, #0 80271e8: 6078 str r0, [r7, #4] 80271ea: 6039 str r1, [r7, #0] #if (osCMSIS < 0x20000U) uint32_t starttime = osKernelSysTick(); #else uint32_t starttime = osKernelGetTickCount(); 80271ec: f7ea f8a2 bl 8011334 80271f0: 60f8 str r0, [r7, #12] #endif if(timeout != 0) 80271f2: 683b ldr r3, [r7, #0] 80271f4: 2b00 cmp r3, #0 80271f6: d011 beq.n 802721c #if (osCMSIS < 0x20000U) if(osSemaphoreWait (*sem, timeout) == osOK) { return (osKernelSysTick() - starttime); #else if(osSemaphoreAcquire(*sem, timeout) == osOK) 80271f8: 687b ldr r3, [r7, #4] 80271fa: 681b ldr r3, [r3, #0] 80271fc: 6839 ldr r1, [r7, #0] 80271fe: 4618 mov r0, r3 8027200: f7ea fbf4 bl 80119ec 8027204: 4603 mov r3, r0 8027206: 2b00 cmp r3, #0 8027208: d105 bne.n 8027216 { return (osKernelGetTickCount() - starttime); 802720a: f7ea f893 bl 8011334 802720e: 4602 mov r2, r0 8027210: 68fb ldr r3, [r7, #12] 8027212: 1ad3 subs r3, r2, r3 8027214: e012 b.n 802723c #endif } else { return SYS_ARCH_TIMEOUT; 8027216: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802721a: e00f b.n 802723c { #if (osCMSIS < 0x20000U) while(osSemaphoreWait (*sem, osWaitForever) != osOK); return (osKernelSysTick() - starttime); #else while(osSemaphoreAcquire(*sem, osWaitForever) != osOK); 802721c: bf00 nop 802721e: 687b ldr r3, [r7, #4] 8027220: 681b ldr r3, [r3, #0] 8027222: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027226: 4618 mov r0, r3 8027228: f7ea fbe0 bl 80119ec 802722c: 4603 mov r3, r0 802722e: 2b00 cmp r3, #0 8027230: d1f5 bne.n 802721e return (osKernelGetTickCount() - starttime); 8027232: f7ea f87f bl 8011334 8027236: 4602 mov r2, r0 8027238: 68fb ldr r3, [r7, #12] 802723a: 1ad3 subs r3, r2, r3 #endif } } 802723c: 4618 mov r0, r3 802723e: 3710 adds r7, #16 8027240: 46bd mov sp, r7 8027242: bd80 pop {r7, pc} 08027244 : /*-----------------------------------------------------------------------------------*/ // Signals a semaphore void sys_sem_signal(sys_sem_t *sem) { 8027244: b580 push {r7, lr} 8027246: b082 sub sp, #8 8027248: af00 add r7, sp, #0 802724a: 6078 str r0, [r7, #4] osSemaphoreRelease(*sem); 802724c: 687b ldr r3, [r7, #4] 802724e: 681b ldr r3, [r3, #0] 8027250: 4618 mov r0, r3 8027252: f7ea fc1d bl 8011a90 } 8027256: bf00 nop 8027258: 3708 adds r7, #8 802725a: 46bd mov sp, r7 802725c: bd80 pop {r7, pc} 0802725e : /*-----------------------------------------------------------------------------------*/ // Deallocates a semaphore void sys_sem_free(sys_sem_t *sem) { 802725e: b580 push {r7, lr} 8027260: b082 sub sp, #8 8027262: af00 add r7, sp, #0 8027264: 6078 str r0, [r7, #4] #if SYS_STATS --lwip_stats.sys.sem.used; #endif /* SYS_STATS */ osSemaphoreDelete(*sem); 8027266: 687b ldr r3, [r7, #4] 8027268: 681b ldr r3, [r3, #0] 802726a: 4618 mov r0, r3 802726c: f7ea fc54 bl 8011b18 } 8027270: bf00 nop 8027272: 3708 adds r7, #8 8027274: 46bd mov sp, r7 8027276: bd80 pop {r7, pc} 08027278 : /*-----------------------------------------------------------------------------------*/ int sys_sem_valid(sys_sem_t *sem) { 8027278: b480 push {r7} 802727a: b083 sub sp, #12 802727c: af00 add r7, sp, #0 802727e: 6078 str r0, [r7, #4] if (*sem == SYS_SEM_NULL) 8027280: 687b ldr r3, [r7, #4] 8027282: 681b ldr r3, [r3, #0] 8027284: 2b00 cmp r3, #0 8027286: d101 bne.n 802728c return 0; 8027288: 2300 movs r3, #0 802728a: e000 b.n 802728e else return 1; 802728c: 2301 movs r3, #1 } 802728e: 4618 mov r0, r3 8027290: 370c adds r7, #12 8027292: 46bd mov sp, r7 8027294: f85d 7b04 ldr.w r7, [sp], #4 8027298: 4770 bx lr 0802729a : /*-----------------------------------------------------------------------------------*/ void sys_sem_set_invalid(sys_sem_t *sem) { 802729a: b480 push {r7} 802729c: b083 sub sp, #12 802729e: af00 add r7, sp, #0 80272a0: 6078 str r0, [r7, #4] *sem = SYS_SEM_NULL; 80272a2: 687b ldr r3, [r7, #4] 80272a4: 2200 movs r2, #0 80272a6: 601a str r2, [r3, #0] } 80272a8: bf00 nop 80272aa: 370c adds r7, #12 80272ac: 46bd mov sp, r7 80272ae: f85d 7b04 ldr.w r7, [sp], #4 80272b2: 4770 bx lr 080272b4 : #else osMutexId_t lwip_sys_mutex; #endif // Initialize sys arch void sys_init(void) { 80272b4: b580 push {r7, lr} 80272b6: af00 add r7, sp, #0 #if (osCMSIS < 0x20000U) lwip_sys_mutex = osMutexCreate(osMutex(lwip_sys_mutex)); #else lwip_sys_mutex = osMutexNew(NULL); 80272b8: 2000 movs r0, #0 80272ba: f7ea fa00 bl 80116be 80272be: 4603 mov r3, r0 80272c0: 4a01 ldr r2, [pc, #4] @ (80272c8 ) 80272c2: 6013 str r3, [r2, #0] #endif } 80272c4: bf00 nop 80272c6: bd80 pop {r7, pc} 80272c8: 2402b11c .word 0x2402b11c 080272cc : /* Mutexes*/ /*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/ #if LWIP_COMPAT_MUTEX == 0 /* Create a new mutex*/ err_t sys_mutex_new(sys_mutex_t *mutex) { 80272cc: b580 push {r7, lr} 80272ce: b082 sub sp, #8 80272d0: af00 add r7, sp, #0 80272d2: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) osMutexDef(MUTEX); *mutex = osMutexCreate(osMutex(MUTEX)); #else *mutex = osMutexNew(NULL); 80272d4: 2000 movs r0, #0 80272d6: f7ea f9f2 bl 80116be 80272da: 4602 mov r2, r0 80272dc: 687b ldr r3, [r7, #4] 80272de: 601a str r2, [r3, #0] #endif if(*mutex == NULL) 80272e0: 687b ldr r3, [r7, #4] 80272e2: 681b ldr r3, [r3, #0] 80272e4: 2b00 cmp r3, #0 80272e6: d102 bne.n 80272ee { #if SYS_STATS ++lwip_stats.sys.mutex.err; #endif /* SYS_STATS */ return ERR_MEM; 80272e8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80272ec: e000 b.n 80272f0 ++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; 80272ee: 2300 movs r3, #0 } 80272f0: 4618 mov r0, r3 80272f2: 3708 adds r7, #8 80272f4: 46bd mov sp, r7 80272f6: bd80 pop {r7, pc} 080272f8 : osMutexDelete(*mutex); } /*-----------------------------------------------------------------------------------*/ /* Lock a mutex*/ void sys_mutex_lock(sys_mutex_t *mutex) { 80272f8: b580 push {r7, lr} 80272fa: b082 sub sp, #8 80272fc: af00 add r7, sp, #0 80272fe: 6078 str r0, [r7, #4] #if (osCMSIS < 0x20000U) osMutexWait(*mutex, osWaitForever); #else osMutexAcquire(*mutex, osWaitForever); 8027300: 687b ldr r3, [r7, #4] 8027302: 681b ldr r3, [r3, #0] 8027304: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027308: 4618 mov r0, r3 802730a: f7ea fa5e bl 80117ca #endif } 802730e: bf00 nop 8027310: 3708 adds r7, #8 8027312: 46bd mov sp, r7 8027314: bd80 pop {r7, pc} 08027316 : /*-----------------------------------------------------------------------------------*/ /* Unlock a mutex*/ void sys_mutex_unlock(sys_mutex_t *mutex) { 8027316: b580 push {r7, lr} 8027318: b082 sub sp, #8 802731a: af00 add r7, sp, #0 802731c: 6078 str r0, [r7, #4] osMutexRelease(*mutex); 802731e: 687b ldr r3, [r7, #4] 8027320: 681b ldr r3, [r3, #0] 8027322: 4618 mov r0, r3 8027324: f7ea fa9c bl 8011860 } 8027328: bf00 nop 802732a: 3708 adds r7, #8 802732c: 46bd mov sp, r7 802732e: bd80 pop {r7, pc} 08027330 : 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) { 8027330: b580 push {r7, lr} 8027332: b08e sub sp, #56 @ 0x38 8027334: af00 add r7, sp, #0 8027336: 60f8 str r0, [r7, #12] 8027338: 60b9 str r1, [r7, #8] 802733a: 607a str r2, [r7, #4] 802733c: 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 = { 802733e: f107 0314 add.w r3, r7, #20 8027342: 2224 movs r2, #36 @ 0x24 8027344: 2100 movs r1, #0 8027346: 4618 mov r0, r3 8027348: f003 fc3a bl 802abc0 802734c: 68fb ldr r3, [r7, #12] 802734e: 617b str r3, [r7, #20] 8027350: 683b ldr r3, [r7, #0] 8027352: 62bb str r3, [r7, #40] @ 0x28 8027354: 6c3b ldr r3, [r7, #64] @ 0x40 8027356: 62fb str r3, [r7, #44] @ 0x2c .name = name, .stack_size = stacksize, .priority = (osPriority_t)prio, }; return osThreadNew(thread, arg, &attributes); 8027358: f107 0314 add.w r3, r7, #20 802735c: 461a mov r2, r3 802735e: 6879 ldr r1, [r7, #4] 8027360: 68b8 ldr r0, [r7, #8] 8027362: f7e9 fffc bl 801135e 8027366: 4603 mov r3, r0 #endif } 8027368: 4618 mov r0, r3 802736a: 3738 adds r7, #56 @ 0x38 802736c: 46bd mov sp, r7 802736e: bd80 pop {r7, pc} 08027370 : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ sys_prot_t sys_arch_protect(void) { 8027370: b580 push {r7, lr} 8027372: af00 add r7, sp, #0 #if (osCMSIS < 0x20000U) osMutexWait(lwip_sys_mutex, osWaitForever); #else osMutexAcquire(lwip_sys_mutex, osWaitForever); 8027374: 4b04 ldr r3, [pc, #16] @ (8027388 ) 8027376: 681b ldr r3, [r3, #0] 8027378: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 802737c: 4618 mov r0, r3 802737e: f7ea fa24 bl 80117ca #endif return (sys_prot_t)1; 8027382: 2301 movs r3, #1 } 8027384: 4618 mov r0, r3 8027386: bd80 pop {r7, pc} 8027388: 2402b11c .word 0x2402b11c 0802738c : Note: This function is based on FreeRTOS API, because no equivalent CMSIS-RTOS API is available */ void sys_arch_unprotect(sys_prot_t pval) { 802738c: b580 push {r7, lr} 802738e: b082 sub sp, #8 8027390: af00 add r7, sp, #0 8027392: 6078 str r0, [r7, #4] ( void ) pval; osMutexRelease(lwip_sys_mutex); 8027394: 4b04 ldr r3, [pc, #16] @ (80273a8 ) 8027396: 681b ldr r3, [r3, #0] 8027398: 4618 mov r0, r3 802739a: f7ea fa61 bl 8011860 } 802739e: bf00 nop 80273a0: 3708 adds r7, #8 80273a2: 46bd mov sp, r7 80273a4: bd80 pop {r7, pc} 80273a6: bf00 nop 80273a8: 2402b11c .word 0x2402b11c 080273ac : #include //#include "cmsis_os.h" osMutexId_t mqttMutex; static void NewMessageData(MessageData* md, MQTTString* aTopicName, MQTTMessage* aMessage) { 80273ac: b480 push {r7} 80273ae: b085 sub sp, #20 80273b0: af00 add r7, sp, #0 80273b2: 60f8 str r0, [r7, #12] 80273b4: 60b9 str r1, [r7, #8] 80273b6: 607a str r2, [r7, #4] md->topicName = aTopicName; 80273b8: 68fb ldr r3, [r7, #12] 80273ba: 68ba ldr r2, [r7, #8] 80273bc: 605a str r2, [r3, #4] md->message = aMessage; 80273be: 68fb ldr r3, [r7, #12] 80273c0: 687a ldr r2, [r7, #4] 80273c2: 601a str r2, [r3, #0] } 80273c4: bf00 nop 80273c6: 3714 adds r7, #20 80273c8: 46bd mov sp, r7 80273ca: f85d 7b04 ldr.w r7, [sp], #4 80273ce: 4770 bx lr 080273d0 : static int getNextPacketId(MQTTClient *c) { 80273d0: b480 push {r7} 80273d2: b083 sub sp, #12 80273d4: af00 add r7, sp, #0 80273d6: 6078 str r0, [r7, #4] return c->next_packetid = (c->next_packetid == MAX_PACKET_ID) ? 1 : c->next_packetid + 1; 80273d8: 687b ldr r3, [r7, #4] 80273da: 681b ldr r3, [r3, #0] 80273dc: f64f 72ff movw r2, #65535 @ 0xffff 80273e0: 4293 cmp r3, r2 80273e2: d003 beq.n 80273ec 80273e4: 687b ldr r3, [r7, #4] 80273e6: 681b ldr r3, [r3, #0] 80273e8: 3301 adds r3, #1 80273ea: e000 b.n 80273ee 80273ec: 2301 movs r3, #1 80273ee: 687a ldr r2, [r7, #4] 80273f0: 6013 str r3, [r2, #0] 80273f2: 687b ldr r3, [r7, #4] 80273f4: 681b ldr r3, [r3, #0] } 80273f6: 4618 mov r0, r3 80273f8: 370c adds r7, #12 80273fa: 46bd mov sp, r7 80273fc: f85d 7b04 ldr.w r7, [sp], #4 8027400: 4770 bx lr 08027402 : static int sendPacket(MQTTClient* c, int length, Timer* timer) { 8027402: b5f0 push {r4, r5, r6, r7, lr} 8027404: b087 sub sp, #28 8027406: af00 add r7, sp, #0 8027408: 60f8 str r0, [r7, #12] 802740a: 60b9 str r1, [r7, #8] 802740c: 607a str r2, [r7, #4] int rc = FAILURE, 802740e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027412: 617b str r3, [r7, #20] sent = 0; 8027414: 2300 movs r3, #0 8027416: 613b str r3, [r7, #16] while (sent < length && !TimerIsExpired(timer)) 8027418: e018 b.n 802744c { rc = c->ipstack->mqttwrite(c->ipstack, &c->buf[sent], length, TimerLeftMS(timer)); 802741a: 68fb ldr r3, [r7, #12] 802741c: 6d5b ldr r3, [r3, #84] @ 0x54 802741e: 689c ldr r4, [r3, #8] 8027420: 68fb ldr r3, [r7, #12] 8027422: 6d5d ldr r5, [r3, #84] @ 0x54 8027424: 68fb ldr r3, [r7, #12] 8027426: 691a ldr r2, [r3, #16] 8027428: 693b ldr r3, [r7, #16] 802742a: 18d6 adds r6, r2, r3 802742c: 6878 ldr r0, [r7, #4] 802742e: f000 fed3 bl 80281d8 8027432: 4603 mov r3, r0 8027434: 68ba ldr r2, [r7, #8] 8027436: 4631 mov r1, r6 8027438: 4628 mov r0, r5 802743a: 47a0 blx r4 802743c: 6178 str r0, [r7, #20] if (rc < 0) // there was an error writing the data 802743e: 697b ldr r3, [r7, #20] 8027440: 2b00 cmp r3, #0 8027442: db0e blt.n 8027462 break; sent += rc; 8027444: 693a ldr r2, [r7, #16] 8027446: 697b ldr r3, [r7, #20] 8027448: 4413 add r3, r2 802744a: 613b str r3, [r7, #16] while (sent < length && !TimerIsExpired(timer)) 802744c: 693a ldr r2, [r7, #16] 802744e: 68bb ldr r3, [r7, #8] 8027450: 429a cmp r2, r3 8027452: da07 bge.n 8027464 8027454: 6878 ldr r0, [r7, #4] 8027456: f000 fe7d bl 8028154 802745a: 4603 mov r3, r0 802745c: 2b00 cmp r3, #0 802745e: d0dc beq.n 802741a 8027460: e000 b.n 8027464 break; 8027462: bf00 nop } if (sent == length) 8027464: 693a ldr r2, [r7, #16] 8027466: 68bb ldr r3, [r7, #8] 8027468: 429a cmp r2, r3 802746a: d10b bne.n 8027484 { TimerCountdown(&c->last_sent, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully sent the packet 802746c: 68fb ldr r3, [r7, #12] 802746e: f103 0258 add.w r2, r3, #88 @ 0x58 8027472: 68fb ldr r3, [r7, #12] 8027474: 699b ldr r3, [r3, #24] 8027476: 4619 mov r1, r3 8027478: 4610 mov r0, r2 802747a: f000 fe95 bl 80281a8 rc = MQTT_SUCCESS; 802747e: 2300 movs r3, #0 8027480: 617b str r3, [r7, #20] 8027482: e002 b.n 802748a } else rc = FAILURE; 8027484: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027488: 617b str r3, [r7, #20] return rc; 802748a: 697b ldr r3, [r7, #20] } 802748c: 4618 mov r0, r3 802748e: 371c adds r7, #28 8027490: 46bd mov sp, r7 8027492: bdf0 pop {r4, r5, r6, r7, pc} 08027494 : 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) { 8027494: b580 push {r7, lr} 8027496: b086 sub sp, #24 8027498: af00 add r7, sp, #0 802749a: 60f8 str r0, [r7, #12] 802749c: 60b9 str r1, [r7, #8] 802749e: 607a str r2, [r7, #4] 80274a0: 603b str r3, [r7, #0] int i; c->ipstack = network; 80274a2: 68fb ldr r3, [r7, #12] 80274a4: 68ba ldr r2, [r7, #8] 80274a6: 655a str r2, [r3, #84] @ 0x54 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80274a8: 2300 movs r3, #0 80274aa: 617b str r3, [r7, #20] 80274ac: e008 b.n 80274c0 c->messageHandlers[i].topicFilter = 0; 80274ae: 68fb ldr r3, [r7, #12] 80274b0: 697a ldr r2, [r7, #20] 80274b2: 3205 adds r2, #5 80274b4: 2100 movs r1, #0 80274b6: f843 1032 str.w r1, [r3, r2, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80274ba: 697b ldr r3, [r7, #20] 80274bc: 3301 adds r3, #1 80274be: 617b str r3, [r7, #20] 80274c0: 697b ldr r3, [r7, #20] 80274c2: 2b04 cmp r3, #4 80274c4: ddf3 ble.n 80274ae c->command_timeout_ms = command_timeout_ms; 80274c6: 68fb ldr r3, [r7, #12] 80274c8: 687a ldr r2, [r7, #4] 80274ca: 605a str r2, [r3, #4] c->buf = sendbuf; 80274cc: 68fb ldr r3, [r7, #12] 80274ce: 683a ldr r2, [r7, #0] 80274d0: 611a str r2, [r3, #16] c->buf_size = sendbuf_size; 80274d2: 68fb ldr r3, [r7, #12] 80274d4: 6a3a ldr r2, [r7, #32] 80274d6: 609a str r2, [r3, #8] c->readbuf = readbuf; 80274d8: 68fb ldr r3, [r7, #12] 80274da: 6a7a ldr r2, [r7, #36] @ 0x24 80274dc: 615a str r2, [r3, #20] c->readbuf_size = readbuf_size; 80274de: 68fb ldr r3, [r7, #12] 80274e0: 6aba ldr r2, [r7, #40] @ 0x28 80274e2: 60da str r2, [r3, #12] c->isconnected = 0; 80274e4: 68fb ldr r3, [r7, #12] 80274e6: 2200 movs r2, #0 80274e8: 621a str r2, [r3, #32] c->cleansession = 0; 80274ea: 68fb ldr r3, [r7, #12] 80274ec: 2200 movs r2, #0 80274ee: 625a str r2, [r3, #36] @ 0x24 c->ping_outstanding = 0; 80274f0: 68fb ldr r3, [r7, #12] 80274f2: 2200 movs r2, #0 80274f4: 771a strb r2, [r3, #28] c->defaultMessageHandler = NULL; 80274f6: 68fb ldr r3, [r7, #12] 80274f8: 2200 movs r2, #0 80274fa: 651a str r2, [r3, #80] @ 0x50 c->next_packetid = 1; 80274fc: 68fb ldr r3, [r7, #12] 80274fe: 2201 movs r2, #1 8027500: 601a str r2, [r3, #0] TimerInit(&c->last_sent); 8027502: 68fb ldr r3, [r7, #12] 8027504: 3358 adds r3, #88 @ 0x58 8027506: 4618 mov r0, r3 8027508: f000 fe7c bl 8028204 TimerInit(&c->last_received); 802750c: 68fb ldr r3, [r7, #12] 802750e: 3360 adds r3, #96 @ 0x60 8027510: 4618 mov r0, r3 8027512: f000 fe77 bl 8028204 #if defined(MQTT_TASK) MutexInit(&c->mutex); #endif if(mqttMutex == NULL) 8027516: 4b07 ldr r3, [pc, #28] @ (8027534 ) 8027518: 681b ldr r3, [r3, #0] 802751a: 2b00 cmp r3, #0 802751c: d105 bne.n 802752a { // osMutexDef(mqttMutex); // mqttMutex = osMutexNew(NULL); c->mutex = osMutexNew(NULL); 802751e: 2000 movs r0, #0 8027520: f7ea f8cd bl 80116be 8027524: 4602 mov r2, r0 8027526: 68fb ldr r3, [r7, #12] 8027528: 669a str r2, [r3, #104] @ 0x68 } } 802752a: bf00 nop 802752c: 3718 adds r7, #24 802752e: 46bd mov sp, r7 8027530: bd80 pop {r7, pc} 8027532: bf00 nop 8027534: 2402b120 .word 0x2402b120 08027538 : static int decodePacket(MQTTClient* c, int* value, int timeout) { 8027538: b590 push {r4, r7, lr} 802753a: b08b sub sp, #44 @ 0x2c 802753c: af00 add r7, sp, #0 802753e: 60f8 str r0, [r7, #12] 8027540: 60b9 str r1, [r7, #8] 8027542: 607a str r2, [r7, #4] unsigned char i; int multiplier = 1; 8027544: 2301 movs r3, #1 8027546: 627b str r3, [r7, #36] @ 0x24 int len = 0; 8027548: 2300 movs r3, #0 802754a: 623b str r3, [r7, #32] const int MAX_NO_OF_REMAINING_LENGTH_BYTES = 4; 802754c: 2304 movs r3, #4 802754e: 61fb str r3, [r7, #28] *value = 0; 8027550: 68bb ldr r3, [r7, #8] 8027552: 2200 movs r2, #0 8027554: 601a str r2, [r3, #0] do { int rc = MQTTPACKET_READ_ERROR; 8027556: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802755a: 61bb str r3, [r7, #24] if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 802755c: 6a3b ldr r3, [r7, #32] 802755e: 3301 adds r3, #1 8027560: 623b str r3, [r7, #32] 8027562: 6a3a ldr r2, [r7, #32] 8027564: 69fb ldr r3, [r7, #28] 8027566: 429a cmp r2, r3 8027568: dd03 ble.n 8027572 { rc = MQTTPACKET_READ_ERROR; /* bad data */ 802756a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802756e: 61bb str r3, [r7, #24] goto exit; 8027570: e021 b.n 80275b6 } rc = c->ipstack->mqttread(c->ipstack, &i, 1, timeout); 8027572: 68fb ldr r3, [r7, #12] 8027574: 6d5b ldr r3, [r3, #84] @ 0x54 8027576: 685c ldr r4, [r3, #4] 8027578: 68fb ldr r3, [r7, #12] 802757a: 6d58 ldr r0, [r3, #84] @ 0x54 802757c: f107 0117 add.w r1, r7, #23 8027580: 687b ldr r3, [r7, #4] 8027582: 2201 movs r2, #1 8027584: 47a0 blx r4 8027586: 61b8 str r0, [r7, #24] if (rc != 1) 8027588: 69bb ldr r3, [r7, #24] 802758a: 2b01 cmp r3, #1 802758c: d112 bne.n 80275b4 goto exit; *value += (i & 127) * multiplier; 802758e: 68bb ldr r3, [r7, #8] 8027590: 681a ldr r2, [r3, #0] 8027592: 7dfb ldrb r3, [r7, #23] 8027594: f003 037f and.w r3, r3, #127 @ 0x7f 8027598: 6a79 ldr r1, [r7, #36] @ 0x24 802759a: fb01 f303 mul.w r3, r1, r3 802759e: 441a add r2, r3 80275a0: 68bb ldr r3, [r7, #8] 80275a2: 601a str r2, [r3, #0] multiplier *= 128; 80275a4: 6a7b ldr r3, [r7, #36] @ 0x24 80275a6: 01db lsls r3, r3, #7 80275a8: 627b str r3, [r7, #36] @ 0x24 } while ((i & 128) != 0); 80275aa: 7dfb ldrb r3, [r7, #23] 80275ac: b25b sxtb r3, r3 80275ae: 2b00 cmp r3, #0 80275b0: dbd1 blt.n 8027556 exit: 80275b2: e000 b.n 80275b6 goto exit; 80275b4: bf00 nop return len; 80275b6: 6a3b ldr r3, [r7, #32] } 80275b8: 4618 mov r0, r3 80275ba: 372c adds r7, #44 @ 0x2c 80275bc: 46bd mov sp, r7 80275be: bd90 pop {r4, r7, pc} 080275c0 : static int readPacket(MQTTClient* c, Timer* timer) { 80275c0: b5f0 push {r4, r5, r6, r7, lr} 80275c2: b089 sub sp, #36 @ 0x24 80275c4: af00 add r7, sp, #0 80275c6: 60f8 str r0, [r7, #12] 80275c8: 60b9 str r1, [r7, #8] MQTTHeader header = {0}; 80275ca: 2300 movs r3, #0 80275cc: 617b str r3, [r7, #20] int len = 0; 80275ce: 2300 movs r3, #0 80275d0: 61bb str r3, [r7, #24] int rem_len = 0; 80275d2: 2300 movs r3, #0 80275d4: 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)); 80275d6: 68fb ldr r3, [r7, #12] 80275d8: 6d5b ldr r3, [r3, #84] @ 0x54 80275da: 685c ldr r4, [r3, #4] 80275dc: 68fb ldr r3, [r7, #12] 80275de: 6d5d ldr r5, [r3, #84] @ 0x54 80275e0: 68fb ldr r3, [r7, #12] 80275e2: 695e ldr r6, [r3, #20] 80275e4: 68b8 ldr r0, [r7, #8] 80275e6: f000 fdf7 bl 80281d8 80275ea: 4603 mov r3, r0 80275ec: 2201 movs r2, #1 80275ee: 4631 mov r1, r6 80275f0: 4628 mov r0, r5 80275f2: 47a0 blx r4 80275f4: 61f8 str r0, [r7, #28] if (rc != 1) 80275f6: 69fb ldr r3, [r7, #28] 80275f8: 2b01 cmp r3, #1 80275fa: d15d bne.n 80276b8 goto exit; len = 1; 80275fc: 2301 movs r3, #1 80275fe: 61bb str r3, [r7, #24] /* 2. read the remaining length. This is variable in itself */ decodePacket(c, &rem_len, TimerLeftMS(timer)); 8027600: 68b8 ldr r0, [r7, #8] 8027602: f000 fde9 bl 80281d8 8027606: 4602 mov r2, r0 8027608: f107 0310 add.w r3, r7, #16 802760c: 4619 mov r1, r3 802760e: 68f8 ldr r0, [r7, #12] 8027610: f7ff ff92 bl 8027538 len += MQTTPacket_encode(c->readbuf + 1, rem_len); /* put the original remaining length back into the buffer */ 8027614: 68fb ldr r3, [r7, #12] 8027616: 695b ldr r3, [r3, #20] 8027618: 3301 adds r3, #1 802761a: 693a ldr r2, [r7, #16] 802761c: 4611 mov r1, r2 802761e: 4618 mov r0, r3 8027620: f001 f959 bl 80288d6 8027624: 4602 mov r2, r0 8027626: 69bb ldr r3, [r7, #24] 8027628: 4413 add r3, r2 802762a: 61bb str r3, [r7, #24] if (rem_len > (c->readbuf_size - len)) 802762c: 68fb ldr r3, [r7, #12] 802762e: 68da ldr r2, [r3, #12] 8027630: 69bb ldr r3, [r7, #24] 8027632: 1ad3 subs r3, r2, r3 8027634: 693a ldr r2, [r7, #16] 8027636: 4293 cmp r3, r2 8027638: d203 bcs.n 8027642 { rc = BUFFER_OVERFLOW; 802763a: f06f 0301 mvn.w r3, #1 802763e: 61fb str r3, [r7, #28] goto exit; 8027640: e03d b.n 80276be } /* 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)) { 8027642: 693b ldr r3, [r7, #16] 8027644: 2b00 cmp r3, #0 8027646: dd20 ble.n 802768a 8027648: 68fb ldr r3, [r7, #12] 802764a: 6d5b ldr r3, [r3, #84] @ 0x54 802764c: 685c ldr r4, [r3, #4] 802764e: 68fb ldr r3, [r7, #12] 8027650: 6d5d ldr r5, [r3, #84] @ 0x54 8027652: 68fb ldr r3, [r7, #12] 8027654: 695a ldr r2, [r3, #20] 8027656: 69bb ldr r3, [r7, #24] 8027658: 18d6 adds r6, r2, r3 802765a: 693b ldr r3, [r7, #16] 802765c: 607b str r3, [r7, #4] 802765e: 68b8 ldr r0, [r7, #8] 8027660: f000 fdba bl 80281d8 8027664: 4603 mov r3, r0 8027666: 687a ldr r2, [r7, #4] 8027668: 4631 mov r1, r6 802766a: 4628 mov r0, r5 802766c: 47a0 blx r4 802766e: 4602 mov r2, r0 8027670: 693b ldr r3, [r7, #16] 8027672: 429a cmp r2, r3 8027674: bf14 ite ne 8027676: 2301 movne r3, #1 8027678: 2300 moveq r3, #0 802767a: b2db uxtb r3, r3 802767c: 61fb str r3, [r7, #28] 802767e: 69fb ldr r3, [r7, #28] 8027680: 2b00 cmp r3, #0 8027682: d002 beq.n 802768a rc = 0; 8027684: 2300 movs r3, #0 8027686: 61fb str r3, [r7, #28] goto exit; 8027688: e019 b.n 80276be } header.byte = c->readbuf[0]; 802768a: 68fb ldr r3, [r7, #12] 802768c: 695b ldr r3, [r3, #20] 802768e: 781b ldrb r3, [r3, #0] 8027690: 753b strb r3, [r7, #20] rc = header.bits.type; 8027692: 7d3b ldrb r3, [r7, #20] 8027694: f3c3 1303 ubfx r3, r3, #4, #4 8027698: b2db uxtb r3, r3 802769a: 61fb str r3, [r7, #28] if (c->keepAliveInterval > 0) 802769c: 68fb ldr r3, [r7, #12] 802769e: 699b ldr r3, [r3, #24] 80276a0: 2b00 cmp r3, #0 80276a2: d00b beq.n 80276bc TimerCountdown(&c->last_received, c->keepAliveInterval); // record the fact that we have MQTT_SUCCESSfully received a packet 80276a4: 68fb ldr r3, [r7, #12] 80276a6: f103 0260 add.w r2, r3, #96 @ 0x60 80276aa: 68fb ldr r3, [r7, #12] 80276ac: 699b ldr r3, [r3, #24] 80276ae: 4619 mov r1, r3 80276b0: 4610 mov r0, r2 80276b2: f000 fd79 bl 80281a8 80276b6: e002 b.n 80276be goto exit; 80276b8: bf00 nop 80276ba: e000 b.n 80276be exit: 80276bc: bf00 nop return rc; 80276be: 69fb ldr r3, [r7, #28] } 80276c0: 4618 mov r0, r3 80276c2: 3724 adds r7, #36 @ 0x24 80276c4: 46bd mov sp, r7 80276c6: bdf0 pop {r4, r5, r6, r7, pc} 080276c8 : // 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) { 80276c8: b480 push {r7} 80276ca: b087 sub sp, #28 80276cc: af00 add r7, sp, #0 80276ce: 6078 str r0, [r7, #4] 80276d0: 6039 str r1, [r7, #0] char* curf = topicFilter; 80276d2: 687b ldr r3, [r7, #4] 80276d4: 617b str r3, [r7, #20] char* curn = topicName->lenstring.data; 80276d6: 683b ldr r3, [r7, #0] 80276d8: 689b ldr r3, [r3, #8] 80276da: 613b str r3, [r7, #16] char* curn_end = curn + topicName->lenstring.len; 80276dc: 683b ldr r3, [r7, #0] 80276de: 685b ldr r3, [r3, #4] 80276e0: 461a mov r2, r3 80276e2: 693b ldr r3, [r7, #16] 80276e4: 4413 add r3, r2 80276e6: 60bb str r3, [r7, #8] while (*curf && curn < curn_end) 80276e8: e039 b.n 802775e { if (*curn == '/' && *curf != '/') 80276ea: 693b ldr r3, [r7, #16] 80276ec: 781b ldrb r3, [r3, #0] 80276ee: 2b2f cmp r3, #47 @ 0x2f 80276f0: d103 bne.n 80276fa 80276f2: 697b ldr r3, [r7, #20] 80276f4: 781b ldrb r3, [r3, #0] 80276f6: 2b2f cmp r3, #47 @ 0x2f 80276f8: d13a bne.n 8027770 break; if (*curf != '+' && *curf != '#' && *curf != *curn) 80276fa: 697b ldr r3, [r7, #20] 80276fc: 781b ldrb r3, [r3, #0] 80276fe: 2b2b cmp r3, #43 @ 0x2b 8027700: d009 beq.n 8027716 8027702: 697b ldr r3, [r7, #20] 8027704: 781b ldrb r3, [r3, #0] 8027706: 2b23 cmp r3, #35 @ 0x23 8027708: d005 beq.n 8027716 802770a: 697b ldr r3, [r7, #20] 802770c: 781a ldrb r2, [r3, #0] 802770e: 693b ldr r3, [r7, #16] 8027710: 781b ldrb r3, [r3, #0] 8027712: 429a cmp r2, r3 8027714: d12e bne.n 8027774 break; if (*curf == '+') 8027716: 697b ldr r3, [r7, #20] 8027718: 781b ldrb r3, [r3, #0] 802771a: 2b2b cmp r3, #43 @ 0x2b 802771c: d112 bne.n 8027744 { // skip until we meet the next separator, or end of string char* nextpos = curn + 1; 802771e: 693b ldr r3, [r7, #16] 8027720: 3301 adds r3, #1 8027722: 60fb str r3, [r7, #12] while (nextpos < curn_end && *nextpos != '/') 8027724: e005 b.n 8027732 nextpos = ++curn + 1; 8027726: 693b ldr r3, [r7, #16] 8027728: 3301 adds r3, #1 802772a: 613b str r3, [r7, #16] 802772c: 693b ldr r3, [r7, #16] 802772e: 3301 adds r3, #1 8027730: 60fb str r3, [r7, #12] while (nextpos < curn_end && *nextpos != '/') 8027732: 68fa ldr r2, [r7, #12] 8027734: 68bb ldr r3, [r7, #8] 8027736: 429a cmp r2, r3 8027738: d20b bcs.n 8027752 802773a: 68fb ldr r3, [r7, #12] 802773c: 781b ldrb r3, [r3, #0] 802773e: 2b2f cmp r3, #47 @ 0x2f 8027740: d1f1 bne.n 8027726 8027742: e006 b.n 8027752 } else if (*curf == '#') 8027744: 697b ldr r3, [r7, #20] 8027746: 781b ldrb r3, [r3, #0] 8027748: 2b23 cmp r3, #35 @ 0x23 802774a: d102 bne.n 8027752 curn = curn_end - 1; // skip until end of string 802774c: 68bb ldr r3, [r7, #8] 802774e: 3b01 subs r3, #1 8027750: 613b str r3, [r7, #16] curf++; 8027752: 697b ldr r3, [r7, #20] 8027754: 3301 adds r3, #1 8027756: 617b str r3, [r7, #20] curn++; 8027758: 693b ldr r3, [r7, #16] 802775a: 3301 adds r3, #1 802775c: 613b str r3, [r7, #16] while (*curf && curn < curn_end) 802775e: 697b ldr r3, [r7, #20] 8027760: 781b ldrb r3, [r3, #0] 8027762: 2b00 cmp r3, #0 8027764: d007 beq.n 8027776 8027766: 693a ldr r2, [r7, #16] 8027768: 68bb ldr r3, [r7, #8] 802776a: 429a cmp r2, r3 802776c: d3bd bcc.n 80276ea 802776e: e002 b.n 8027776 break; 8027770: bf00 nop 8027772: e000 b.n 8027776 break; 8027774: bf00 nop }; return (curn == curn_end) && (*curf == '\0'); 8027776: 693a ldr r2, [r7, #16] 8027778: 68bb ldr r3, [r7, #8] 802777a: 429a cmp r2, r3 802777c: d105 bne.n 802778a 802777e: 697b ldr r3, [r7, #20] 8027780: 781b ldrb r3, [r3, #0] 8027782: 2b00 cmp r3, #0 8027784: d101 bne.n 802778a 8027786: 2301 movs r3, #1 8027788: e000 b.n 802778c 802778a: 2300 movs r3, #0 802778c: b2db uxtb r3, r3 } 802778e: 4618 mov r0, r3 8027790: 371c adds r7, #28 8027792: 46bd mov sp, r7 8027794: f85d 7b04 ldr.w r7, [sp], #4 8027798: 4770 bx lr 0802779a : int deliverMessage(MQTTClient* c, MQTTString* topicName, MQTTMessage* message) { 802779a: b580 push {r7, lr} 802779c: b08a sub sp, #40 @ 0x28 802779e: af00 add r7, sp, #0 80277a0: 60f8 str r0, [r7, #12] 80277a2: 60b9 str r1, [r7, #8] 80277a4: 607a str r2, [r7, #4] int i; int rc = FAILURE; 80277a6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80277aa: 623b str r3, [r7, #32] // we have to find the right message handler - indexed by topic for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 80277ac: 2300 movs r3, #0 80277ae: 627b str r3, [r7, #36] @ 0x24 80277b0: e03c b.n 802782c { if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 80277b2: 68fb ldr r3, [r7, #12] 80277b4: 6a7a ldr r2, [r7, #36] @ 0x24 80277b6: 3205 adds r2, #5 80277b8: f853 3032 ldr.w r3, [r3, r2, lsl #3] 80277bc: 2b00 cmp r3, #0 80277be: d032 beq.n 8027826 80277c0: 68fb ldr r3, [r7, #12] 80277c2: 6a7a ldr r2, [r7, #36] @ 0x24 80277c4: 3205 adds r2, #5 80277c6: f853 3032 ldr.w r3, [r3, r2, lsl #3] 80277ca: 4619 mov r1, r3 80277cc: 68b8 ldr r0, [r7, #8] 80277ce: f001 fa51 bl 8028c74 80277d2: 4603 mov r3, r0 80277d4: 2b00 cmp r3, #0 80277d6: d10b bne.n 80277f0 isTopicMatched((char*)c->messageHandlers[i].topicFilter, topicName))) 80277d8: 68fb ldr r3, [r7, #12] 80277da: 6a7a ldr r2, [r7, #36] @ 0x24 80277dc: 3205 adds r2, #5 80277de: f853 3032 ldr.w r3, [r3, r2, lsl #3] 80277e2: 68b9 ldr r1, [r7, #8] 80277e4: 4618 mov r0, r3 80277e6: f7ff ff6f bl 80276c8 80277ea: 4603 mov r3, r0 if (c->messageHandlers[i].topicFilter != 0 && (MQTTPacket_equals(topicName, (char*)c->messageHandlers[i].topicFilter) || 80277ec: 2b00 cmp r3, #0 80277ee: d01a beq.n 8027826 { if (c->messageHandlers[i].fp != NULL) 80277f0: 68fa ldr r2, [r7, #12] 80277f2: 6a7b ldr r3, [r7, #36] @ 0x24 80277f4: 3305 adds r3, #5 80277f6: 00db lsls r3, r3, #3 80277f8: 4413 add r3, r2 80277fa: 685b ldr r3, [r3, #4] 80277fc: 2b00 cmp r3, #0 80277fe: d012 beq.n 8027826 { MessageData md; NewMessageData(&md, topicName, message); 8027800: f107 0318 add.w r3, r7, #24 8027804: 687a ldr r2, [r7, #4] 8027806: 68b9 ldr r1, [r7, #8] 8027808: 4618 mov r0, r3 802780a: f7ff fdcf bl 80273ac c->messageHandlers[i].fp(&md); 802780e: 68fa ldr r2, [r7, #12] 8027810: 6a7b ldr r3, [r7, #36] @ 0x24 8027812: 3305 adds r3, #5 8027814: 00db lsls r3, r3, #3 8027816: 4413 add r3, r2 8027818: 685b ldr r3, [r3, #4] 802781a: f107 0218 add.w r2, r7, #24 802781e: 4610 mov r0, r2 8027820: 4798 blx r3 rc = MQTT_SUCCESS; 8027822: 2300 movs r3, #0 8027824: 623b str r3, [r7, #32] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027826: 6a7b ldr r3, [r7, #36] @ 0x24 8027828: 3301 adds r3, #1 802782a: 627b str r3, [r7, #36] @ 0x24 802782c: 6a7b ldr r3, [r7, #36] @ 0x24 802782e: 2b04 cmp r3, #4 8027830: ddbf ble.n 80277b2 } } } if (rc == FAILURE && c->defaultMessageHandler != NULL) 8027832: 6a3b ldr r3, [r7, #32] 8027834: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027838: d112 bne.n 8027860 802783a: 68fb ldr r3, [r7, #12] 802783c: 6d1b ldr r3, [r3, #80] @ 0x50 802783e: 2b00 cmp r3, #0 8027840: d00e beq.n 8027860 { MessageData md; NewMessageData(&md, topicName, message); 8027842: f107 0310 add.w r3, r7, #16 8027846: 687a ldr r2, [r7, #4] 8027848: 68b9 ldr r1, [r7, #8] 802784a: 4618 mov r0, r3 802784c: f7ff fdae bl 80273ac c->defaultMessageHandler(&md); 8027850: 68fb ldr r3, [r7, #12] 8027852: 6d1b ldr r3, [r3, #80] @ 0x50 8027854: f107 0210 add.w r2, r7, #16 8027858: 4610 mov r0, r2 802785a: 4798 blx r3 rc = MQTT_SUCCESS; 802785c: 2300 movs r3, #0 802785e: 623b str r3, [r7, #32] } return rc; 8027860: 6a3b ldr r3, [r7, #32] } 8027862: 4618 mov r0, r3 8027864: 3728 adds r7, #40 @ 0x28 8027866: 46bd mov sp, r7 8027868: bd80 pop {r7, pc} 0802786a : int keepalive(MQTTClient* c) { 802786a: b580 push {r7, lr} 802786c: b086 sub sp, #24 802786e: af00 add r7, sp, #0 8027870: 6078 str r0, [r7, #4] int rc = MQTT_SUCCESS; 8027872: 2300 movs r3, #0 8027874: 617b str r3, [r7, #20] if (c->keepAliveInterval == 0) 8027876: 687b ldr r3, [r7, #4] 8027878: 699b ldr r3, [r3, #24] 802787a: 2b00 cmp r3, #0 802787c: d03e beq.n 80278fc goto exit; if (TimerIsExpired(&c->last_sent) || TimerIsExpired(&c->last_received)) 802787e: 687b ldr r3, [r7, #4] 8027880: 3358 adds r3, #88 @ 0x58 8027882: 4618 mov r0, r3 8027884: f000 fc66 bl 8028154 8027888: 4603 mov r3, r0 802788a: 2b00 cmp r3, #0 802788c: d107 bne.n 802789e 802788e: 687b ldr r3, [r7, #4] 8027890: 3360 adds r3, #96 @ 0x60 8027892: 4618 mov r0, r3 8027894: f000 fc5e bl 8028154 8027898: 4603 mov r3, r0 802789a: 2b00 cmp r3, #0 802789c: d030 beq.n 8027900 { if (c->ping_outstanding) 802789e: 687b ldr r3, [r7, #4] 80278a0: 7f1b ldrb r3, [r3, #28] 80278a2: 2b00 cmp r3, #0 80278a4: d003 beq.n 80278ae rc = FAILURE; /* PINGRESP not received in keepalive interval */ 80278a6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80278aa: 617b str r3, [r7, #20] 80278ac: e029 b.n 8027902 else { Timer timer; TimerInit(&timer); 80278ae: f107 0308 add.w r3, r7, #8 80278b2: 4618 mov r0, r3 80278b4: f000 fca6 bl 8028204 TimerCountdownMS(&timer, 1000); 80278b8: f107 0308 add.w r3, r7, #8 80278bc: f44f 717a mov.w r1, #1000 @ 0x3e8 80278c0: 4618 mov r0, r3 80278c2: f000 fc5d bl 8028180 int len = MQTTSerialize_pingreq(c->buf, c->buf_size); 80278c6: 687b ldr r3, [r7, #4] 80278c8: 691a ldr r2, [r3, #16] 80278ca: 687b ldr r3, [r7, #4] 80278cc: 689b ldr r3, [r3, #8] 80278ce: 4619 mov r1, r3 80278d0: 4610 mov r0, r2 80278d2: f000 ff34 bl 802873e 80278d6: 6138 str r0, [r7, #16] if (len > 0 && (rc = sendPacket(c, len, &timer)) == MQTT_SUCCESS) // send the ping packet 80278d8: 693b ldr r3, [r7, #16] 80278da: 2b00 cmp r3, #0 80278dc: dd11 ble.n 8027902 80278de: f107 0308 add.w r3, r7, #8 80278e2: 461a mov r2, r3 80278e4: 6939 ldr r1, [r7, #16] 80278e6: 6878 ldr r0, [r7, #4] 80278e8: f7ff fd8b bl 8027402 80278ec: 6178 str r0, [r7, #20] 80278ee: 697b ldr r3, [r7, #20] 80278f0: 2b00 cmp r3, #0 80278f2: d106 bne.n 8027902 c->ping_outstanding = 1; 80278f4: 687b ldr r3, [r7, #4] 80278f6: 2201 movs r2, #1 80278f8: 771a strb r2, [r3, #28] 80278fa: e002 b.n 8027902 goto exit; 80278fc: bf00 nop 80278fe: e000 b.n 8027902 } } exit: 8027900: bf00 nop return rc; 8027902: 697b ldr r3, [r7, #20] } 8027904: 4618 mov r0, r3 8027906: 3718 adds r7, #24 8027908: 46bd mov sp, r7 802790a: bd80 pop {r7, pc} 0802790c : void MQTTCleanSession(MQTTClient* c) { 802790c: b480 push {r7} 802790e: b085 sub sp, #20 8027910: af00 add r7, sp, #0 8027912: 6078 str r0, [r7, #4] int i = 0; 8027914: 2300 movs r3, #0 8027916: 60fb str r3, [r7, #12] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027918: 2300 movs r3, #0 802791a: 60fb str r3, [r7, #12] 802791c: e008 b.n 8027930 c->messageHandlers[i].topicFilter = NULL; 802791e: 687b ldr r3, [r7, #4] 8027920: 68fa ldr r2, [r7, #12] 8027922: 3205 adds r2, #5 8027924: 2100 movs r1, #0 8027926: f843 1032 str.w r1, [r3, r2, lsl #3] for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 802792a: 68fb ldr r3, [r7, #12] 802792c: 3301 adds r3, #1 802792e: 60fb str r3, [r7, #12] 8027930: 68fb ldr r3, [r7, #12] 8027932: 2b04 cmp r3, #4 8027934: ddf3 ble.n 802791e } 8027936: bf00 nop 8027938: bf00 nop 802793a: 3714 adds r7, #20 802793c: 46bd mov sp, r7 802793e: f85d 7b04 ldr.w r7, [sp], #4 8027942: 4770 bx lr 08027944 : void MQTTCloseSession(MQTTClient* c) { 8027944: b580 push {r7, lr} 8027946: b082 sub sp, #8 8027948: af00 add r7, sp, #0 802794a: 6078 str r0, [r7, #4] c->ping_outstanding = 0; 802794c: 687b ldr r3, [r7, #4] 802794e: 2200 movs r2, #0 8027950: 771a strb r2, [r3, #28] c->isconnected = 0; 8027952: 687b ldr r3, [r7, #4] 8027954: 2200 movs r2, #0 8027956: 621a str r2, [r3, #32] if (c->cleansession) 8027958: 687b ldr r3, [r7, #4] 802795a: 6a5b ldr r3, [r3, #36] @ 0x24 802795c: 2b00 cmp r3, #0 802795e: d002 beq.n 8027966 MQTTCleanSession(c); 8027960: 6878 ldr r0, [r7, #4] 8027962: f7ff ffd3 bl 802790c } 8027966: bf00 nop 8027968: 3708 adds r7, #8 802796a: 46bd mov sp, r7 802796c: bd80 pop {r7, pc} ... 08027970 : int cycle(MQTTClient* c, Timer* timer) { 8027970: b5f0 push {r4, r5, r6, r7, lr} 8027972: b095 sub sp, #84 @ 0x54 8027974: af06 add r7, sp, #24 8027976: 6078 str r0, [r7, #4] 8027978: 6039 str r1, [r7, #0] int len = 0, 802797a: 2300 movs r3, #0 802797c: 637b str r3, [r7, #52] @ 0x34 rc = MQTT_SUCCESS; 802797e: 2300 movs r3, #0 8027980: 633b str r3, [r7, #48] @ 0x30 int packet_type = readPacket(c, timer); /* read the socket, see what work is due */ 8027982: 6839 ldr r1, [r7, #0] 8027984: 6878 ldr r0, [r7, #4] 8027986: f7ff fe1b bl 80275c0 802798a: 62f8 str r0, [r7, #44] @ 0x2c switch (packet_type) 802798c: 6afb ldr r3, [r7, #44] @ 0x2c 802798e: 2b0d cmp r3, #13 8027990: d81e bhi.n 80279d0 8027992: a201 add r2, pc, #4 @ (adr r2, 8027998 ) 8027994: f852 f023 ldr.w pc, [r2, r3, lsl #2] 8027998: 08027b27 .word 0x08027b27 802799c: 080279d1 .word 0x080279d1 80279a0: 08027b27 .word 0x08027b27 80279a4: 080279d7 .word 0x080279d7 80279a8: 08027b27 .word 0x08027b27 80279ac: 08027aa3 .word 0x08027aa3 80279b0: 08027aa3 .word 0x08027aa3 80279b4: 08027b27 .word 0x08027b27 80279b8: 080279d1 .word 0x080279d1 80279bc: 08027b27 .word 0x08027b27 80279c0: 080279d1 .word 0x080279d1 80279c4: 08027b27 .word 0x08027b27 80279c8: 080279d1 .word 0x080279d1 80279cc: 08027b1f .word 0x08027b1f { default: /* no more data to read, unrecoverable. Or read packet fails due to unexpected network error */ rc = packet_type; 80279d0: 6afb ldr r3, [r7, #44] @ 0x2c 80279d2: 633b str r3, [r7, #48] @ 0x30 goto exit; 80279d4: e0b9 b.n 8027b4a case PUBLISH: { MQTTString topicName; MQTTMessage msg; int intQoS; msg.payloadlen = 0; /* this is a size_t, but deserialize publish sets this as int */ 80279d6: 2300 movs r3, #0 80279d8: 61fb str r3, [r7, #28] if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName, 80279da: 687b ldr r3, [r7, #4] 80279dc: 695b ldr r3, [r3, #20] (unsigned char**)&msg.payload, (int*)&msg.payloadlen, c->readbuf, c->readbuf_size) != 1) 80279de: 687a ldr r2, [r7, #4] 80279e0: 68d2 ldr r2, [r2, #12] if (MQTTDeserialize_publish(&msg.dup, &intQoS, &msg.retained, &msg.id, &topicName, 80279e2: 4616 mov r6, r2 80279e4: f107 0210 add.w r2, r7, #16 80279e8: 1d15 adds r5, r2, #4 80279ea: f107 0210 add.w r2, r7, #16 80279ee: 1c54 adds r4, r2, #1 80279f0: f107 010c add.w r1, r7, #12 80279f4: f107 0210 add.w r2, r7, #16 80279f8: 1c90 adds r0, r2, #2 80279fa: 9604 str r6, [sp, #16] 80279fc: 9303 str r3, [sp, #12] 80279fe: f107 0310 add.w r3, r7, #16 8027a02: 330c adds r3, #12 8027a04: 9302 str r3, [sp, #8] 8027a06: f107 0310 add.w r3, r7, #16 8027a0a: 3308 adds r3, #8 8027a0c: 9301 str r3, [sp, #4] 8027a0e: f107 0320 add.w r3, r7, #32 8027a12: 9300 str r3, [sp, #0] 8027a14: 462b mov r3, r5 8027a16: 4622 mov r2, r4 8027a18: f000 fea0 bl 802875c 8027a1c: 4603 mov r3, r0 8027a1e: 2b01 cmp r3, #1 8027a20: f040 8090 bne.w 8027b44 goto exit; msg.qos = (enum QoS)intQoS; 8027a24: 68fb ldr r3, [r7, #12] 8027a26: b2db uxtb r3, r3 8027a28: 743b strb r3, [r7, #16] deliverMessage(c, &topicName, &msg); 8027a2a: f107 0210 add.w r2, r7, #16 8027a2e: f107 0320 add.w r3, r7, #32 8027a32: 4619 mov r1, r3 8027a34: 6878 ldr r0, [r7, #4] 8027a36: f7ff feb0 bl 802779a if (msg.qos != QOS0) 8027a3a: 7c3b ldrb r3, [r7, #16] 8027a3c: 2b00 cmp r3, #0 8027a3e: d074 beq.n 8027b2a { if (msg.qos == QOS1) 8027a40: 7c3b ldrb r3, [r7, #16] 8027a42: 2b01 cmp r3, #1 8027a44: d10c bne.n 8027a60 len = MQTTSerialize_ack(c->buf, c->buf_size, PUBACK, 0, msg.id); 8027a46: 687b ldr r3, [r7, #4] 8027a48: 6918 ldr r0, [r3, #16] 8027a4a: 687b ldr r3, [r7, #4] 8027a4c: 689b ldr r3, [r3, #8] 8027a4e: 4619 mov r1, r3 8027a50: 8abb ldrh r3, [r7, #20] 8027a52: 9300 str r3, [sp, #0] 8027a54: 2300 movs r3, #0 8027a56: 2204 movs r2, #4 8027a58: f001 f9d9 bl 8028e0e 8027a5c: 6378 str r0, [r7, #52] @ 0x34 8027a5e: e00e b.n 8027a7e else if (msg.qos == QOS2) 8027a60: 7c3b ldrb r3, [r7, #16] 8027a62: 2b02 cmp r3, #2 8027a64: d10b bne.n 8027a7e len = MQTTSerialize_ack(c->buf, c->buf_size, PUBREC, 0, msg.id); 8027a66: 687b ldr r3, [r7, #4] 8027a68: 6918 ldr r0, [r3, #16] 8027a6a: 687b ldr r3, [r7, #4] 8027a6c: 689b ldr r3, [r3, #8] 8027a6e: 4619 mov r1, r3 8027a70: 8abb ldrh r3, [r7, #20] 8027a72: 9300 str r3, [sp, #0] 8027a74: 2300 movs r3, #0 8027a76: 2205 movs r2, #5 8027a78: f001 f9c9 bl 8028e0e 8027a7c: 6378 str r0, [r7, #52] @ 0x34 if (len <= 0) 8027a7e: 6b7b ldr r3, [r7, #52] @ 0x34 8027a80: 2b00 cmp r3, #0 8027a82: dc03 bgt.n 8027a8c rc = FAILURE; 8027a84: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027a88: 633b str r3, [r7, #48] @ 0x30 8027a8a: e005 b.n 8027a98 else rc = sendPacket(c, len, timer); 8027a8c: 683a ldr r2, [r7, #0] 8027a8e: 6b79 ldr r1, [r7, #52] @ 0x34 8027a90: 6878 ldr r0, [r7, #4] 8027a92: f7ff fcb6 bl 8027402 8027a96: 6338 str r0, [r7, #48] @ 0x30 if (rc == FAILURE) 8027a98: 6b3b ldr r3, [r7, #48] @ 0x30 8027a9a: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027a9e: d144 bne.n 8027b2a goto exit; // there was a problem 8027aa0: e053 b.n 8027b4a case PUBREC: case PUBREL: { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 8027aa2: 687b ldr r3, [r7, #4] 8027aa4: 695c ldr r4, [r3, #20] 8027aa6: 687b ldr r3, [r7, #4] 8027aa8: 68db ldr r3, [r3, #12] 8027aaa: f107 020a add.w r2, r7, #10 8027aae: f107 0109 add.w r1, r7, #9 8027ab2: f107 0008 add.w r0, r7, #8 8027ab6: 9300 str r3, [sp, #0] 8027ab8: 4623 mov r3, r4 8027aba: f000 fec1 bl 8028840 8027abe: 4603 mov r3, r0 8027ac0: 2b01 cmp r3, #1 8027ac2: d003 beq.n 8027acc rc = FAILURE; 8027ac4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027ac8: 633b str r3, [r7, #48] @ 0x30 8027aca: e023 b.n 8027b14 else if ((len = MQTTSerialize_ack(c->buf, c->buf_size, 8027acc: 687b ldr r3, [r7, #4] 8027ace: 6918 ldr r0, [r3, #16] 8027ad0: 687b ldr r3, [r7, #4] 8027ad2: 689b ldr r3, [r3, #8] 8027ad4: 4619 mov r1, r3 8027ad6: 6afb ldr r3, [r7, #44] @ 0x2c 8027ad8: 2b05 cmp r3, #5 8027ada: d101 bne.n 8027ae0 8027adc: 2206 movs r2, #6 8027ade: e000 b.n 8027ae2 8027ae0: 2207 movs r2, #7 8027ae2: 897b ldrh r3, [r7, #10] 8027ae4: 9300 str r3, [sp, #0] 8027ae6: 2300 movs r3, #0 8027ae8: f001 f991 bl 8028e0e 8027aec: 6378 str r0, [r7, #52] @ 0x34 8027aee: 6b7b ldr r3, [r7, #52] @ 0x34 8027af0: 2b00 cmp r3, #0 8027af2: dc03 bgt.n 8027afc (packet_type == PUBREC) ? PUBREL : PUBCOMP, 0, mypacketid)) <= 0) rc = FAILURE; 8027af4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027af8: 633b str r3, [r7, #48] @ 0x30 8027afa: e00b b.n 8027b14 else if ((rc = sendPacket(c, len, timer)) != MQTT_SUCCESS) // send the PUBREL packet 8027afc: 683a ldr r2, [r7, #0] 8027afe: 6b79 ldr r1, [r7, #52] @ 0x34 8027b00: 6878 ldr r0, [r7, #4] 8027b02: f7ff fc7e bl 8027402 8027b06: 6338 str r0, [r7, #48] @ 0x30 8027b08: 6b3b ldr r3, [r7, #48] @ 0x30 8027b0a: 2b00 cmp r3, #0 8027b0c: d002 beq.n 8027b14 rc = FAILURE; // there was a problem 8027b0e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027b12: 633b str r3, [r7, #48] @ 0x30 if (rc == FAILURE) 8027b14: 6b3b ldr r3, [r7, #48] @ 0x30 8027b16: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027b1a: d108 bne.n 8027b2e goto exit; // there was a problem 8027b1c: e015 b.n 8027b4a } case PUBCOMP: break; case PINGRESP: c->ping_outstanding = 0; 8027b1e: 687b ldr r3, [r7, #4] 8027b20: 2200 movs r2, #0 8027b22: 771a strb r2, [r3, #28] break; 8027b24: e004 b.n 8027b30 break; 8027b26: bf00 nop 8027b28: e002 b.n 8027b30 break; 8027b2a: bf00 nop 8027b2c: e000 b.n 8027b30 break; 8027b2e: bf00 nop } if (keepalive(c) != MQTT_SUCCESS) { 8027b30: 6878 ldr r0, [r7, #4] 8027b32: f7ff fe9a bl 802786a 8027b36: 4603 mov r3, r0 8027b38: 2b00 cmp r3, #0 8027b3a: d005 beq.n 8027b48 //check only keepalive FAILURE status so that previous FAILURE status can be considered as FAULT rc = FAILURE; 8027b3c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027b40: 633b str r3, [r7, #48] @ 0x30 8027b42: e002 b.n 8027b4a goto exit; 8027b44: bf00 nop 8027b46: e000 b.n 8027b4a } exit: 8027b48: bf00 nop if (rc == MQTT_SUCCESS) 8027b4a: 6b3b ldr r3, [r7, #48] @ 0x30 8027b4c: 2b00 cmp r3, #0 8027b4e: d102 bne.n 8027b56 rc = packet_type; 8027b50: 6afb ldr r3, [r7, #44] @ 0x2c 8027b52: 633b str r3, [r7, #48] @ 0x30 8027b54: e006 b.n 8027b64 else if (c->isconnected) 8027b56: 687b ldr r3, [r7, #4] 8027b58: 6a1b ldr r3, [r3, #32] 8027b5a: 2b00 cmp r3, #0 8027b5c: d002 beq.n 8027b64 MQTTCloseSession(c); 8027b5e: 6878 ldr r0, [r7, #4] 8027b60: f7ff fef0 bl 8027944 return rc; 8027b64: 6b3b ldr r3, [r7, #48] @ 0x30 } 8027b66: 4618 mov r0, r3 8027b68: 373c adds r7, #60 @ 0x3c 8027b6a: 46bd mov sp, r7 8027b6c: bdf0 pop {r4, r5, r6, r7, pc} 8027b6e: bf00 nop 08027b70 : int MQTTYield(MQTTClient* c, int timeout_ms) { 8027b70: b580 push {r7, lr} 8027b72: b086 sub sp, #24 8027b74: af00 add r7, sp, #0 8027b76: 6078 str r0, [r7, #4] 8027b78: 6039 str r1, [r7, #0] int rc = MQTT_SUCCESS; 8027b7a: 2300 movs r3, #0 8027b7c: 617b str r3, [r7, #20] Timer timer; TimerInit(&timer); 8027b7e: f107 030c add.w r3, r7, #12 8027b82: 4618 mov r0, r3 8027b84: f000 fb3e bl 8028204 TimerCountdownMS(&timer, timeout_ms); 8027b88: 683a ldr r2, [r7, #0] 8027b8a: f107 030c add.w r3, r7, #12 8027b8e: 4611 mov r1, r2 8027b90: 4618 mov r0, r3 8027b92: f000 faf5 bl 8028180 do { if (cycle(c, &timer) < 0) 8027b96: f107 030c add.w r3, r7, #12 8027b9a: 4619 mov r1, r3 8027b9c: 6878 ldr r0, [r7, #4] 8027b9e: f7ff fee7 bl 8027970 8027ba2: 4603 mov r3, r0 8027ba4: 2b00 cmp r3, #0 8027ba6: da03 bge.n 8027bb0 { rc = FAILURE; 8027ba8: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027bac: 617b str r3, [r7, #20] break; 8027bae: e007 b.n 8027bc0 } } while (!TimerIsExpired(&timer)); 8027bb0: f107 030c add.w r3, r7, #12 8027bb4: 4618 mov r0, r3 8027bb6: f000 facd bl 8028154 8027bba: 4603 mov r3, r0 8027bbc: 2b00 cmp r3, #0 8027bbe: d0ea beq.n 8027b96 return rc; 8027bc0: 697b ldr r3, [r7, #20] } 8027bc2: 4618 mov r0, r3 8027bc4: 3718 adds r7, #24 8027bc6: 46bd mov sp, r7 8027bc8: bd80 pop {r7, pc} 08027bca : } #endif int waitfor(MQTTClient* c, int packet_type, Timer* timer) { 8027bca: b580 push {r7, lr} 8027bcc: b086 sub sp, #24 8027bce: af00 add r7, sp, #0 8027bd0: 60f8 str r0, [r7, #12] 8027bd2: 60b9 str r1, [r7, #8] 8027bd4: 607a str r2, [r7, #4] int rc = FAILURE; 8027bd6: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027bda: 617b str r3, [r7, #20] do { if (TimerIsExpired(timer)) 8027bdc: 6878 ldr r0, [r7, #4] 8027bde: f000 fab9 bl 8028154 8027be2: 4603 mov r3, r0 8027be4: 2b00 cmp r3, #0 8027be6: d10c bne.n 8027c02 break; // we timed out rc = cycle(c, timer); 8027be8: 6879 ldr r1, [r7, #4] 8027bea: 68f8 ldr r0, [r7, #12] 8027bec: f7ff fec0 bl 8027970 8027bf0: 6178 str r0, [r7, #20] } while (rc != packet_type && rc >= 0); 8027bf2: 697a ldr r2, [r7, #20] 8027bf4: 68bb ldr r3, [r7, #8] 8027bf6: 429a cmp r2, r3 8027bf8: d004 beq.n 8027c04 8027bfa: 697b ldr r3, [r7, #20] 8027bfc: 2b00 cmp r3, #0 8027bfe: daed bge.n 8027bdc 8027c00: e000 b.n 8027c04 break; // we timed out 8027c02: bf00 nop return rc; 8027c04: 697b ldr r3, [r7, #20] } 8027c06: 4618 mov r0, r3 8027c08: 3718 adds r7, #24 8027c0a: 46bd mov sp, r7 8027c0c: bd80 pop {r7, pc} ... 08027c10 : int MQTTConnectWithResults(MQTTClient* c, MQTTPacket_connectData* options, MQTTConnackData* data) { 8027c10: b580 push {r7, lr} 8027c12: b09e sub sp, #120 @ 0x78 8027c14: af00 add r7, sp, #0 8027c16: 60f8 str r0, [r7, #12] 8027c18: 60b9 str r1, [r7, #8] 8027c1a: 607a str r2, [r7, #4] Timer connect_timer; int rc = FAILURE; 8027c1c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027c20: 677b str r3, [r7, #116] @ 0x74 MQTTPacket_connectData default_options = MQTTPacket_connectData_initializer; 8027c22: 4a49 ldr r2, [pc, #292] @ (8027d48 ) 8027c24: f107 0310 add.w r3, r7, #16 8027c28: 4611 mov r1, r2 8027c2a: 2258 movs r2, #88 @ 0x58 8027c2c: 4618 mov r0, r3 8027c2e: f003 f8be bl 802adae int len = 0; 8027c32: 2300 movs r3, #0 8027c34: 673b str r3, [r7, #112] @ 0x70 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8027c36: 68fb ldr r3, [r7, #12] 8027c38: 6e9b ldr r3, [r3, #104] @ 0x68 8027c3a: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027c3e: 4618 mov r0, r3 8027c40: f7e9 fdc3 bl 80117ca if (c->isconnected) /* don't send connect packet again if we are already connected */ 8027c44: 68fb ldr r3, [r7, #12] 8027c46: 6a1b ldr r3, [r3, #32] 8027c48: 2b00 cmp r3, #0 8027c4a: d164 bne.n 8027d16 goto exit; TimerInit(&connect_timer); 8027c4c: f107 0368 add.w r3, r7, #104 @ 0x68 8027c50: 4618 mov r0, r3 8027c52: f000 fad7 bl 8028204 TimerCountdownMS(&connect_timer, c->command_timeout_ms); 8027c56: 68fb ldr r3, [r7, #12] 8027c58: 685a ldr r2, [r3, #4] 8027c5a: f107 0368 add.w r3, r7, #104 @ 0x68 8027c5e: 4611 mov r1, r2 8027c60: 4618 mov r0, r3 8027c62: f000 fa8d bl 8028180 if (options == 0) 8027c66: 68bb ldr r3, [r7, #8] 8027c68: 2b00 cmp r3, #0 8027c6a: d102 bne.n 8027c72 options = &default_options; /* set default options if none were supplied */ 8027c6c: f107 0310 add.w r3, r7, #16 8027c70: 60bb str r3, [r7, #8] c->keepAliveInterval = options->keepAliveInterval; 8027c72: 68bb ldr r3, [r7, #8] 8027c74: 8b1b ldrh r3, [r3, #24] 8027c76: 461a mov r2, r3 8027c78: 68fb ldr r3, [r7, #12] 8027c7a: 619a str r2, [r3, #24] c->cleansession = options->cleansession; 8027c7c: 68bb ldr r3, [r7, #8] 8027c7e: 7e9b ldrb r3, [r3, #26] 8027c80: 461a mov r2, r3 8027c82: 68fb ldr r3, [r7, #12] 8027c84: 625a str r2, [r3, #36] @ 0x24 TimerCountdown(&c->last_received, c->keepAliveInterval); 8027c86: 68fb ldr r3, [r7, #12] 8027c88: f103 0260 add.w r2, r3, #96 @ 0x60 8027c8c: 68fb ldr r3, [r7, #12] 8027c8e: 699b ldr r3, [r3, #24] 8027c90: 4619 mov r1, r3 8027c92: 4610 mov r0, r2 8027c94: f000 fa88 bl 80281a8 if ((len = MQTTSerialize_connect(c->buf, c->buf_size, options)) <= 0) 8027c98: 68fb ldr r3, [r7, #12] 8027c9a: 6918 ldr r0, [r3, #16] 8027c9c: 68fb ldr r3, [r7, #12] 8027c9e: 689b ldr r3, [r3, #8] 8027ca0: 68ba ldr r2, [r7, #8] 8027ca2: 4619 mov r1, r3 8027ca4: f000 fbd2 bl 802844c 8027ca8: 6738 str r0, [r7, #112] @ 0x70 8027caa: 6f3b ldr r3, [r7, #112] @ 0x70 8027cac: 2b00 cmp r3, #0 8027cae: dd34 ble.n 8027d1a goto exit; if ((rc = sendPacket(c, len, &connect_timer)) != MQTT_SUCCESS) // send the connect packet 8027cb0: f107 0368 add.w r3, r7, #104 @ 0x68 8027cb4: 461a mov r2, r3 8027cb6: 6f39 ldr r1, [r7, #112] @ 0x70 8027cb8: 68f8 ldr r0, [r7, #12] 8027cba: f7ff fba2 bl 8027402 8027cbe: 6778 str r0, [r7, #116] @ 0x74 8027cc0: 6f7b ldr r3, [r7, #116] @ 0x74 8027cc2: 2b00 cmp r3, #0 8027cc4: d12b bne.n 8027d1e goto exit; // there was a problem // this will be a blocking call, wait for the connack if (waitfor(c, CONNACK, &connect_timer) == CONNACK) 8027cc6: f107 0368 add.w r3, r7, #104 @ 0x68 8027cca: 461a mov r2, r3 8027ccc: 2102 movs r1, #2 8027cce: 68f8 ldr r0, [r7, #12] 8027cd0: f7ff ff7b bl 8027bca 8027cd4: 4603 mov r3, r0 8027cd6: 2b02 cmp r3, #2 8027cd8: d119 bne.n 8027d0e { data->rc = 0; 8027cda: 687b ldr r3, [r7, #4] 8027cdc: 2200 movs r2, #0 8027cde: 701a strb r2, [r3, #0] data->sessionPresent = 0; 8027ce0: 687b ldr r3, [r7, #4] 8027ce2: 2200 movs r2, #0 8027ce4: 705a strb r2, [r3, #1] if (MQTTDeserialize_connack(&data->sessionPresent, &data->rc, c->readbuf, c->readbuf_size) == 1) 8027ce6: 687b ldr r3, [r7, #4] 8027ce8: 1c58 adds r0, r3, #1 8027cea: 6879 ldr r1, [r7, #4] 8027cec: 68fb ldr r3, [r7, #12] 8027cee: 695a ldr r2, [r3, #20] 8027cf0: 68fb ldr r3, [r7, #12] 8027cf2: 68db ldr r3, [r3, #12] 8027cf4: f000 fc96 bl 8028624 8027cf8: 4603 mov r3, r0 8027cfa: 2b01 cmp r3, #1 8027cfc: d103 bne.n 8027d06 rc = data->rc; 8027cfe: 687b ldr r3, [r7, #4] 8027d00: 781b ldrb r3, [r3, #0] 8027d02: 677b str r3, [r7, #116] @ 0x74 8027d04: e00c b.n 8027d20 // rc = MQTT_SUCCESS; else rc = FAILURE; 8027d06: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027d0a: 677b str r3, [r7, #116] @ 0x74 8027d0c: e008 b.n 8027d20 } else rc = FAILURE; 8027d0e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027d12: 677b str r3, [r7, #116] @ 0x74 8027d14: e004 b.n 8027d20 goto exit; 8027d16: bf00 nop 8027d18: e002 b.n 8027d20 goto exit; 8027d1a: bf00 nop 8027d1c: e000 b.n 8027d20 goto exit; // there was a problem 8027d1e: bf00 nop exit: if (rc == MQTT_SUCCESS) 8027d20: 6f7b ldr r3, [r7, #116] @ 0x74 8027d22: 2b00 cmp r3, #0 8027d24: d105 bne.n 8027d32 { c->isconnected = 1; 8027d26: 68fb ldr r3, [r7, #12] 8027d28: 2201 movs r2, #1 8027d2a: 621a str r2, [r3, #32] c->ping_outstanding = 0; 8027d2c: 68fb ldr r3, [r7, #12] 8027d2e: 2200 movs r2, #0 8027d30: 771a strb r2, [r3, #28] #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 8027d32: 68fb ldr r3, [r7, #12] 8027d34: 6e9b ldr r3, [r3, #104] @ 0x68 8027d36: 4618 mov r0, r3 8027d38: f7e9 fd92 bl 8011860 return rc; 8027d3c: 6f7b ldr r3, [r7, #116] @ 0x74 } 8027d3e: 4618 mov r0, r3 8027d40: 3778 adds r7, #120 @ 0x78 8027d42: 46bd mov sp, r7 8027d44: bd80 pop {r7, pc} 8027d46: bf00 nop 8027d48: 08031958 .word 0x08031958 08027d4c : int MQTTConnect(MQTTClient* c, MQTTPacket_connectData* options) { 8027d4c: b580 push {r7, lr} 8027d4e: b084 sub sp, #16 8027d50: af00 add r7, sp, #0 8027d52: 6078 str r0, [r7, #4] 8027d54: 6039 str r1, [r7, #0] MQTTConnackData data; return MQTTConnectWithResults(c, options, &data); 8027d56: f107 030c add.w r3, r7, #12 8027d5a: 461a mov r2, r3 8027d5c: 6839 ldr r1, [r7, #0] 8027d5e: 6878 ldr r0, [r7, #4] 8027d60: f7ff ff56 bl 8027c10 8027d64: 4603 mov r3, r0 } 8027d66: 4618 mov r0, r3 8027d68: 3710 adds r7, #16 8027d6a: 46bd mov sp, r7 8027d6c: bd80 pop {r7, pc} 08027d6e : int MQTTSetMessageHandler(MQTTClient* c, const char* topicFilter, messageHandler messageHandler) { 8027d6e: b580 push {r7, lr} 8027d70: b086 sub sp, #24 8027d72: af00 add r7, sp, #0 8027d74: 60f8 str r0, [r7, #12] 8027d76: 60b9 str r1, [r7, #8] 8027d78: 607a str r2, [r7, #4] int rc = FAILURE; 8027d7a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027d7e: 617b str r3, [r7, #20] int i = -1; 8027d80: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027d84: 613b str r3, [r7, #16] /* first check for an existing matching slot */ for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027d86: 2300 movs r3, #0 8027d88: 613b str r3, [r7, #16] 8027d8a: e028 b.n 8027dde { if (c->messageHandlers[i].topicFilter != NULL && strcmp(c->messageHandlers[i].topicFilter, topicFilter) == 0) 8027d8c: 68fb ldr r3, [r7, #12] 8027d8e: 693a ldr r2, [r7, #16] 8027d90: 3205 adds r2, #5 8027d92: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8027d96: 2b00 cmp r3, #0 8027d98: d01e beq.n 8027dd8 8027d9a: 68fb ldr r3, [r7, #12] 8027d9c: 693a ldr r2, [r7, #16] 8027d9e: 3205 adds r2, #5 8027da0: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8027da4: 68b9 ldr r1, [r7, #8] 8027da6: 4618 mov r0, r3 8027da8: f7d8 fa9a bl 80002e0 8027dac: 4603 mov r3, r0 8027dae: 2b00 cmp r3, #0 8027db0: d112 bne.n 8027dd8 { if (messageHandler == NULL) /* remove existing */ 8027db2: 687b ldr r3, [r7, #4] 8027db4: 2b00 cmp r3, #0 8027db6: d10c bne.n 8027dd2 { c->messageHandlers[i].topicFilter = NULL; 8027db8: 68fb ldr r3, [r7, #12] 8027dba: 693a ldr r2, [r7, #16] 8027dbc: 3205 adds r2, #5 8027dbe: 2100 movs r1, #0 8027dc0: f843 1032 str.w r1, [r3, r2, lsl #3] c->messageHandlers[i].fp = NULL; 8027dc4: 68fa ldr r2, [r7, #12] 8027dc6: 693b ldr r3, [r7, #16] 8027dc8: 3305 adds r3, #5 8027dca: 00db lsls r3, r3, #3 8027dcc: 4413 add r3, r2 8027dce: 2200 movs r2, #0 8027dd0: 605a str r2, [r3, #4] } rc = MQTT_SUCCESS; /* return i when adding new subscription */ 8027dd2: 2300 movs r3, #0 8027dd4: 617b str r3, [r7, #20] break; 8027dd6: e005 b.n 8027de4 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027dd8: 693b ldr r3, [r7, #16] 8027dda: 3301 adds r3, #1 8027ddc: 613b str r3, [r7, #16] 8027dde: 693b ldr r3, [r7, #16] 8027de0: 2b04 cmp r3, #4 8027de2: ddd3 ble.n 8027d8c } } /* if no existing, look for empty slot (unless we are removing) */ if (messageHandler != NULL) { 8027de4: 687b ldr r3, [r7, #4] 8027de6: 2b00 cmp r3, #0 8027de8: d026 beq.n 8027e38 if (rc == FAILURE) 8027dea: 697b ldr r3, [r7, #20] 8027dec: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027df0: d112 bne.n 8027e18 { for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027df2: 2300 movs r3, #0 8027df4: 613b str r3, [r7, #16] 8027df6: e00c b.n 8027e12 { if (c->messageHandlers[i].topicFilter == NULL) 8027df8: 68fb ldr r3, [r7, #12] 8027dfa: 693a ldr r2, [r7, #16] 8027dfc: 3205 adds r2, #5 8027dfe: f853 3032 ldr.w r3, [r3, r2, lsl #3] 8027e02: 2b00 cmp r3, #0 8027e04: d102 bne.n 8027e0c { rc = MQTT_SUCCESS; 8027e06: 2300 movs r3, #0 8027e08: 617b str r3, [r7, #20] break; 8027e0a: e005 b.n 8027e18 for (i = 0; i < MAX_MESSAGE_HANDLERS; ++i) 8027e0c: 693b ldr r3, [r7, #16] 8027e0e: 3301 adds r3, #1 8027e10: 613b str r3, [r7, #16] 8027e12: 693b ldr r3, [r7, #16] 8027e14: 2b04 cmp r3, #4 8027e16: ddef ble.n 8027df8 } } } if (i < MAX_MESSAGE_HANDLERS) 8027e18: 693b ldr r3, [r7, #16] 8027e1a: 2b04 cmp r3, #4 8027e1c: dc0c bgt.n 8027e38 { c->messageHandlers[i].topicFilter = topicFilter; 8027e1e: 68fb ldr r3, [r7, #12] 8027e20: 693a ldr r2, [r7, #16] 8027e22: 3205 adds r2, #5 8027e24: 68b9 ldr r1, [r7, #8] 8027e26: f843 1032 str.w r1, [r3, r2, lsl #3] c->messageHandlers[i].fp = messageHandler; 8027e2a: 68fa ldr r2, [r7, #12] 8027e2c: 693b ldr r3, [r7, #16] 8027e2e: 3305 adds r3, #5 8027e30: 00db lsls r3, r3, #3 8027e32: 4413 add r3, r2 8027e34: 687a ldr r2, [r7, #4] 8027e36: 605a str r2, [r3, #4] } } return rc; 8027e38: 697b ldr r3, [r7, #20] } 8027e3a: 4618 mov r0, r3 8027e3c: 3718 adds r7, #24 8027e3e: 46bd mov sp, r7 8027e40: bd80 pop {r7, pc} 08027e42 : int MQTTSubscribeWithResults(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler, MQTTSubackData* data) { 8027e42: b5b0 push {r4, r5, r7, lr} 8027e44: b094 sub sp, #80 @ 0x50 8027e46: af04 add r7, sp, #16 8027e48: 60f8 str r0, [r7, #12] 8027e4a: 60b9 str r1, [r7, #8] 8027e4c: 603b str r3, [r7, #0] 8027e4e: 4613 mov r3, r2 8027e50: 71fb strb r3, [r7, #7] int rc = FAILURE; 8027e52: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027e56: 63fb str r3, [r7, #60] @ 0x3c Timer timer; int len = 0; 8027e58: 2300 movs r3, #0 8027e5a: 63bb str r3, [r7, #56] @ 0x38 MQTTString topic = MQTTString_initializer; 8027e5c: 2300 movs r3, #0 8027e5e: 627b str r3, [r7, #36] @ 0x24 8027e60: 2300 movs r3, #0 8027e62: 62bb str r3, [r7, #40] @ 0x28 8027e64: 2300 movs r3, #0 8027e66: 62fb str r3, [r7, #44] @ 0x2c topic.cstring = (char *)topicFilter; 8027e68: 68bb ldr r3, [r7, #8] 8027e6a: 627b str r3, [r7, #36] @ 0x24 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8027e6c: 68fb ldr r3, [r7, #12] 8027e6e: 6e9b ldr r3, [r3, #104] @ 0x68 8027e70: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027e74: 4618 mov r0, r3 8027e76: f7e9 fca8 bl 80117ca if (!c->isconnected) 8027e7a: 68fb ldr r3, [r7, #12] 8027e7c: 6a1b ldr r3, [r3, #32] 8027e7e: 2b00 cmp r3, #0 8027e80: d069 beq.n 8027f56 goto exit; TimerInit(&timer); 8027e82: f107 0330 add.w r3, r7, #48 @ 0x30 8027e86: 4618 mov r0, r3 8027e88: f000 f9bc bl 8028204 TimerCountdownMS(&timer, c->command_timeout_ms); 8027e8c: 68fb ldr r3, [r7, #12] 8027e8e: 685a ldr r2, [r3, #4] 8027e90: f107 0330 add.w r3, r7, #48 @ 0x30 8027e94: 4611 mov r1, r2 8027e96: 4618 mov r0, r3 8027e98: f000 f972 bl 8028180 int _qos[1] = {(int)qos}; 8027e9c: 79fb ldrb r3, [r7, #7] 8027e9e: 623b str r3, [r7, #32] len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, _qos); 8027ea0: 68fb ldr r3, [r7, #12] 8027ea2: 691c ldr r4, [r3, #16] 8027ea4: 68fb ldr r3, [r7, #12] 8027ea6: 689b ldr r3, [r3, #8] 8027ea8: 461d mov r5, r3 8027eaa: 68f8 ldr r0, [r7, #12] 8027eac: f7ff fa90 bl 80273d0 8027eb0: 4603 mov r3, r0 8027eb2: b29a uxth r2, r3 8027eb4: f107 0320 add.w r3, r7, #32 8027eb8: 9302 str r3, [sp, #8] 8027eba: f107 0324 add.w r3, r7, #36 @ 0x24 8027ebe: 9301 str r3, [sp, #4] 8027ec0: 2301 movs r3, #1 8027ec2: 9300 str r3, [sp, #0] 8027ec4: 4613 mov r3, r2 8027ec6: 2200 movs r2, #0 8027ec8: 4629 mov r1, r5 8027eca: 4620 mov r0, r4 8027ecc: f001 f81b bl 8028f06 8027ed0: 63b8 str r0, [r7, #56] @ 0x38 // len = MQTTSerialize_subscribe(c->buf, c->buf_size, 0, getNextPacketId(c), 1, &topic, (int*)&qos); if (len <= 0) 8027ed2: 6bbb ldr r3, [r7, #56] @ 0x38 8027ed4: 2b00 cmp r3, #0 8027ed6: dd40 ble.n 8027f5a goto exit; if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 8027ed8: f107 0330 add.w r3, r7, #48 @ 0x30 8027edc: 461a mov r2, r3 8027ede: 6bb9 ldr r1, [r7, #56] @ 0x38 8027ee0: 68f8 ldr r0, [r7, #12] 8027ee2: f7ff fa8e bl 8027402 8027ee6: 63f8 str r0, [r7, #60] @ 0x3c 8027ee8: 6bfb ldr r3, [r7, #60] @ 0x3c 8027eea: 2b00 cmp r3, #0 8027eec: d137 bne.n 8027f5e goto exit; // there was a problem if (waitfor(c, SUBACK, &timer) == SUBACK) // wait for suback 8027eee: f107 0330 add.w r3, r7, #48 @ 0x30 8027ef2: 461a mov r2, r3 8027ef4: 2109 movs r1, #9 8027ef6: 68f8 ldr r0, [r7, #12] 8027ef8: f7ff fe67 bl 8027bca 8027efc: 4603 mov r3, r0 8027efe: 2b09 cmp r3, #9 8027f00: d125 bne.n 8027f4e { int count = 0; 8027f02: 2300 movs r3, #0 8027f04: 61fb str r3, [r7, #28] unsigned short mypacketid; data->grantedQoS = QOS0; 8027f06: 6d3b ldr r3, [r7, #80] @ 0x50 8027f08: 2200 movs r2, #0 8027f0a: 701a strb r2, [r3, #0] int _grantedQoS[1] = {(int)&data->grantedQoS}; 8027f0c: 6d3b ldr r3, [r7, #80] @ 0x50 8027f0e: 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) 8027f10: 68fb ldr r3, [r7, #12] 8027f12: 695b ldr r3, [r3, #20] 8027f14: 68fa ldr r2, [r7, #12] 8027f16: 68d2 ldr r2, [r2, #12] 8027f18: 4614 mov r4, r2 8027f1a: f107 0114 add.w r1, r7, #20 8027f1e: f107 021c add.w r2, r7, #28 8027f22: f107 001a add.w r0, r7, #26 8027f26: 9401 str r4, [sp, #4] 8027f28: 9300 str r3, [sp, #0] 8027f2a: 460b mov r3, r1 8027f2c: 2101 movs r1, #1 8027f2e: f001 f866 bl 8028ffe 8027f32: 4603 mov r3, r0 8027f34: 2b01 cmp r3, #1 8027f36: d113 bne.n 8027f60 { if (data->grantedQoS != 0x80) 8027f38: 6d3b ldr r3, [r7, #80] @ 0x50 8027f3a: 781b ldrb r3, [r3, #0] 8027f3c: 2b80 cmp r3, #128 @ 0x80 8027f3e: d00f beq.n 8027f60 rc = MQTTSetMessageHandler(c, topicFilter, messageHandler); 8027f40: 683a ldr r2, [r7, #0] 8027f42: 68b9 ldr r1, [r7, #8] 8027f44: 68f8 ldr r0, [r7, #12] 8027f46: f7ff ff12 bl 8027d6e 8027f4a: 63f8 str r0, [r7, #60] @ 0x3c 8027f4c: e008 b.n 8027f60 } } else rc = FAILURE; 8027f4e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027f52: 63fb str r3, [r7, #60] @ 0x3c 8027f54: e004 b.n 8027f60 goto exit; 8027f56: bf00 nop 8027f58: e002 b.n 8027f60 goto exit; 8027f5a: bf00 nop 8027f5c: e000 b.n 8027f60 goto exit; // there was a problem 8027f5e: bf00 nop exit: if (rc == FAILURE) 8027f60: 6bfb ldr r3, [r7, #60] @ 0x3c 8027f62: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8027f66: d102 bne.n 8027f6e MQTTCloseSession(c); 8027f68: 68f8 ldr r0, [r7, #12] 8027f6a: f7ff fceb bl 8027944 #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 8027f6e: 68fb ldr r3, [r7, #12] 8027f70: 6e9b ldr r3, [r3, #104] @ 0x68 8027f72: 4618 mov r0, r3 8027f74: f7e9 fc74 bl 8011860 return rc; 8027f78: 6bfb ldr r3, [r7, #60] @ 0x3c } 8027f7a: 4618 mov r0, r3 8027f7c: 3740 adds r7, #64 @ 0x40 8027f7e: 46bd mov sp, r7 8027f80: bdb0 pop {r4, r5, r7, pc} 08027f82 : int MQTTSubscribe(MQTTClient* c, const char* topicFilter, enum QoS qos, messageHandler messageHandler) { 8027f82: b580 push {r7, lr} 8027f84: b088 sub sp, #32 8027f86: af02 add r7, sp, #8 8027f88: 60f8 str r0, [r7, #12] 8027f8a: 60b9 str r1, [r7, #8] 8027f8c: 603b str r3, [r7, #0] 8027f8e: 4613 mov r3, r2 8027f90: 71fb strb r3, [r7, #7] MQTTSubackData data; return MQTTSubscribeWithResults(c, topicFilter, qos, messageHandler, &data); 8027f92: 79fa ldrb r2, [r7, #7] 8027f94: f107 0314 add.w r3, r7, #20 8027f98: 9300 str r3, [sp, #0] 8027f9a: 683b ldr r3, [r7, #0] 8027f9c: 68b9 ldr r1, [r7, #8] 8027f9e: 68f8 ldr r0, [r7, #12] 8027fa0: f7ff ff4f bl 8027e42 8027fa4: 4603 mov r3, r0 } 8027fa6: 4618 mov r0, r3 8027fa8: 3718 adds r7, #24 8027faa: 46bd mov sp, r7 8027fac: bd80 pop {r7, pc} 08027fae : return rc; } int MQTTPublish(MQTTClient* c, const char* topicName, MQTTMessage* message) { 8027fae: b5f0 push {r4, r5, r6, r7, lr} 8027fb0: b097 sub sp, #92 @ 0x5c 8027fb2: af08 add r7, sp, #32 8027fb4: 60f8 str r0, [r7, #12] 8027fb6: 60b9 str r1, [r7, #8] 8027fb8: 607a str r2, [r7, #4] int rc = FAILURE; 8027fba: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8027fbe: 637b str r3, [r7, #52] @ 0x34 Timer timer; MQTTString topic = MQTTString_initializer; 8027fc0: 2300 movs r3, #0 8027fc2: 61fb str r3, [r7, #28] 8027fc4: 2300 movs r3, #0 8027fc6: 623b str r3, [r7, #32] 8027fc8: 2300 movs r3, #0 8027fca: 627b str r3, [r7, #36] @ 0x24 topic.cstring = (char *)topicName; 8027fcc: 68bb ldr r3, [r7, #8] 8027fce: 61fb str r3, [r7, #28] int len = 0; 8027fd0: 2300 movs r3, #0 8027fd2: 633b str r3, [r7, #48] @ 0x30 #if defined(MQTT_TASK) MutexLock(&c->mutex); #endif // osMutexAcquire(mqttMutex, osWaitForever); osMutexAcquire(c->mutex, osWaitForever); 8027fd4: 68fb ldr r3, [r7, #12] 8027fd6: 6e9b ldr r3, [r3, #104] @ 0x68 8027fd8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8027fdc: 4618 mov r0, r3 8027fde: f7e9 fbf4 bl 80117ca if (!c->isconnected) 8027fe2: 68fb ldr r3, [r7, #12] 8027fe4: 6a1b ldr r3, [r3, #32] 8027fe6: 2b00 cmp r3, #0 8027fe8: f000 809b beq.w 8028122 goto exit; TimerInit(&timer); 8027fec: f107 0328 add.w r3, r7, #40 @ 0x28 8027ff0: 4618 mov r0, r3 8027ff2: f000 f907 bl 8028204 TimerCountdownMS(&timer, c->command_timeout_ms); 8027ff6: 68fb ldr r3, [r7, #12] 8027ff8: 685a ldr r2, [r3, #4] 8027ffa: f107 0328 add.w r3, r7, #40 @ 0x28 8027ffe: 4611 mov r1, r2 8028000: 4618 mov r0, r3 8028002: f000 f8bd bl 8028180 if (message->qos == QOS1 || message->qos == QOS2) 8028006: 687b ldr r3, [r7, #4] 8028008: 781b ldrb r3, [r3, #0] 802800a: 2b01 cmp r3, #1 802800c: d003 beq.n 8028016 802800e: 687b ldr r3, [r7, #4] 8028010: 781b ldrb r3, [r3, #0] 8028012: 2b02 cmp r3, #2 8028014: d106 bne.n 8028024 message->id = getNextPacketId(c); 8028016: 68f8 ldr r0, [r7, #12] 8028018: f7ff f9da bl 80273d0 802801c: 4603 mov r3, r0 802801e: b29a uxth r2, r3 8028020: 687b ldr r3, [r7, #4] 8028022: 809a strh r2, [r3, #4] len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id, 8028024: 68fb ldr r3, [r7, #12] 8028026: 691b ldr r3, [r3, #16] 8028028: 603b str r3, [r7, #0] 802802a: 68fb ldr r3, [r7, #12] 802802c: 689b ldr r3, [r3, #8] 802802e: 469c mov ip, r3 8028030: 687b ldr r3, [r7, #4] 8028032: 781b ldrb r3, [r3, #0] 8028034: 469e mov lr, r3 8028036: 687b ldr r3, [r7, #4] 8028038: 785d ldrb r5, [r3, #1] 802803a: 687b ldr r3, [r7, #4] 802803c: 889e ldrh r6, [r3, #4] topic, (unsigned char*)message->payload, message->payloadlen); 802803e: 687b ldr r3, [r7, #4] 8028040: 689b ldr r3, [r3, #8] 8028042: 687a ldr r2, [r7, #4] 8028044: 68d2 ldr r2, [r2, #12] len = MQTTSerialize_publish(c->buf, c->buf_size, 0, message->qos, message->retained, message->id, 8028046: 9206 str r2, [sp, #24] 8028048: 9305 str r3, [sp, #20] 802804a: ac02 add r4, sp, #8 802804c: f107 031c add.w r3, r7, #28 8028050: e893 0007 ldmia.w r3, {r0, r1, r2} 8028054: e884 0007 stmia.w r4, {r0, r1, r2} 8028058: 9601 str r6, [sp, #4] 802805a: 9500 str r5, [sp, #0] 802805c: 4673 mov r3, lr 802805e: 2200 movs r2, #0 8028060: 4661 mov r1, ip 8028062: 6838 ldr r0, [r7, #0] 8028064: f000 fe5d bl 8028d22 8028068: 6338 str r0, [r7, #48] @ 0x30 if (len <= 0) 802806a: 6b3b ldr r3, [r7, #48] @ 0x30 802806c: 2b00 cmp r3, #0 802806e: dd5a ble.n 8028126 goto exit; if ((rc = sendPacket(c, len, &timer)) != MQTT_SUCCESS) // send the subscribe packet 8028070: f107 0328 add.w r3, r7, #40 @ 0x28 8028074: 461a mov r2, r3 8028076: 6b39 ldr r1, [r7, #48] @ 0x30 8028078: 68f8 ldr r0, [r7, #12] 802807a: f7ff f9c2 bl 8027402 802807e: 6378 str r0, [r7, #52] @ 0x34 8028080: 6b7b ldr r3, [r7, #52] @ 0x34 8028082: 2b00 cmp r3, #0 8028084: d151 bne.n 802812a goto exit; // there was a problem if (message->qos == QOS1) 8028086: 687b ldr r3, [r7, #4] 8028088: 781b ldrb r3, [r3, #0] 802808a: 2b01 cmp r3, #1 802808c: d122 bne.n 80280d4 { if (waitfor(c, PUBACK, &timer) == PUBACK) 802808e: f107 0328 add.w r3, r7, #40 @ 0x28 8028092: 461a mov r2, r3 8028094: 2104 movs r1, #4 8028096: 68f8 ldr r0, [r7, #12] 8028098: f7ff fd97 bl 8027bca 802809c: 4603 mov r3, r0 802809e: 2b04 cmp r3, #4 80280a0: d114 bne.n 80280cc { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 80280a2: 68fb ldr r3, [r7, #12] 80280a4: 695c ldr r4, [r3, #20] 80280a6: 68fb ldr r3, [r7, #12] 80280a8: 68db ldr r3, [r3, #12] 80280aa: f107 021a add.w r2, r7, #26 80280ae: f107 0119 add.w r1, r7, #25 80280b2: f107 0018 add.w r0, r7, #24 80280b6: 9300 str r3, [sp, #0] 80280b8: 4623 mov r3, r4 80280ba: f000 fbc1 bl 8028840 80280be: 4603 mov r3, r0 80280c0: 2b01 cmp r3, #1 80280c2: d035 beq.n 8028130 rc = FAILURE; 80280c4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80280c8: 637b str r3, [r7, #52] @ 0x34 80280ca: e031 b.n 8028130 } else rc = FAILURE; 80280cc: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80280d0: 637b str r3, [r7, #52] @ 0x34 80280d2: e02d b.n 8028130 } else if (message->qos == QOS2) 80280d4: 687b ldr r3, [r7, #4] 80280d6: 781b ldrb r3, [r3, #0] 80280d8: 2b02 cmp r3, #2 80280da: d128 bne.n 802812e { if (waitfor(c, PUBCOMP, &timer) == PUBCOMP) 80280dc: f107 0328 add.w r3, r7, #40 @ 0x28 80280e0: 461a mov r2, r3 80280e2: 2107 movs r1, #7 80280e4: 68f8 ldr r0, [r7, #12] 80280e6: f7ff fd70 bl 8027bca 80280ea: 4603 mov r3, r0 80280ec: 2b07 cmp r3, #7 80280ee: d114 bne.n 802811a { unsigned short mypacketid; unsigned char dup, type; if (MQTTDeserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1) 80280f0: 68fb ldr r3, [r7, #12] 80280f2: 695c ldr r4, [r3, #20] 80280f4: 68fb ldr r3, [r7, #12] 80280f6: 68db ldr r3, [r3, #12] 80280f8: f107 0216 add.w r2, r7, #22 80280fc: f107 0115 add.w r1, r7, #21 8028100: f107 0014 add.w r0, r7, #20 8028104: 9300 str r3, [sp, #0] 8028106: 4623 mov r3, r4 8028108: f000 fb9a bl 8028840 802810c: 4603 mov r3, r0 802810e: 2b01 cmp r3, #1 8028110: d00e beq.n 8028130 rc = FAILURE; 8028112: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028116: 637b str r3, [r7, #52] @ 0x34 8028118: e00a b.n 8028130 } else rc = FAILURE; 802811a: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802811e: 637b str r3, [r7, #52] @ 0x34 8028120: e006 b.n 8028130 goto exit; 8028122: bf00 nop 8028124: e004 b.n 8028130 goto exit; 8028126: bf00 nop 8028128: e002 b.n 8028130 goto exit; // there was a problem 802812a: bf00 nop 802812c: e000 b.n 8028130 } exit: 802812e: bf00 nop if (rc == FAILURE) 8028130: 6b7b ldr r3, [r7, #52] @ 0x34 8028132: f1b3 3fff cmp.w r3, #4294967295 @ 0xffffffff 8028136: d102 bne.n 802813e MQTTCloseSession(c); 8028138: 68f8 ldr r0, [r7, #12] 802813a: f7ff fc03 bl 8027944 #if defined(MQTT_TASK) MutexUnlock(&c->mutex); #endif // osMutexRelease(mqttMutex); osMutexRelease(c->mutex); 802813e: 68fb ldr r3, [r7, #12] 8028140: 6e9b ldr r3, [r3, #104] @ 0x68 8028142: 4618 mov r0, r3 8028144: f7e9 fb8c bl 8011860 return rc; 8028148: 6b7b ldr r3, [r7, #52] @ 0x34 } 802814a: 4618 mov r0, r3 802814c: 373c adds r7, #60 @ 0x3c 802814e: 46bd mov sp, r7 8028150: bdf0 pop {r4, r5, r6, r7, pc} ... 08028154 : #define SERVER_IP4 34 uint32_t MilliTimer; //Timer functions char TimerIsExpired(Timer *timer) { 8028154: b480 push {r7} 8028156: b085 sub sp, #20 8028158: af00 add r7, sp, #0 802815a: 6078 str r0, [r7, #4] long left = timer->end_time - MilliTimer; 802815c: 687b ldr r3, [r7, #4] 802815e: 685a ldr r2, [r3, #4] 8028160: 4b06 ldr r3, [pc, #24] @ (802817c ) 8028162: 681b ldr r3, [r3, #0] 8028164: 1ad3 subs r3, r2, r3 8028166: 60fb str r3, [r7, #12] return (left < 0); 8028168: 68fb ldr r3, [r7, #12] 802816a: 0fdb lsrs r3, r3, #31 802816c: b2db uxtb r3, r3 } 802816e: 4618 mov r0, r3 8028170: 3714 adds r7, #20 8028172: 46bd mov sp, r7 8028174: f85d 7b04 ldr.w r7, [sp], #4 8028178: 4770 bx lr 802817a: bf00 nop 802817c: 2402b124 .word 0x2402b124 08028180 : void TimerCountdownMS(Timer *timer, unsigned int timeout) { 8028180: b480 push {r7} 8028182: b083 sub sp, #12 8028184: af00 add r7, sp, #0 8028186: 6078 str r0, [r7, #4] 8028188: 6039 str r1, [r7, #0] timer->end_time = MilliTimer + timeout; 802818a: 4b06 ldr r3, [pc, #24] @ (80281a4 ) 802818c: 681a ldr r2, [r3, #0] 802818e: 683b ldr r3, [r7, #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: 2402b124 .word 0x2402b124 080281a8 : void TimerCountdown(Timer *timer, unsigned int timeout) { 80281a8: b480 push {r7} 80281aa: b083 sub sp, #12 80281ac: af00 add r7, sp, #0 80281ae: 6078 str r0, [r7, #4] 80281b0: 6039 str r1, [r7, #0] timer->end_time = MilliTimer + (timeout * 1000); 80281b2: 683b ldr r3, [r7, #0] 80281b4: f44f 727a mov.w r2, #1000 @ 0x3e8 80281b8: fb03 f202 mul.w r2, r3, r2 80281bc: 4b05 ldr r3, [pc, #20] @ (80281d4 ) 80281be: 681b ldr r3, [r3, #0] 80281c0: 441a add r2, r3 80281c2: 687b ldr r3, [r7, #4] 80281c4: 605a str r2, [r3, #4] } 80281c6: bf00 nop 80281c8: 370c adds r7, #12 80281ca: 46bd mov sp, r7 80281cc: f85d 7b04 ldr.w r7, [sp], #4 80281d0: 4770 bx lr 80281d2: bf00 nop 80281d4: 2402b124 .word 0x2402b124 080281d8 : int TimerLeftMS(Timer *timer) { 80281d8: b480 push {r7} 80281da: b085 sub sp, #20 80281dc: af00 add r7, sp, #0 80281de: 6078 str r0, [r7, #4] long left = timer->end_time - MilliTimer; 80281e0: 687b ldr r3, [r7, #4] 80281e2: 685a ldr r2, [r3, #4] 80281e4: 4b06 ldr r3, [pc, #24] @ (8028200 ) 80281e6: 681b ldr r3, [r3, #0] 80281e8: 1ad3 subs r3, r2, r3 80281ea: 60fb str r3, [r7, #12] return (left < 0) ? 0 : left; 80281ec: 68fb ldr r3, [r7, #12] 80281ee: ea23 73e3 bic.w r3, r3, r3, asr #31 } 80281f2: 4618 mov r0, r3 80281f4: 3714 adds r7, #20 80281f6: 46bd mov sp, r7 80281f8: f85d 7b04 ldr.w r7, [sp], #4 80281fc: 4770 bx lr 80281fe: bf00 nop 8028200: 2402b124 .word 0x2402b124 08028204 : void TimerInit(Timer *timer) { 8028204: b480 push {r7} 8028206: b083 sub sp, #12 8028208: af00 add r7, sp, #0 802820a: 6078 str r0, [r7, #4] timer->end_time = 0; 802820c: 687b ldr r3, [r7, #4] 802820e: 2200 movs r2, #0 8028210: 605a str r2, [r3, #4] } 8028212: bf00 nop 8028214: 370c adds r7, #12 8028216: 46bd mov sp, r7 8028218: f85d 7b04 ldr.w r7, [sp], #4 802821c: 4770 bx lr ... 08028220 : #ifdef MQTT_LWIP_SOCKET void NewNetwork(Network *n) { 8028220: b480 push {r7} 8028222: b083 sub sp, #12 8028224: af00 add r7, sp, #0 8028226: 6078 str r0, [r7, #4] n->socket = 0; //clear 8028228: 687b ldr r3, [r7, #4] 802822a: 2200 movs r2, #0 802822c: 601a str r2, [r3, #0] n->mqttread = net_read; //receive function 802822e: 687b ldr r3, [r7, #4] 8028230: 4a06 ldr r2, [pc, #24] @ (802824c ) 8028232: 605a str r2, [r3, #4] n->mqttwrite = net_write; //send function 8028234: 687b ldr r3, [r7, #4] 8028236: 4a06 ldr r2, [pc, #24] @ (8028250 ) 8028238: 609a str r2, [r3, #8] n->disconnect = net_disconnect; //disconnection function 802823a: 687b ldr r3, [r7, #4] 802823c: 4a05 ldr r2, [pc, #20] @ (8028254 ) 802823e: 60da str r2, [r3, #12] } 8028240: bf00 nop 8028242: 370c adds r7, #12 8028244: 46bd mov sp, r7 8028246: f85d 7b04 ldr.w r7, [sp], #4 802824a: 4770 bx lr 802824c: 080282f5 .word 0x080282f5 8028250: 08028345 .word 0x08028345 8028254: 0802836b .word 0x0802836b 08028258 : int ConnectNetwork(Network *n, char *ip, int port) { 8028258: b580 push {r7, lr} 802825a: b088 sub sp, #32 802825c: af00 add r7, sp, #0 802825e: 60f8 str r0, [r7, #12] 8028260: 60b9 str r1, [r7, #8] 8028262: 607a str r2, [r7, #4] struct sockaddr_in server_addr; if(n->socket) 8028264: 68fb ldr r3, [r7, #12] 8028266: 681b ldr r3, [r3, #0] 8028268: 2b00 cmp r3, #0 802826a: d004 beq.n 8028276 { close(n->socket); 802826c: 68fb ldr r3, [r7, #12] 802826e: 681b ldr r3, [r3, #0] 8028270: 4618 mov r0, r3 8028272: f7f0 fa65 bl 8018740 } n->socket = socket(PF_INET, SOCK_STREAM, 0); //create socket 8028276: 2200 movs r2, #0 8028278: 2101 movs r1, #1 802827a: 2002 movs r0, #2 802827c: f7f0 ff72 bl 8019164 8028280: 4602 mov r2, r0 8028282: 68fb ldr r3, [r7, #12] 8028284: 601a str r2, [r3, #0] if(n->socket < 0) 8028286: 68fb ldr r3, [r7, #12] 8028288: 681b ldr r3, [r3, #0] 802828a: 2b00 cmp r3, #0 802828c: da05 bge.n 802829a { n->socket = 0; 802828e: 68fb ldr r3, [r7, #12] 8028290: 2200 movs r2, #0 8028292: 601a str r2, [r3, #0] return -1; 8028294: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028298: e028 b.n 80282ec } memset(&server_addr, 0, sizeof(struct sockaddr_in)); //broker address info 802829a: f107 0310 add.w r3, r7, #16 802829e: 2210 movs r2, #16 80282a0: 2100 movs r1, #0 80282a2: 4618 mov r0, r3 80282a4: f002 fc8c bl 802abc0 server_addr.sin_family = AF_INET; 80282a8: 2302 movs r3, #2 80282aa: 747b strb r3, [r7, #17] server_addr.sin_addr.s_addr = inet_addr(ip); 80282ac: 68b8 ldr r0, [r7, #8] 80282ae: f7fd fde0 bl 8025e72 80282b2: 4603 mov r3, r0 80282b4: 617b str r3, [r7, #20] server_addr.sin_port = htons(port); 80282b6: 687b ldr r3, [r7, #4] 80282b8: b29b uxth r3, r3 80282ba: 4618 mov r0, r3 80282bc: f7f1 fb94 bl 80199e8 80282c0: 4603 mov r3, r0 80282c2: 827b strh r3, [r7, #18] if(connect(n->socket, (struct sockaddr*)&server_addr, sizeof(struct sockaddr_in)) < 0) //connect to the broker 80282c4: 68fb ldr r3, [r7, #12] 80282c6: 681b ldr r3, [r3, #0] 80282c8: f107 0110 add.w r1, r7, #16 80282cc: 2210 movs r2, #16 80282ce: 4618 mov r0, r3 80282d0: f7f0 fa8c bl 80187ec 80282d4: 4603 mov r3, r0 80282d6: 2b00 cmp r3, #0 80282d8: da07 bge.n 80282ea { close(n->socket); 80282da: 68fb ldr r3, [r7, #12] 80282dc: 681b ldr r3, [r3, #0] 80282de: 4618 mov r0, r3 80282e0: f7f0 fa2e bl 8018740 return -1; 80282e4: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80282e8: e000 b.n 80282ec } return 0; 80282ea: 2300 movs r3, #0 } 80282ec: 4618 mov r0, r3 80282ee: 3720 adds r7, #32 80282f0: 46bd mov sp, r7 80282f2: bd80 pop {r7, pc} 080282f4 : int net_read(Network *n, unsigned char *buffer, int len, int timeout_ms) { 80282f4: b580 push {r7, lr} 80282f6: b086 sub sp, #24 80282f8: af00 add r7, sp, #0 80282fa: 60f8 str r0, [r7, #12] 80282fc: 60b9 str r1, [r7, #8] 80282fe: 607a str r2, [r7, #4] 8028300: 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 8028302: 68fb ldr r3, [r7, #12] 8028304: 681b ldr r3, [r3, #0] 8028306: f107 0214 add.w r2, r7, #20 802830a: 490d ldr r1, [pc, #52] @ (8028340 ) 802830c: 4618 mov r0, r3 802830e: f7f1 f917 bl 8019540 8028312: 4603 mov r3, r0 8028314: 2b00 cmp r3, #0 8028316: da02 bge.n 802831e 8028318: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802831c: e00c b.n 8028338 if(available > 0) 802831e: 697b ldr r3, [r7, #20] 8028320: 2b00 cmp r3, #0 8028322: dd08 ble.n 8028336 { return recv(n->socket, buffer, len, 0); 8028324: 68fb ldr r3, [r7, #12] 8028326: 6818 ldr r0, [r3, #0] 8028328: 687a ldr r2, [r7, #4] 802832a: 2300 movs r3, #0 802832c: 68b9 ldr r1, [r7, #8] 802832e: f7f0 fdf3 bl 8018f18 8028332: 4603 mov r3, r0 8028334: e000 b.n 8028338 } return 0; 8028336: 2300 movs r3, #0 } 8028338: 4618 mov r0, r3 802833a: 3718 adds r7, #24 802833c: 46bd mov sp, r7 802833e: bd80 pop {r7, pc} 8028340: 4004667f .word 0x4004667f 08028344 : int net_write(Network *n, unsigned char *buffer, int len, int timeout_ms) { 8028344: b580 push {r7, lr} 8028346: b084 sub sp, #16 8028348: af00 add r7, sp, #0 802834a: 60f8 str r0, [r7, #12] 802834c: 60b9 str r1, [r7, #8] 802834e: 607a str r2, [r7, #4] 8028350: 603b str r3, [r7, #0] return send(n->socket, buffer, len, 0); 8028352: 68fb ldr r3, [r7, #12] 8028354: 6818 ldr r0, [r3, #0] 8028356: 687a ldr r2, [r7, #4] 8028358: 2300 movs r3, #0 802835a: 68b9 ldr r1, [r7, #8] 802835c: f7f0 fdf2 bl 8018f44 8028360: 4603 mov r3, r0 } 8028362: 4618 mov r0, r3 8028364: 3710 adds r7, #16 8028366: 46bd mov sp, r7 8028368: bd80 pop {r7, pc} 0802836a : void net_disconnect(Network *n) { 802836a: b580 push {r7, lr} 802836c: b082 sub sp, #8 802836e: af00 add r7, sp, #0 8028370: 6078 str r0, [r7, #4] close(n->socket); 8028372: 687b ldr r3, [r7, #4] 8028374: 681b ldr r3, [r3, #0] 8028376: 4618 mov r0, r3 8028378: f7f0 f9e2 bl 8018740 n->socket = 0; 802837c: 687b ldr r3, [r7, #4] 802837e: 2200 movs r2, #0 8028380: 601a str r2, [r3, #0] } 8028382: bf00 nop 8028384: 3708 adds r7, #8 8028386: 46bd mov sp, r7 8028388: bd80 pop {r7, pc} 0802838a : * 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) { 802838a: b590 push {r4, r7, lr} 802838c: b085 sub sp, #20 802838e: af00 add r7, sp, #0 8028390: 6078 str r0, [r7, #4] int len = 0; 8028392: 2300 movs r3, #0 8028394: 60fb str r3, [r7, #12] FUNC_ENTRY; if (options->MQTTVersion == 3) 8028396: 687b ldr r3, [r7, #4] 8028398: 7a1b ldrb r3, [r3, #8] 802839a: 2b03 cmp r3, #3 802839c: d102 bne.n 80283a4 len = 12; /* variable depending on MQTT or MQIsdp */ 802839e: 230c movs r3, #12 80283a0: 60fb str r3, [r7, #12] 80283a2: e005 b.n 80283b0 else if (options->MQTTVersion == 4) 80283a4: 687b ldr r3, [r7, #4] 80283a6: 7a1b ldrb r3, [r3, #8] 80283a8: 2b04 cmp r3, #4 80283aa: d101 bne.n 80283b0 len = 10; 80283ac: 230a movs r3, #10 80283ae: 60fb str r3, [r7, #12] len += MQTTstrlen(options->clientID)+2; 80283b0: 687b ldr r3, [r7, #4] 80283b2: 330c adds r3, #12 80283b4: e893 0007 ldmia.w r3, {r0, r1, r2} 80283b8: f000 fc43 bl 8028c42 80283bc: 4603 mov r3, r0 80283be: 3302 adds r3, #2 80283c0: 68fa ldr r2, [r7, #12] 80283c2: 4413 add r3, r2 80283c4: 60fb str r3, [r7, #12] if (options->willFlag) 80283c6: 687b ldr r3, [r7, #4] 80283c8: 7edb ldrb r3, [r3, #27] 80283ca: 2b00 cmp r3, #0 80283cc: d013 beq.n 80283f6 len += MQTTstrlen(options->will.topicName)+2 + MQTTstrlen(options->will.message)+2; 80283ce: 687b ldr r3, [r7, #4] 80283d0: 3324 adds r3, #36 @ 0x24 80283d2: e893 0007 ldmia.w r3, {r0, r1, r2} 80283d6: f000 fc34 bl 8028c42 80283da: 4603 mov r3, r0 80283dc: 1c9c adds r4, r3, #2 80283de: 687b ldr r3, [r7, #4] 80283e0: 3330 adds r3, #48 @ 0x30 80283e2: e893 0007 ldmia.w r3, {r0, r1, r2} 80283e6: f000 fc2c bl 8028c42 80283ea: 4603 mov r3, r0 80283ec: 4423 add r3, r4 80283ee: 3302 adds r3, #2 80283f0: 68fa ldr r2, [r7, #12] 80283f2: 4413 add r3, r2 80283f4: 60fb str r3, [r7, #12] if (options->username.cstring || options->username.lenstring.data) 80283f6: 687b ldr r3, [r7, #4] 80283f8: 6c1b ldr r3, [r3, #64] @ 0x40 80283fa: 2b00 cmp r3, #0 80283fc: d103 bne.n 8028406 80283fe: 687b ldr r3, [r7, #4] 8028400: 6c9b ldr r3, [r3, #72] @ 0x48 8028402: 2b00 cmp r3, #0 8028404: d00a beq.n 802841c len += MQTTstrlen(options->username)+2; 8028406: 687b ldr r3, [r7, #4] 8028408: 3340 adds r3, #64 @ 0x40 802840a: e893 0007 ldmia.w r3, {r0, r1, r2} 802840e: f000 fc18 bl 8028c42 8028412: 4603 mov r3, r0 8028414: 3302 adds r3, #2 8028416: 68fa ldr r2, [r7, #12] 8028418: 4413 add r3, r2 802841a: 60fb str r3, [r7, #12] if (options->password.cstring || options->password.lenstring.data) 802841c: 687b ldr r3, [r7, #4] 802841e: 6cdb ldr r3, [r3, #76] @ 0x4c 8028420: 2b00 cmp r3, #0 8028422: d103 bne.n 802842c 8028424: 687b ldr r3, [r7, #4] 8028426: 6d5b ldr r3, [r3, #84] @ 0x54 8028428: 2b00 cmp r3, #0 802842a: d00a beq.n 8028442 len += MQTTstrlen(options->password)+2; 802842c: 687b ldr r3, [r7, #4] 802842e: 334c adds r3, #76 @ 0x4c 8028430: e893 0007 ldmia.w r3, {r0, r1, r2} 8028434: f000 fc05 bl 8028c42 8028438: 4603 mov r3, r0 802843a: 3302 adds r3, #2 802843c: 68fa ldr r2, [r7, #12] 802843e: 4413 add r3, r2 8028440: 60fb str r3, [r7, #12] FUNC_EXIT_RC(len); return len; 8028442: 68fb ldr r3, [r7, #12] } 8028444: 4618 mov r0, r3 8028446: 3714 adds r7, #20 8028448: 46bd mov sp, r7 802844a: bd90 pop {r4, r7, pc} 0802844c : * @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) { 802844c: b580 push {r7, lr} 802844e: b08a sub sp, #40 @ 0x28 8028450: af00 add r7, sp, #0 8028452: 60f8 str r0, [r7, #12] 8028454: 60b9 str r1, [r7, #8] 8028456: 607a str r2, [r7, #4] unsigned char *ptr = buf; 8028458: 68fb ldr r3, [r7, #12] 802845a: 61fb str r3, [r7, #28] MQTTHeader header = {0}; 802845c: 2300 movs r3, #0 802845e: 61bb str r3, [r7, #24] MQTTConnectFlags flags = {0}; 8028460: 2300 movs r3, #0 8028462: 617b str r3, [r7, #20] int len = 0; 8028464: 2300 movs r3, #0 8028466: 623b str r3, [r7, #32] int rc = -1; 8028468: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 802846c: 627b str r3, [r7, #36] @ 0x24 FUNC_ENTRY; if (MQTTPacket_len(len = MQTTSerialize_connectLength(options)) > buflen) 802846e: 6878 ldr r0, [r7, #4] 8028470: f7ff ff8b bl 802838a 8028474: 6238 str r0, [r7, #32] 8028476: 6a38 ldr r0, [r7, #32] 8028478: f000 fa98 bl 80289ac 802847c: 4602 mov r2, r0 802847e: 68bb ldr r3, [r7, #8] 8028480: 4293 cmp r3, r2 8028482: da03 bge.n 802848c { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028484: f06f 0301 mvn.w r3, #1 8028488: 627b str r3, [r7, #36] @ 0x24 goto exit; 802848a: e0c2 b.n 8028612 } header.byte = 0; 802848c: 2300 movs r3, #0 802848e: 763b strb r3, [r7, #24] header.bits.type = CONNECT; 8028490: 7e3b ldrb r3, [r7, #24] 8028492: 2201 movs r2, #1 8028494: f362 1307 bfi r3, r2, #4, #4 8028498: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 802849a: 7e3a ldrb r2, [r7, #24] 802849c: f107 031c add.w r3, r7, #28 80284a0: 4611 mov r1, r2 80284a2: 4618 mov r0, r3 80284a4: f000 fb11 bl 8028aca ptr += MQTTPacket_encode(ptr, len); /* write remaining length */ 80284a8: 69fb ldr r3, [r7, #28] 80284aa: 6a39 ldr r1, [r7, #32] 80284ac: 4618 mov r0, r3 80284ae: f000 fa12 bl 80288d6 80284b2: 4602 mov r2, r0 80284b4: 69fb ldr r3, [r7, #28] 80284b6: 4413 add r3, r2 80284b8: 61fb str r3, [r7, #28] if (options->MQTTVersion == 4) 80284ba: 687b ldr r3, [r7, #4] 80284bc: 7a1b ldrb r3, [r3, #8] 80284be: 2b04 cmp r3, #4 80284c0: d10c bne.n 80284dc { writeCString(&ptr, "MQTT"); 80284c2: f107 031c add.w r3, r7, #28 80284c6: 4955 ldr r1, [pc, #340] @ (802861c ) 80284c8: 4618 mov r0, r3 80284ca: f000 fb3c bl 8028b46 writeChar(&ptr, (char) 4); 80284ce: f107 031c add.w r3, r7, #28 80284d2: 2104 movs r1, #4 80284d4: 4618 mov r0, r3 80284d6: f000 faf8 bl 8028aca 80284da: e00b b.n 80284f4 } else { writeCString(&ptr, "MQIsdp"); 80284dc: f107 031c add.w r3, r7, #28 80284e0: 494f ldr r1, [pc, #316] @ (8028620 ) 80284e2: 4618 mov r0, r3 80284e4: f000 fb2f bl 8028b46 writeChar(&ptr, (char) 3); 80284e8: f107 031c add.w r3, r7, #28 80284ec: 2103 movs r1, #3 80284ee: 4618 mov r0, r3 80284f0: f000 faeb bl 8028aca } flags.all = 0; 80284f4: 2300 movs r3, #0 80284f6: 753b strb r3, [r7, #20] flags.bits.cleansession = options->cleansession; 80284f8: 687b ldr r3, [r7, #4] 80284fa: 7e9b ldrb r3, [r3, #26] 80284fc: f003 0301 and.w r3, r3, #1 8028500: b2da uxtb r2, r3 8028502: 7d3b ldrb r3, [r7, #20] 8028504: f362 0341 bfi r3, r2, #1, #1 8028508: 753b strb r3, [r7, #20] flags.bits.will = (options->willFlag) ? 1 : 0; 802850a: 687b ldr r3, [r7, #4] 802850c: 7edb ldrb r3, [r3, #27] 802850e: 2b00 cmp r3, #0 8028510: bf14 ite ne 8028512: 2301 movne r3, #1 8028514: 2300 moveq r3, #0 8028516: b2da uxtb r2, r3 8028518: 7d3b ldrb r3, [r7, #20] 802851a: f362 0382 bfi r3, r2, #2, #1 802851e: 753b strb r3, [r7, #20] if (flags.bits.will) 8028520: 7d3b ldrb r3, [r7, #20] 8028522: f003 0304 and.w r3, r3, #4 8028526: b2db uxtb r3, r3 8028528: 2b00 cmp r3, #0 802852a: d013 beq.n 8028554 { flags.bits.willQoS = options->will.qos; 802852c: 687b ldr r3, [r7, #4] 802852e: f893 303d ldrb.w r3, [r3, #61] @ 0x3d 8028532: f003 0303 and.w r3, r3, #3 8028536: b2da uxtb r2, r3 8028538: 7d3b ldrb r3, [r7, #20] 802853a: f362 03c4 bfi r3, r2, #3, #2 802853e: 753b strb r3, [r7, #20] flags.bits.willRetain = options->will.retained; 8028540: 687b ldr r3, [r7, #4] 8028542: f893 303c ldrb.w r3, [r3, #60] @ 0x3c 8028546: f003 0301 and.w r3, r3, #1 802854a: b2da uxtb r2, r3 802854c: 7d3b ldrb r3, [r7, #20] 802854e: f362 1345 bfi r3, r2, #5, #1 8028552: 753b strb r3, [r7, #20] } if (options->username.cstring || options->username.lenstring.data) 8028554: 687b ldr r3, [r7, #4] 8028556: 6c1b ldr r3, [r3, #64] @ 0x40 8028558: 2b00 cmp r3, #0 802855a: d103 bne.n 8028564 802855c: 687b ldr r3, [r7, #4] 802855e: 6c9b ldr r3, [r3, #72] @ 0x48 8028560: 2b00 cmp r3, #0 8028562: d003 beq.n 802856c flags.bits.username = 1; 8028564: 7d3b ldrb r3, [r7, #20] 8028566: f043 0380 orr.w r3, r3, #128 @ 0x80 802856a: 753b strb r3, [r7, #20] if (options->password.cstring || options->password.lenstring.data) 802856c: 687b ldr r3, [r7, #4] 802856e: 6cdb ldr r3, [r3, #76] @ 0x4c 8028570: 2b00 cmp r3, #0 8028572: d103 bne.n 802857c 8028574: 687b ldr r3, [r7, #4] 8028576: 6d5b ldr r3, [r3, #84] @ 0x54 8028578: 2b00 cmp r3, #0 802857a: d003 beq.n 8028584 flags.bits.password = 1; 802857c: 7d3b ldrb r3, [r7, #20] 802857e: f043 0340 orr.w r3, r3, #64 @ 0x40 8028582: 753b strb r3, [r7, #20] writeChar(&ptr, flags.all); 8028584: 7d3a ldrb r2, [r7, #20] 8028586: f107 031c add.w r3, r7, #28 802858a: 4611 mov r1, r2 802858c: 4618 mov r0, r3 802858e: f000 fa9c bl 8028aca writeInt(&ptr, options->keepAliveInterval); 8028592: 687b ldr r3, [r7, #4] 8028594: 8b1b ldrh r3, [r3, #24] 8028596: 461a mov r2, r3 8028598: f107 031c add.w r3, r7, #28 802859c: 4611 mov r1, r2 802859e: 4618 mov r0, r3 80285a0: f000 faa8 bl 8028af4 writeMQTTString(&ptr, options->clientID); 80285a4: 687b ldr r3, [r7, #4] 80285a6: f107 001c add.w r0, r7, #28 80285aa: 330c adds r3, #12 80285ac: cb0e ldmia r3, {r1, r2, r3} 80285ae: f000 fae9 bl 8028b84 if (options->willFlag) 80285b2: 687b ldr r3, [r7, #4] 80285b4: 7edb ldrb r3, [r3, #27] 80285b6: 2b00 cmp r3, #0 80285b8: d00d beq.n 80285d6 { writeMQTTString(&ptr, options->will.topicName); 80285ba: 687b ldr r3, [r7, #4] 80285bc: f107 001c add.w r0, r7, #28 80285c0: 3324 adds r3, #36 @ 0x24 80285c2: cb0e ldmia r3, {r1, r2, r3} 80285c4: f000 fade bl 8028b84 writeMQTTString(&ptr, options->will.message); 80285c8: 687b ldr r3, [r7, #4] 80285ca: f107 001c add.w r0, r7, #28 80285ce: 3330 adds r3, #48 @ 0x30 80285d0: cb0e ldmia r3, {r1, r2, r3} 80285d2: f000 fad7 bl 8028b84 } if (flags.bits.username) 80285d6: 7d3b ldrb r3, [r7, #20] 80285d8: f023 037f bic.w r3, r3, #127 @ 0x7f 80285dc: b2db uxtb r3, r3 80285de: 2b00 cmp r3, #0 80285e0: d006 beq.n 80285f0 writeMQTTString(&ptr, options->username); 80285e2: 687b ldr r3, [r7, #4] 80285e4: f107 001c add.w r0, r7, #28 80285e8: 3340 adds r3, #64 @ 0x40 80285ea: cb0e ldmia r3, {r1, r2, r3} 80285ec: f000 faca bl 8028b84 if (flags.bits.password) 80285f0: 7d3b ldrb r3, [r7, #20] 80285f2: f003 0340 and.w r3, r3, #64 @ 0x40 80285f6: b2db uxtb r3, r3 80285f8: 2b00 cmp r3, #0 80285fa: d006 beq.n 802860a writeMQTTString(&ptr, options->password); 80285fc: 687b ldr r3, [r7, #4] 80285fe: f107 001c add.w r0, r7, #28 8028602: 334c adds r3, #76 @ 0x4c 8028604: cb0e ldmia r3, {r1, r2, r3} 8028606: f000 fabd bl 8028b84 rc = ptr - buf; 802860a: 69fa ldr r2, [r7, #28] 802860c: 68fb ldr r3, [r7, #12] 802860e: 1ad3 subs r3, r2, r3 8028610: 627b str r3, [r7, #36] @ 0x24 exit: FUNC_EXIT_RC(rc); return rc; 8028612: 6a7b ldr r3, [r7, #36] @ 0x24 } 8028614: 4618 mov r0, r3 8028616: 3728 adds r7, #40 @ 0x28 8028618: 46bd mov sp, r7 802861a: bd80 pop {r7, pc} 802861c: 080319b0 .word 0x080319b0 8028620: 080319b8 .word 0x080319b8 08028624 : * @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) { 8028624: b580 push {r7, lr} 8028626: b08a sub sp, #40 @ 0x28 8028628: af00 add r7, sp, #0 802862a: 60f8 str r0, [r7, #12] 802862c: 60b9 str r1, [r7, #8] 802862e: 607a str r2, [r7, #4] 8028630: 603b str r3, [r7, #0] MQTTHeader header = {0}; 8028632: 2300 movs r3, #0 8028634: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8028636: 687b ldr r3, [r7, #4] 8028638: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 802863a: 2300 movs r3, #0 802863c: 623b str r3, [r7, #32] int rc = 0; 802863e: 2300 movs r3, #0 8028640: 627b str r3, [r7, #36] @ 0x24 int mylen; MQTTConnackFlags flags = {0}; 8028642: 2300 movs r3, #0 8028644: 613b str r3, [r7, #16] FUNC_ENTRY; header.byte = readChar(&curdata); 8028646: f107 0318 add.w r3, r7, #24 802864a: 4618 mov r0, r3 802864c: f000 fa29 bl 8028aa2 8028650: 4603 mov r3, r0 8028652: 773b strb r3, [r7, #28] if (header.bits.type != CONNACK) 8028654: 7f3b ldrb r3, [r7, #28] 8028656: f023 030f bic.w r3, r3, #15 802865a: b2db uxtb r3, r3 802865c: 2b20 cmp r3, #32 802865e: d12e bne.n 80286be goto exit; curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8028660: 69bb ldr r3, [r7, #24] 8028662: f107 0214 add.w r2, r7, #20 8028666: 4611 mov r1, r2 8028668: 4618 mov r0, r3 802866a: f000 f9e9 bl 8028a40 802866e: 6278 str r0, [r7, #36] @ 0x24 8028670: 6a7a ldr r2, [r7, #36] @ 0x24 8028672: 69bb ldr r3, [r7, #24] 8028674: 4413 add r3, r2 8028676: 61bb str r3, [r7, #24] enddata = curdata + mylen; 8028678: 69bb ldr r3, [r7, #24] 802867a: 697a ldr r2, [r7, #20] 802867c: 4413 add r3, r2 802867e: 623b str r3, [r7, #32] if (enddata - curdata < 2) 8028680: 69bb ldr r3, [r7, #24] 8028682: 6a3a ldr r2, [r7, #32] 8028684: 1ad3 subs r3, r2, r3 8028686: 2b01 cmp r3, #1 8028688: dd1b ble.n 80286c2 goto exit; flags.all = readChar(&curdata); 802868a: f107 0318 add.w r3, r7, #24 802868e: 4618 mov r0, r3 8028690: f000 fa07 bl 8028aa2 8028694: 4603 mov r3, r0 8028696: 743b strb r3, [r7, #16] *sessionPresent = flags.bits.sessionpresent; 8028698: 7c3b ldrb r3, [r7, #16] 802869a: f3c3 0300 ubfx r3, r3, #0, #1 802869e: b2db uxtb r3, r3 80286a0: 461a mov r2, r3 80286a2: 68fb ldr r3, [r7, #12] 80286a4: 701a strb r2, [r3, #0] *connack_rc = readChar(&curdata); 80286a6: f107 0318 add.w r3, r7, #24 80286aa: 4618 mov r0, r3 80286ac: f000 f9f9 bl 8028aa2 80286b0: 4603 mov r3, r0 80286b2: 461a mov r2, r3 80286b4: 68bb ldr r3, [r7, #8] 80286b6: 701a strb r2, [r3, #0] rc = 1; 80286b8: 2301 movs r3, #1 80286ba: 627b str r3, [r7, #36] @ 0x24 80286bc: e002 b.n 80286c4 goto exit; 80286be: bf00 nop 80286c0: e000 b.n 80286c4 goto exit; 80286c2: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 80286c4: 6a7b ldr r3, [r7, #36] @ 0x24 } 80286c6: 4618 mov r0, r3 80286c8: 3728 adds r7, #40 @ 0x28 80286ca: 46bd mov sp, r7 80286cc: bd80 pop {r7, pc} 080286ce : * @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) { 80286ce: b580 push {r7, lr} 80286d0: b088 sub sp, #32 80286d2: af00 add r7, sp, #0 80286d4: 60f8 str r0, [r7, #12] 80286d6: 60b9 str r1, [r7, #8] 80286d8: 4613 mov r3, r2 80286da: 71fb strb r3, [r7, #7] MQTTHeader header = {0}; 80286dc: 2300 movs r3, #0 80286de: 61bb str r3, [r7, #24] int rc = -1; 80286e0: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 80286e4: 61fb str r3, [r7, #28] unsigned char *ptr = buf; 80286e6: 68fb ldr r3, [r7, #12] 80286e8: 617b str r3, [r7, #20] FUNC_ENTRY; if (buflen < 2) 80286ea: 68bb ldr r3, [r7, #8] 80286ec: 2b01 cmp r3, #1 80286ee: dc03 bgt.n 80286f8 { rc = MQTTPACKET_BUFFER_TOO_SHORT; 80286f0: f06f 0301 mvn.w r3, #1 80286f4: 61fb str r3, [r7, #28] goto exit; 80286f6: e01d b.n 8028734 } header.byte = 0; 80286f8: 2300 movs r3, #0 80286fa: 763b strb r3, [r7, #24] header.bits.type = packettype; 80286fc: 79fb ldrb r3, [r7, #7] 80286fe: f003 030f and.w r3, r3, #15 8028702: b2da uxtb r2, r3 8028704: 7e3b ldrb r3, [r7, #24] 8028706: f362 1307 bfi r3, r2, #4, #4 802870a: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 802870c: 7e3a ldrb r2, [r7, #24] 802870e: f107 0314 add.w r3, r7, #20 8028712: 4611 mov r1, r2 8028714: 4618 mov r0, r3 8028716: f000 f9d8 bl 8028aca ptr += MQTTPacket_encode(ptr, 0); /* write remaining length */ 802871a: 697b ldr r3, [r7, #20] 802871c: 2100 movs r1, #0 802871e: 4618 mov r0, r3 8028720: f000 f8d9 bl 80288d6 8028724: 4602 mov r2, r0 8028726: 697b ldr r3, [r7, #20] 8028728: 4413 add r3, r2 802872a: 617b str r3, [r7, #20] rc = ptr - buf; 802872c: 697a ldr r2, [r7, #20] 802872e: 68fb ldr r3, [r7, #12] 8028730: 1ad3 subs r3, r2, r3 8028732: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8028734: 69fb ldr r3, [r7, #28] } 8028736: 4618 mov r0, r3 8028738: 3720 adds r7, #32 802873a: 46bd mov sp, r7 802873c: bd80 pop {r7, pc} 0802873e : * @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) { 802873e: b580 push {r7, lr} 8028740: b082 sub sp, #8 8028742: af00 add r7, sp, #0 8028744: 6078 str r0, [r7, #4] 8028746: 6039 str r1, [r7, #0] return MQTTSerialize_zero(buf, buflen, PINGREQ); 8028748: 220c movs r2, #12 802874a: 6839 ldr r1, [r7, #0] 802874c: 6878 ldr r0, [r7, #4] 802874e: f7ff ffbe bl 80286ce 8028752: 4603 mov r3, r0 } 8028754: 4618 mov r0, r3 8028756: 3708 adds r7, #8 8028758: 46bd mov sp, r7 802875a: bd80 pop {r7, pc} 0802875c : * @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) { 802875c: b580 push {r7, lr} 802875e: b08a sub sp, #40 @ 0x28 8028760: af00 add r7, sp, #0 8028762: 60f8 str r0, [r7, #12] 8028764: 60b9 str r1, [r7, #8] 8028766: 607a str r2, [r7, #4] 8028768: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802876a: 2300 movs r3, #0 802876c: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 802876e: 6bfb ldr r3, [r7, #60] @ 0x3c 8028770: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8028772: 2300 movs r3, #0 8028774: 623b str r3, [r7, #32] int rc = 0; 8028776: 2300 movs r3, #0 8028778: 627b str r3, [r7, #36] @ 0x24 int mylen = 0; 802877a: 2300 movs r3, #0 802877c: 617b str r3, [r7, #20] FUNC_ENTRY; header.byte = readChar(&curdata); 802877e: f107 0318 add.w r3, r7, #24 8028782: 4618 mov r0, r3 8028784: f000 f98d bl 8028aa2 8028788: 4603 mov r3, r0 802878a: 773b strb r3, [r7, #28] if (header.bits.type != PUBLISH) 802878c: 7f3b ldrb r3, [r7, #28] 802878e: f023 030f bic.w r3, r3, #15 8028792: b2db uxtb r3, r3 8028794: 2b30 cmp r3, #48 @ 0x30 8028796: d14b bne.n 8028830 goto exit; *dup = header.bits.dup; 8028798: 7f3b ldrb r3, [r7, #28] 802879a: f3c3 03c0 ubfx r3, r3, #3, #1 802879e: b2db uxtb r3, r3 80287a0: 461a mov r2, r3 80287a2: 68fb ldr r3, [r7, #12] 80287a4: 701a strb r2, [r3, #0] *qos = header.bits.qos; 80287a6: 7f3b ldrb r3, [r7, #28] 80287a8: f3c3 0341 ubfx r3, r3, #1, #2 80287ac: b2db uxtb r3, r3 80287ae: 461a mov r2, r3 80287b0: 68bb ldr r3, [r7, #8] 80287b2: 601a str r2, [r3, #0] *retained = header.bits.retain; 80287b4: 7f3b ldrb r3, [r7, #28] 80287b6: f3c3 0300 ubfx r3, r3, #0, #1 80287ba: b2db uxtb r3, r3 80287bc: 461a mov r2, r3 80287be: 687b ldr r3, [r7, #4] 80287c0: 701a strb r2, [r3, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 80287c2: 69bb ldr r3, [r7, #24] 80287c4: f107 0214 add.w r2, r7, #20 80287c8: 4611 mov r1, r2 80287ca: 4618 mov r0, r3 80287cc: f000 f938 bl 8028a40 80287d0: 6278 str r0, [r7, #36] @ 0x24 80287d2: 6a7a ldr r2, [r7, #36] @ 0x24 80287d4: 69bb ldr r3, [r7, #24] 80287d6: 4413 add r3, r2 80287d8: 61bb str r3, [r7, #24] enddata = curdata + mylen; 80287da: 69bb ldr r3, [r7, #24] 80287dc: 697a ldr r2, [r7, #20] 80287de: 4413 add r3, r2 80287e0: 623b str r3, [r7, #32] if (!readMQTTLenString(topicName, &curdata, enddata) || 80287e2: f107 0318 add.w r3, r7, #24 80287e6: 6a3a ldr r2, [r7, #32] 80287e8: 4619 mov r1, r3 80287ea: 6b38 ldr r0, [r7, #48] @ 0x30 80287ec: f000 f9f8 bl 8028be0 80287f0: 4603 mov r3, r0 80287f2: 2b00 cmp r3, #0 80287f4: d01e beq.n 8028834 enddata - curdata < 0) /* do we have enough data to read the protocol version byte? */ 80287f6: 69bb ldr r3, [r7, #24] 80287f8: 6a3a ldr r2, [r7, #32] 80287fa: 1ad3 subs r3, r2, r3 if (!readMQTTLenString(topicName, &curdata, enddata) || 80287fc: 2b00 cmp r3, #0 80287fe: db19 blt.n 8028834 goto exit; if (*qos > 0) 8028800: 68bb ldr r3, [r7, #8] 8028802: 681b ldr r3, [r3, #0] 8028804: 2b00 cmp r3, #0 8028806: dd08 ble.n 802881a *packetid = readInt(&curdata); 8028808: f107 0318 add.w r3, r7, #24 802880c: 4618 mov r0, r3 802880e: f000 f92d bl 8028a6c 8028812: 4603 mov r3, r0 8028814: b29a uxth r2, r3 8028816: 683b ldr r3, [r7, #0] 8028818: 801a strh r2, [r3, #0] *payloadlen = enddata - curdata; 802881a: 69bb ldr r3, [r7, #24] 802881c: 6a3a ldr r2, [r7, #32] 802881e: 1ad2 subs r2, r2, r3 8028820: 6bbb ldr r3, [r7, #56] @ 0x38 8028822: 601a str r2, [r3, #0] *payload = curdata; 8028824: 69ba ldr r2, [r7, #24] 8028826: 6b7b ldr r3, [r7, #52] @ 0x34 8028828: 601a str r2, [r3, #0] rc = 1; 802882a: 2301 movs r3, #1 802882c: 627b str r3, [r7, #36] @ 0x24 802882e: e002 b.n 8028836 goto exit; 8028830: bf00 nop 8028832: e000 b.n 8028836 goto exit; 8028834: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 8028836: 6a7b ldr r3, [r7, #36] @ 0x24 } 8028838: 4618 mov r0, r3 802883a: 3728 adds r7, #40 @ 0x28 802883c: 46bd mov sp, r7 802883e: bd80 pop {r7, pc} 08028840 : * @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) { 8028840: b580 push {r7, lr} 8028842: b08a sub sp, #40 @ 0x28 8028844: af00 add r7, sp, #0 8028846: 60f8 str r0, [r7, #12] 8028848: 60b9 str r1, [r7, #8] 802884a: 607a str r2, [r7, #4] 802884c: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802884e: 2300 movs r3, #0 8028850: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8028852: 683b ldr r3, [r7, #0] 8028854: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8028856: 2300 movs r3, #0 8028858: 623b str r3, [r7, #32] int rc = 0; 802885a: 2300 movs r3, #0 802885c: 627b str r3, [r7, #36] @ 0x24 int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 802885e: f107 0318 add.w r3, r7, #24 8028862: 4618 mov r0, r3 8028864: f000 f91d bl 8028aa2 8028868: 4603 mov r3, r0 802886a: 773b strb r3, [r7, #28] *dup = header.bits.dup; 802886c: 7f3b ldrb r3, [r7, #28] 802886e: f3c3 03c0 ubfx r3, r3, #3, #1 8028872: b2db uxtb r3, r3 8028874: 461a mov r2, r3 8028876: 68bb ldr r3, [r7, #8] 8028878: 701a strb r2, [r3, #0] *packettype = header.bits.type; 802887a: 7f3b ldrb r3, [r7, #28] 802887c: f3c3 1303 ubfx r3, r3, #4, #4 8028880: b2db uxtb r3, r3 8028882: 461a mov r2, r3 8028884: 68fb ldr r3, [r7, #12] 8028886: 701a strb r2, [r3, #0] curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8028888: 69bb ldr r3, [r7, #24] 802888a: f107 0214 add.w r2, r7, #20 802888e: 4611 mov r1, r2 8028890: 4618 mov r0, r3 8028892: f000 f8d5 bl 8028a40 8028896: 6278 str r0, [r7, #36] @ 0x24 8028898: 6a7a ldr r2, [r7, #36] @ 0x24 802889a: 69bb ldr r3, [r7, #24] 802889c: 4413 add r3, r2 802889e: 61bb str r3, [r7, #24] enddata = curdata + mylen; 80288a0: 69bb ldr r3, [r7, #24] 80288a2: 697a ldr r2, [r7, #20] 80288a4: 4413 add r3, r2 80288a6: 623b str r3, [r7, #32] if (enddata - curdata < 2) 80288a8: 69bb ldr r3, [r7, #24] 80288aa: 6a3a ldr r2, [r7, #32] 80288ac: 1ad3 subs r3, r2, r3 80288ae: 2b01 cmp r3, #1 80288b0: dd0b ble.n 80288ca goto exit; *packetid = readInt(&curdata); 80288b2: f107 0318 add.w r3, r7, #24 80288b6: 4618 mov r0, r3 80288b8: f000 f8d8 bl 8028a6c 80288bc: 4603 mov r3, r0 80288be: b29a uxth r2, r3 80288c0: 687b ldr r3, [r7, #4] 80288c2: 801a strh r2, [r3, #0] rc = 1; 80288c4: 2301 movs r3, #1 80288c6: 627b str r3, [r7, #36] @ 0x24 80288c8: e000 b.n 80288cc goto exit; 80288ca: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 80288cc: 6a7b ldr r3, [r7, #36] @ 0x24 } 80288ce: 4618 mov r0, r3 80288d0: 3728 adds r7, #40 @ 0x28 80288d2: 46bd mov sp, r7 80288d4: bd80 pop {r7, pc} 080288d6 : * @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) { 80288d6: b480 push {r7} 80288d8: b085 sub sp, #20 80288da: af00 add r7, sp, #0 80288dc: 6078 str r0, [r7, #4] 80288de: 6039 str r1, [r7, #0] int rc = 0; 80288e0: 2300 movs r3, #0 80288e2: 60fb str r3, [r7, #12] FUNC_ENTRY; do { char d = length % 128; 80288e4: 683b ldr r3, [r7, #0] 80288e6: 425a negs r2, r3 80288e8: f003 037f and.w r3, r3, #127 @ 0x7f 80288ec: f002 027f and.w r2, r2, #127 @ 0x7f 80288f0: bf58 it pl 80288f2: 4253 negpl r3, r2 80288f4: 72fb strb r3, [r7, #11] length /= 128; 80288f6: 683b ldr r3, [r7, #0] 80288f8: 2b00 cmp r3, #0 80288fa: da00 bge.n 80288fe 80288fc: 337f adds r3, #127 @ 0x7f 80288fe: 11db asrs r3, r3, #7 8028900: 603b str r3, [r7, #0] /* if there are more digits to encode, set the top bit of this digit */ if (length > 0) 8028902: 683b ldr r3, [r7, #0] 8028904: 2b00 cmp r3, #0 8028906: dd03 ble.n 8028910 d |= 0x80; 8028908: 7afb ldrb r3, [r7, #11] 802890a: f063 037f orn r3, r3, #127 @ 0x7f 802890e: 72fb strb r3, [r7, #11] buf[rc++] = d; 8028910: 68fb ldr r3, [r7, #12] 8028912: 1c5a adds r2, r3, #1 8028914: 60fa str r2, [r7, #12] 8028916: 461a mov r2, r3 8028918: 687b ldr r3, [r7, #4] 802891a: 4413 add r3, r2 802891c: 7afa ldrb r2, [r7, #11] 802891e: 701a strb r2, [r3, #0] } while (length > 0); 8028920: 683b ldr r3, [r7, #0] 8028922: 2b00 cmp r3, #0 8028924: dcde bgt.n 80288e4 FUNC_EXIT_RC(rc); return rc; 8028926: 68fb ldr r3, [r7, #12] } 8028928: 4618 mov r0, r3 802892a: 3714 adds r7, #20 802892c: 46bd mov sp, r7 802892e: f85d 7b04 ldr.w r7, [sp], #4 8028932: 4770 bx lr 08028934 : * @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) { 8028934: b580 push {r7, lr} 8028936: b086 sub sp, #24 8028938: af00 add r7, sp, #0 802893a: 6078 str r0, [r7, #4] 802893c: 6039 str r1, [r7, #0] unsigned char c; int multiplier = 1; 802893e: 2301 movs r3, #1 8028940: 617b str r3, [r7, #20] int len = 0; 8028942: 2300 movs r3, #0 8028944: 613b str r3, [r7, #16] #define MAX_NO_OF_REMAINING_LENGTH_BYTES 4 FUNC_ENTRY; *value = 0; 8028946: 683b ldr r3, [r7, #0] 8028948: 2200 movs r2, #0 802894a: 601a str r2, [r3, #0] do { int rc = MQTTPACKET_READ_ERROR; 802894c: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028950: 60fb str r3, [r7, #12] if (++len > MAX_NO_OF_REMAINING_LENGTH_BYTES) 8028952: 693b ldr r3, [r7, #16] 8028954: 3301 adds r3, #1 8028956: 613b str r3, [r7, #16] 8028958: 693b ldr r3, [r7, #16] 802895a: 2b04 cmp r3, #4 802895c: dd03 ble.n 8028966 { rc = MQTTPACKET_READ_ERROR; /* bad data */ 802895e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8028962: 60fb str r3, [r7, #12] goto exit; 8028964: e01d b.n 80289a2 } rc = (*getcharfn)(&c, 1); 8028966: f107 020b add.w r2, r7, #11 802896a: 687b ldr r3, [r7, #4] 802896c: 2101 movs r1, #1 802896e: 4610 mov r0, r2 8028970: 4798 blx r3 8028972: 60f8 str r0, [r7, #12] if (rc != 1) 8028974: 68fb ldr r3, [r7, #12] 8028976: 2b01 cmp r3, #1 8028978: d112 bne.n 80289a0 goto exit; *value += (c & 127) * multiplier; 802897a: 683b ldr r3, [r7, #0] 802897c: 681a ldr r2, [r3, #0] 802897e: 7afb ldrb r3, [r7, #11] 8028980: f003 037f and.w r3, r3, #127 @ 0x7f 8028984: 6979 ldr r1, [r7, #20] 8028986: fb01 f303 mul.w r3, r1, r3 802898a: 441a add r2, r3 802898c: 683b ldr r3, [r7, #0] 802898e: 601a str r2, [r3, #0] multiplier *= 128; 8028990: 697b ldr r3, [r7, #20] 8028992: 01db lsls r3, r3, #7 8028994: 617b str r3, [r7, #20] } while ((c & 128) != 0); 8028996: 7afb ldrb r3, [r7, #11] 8028998: b25b sxtb r3, r3 802899a: 2b00 cmp r3, #0 802899c: dbd6 blt.n 802894c exit: 802899e: e000 b.n 80289a2 goto exit; 80289a0: bf00 nop FUNC_EXIT_RC(len); return len; 80289a2: 693b ldr r3, [r7, #16] } 80289a4: 4618 mov r0, r3 80289a6: 3718 adds r7, #24 80289a8: 46bd mov sp, r7 80289aa: bd80 pop {r7, pc} 080289ac : int MQTTPacket_len(int rem_len) { 80289ac: b480 push {r7} 80289ae: b083 sub sp, #12 80289b0: af00 add r7, sp, #0 80289b2: 6078 str r0, [r7, #4] rem_len += 1; /* header byte */ 80289b4: 687b ldr r3, [r7, #4] 80289b6: 3301 adds r3, #1 80289b8: 607b str r3, [r7, #4] /* now remaining_length field */ if (rem_len < 128) 80289ba: 687b ldr r3, [r7, #4] 80289bc: 2b7f cmp r3, #127 @ 0x7f 80289be: dc03 bgt.n 80289c8 rem_len += 1; 80289c0: 687b ldr r3, [r7, #4] 80289c2: 3301 adds r3, #1 80289c4: 607b str r3, [r7, #4] 80289c6: e012 b.n 80289ee else if (rem_len < 16384) 80289c8: 687b ldr r3, [r7, #4] 80289ca: f5b3 4f80 cmp.w r3, #16384 @ 0x4000 80289ce: da03 bge.n 80289d8 rem_len += 2; 80289d0: 687b ldr r3, [r7, #4] 80289d2: 3302 adds r3, #2 80289d4: 607b str r3, [r7, #4] 80289d6: e00a b.n 80289ee else if (rem_len < 2097151) 80289d8: 687b ldr r3, [r7, #4] 80289da: 4a08 ldr r2, [pc, #32] @ (80289fc ) 80289dc: 4293 cmp r3, r2 80289de: dc03 bgt.n 80289e8 rem_len += 3; 80289e0: 687b ldr r3, [r7, #4] 80289e2: 3303 adds r3, #3 80289e4: 607b str r3, [r7, #4] 80289e6: e002 b.n 80289ee else rem_len += 4; 80289e8: 687b ldr r3, [r7, #4] 80289ea: 3304 adds r3, #4 80289ec: 607b str r3, [r7, #4] return rem_len; 80289ee: 687b ldr r3, [r7, #4] } 80289f0: 4618 mov r0, r3 80289f2: 370c adds r7, #12 80289f4: 46bd mov sp, r7 80289f6: f85d 7b04 ldr.w r7, [sp], #4 80289fa: 4770 bx lr 80289fc: 001ffffe .word 0x001ffffe 08028a00 : static unsigned char* bufptr; int bufchar(unsigned char* c, int count) { 8028a00: b480 push {r7} 8028a02: b085 sub sp, #20 8028a04: af00 add r7, sp, #0 8028a06: 6078 str r0, [r7, #4] 8028a08: 6039 str r1, [r7, #0] int i; for (i = 0; i < count; ++i) 8028a0a: 2300 movs r3, #0 8028a0c: 60fb str r3, [r7, #12] 8028a0e: e00a b.n 8028a26 *c = *bufptr++; 8028a10: 4b0a ldr r3, [pc, #40] @ (8028a3c ) 8028a12: 681b ldr r3, [r3, #0] 8028a14: 1c5a adds r2, r3, #1 8028a16: 4909 ldr r1, [pc, #36] @ (8028a3c ) 8028a18: 600a str r2, [r1, #0] 8028a1a: 781a ldrb r2, [r3, #0] 8028a1c: 687b ldr r3, [r7, #4] 8028a1e: 701a strb r2, [r3, #0] for (i = 0; i < count; ++i) 8028a20: 68fb ldr r3, [r7, #12] 8028a22: 3301 adds r3, #1 8028a24: 60fb str r3, [r7, #12] 8028a26: 68fa ldr r2, [r7, #12] 8028a28: 683b ldr r3, [r7, #0] 8028a2a: 429a cmp r2, r3 8028a2c: dbf0 blt.n 8028a10 return count; 8028a2e: 683b ldr r3, [r7, #0] } 8028a30: 4618 mov r0, r3 8028a32: 3714 adds r7, #20 8028a34: 46bd mov sp, r7 8028a36: f85d 7b04 ldr.w r7, [sp], #4 8028a3a: 4770 bx lr 8028a3c: 2402b128 .word 0x2402b128 08028a40 : int MQTTPacket_decodeBuf(unsigned char* buf, int* value) { 8028a40: b580 push {r7, lr} 8028a42: b082 sub sp, #8 8028a44: af00 add r7, sp, #0 8028a46: 6078 str r0, [r7, #4] 8028a48: 6039 str r1, [r7, #0] bufptr = buf; 8028a4a: 4a06 ldr r2, [pc, #24] @ (8028a64 ) 8028a4c: 687b ldr r3, [r7, #4] 8028a4e: 6013 str r3, [r2, #0] return MQTTPacket_decode(bufchar, value); 8028a50: 6839 ldr r1, [r7, #0] 8028a52: 4805 ldr r0, [pc, #20] @ (8028a68 ) 8028a54: f7ff ff6e bl 8028934 8028a58: 4603 mov r3, r0 } 8028a5a: 4618 mov r0, r3 8028a5c: 3708 adds r7, #8 8028a5e: 46bd mov sp, r7 8028a60: bd80 pop {r7, pc} 8028a62: bf00 nop 8028a64: 2402b128 .word 0x2402b128 8028a68: 08028a01 .word 0x08028a01 08028a6c : * 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) { 8028a6c: b480 push {r7} 8028a6e: b085 sub sp, #20 8028a70: af00 add r7, sp, #0 8028a72: 6078 str r0, [r7, #4] unsigned char* ptr = *pptr; 8028a74: 687b ldr r3, [r7, #4] 8028a76: 681b ldr r3, [r3, #0] 8028a78: 60fb str r3, [r7, #12] int len = 256*(*ptr) + (*(ptr+1)); 8028a7a: 68fb ldr r3, [r7, #12] 8028a7c: 781b ldrb r3, [r3, #0] 8028a7e: 021b lsls r3, r3, #8 8028a80: 68fa ldr r2, [r7, #12] 8028a82: 3201 adds r2, #1 8028a84: 7812 ldrb r2, [r2, #0] 8028a86: 4413 add r3, r2 8028a88: 60bb str r3, [r7, #8] *pptr += 2; 8028a8a: 687b ldr r3, [r7, #4] 8028a8c: 681b ldr r3, [r3, #0] 8028a8e: 1c9a adds r2, r3, #2 8028a90: 687b ldr r3, [r7, #4] 8028a92: 601a str r2, [r3, #0] return len; 8028a94: 68bb ldr r3, [r7, #8] } 8028a96: 4618 mov r0, r3 8028a98: 3714 adds r7, #20 8028a9a: 46bd mov sp, r7 8028a9c: f85d 7b04 ldr.w r7, [sp], #4 8028aa0: 4770 bx lr 08028aa2 : * 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) { 8028aa2: b480 push {r7} 8028aa4: b085 sub sp, #20 8028aa6: af00 add r7, sp, #0 8028aa8: 6078 str r0, [r7, #4] char c = **pptr; 8028aaa: 687b ldr r3, [r7, #4] 8028aac: 681b ldr r3, [r3, #0] 8028aae: 781b ldrb r3, [r3, #0] 8028ab0: 73fb strb r3, [r7, #15] (*pptr)++; 8028ab2: 687b ldr r3, [r7, #4] 8028ab4: 681b ldr r3, [r3, #0] 8028ab6: 1c5a adds r2, r3, #1 8028ab8: 687b ldr r3, [r7, #4] 8028aba: 601a str r2, [r3, #0] return c; 8028abc: 7bfb ldrb r3, [r7, #15] } 8028abe: 4618 mov r0, r3 8028ac0: 3714 adds r7, #20 8028ac2: 46bd mov sp, r7 8028ac4: f85d 7b04 ldr.w r7, [sp], #4 8028ac8: 4770 bx lr 08028aca : * 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) { 8028aca: b480 push {r7} 8028acc: b083 sub sp, #12 8028ace: af00 add r7, sp, #0 8028ad0: 6078 str r0, [r7, #4] 8028ad2: 460b mov r3, r1 8028ad4: 70fb strb r3, [r7, #3] **pptr = c; 8028ad6: 687b ldr r3, [r7, #4] 8028ad8: 681b ldr r3, [r3, #0] 8028ada: 78fa ldrb r2, [r7, #3] 8028adc: 701a strb r2, [r3, #0] (*pptr)++; 8028ade: 687b ldr r3, [r7, #4] 8028ae0: 681b ldr r3, [r3, #0] 8028ae2: 1c5a adds r2, r3, #1 8028ae4: 687b ldr r3, [r7, #4] 8028ae6: 601a str r2, [r3, #0] } 8028ae8: bf00 nop 8028aea: 370c adds r7, #12 8028aec: 46bd mov sp, r7 8028aee: f85d 7b04 ldr.w r7, [sp], #4 8028af2: 4770 bx lr 08028af4 : * 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) { 8028af4: b480 push {r7} 8028af6: b083 sub sp, #12 8028af8: af00 add r7, sp, #0 8028afa: 6078 str r0, [r7, #4] 8028afc: 6039 str r1, [r7, #0] **pptr = (unsigned char)(anInt / 256); 8028afe: 683b ldr r3, [r7, #0] 8028b00: 2b00 cmp r3, #0 8028b02: da00 bge.n 8028b06 8028b04: 33ff adds r3, #255 @ 0xff 8028b06: 121b asrs r3, r3, #8 8028b08: 461a mov r2, r3 8028b0a: 687b ldr r3, [r7, #4] 8028b0c: 681b ldr r3, [r3, #0] 8028b0e: b2d2 uxtb r2, r2 8028b10: 701a strb r2, [r3, #0] (*pptr)++; 8028b12: 687b ldr r3, [r7, #4] 8028b14: 681b ldr r3, [r3, #0] 8028b16: 1c5a adds r2, r3, #1 8028b18: 687b ldr r3, [r7, #4] 8028b1a: 601a str r2, [r3, #0] **pptr = (unsigned char)(anInt % 256); 8028b1c: 683b ldr r3, [r7, #0] 8028b1e: 425a negs r2, r3 8028b20: b2db uxtb r3, r3 8028b22: b2d2 uxtb r2, r2 8028b24: bf58 it pl 8028b26: 4253 negpl r3, r2 8028b28: 687a ldr r2, [r7, #4] 8028b2a: 6812 ldr r2, [r2, #0] 8028b2c: b2db uxtb r3, r3 8028b2e: 7013 strb r3, [r2, #0] (*pptr)++; 8028b30: 687b ldr r3, [r7, #4] 8028b32: 681b ldr r3, [r3, #0] 8028b34: 1c5a adds r2, r3, #1 8028b36: 687b ldr r3, [r7, #4] 8028b38: 601a str r2, [r3, #0] } 8028b3a: bf00 nop 8028b3c: 370c adds r7, #12 8028b3e: 46bd mov sp, r7 8028b40: f85d 7b04 ldr.w r7, [sp], #4 8028b44: 4770 bx lr 08028b46 : * 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) { 8028b46: b580 push {r7, lr} 8028b48: b084 sub sp, #16 8028b4a: af00 add r7, sp, #0 8028b4c: 6078 str r0, [r7, #4] 8028b4e: 6039 str r1, [r7, #0] int len = strlen(string); 8028b50: 6838 ldr r0, [r7, #0] 8028b52: f7d7 fc25 bl 80003a0 8028b56: 4603 mov r3, r0 8028b58: 60fb str r3, [r7, #12] writeInt(pptr, len); 8028b5a: 68f9 ldr r1, [r7, #12] 8028b5c: 6878 ldr r0, [r7, #4] 8028b5e: f7ff ffc9 bl 8028af4 memcpy(*pptr, string, len); 8028b62: 687b ldr r3, [r7, #4] 8028b64: 681b ldr r3, [r3, #0] 8028b66: 68fa ldr r2, [r7, #12] 8028b68: 6839 ldr r1, [r7, #0] 8028b6a: 4618 mov r0, r3 8028b6c: f002 f91f bl 802adae *pptr += len; 8028b70: 687b ldr r3, [r7, #4] 8028b72: 681a ldr r2, [r3, #0] 8028b74: 68fb ldr r3, [r7, #12] 8028b76: 441a add r2, r3 8028b78: 687b ldr r3, [r7, #4] 8028b7a: 601a str r2, [r3, #0] } 8028b7c: bf00 nop 8028b7e: 3710 adds r7, #16 8028b80: 46bd mov sp, r7 8028b82: bd80 pop {r7, pc} 08028b84 : return len; } void writeMQTTString(unsigned char** pptr, MQTTString mqttstring) { 8028b84: b580 push {r7, lr} 8028b86: b084 sub sp, #16 8028b88: af00 add r7, sp, #0 8028b8a: 60f8 str r0, [r7, #12] 8028b8c: 4638 mov r0, r7 8028b8e: e880 000e stmia.w r0, {r1, r2, r3} if (mqttstring.lenstring.len > 0) 8028b92: 687b ldr r3, [r7, #4] 8028b94: 2b00 cmp r3, #0 8028b96: dd12 ble.n 8028bbe { writeInt(pptr, mqttstring.lenstring.len); 8028b98: 687b ldr r3, [r7, #4] 8028b9a: 4619 mov r1, r3 8028b9c: 68f8 ldr r0, [r7, #12] 8028b9e: f7ff ffa9 bl 8028af4 memcpy(*pptr, mqttstring.lenstring.data, mqttstring.lenstring.len); 8028ba2: 68fb ldr r3, [r7, #12] 8028ba4: 681b ldr r3, [r3, #0] 8028ba6: 68b9 ldr r1, [r7, #8] 8028ba8: 687a ldr r2, [r7, #4] 8028baa: 4618 mov r0, r3 8028bac: f002 f8ff bl 802adae *pptr += mqttstring.lenstring.len; 8028bb0: 68fb ldr r3, [r7, #12] 8028bb2: 681b ldr r3, [r3, #0] 8028bb4: 687a ldr r2, [r7, #4] 8028bb6: 441a add r2, r3 8028bb8: 68fb ldr r3, [r7, #12] 8028bba: 601a str r2, [r3, #0] } else if (mqttstring.cstring) writeCString(pptr, mqttstring.cstring); else writeInt(pptr, 0); } 8028bbc: e00c b.n 8028bd8 else if (mqttstring.cstring) 8028bbe: 683b ldr r3, [r7, #0] 8028bc0: 2b00 cmp r3, #0 8028bc2: d005 beq.n 8028bd0 writeCString(pptr, mqttstring.cstring); 8028bc4: 683b ldr r3, [r7, #0] 8028bc6: 4619 mov r1, r3 8028bc8: 68f8 ldr r0, [r7, #12] 8028bca: f7ff ffbc bl 8028b46 } 8028bce: e003 b.n 8028bd8 writeInt(pptr, 0); 8028bd0: 2100 movs r1, #0 8028bd2: 68f8 ldr r0, [r7, #12] 8028bd4: f7ff ff8e bl 8028af4 } 8028bd8: bf00 nop 8028bda: 3710 adds r7, #16 8028bdc: 46bd mov sp, r7 8028bde: bd80 pop {r7, pc} 08028be0 : * @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) { 8028be0: b580 push {r7, lr} 8028be2: b086 sub sp, #24 8028be4: af00 add r7, sp, #0 8028be6: 60f8 str r0, [r7, #12] 8028be8: 60b9 str r1, [r7, #8] 8028bea: 607a str r2, [r7, #4] int rc = 0; 8028bec: 2300 movs r3, #0 8028bee: 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? */ 8028bf0: 68bb ldr r3, [r7, #8] 8028bf2: 681b ldr r3, [r3, #0] 8028bf4: 687a ldr r2, [r7, #4] 8028bf6: 1ad3 subs r3, r2, r3 8028bf8: 2b01 cmp r3, #1 8028bfa: dd1a ble.n 8028c32 { mqttstring->lenstring.len = readInt(pptr); /* increments pptr to point past length */ 8028bfc: 68b8 ldr r0, [r7, #8] 8028bfe: f7ff ff35 bl 8028a6c 8028c02: 4602 mov r2, r0 8028c04: 68fb ldr r3, [r7, #12] 8028c06: 605a str r2, [r3, #4] if (&(*pptr)[mqttstring->lenstring.len] <= enddata) 8028c08: 68bb ldr r3, [r7, #8] 8028c0a: 681b ldr r3, [r3, #0] 8028c0c: 68fa ldr r2, [r7, #12] 8028c0e: 6852 ldr r2, [r2, #4] 8028c10: 4413 add r3, r2 8028c12: 687a ldr r2, [r7, #4] 8028c14: 429a cmp r2, r3 8028c16: d30c bcc.n 8028c32 { mqttstring->lenstring.data = (char*)*pptr; 8028c18: 68bb ldr r3, [r7, #8] 8028c1a: 681a ldr r2, [r3, #0] 8028c1c: 68fb ldr r3, [r7, #12] 8028c1e: 609a str r2, [r3, #8] *pptr += mqttstring->lenstring.len; 8028c20: 68bb ldr r3, [r7, #8] 8028c22: 681b ldr r3, [r3, #0] 8028c24: 68fa ldr r2, [r7, #12] 8028c26: 6852 ldr r2, [r2, #4] 8028c28: 441a add r2, r3 8028c2a: 68bb ldr r3, [r7, #8] 8028c2c: 601a str r2, [r3, #0] rc = 1; 8028c2e: 2301 movs r3, #1 8028c30: 617b str r3, [r7, #20] } } mqttstring->cstring = NULL; 8028c32: 68fb ldr r3, [r7, #12] 8028c34: 2200 movs r2, #0 8028c36: 601a str r2, [r3, #0] FUNC_EXIT_RC(rc); return rc; 8028c38: 697b ldr r3, [r7, #20] } 8028c3a: 4618 mov r0, r3 8028c3c: 3718 adds r7, #24 8028c3e: 46bd mov sp, r7 8028c40: bd80 pop {r7, pc} 08028c42 : * 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) { 8028c42: b580 push {r7, lr} 8028c44: b086 sub sp, #24 8028c46: af00 add r7, sp, #0 8028c48: 1d3b adds r3, r7, #4 8028c4a: e883 0007 stmia.w r3, {r0, r1, r2} int rc = 0; 8028c4e: 2300 movs r3, #0 8028c50: 617b str r3, [r7, #20] if (mqttstring.cstring) 8028c52: 687b ldr r3, [r7, #4] 8028c54: 2b00 cmp r3, #0 8028c56: d006 beq.n 8028c66 rc = strlen(mqttstring.cstring); 8028c58: 687b ldr r3, [r7, #4] 8028c5a: 4618 mov r0, r3 8028c5c: f7d7 fba0 bl 80003a0 8028c60: 4603 mov r3, r0 8028c62: 617b str r3, [r7, #20] 8028c64: e001 b.n 8028c6a else rc = mqttstring.lenstring.len; 8028c66: 68bb ldr r3, [r7, #8] 8028c68: 617b str r3, [r7, #20] return rc; 8028c6a: 697b ldr r3, [r7, #20] } 8028c6c: 4618 mov r0, r3 8028c6e: 3718 adds r7, #24 8028c70: 46bd mov sp, r7 8028c72: bd80 pop {r7, pc} 08028c74 : * @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) { 8028c74: b580 push {r7, lr} 8028c76: b086 sub sp, #24 8028c78: af00 add r7, sp, #0 8028c7a: 6078 str r0, [r7, #4] 8028c7c: 6039 str r1, [r7, #0] int alen = 0, 8028c7e: 2300 movs r3, #0 8028c80: 617b str r3, [r7, #20] blen = 0; 8028c82: 2300 movs r3, #0 8028c84: 60fb str r3, [r7, #12] char *aptr; if (a->cstring) 8028c86: 687b ldr r3, [r7, #4] 8028c88: 681b ldr r3, [r3, #0] 8028c8a: 2b00 cmp r3, #0 8028c8c: d00a beq.n 8028ca4 { aptr = a->cstring; 8028c8e: 687b ldr r3, [r7, #4] 8028c90: 681b ldr r3, [r3, #0] 8028c92: 613b str r3, [r7, #16] alen = strlen(a->cstring); 8028c94: 687b ldr r3, [r7, #4] 8028c96: 681b ldr r3, [r3, #0] 8028c98: 4618 mov r0, r3 8028c9a: f7d7 fb81 bl 80003a0 8028c9e: 4603 mov r3, r0 8028ca0: 617b str r3, [r7, #20] 8028ca2: e005 b.n 8028cb0 } else { aptr = a->lenstring.data; 8028ca4: 687b ldr r3, [r7, #4] 8028ca6: 689b ldr r3, [r3, #8] 8028ca8: 613b str r3, [r7, #16] alen = a->lenstring.len; 8028caa: 687b ldr r3, [r7, #4] 8028cac: 685b ldr r3, [r3, #4] 8028cae: 617b str r3, [r7, #20] } blen = strlen(bptr); 8028cb0: 6838 ldr r0, [r7, #0] 8028cb2: f7d7 fb75 bl 80003a0 8028cb6: 4603 mov r3, r0 8028cb8: 60fb str r3, [r7, #12] return (alen == blen) && (strncmp(aptr, bptr, alen) == 0); 8028cba: 697a ldr r2, [r7, #20] 8028cbc: 68fb ldr r3, [r7, #12] 8028cbe: 429a cmp r2, r3 8028cc0: d10a bne.n 8028cd8 8028cc2: 697b ldr r3, [r7, #20] 8028cc4: 461a mov r2, r3 8028cc6: 6839 ldr r1, [r7, #0] 8028cc8: 6938 ldr r0, [r7, #16] 8028cca: f001 ff81 bl 802abd0 8028cce: 4603 mov r3, r0 8028cd0: 2b00 cmp r3, #0 8028cd2: d101 bne.n 8028cd8 8028cd4: 2301 movs r3, #1 8028cd6: e000 b.n 8028cda 8028cd8: 2300 movs r3, #0 } 8028cda: 4618 mov r0, r3 8028cdc: 3718 adds r7, #24 8028cde: 46bd mov sp, r7 8028ce0: bd80 pop {r7, pc} 08028ce2 : * @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) { 8028ce2: b580 push {r7, lr} 8028ce4: b086 sub sp, #24 8028ce6: af00 add r7, sp, #0 8028ce8: 60f8 str r0, [r7, #12] 8028cea: 4638 mov r0, r7 8028cec: e880 000e stmia.w r0, {r1, r2, r3} int len = 0; 8028cf0: 2300 movs r3, #0 8028cf2: 617b str r3, [r7, #20] len += 2 + MQTTstrlen(topicName) + payloadlen; 8028cf4: 463b mov r3, r7 8028cf6: e893 0007 ldmia.w r3, {r0, r1, r2} 8028cfa: f7ff ffa2 bl 8028c42 8028cfe: 4603 mov r3, r0 8028d00: 1c9a adds r2, r3, #2 8028d02: 6a3b ldr r3, [r7, #32] 8028d04: 4413 add r3, r2 8028d06: 697a ldr r2, [r7, #20] 8028d08: 4413 add r3, r2 8028d0a: 617b str r3, [r7, #20] if (qos > 0) 8028d0c: 68fb ldr r3, [r7, #12] 8028d0e: 2b00 cmp r3, #0 8028d10: dd02 ble.n 8028d18 len += 2; /* packetid */ 8028d12: 697b ldr r3, [r7, #20] 8028d14: 3302 adds r3, #2 8028d16: 617b str r3, [r7, #20] return len; 8028d18: 697b ldr r3, [r7, #20] } 8028d1a: 4618 mov r0, r3 8028d1c: 3718 adds r7, #24 8028d1e: 46bd mov sp, r7 8028d20: bd80 pop {r7, pc} 08028d22 : * @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) { 8028d22: b580 push {r7, lr} 8028d24: b08a sub sp, #40 @ 0x28 8028d26: af02 add r7, sp, #8 8028d28: 60f8 str r0, [r7, #12] 8028d2a: 60b9 str r1, [r7, #8] 8028d2c: 603b str r3, [r7, #0] 8028d2e: 4613 mov r3, r2 8028d30: 71fb strb r3, [r7, #7] unsigned char *ptr = buf; 8028d32: 68fb ldr r3, [r7, #12] 8028d34: 617b str r3, [r7, #20] MQTTHeader header = {0}; 8028d36: 2300 movs r3, #0 8028d38: 613b str r3, [r7, #16] int rem_len = 0; 8028d3a: 2300 movs r3, #0 8028d3c: 61bb str r3, [r7, #24] int rc = 0; 8028d3e: 2300 movs r3, #0 8028d40: 61fb str r3, [r7, #28] FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_publishLength(qos, topicName, payloadlen)) > buflen) 8028d42: 6c3b ldr r3, [r7, #64] @ 0x40 8028d44: 9300 str r3, [sp, #0] 8028d46: f107 0330 add.w r3, r7, #48 @ 0x30 8028d4a: cb0e ldmia r3, {r1, r2, r3} 8028d4c: 6838 ldr r0, [r7, #0] 8028d4e: f7ff ffc8 bl 8028ce2 8028d52: 61b8 str r0, [r7, #24] 8028d54: 69b8 ldr r0, [r7, #24] 8028d56: f7ff fe29 bl 80289ac 8028d5a: 4602 mov r2, r0 8028d5c: 68bb ldr r3, [r7, #8] 8028d5e: 4293 cmp r3, r2 8028d60: da03 bge.n 8028d6a { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028d62: f06f 0301 mvn.w r3, #1 8028d66: 61fb str r3, [r7, #28] goto exit; 8028d68: e04c b.n 8028e04 } header.bits.type = PUBLISH; 8028d6a: 7c3b ldrb r3, [r7, #16] 8028d6c: 2203 movs r2, #3 8028d6e: f362 1307 bfi r3, r2, #4, #4 8028d72: 743b strb r3, [r7, #16] header.bits.dup = dup; 8028d74: 79fb ldrb r3, [r7, #7] 8028d76: f003 0301 and.w r3, r3, #1 8028d7a: b2da uxtb r2, r3 8028d7c: 7c3b ldrb r3, [r7, #16] 8028d7e: f362 03c3 bfi r3, r2, #3, #1 8028d82: 743b strb r3, [r7, #16] header.bits.qos = qos; 8028d84: 683b ldr r3, [r7, #0] 8028d86: f003 0303 and.w r3, r3, #3 8028d8a: b2da uxtb r2, r3 8028d8c: 7c3b ldrb r3, [r7, #16] 8028d8e: f362 0342 bfi r3, r2, #1, #2 8028d92: 743b strb r3, [r7, #16] header.bits.retain = retained; 8028d94: f897 3028 ldrb.w r3, [r7, #40] @ 0x28 8028d98: f003 0301 and.w r3, r3, #1 8028d9c: b2da uxtb r2, r3 8028d9e: 7c3b ldrb r3, [r7, #16] 8028da0: f362 0300 bfi r3, r2, #0, #1 8028da4: 743b strb r3, [r7, #16] writeChar(&ptr, header.byte); /* write header */ 8028da6: 7c3a ldrb r2, [r7, #16] 8028da8: f107 0314 add.w r3, r7, #20 8028dac: 4611 mov r1, r2 8028dae: 4618 mov r0, r3 8028db0: f7ff fe8b bl 8028aca ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 8028db4: 697b ldr r3, [r7, #20] 8028db6: 69b9 ldr r1, [r7, #24] 8028db8: 4618 mov r0, r3 8028dba: f7ff fd8c bl 80288d6 8028dbe: 4602 mov r2, r0 8028dc0: 697b ldr r3, [r7, #20] 8028dc2: 4413 add r3, r2 8028dc4: 617b str r3, [r7, #20] writeMQTTString(&ptr, topicName); 8028dc6: f107 0014 add.w r0, r7, #20 8028dca: f107 0330 add.w r3, r7, #48 @ 0x30 8028dce: cb0e ldmia r3, {r1, r2, r3} 8028dd0: f7ff fed8 bl 8028b84 if (qos > 0) 8028dd4: 683b ldr r3, [r7, #0] 8028dd6: 2b00 cmp r3, #0 8028dd8: dd06 ble.n 8028de8 writeInt(&ptr, packetid); 8028dda: 8dba ldrh r2, [r7, #44] @ 0x2c 8028ddc: f107 0314 add.w r3, r7, #20 8028de0: 4611 mov r1, r2 8028de2: 4618 mov r0, r3 8028de4: f7ff fe86 bl 8028af4 memcpy(ptr, payload, payloadlen); 8028de8: 697b ldr r3, [r7, #20] 8028dea: 6c3a ldr r2, [r7, #64] @ 0x40 8028dec: 6bf9 ldr r1, [r7, #60] @ 0x3c 8028dee: 4618 mov r0, r3 8028df0: f001 ffdd bl 802adae ptr += payloadlen; 8028df4: 697a ldr r2, [r7, #20] 8028df6: 6c3b ldr r3, [r7, #64] @ 0x40 8028df8: 4413 add r3, r2 8028dfa: 617b str r3, [r7, #20] rc = ptr - buf; 8028dfc: 697a ldr r2, [r7, #20] 8028dfe: 68fb ldr r3, [r7, #12] 8028e00: 1ad3 subs r3, r2, r3 8028e02: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8028e04: 69fb ldr r3, [r7, #28] } 8028e06: 4618 mov r0, r3 8028e08: 3720 adds r7, #32 8028e0a: 46bd mov sp, r7 8028e0c: bd80 pop {r7, pc} 08028e0e : * @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) { 8028e0e: b580 push {r7, lr} 8028e10: b088 sub sp, #32 8028e12: af00 add r7, sp, #0 8028e14: 60f8 str r0, [r7, #12] 8028e16: 60b9 str r1, [r7, #8] 8028e18: 4611 mov r1, r2 8028e1a: 461a mov r2, r3 8028e1c: 460b mov r3, r1 8028e1e: 71fb strb r3, [r7, #7] 8028e20: 4613 mov r3, r2 8028e22: 71bb strb r3, [r7, #6] MQTTHeader header = {0}; 8028e24: 2300 movs r3, #0 8028e26: 61bb str r3, [r7, #24] int rc = 0; 8028e28: 2300 movs r3, #0 8028e2a: 61fb str r3, [r7, #28] unsigned char *ptr = buf; 8028e2c: 68fb ldr r3, [r7, #12] 8028e2e: 617b str r3, [r7, #20] FUNC_ENTRY; if (buflen < 4) 8028e30: 68bb ldr r3, [r7, #8] 8028e32: 2b03 cmp r3, #3 8028e34: dc03 bgt.n 8028e3e { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028e36: f06f 0301 mvn.w r3, #1 8028e3a: 61fb str r3, [r7, #28] goto exit; 8028e3c: e037 b.n 8028eae } header.bits.type = packettype; 8028e3e: 79fb ldrb r3, [r7, #7] 8028e40: f003 030f and.w r3, r3, #15 8028e44: b2da uxtb r2, r3 8028e46: 7e3b ldrb r3, [r7, #24] 8028e48: f362 1307 bfi r3, r2, #4, #4 8028e4c: 763b strb r3, [r7, #24] header.bits.dup = dup; 8028e4e: 79bb ldrb r3, [r7, #6] 8028e50: f003 0301 and.w r3, r3, #1 8028e54: b2da uxtb r2, r3 8028e56: 7e3b ldrb r3, [r7, #24] 8028e58: f362 03c3 bfi r3, r2, #3, #1 8028e5c: 763b strb r3, [r7, #24] header.bits.qos = (packettype == PUBREL) ? 1 : 0; 8028e5e: 79fb ldrb r3, [r7, #7] 8028e60: 2b06 cmp r3, #6 8028e62: bf0c ite eq 8028e64: 2301 moveq r3, #1 8028e66: 2300 movne r3, #0 8028e68: b2db uxtb r3, r3 8028e6a: f003 0303 and.w r3, r3, #3 8028e6e: b2da uxtb r2, r3 8028e70: 7e3b ldrb r3, [r7, #24] 8028e72: f362 0342 bfi r3, r2, #1, #2 8028e76: 763b strb r3, [r7, #24] writeChar(&ptr, header.byte); /* write header */ 8028e78: 7e3a ldrb r2, [r7, #24] 8028e7a: f107 0314 add.w r3, r7, #20 8028e7e: 4611 mov r1, r2 8028e80: 4618 mov r0, r3 8028e82: f7ff fe22 bl 8028aca ptr += MQTTPacket_encode(ptr, 2); /* write remaining length */ 8028e86: 697b ldr r3, [r7, #20] 8028e88: 2102 movs r1, #2 8028e8a: 4618 mov r0, r3 8028e8c: f7ff fd23 bl 80288d6 8028e90: 4602 mov r2, r0 8028e92: 697b ldr r3, [r7, #20] 8028e94: 4413 add r3, r2 8028e96: 617b str r3, [r7, #20] writeInt(&ptr, packetid); 8028e98: 8d3a ldrh r2, [r7, #40] @ 0x28 8028e9a: f107 0314 add.w r3, r7, #20 8028e9e: 4611 mov r1, r2 8028ea0: 4618 mov r0, r3 8028ea2: f7ff fe27 bl 8028af4 rc = ptr - buf; 8028ea6: 697a ldr r2, [r7, #20] 8028ea8: 68fb ldr r3, [r7, #12] 8028eaa: 1ad3 subs r3, r2, r3 8028eac: 61fb str r3, [r7, #28] exit: FUNC_EXIT_RC(rc); return rc; 8028eae: 69fb ldr r3, [r7, #28] } 8028eb0: 4618 mov r0, r3 8028eb2: 3720 adds r7, #32 8028eb4: 46bd mov sp, r7 8028eb6: bd80 pop {r7, pc} 08028eb8 : * @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[]) { 8028eb8: b580 push {r7, lr} 8028eba: b084 sub sp, #16 8028ebc: af00 add r7, sp, #0 8028ebe: 6078 str r0, [r7, #4] 8028ec0: 6039 str r1, [r7, #0] int i; int len = 2; /* packetid */ 8028ec2: 2302 movs r3, #2 8028ec4: 60bb str r3, [r7, #8] for (i = 0; i < count; ++i) 8028ec6: 2300 movs r3, #0 8028ec8: 60fb str r3, [r7, #12] 8028eca: e013 b.n 8028ef4 len += 2 + MQTTstrlen(topicFilters[i]) + 1; /* length + topic + req_qos */ 8028ecc: 68fa ldr r2, [r7, #12] 8028ece: 4613 mov r3, r2 8028ed0: 005b lsls r3, r3, #1 8028ed2: 4413 add r3, r2 8028ed4: 009b lsls r3, r3, #2 8028ed6: 461a mov r2, r3 8028ed8: 683b ldr r3, [r7, #0] 8028eda: 4413 add r3, r2 8028edc: e893 0007 ldmia.w r3, {r0, r1, r2} 8028ee0: f7ff feaf bl 8028c42 8028ee4: 4603 mov r3, r0 8028ee6: 3303 adds r3, #3 8028ee8: 68ba ldr r2, [r7, #8] 8028eea: 4413 add r3, r2 8028eec: 60bb str r3, [r7, #8] for (i = 0; i < count; ++i) 8028eee: 68fb ldr r3, [r7, #12] 8028ef0: 3301 adds r3, #1 8028ef2: 60fb str r3, [r7, #12] 8028ef4: 68fa ldr r2, [r7, #12] 8028ef6: 687b ldr r3, [r7, #4] 8028ef8: 429a cmp r2, r3 8028efa: dbe7 blt.n 8028ecc return len; 8028efc: 68bb ldr r3, [r7, #8] } 8028efe: 4618 mov r0, r3 8028f00: 3710 adds r7, #16 8028f02: 46bd mov sp, r7 8028f04: bd80 pop {r7, pc} 08028f06 : * @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[]) { 8028f06: b580 push {r7, lr} 8028f08: b08a sub sp, #40 @ 0x28 8028f0a: af00 add r7, sp, #0 8028f0c: 60f8 str r0, [r7, #12] 8028f0e: 60b9 str r1, [r7, #8] 8028f10: 4611 mov r1, r2 8028f12: 461a mov r2, r3 8028f14: 460b mov r3, r1 8028f16: 71fb strb r3, [r7, #7] 8028f18: 4613 mov r3, r2 8028f1a: 80bb strh r3, [r7, #4] unsigned char *ptr = buf; 8028f1c: 68fb ldr r3, [r7, #12] 8028f1e: 61bb str r3, [r7, #24] MQTTHeader header = {0}; 8028f20: 2300 movs r3, #0 8028f22: 617b str r3, [r7, #20] int rem_len = 0; 8028f24: 2300 movs r3, #0 8028f26: 61fb str r3, [r7, #28] int rc = 0; 8028f28: 2300 movs r3, #0 8028f2a: 627b str r3, [r7, #36] @ 0x24 int i = 0; 8028f2c: 2300 movs r3, #0 8028f2e: 623b str r3, [r7, #32] FUNC_ENTRY; if (MQTTPacket_len(rem_len = MQTTSerialize_subscribeLength(count, topicFilters)) > buflen) 8028f30: 6b79 ldr r1, [r7, #52] @ 0x34 8028f32: 6b38 ldr r0, [r7, #48] @ 0x30 8028f34: f7ff ffc0 bl 8028eb8 8028f38: 61f8 str r0, [r7, #28] 8028f3a: 69f8 ldr r0, [r7, #28] 8028f3c: f7ff fd36 bl 80289ac 8028f40: 4602 mov r2, r0 8028f42: 68bb ldr r3, [r7, #8] 8028f44: 4293 cmp r3, r2 8028f46: da03 bge.n 8028f50 { rc = MQTTPACKET_BUFFER_TOO_SHORT; 8028f48: f06f 0301 mvn.w r3, #1 8028f4c: 627b str r3, [r7, #36] @ 0x24 goto exit; 8028f4e: e051 b.n 8028ff4 } header.byte = 0; 8028f50: 2300 movs r3, #0 8028f52: 753b strb r3, [r7, #20] header.bits.type = SUBSCRIBE; 8028f54: 7d3b ldrb r3, [r7, #20] 8028f56: 2208 movs r2, #8 8028f58: f362 1307 bfi r3, r2, #4, #4 8028f5c: 753b strb r3, [r7, #20] header.bits.dup = dup; 8028f5e: 79fb ldrb r3, [r7, #7] 8028f60: f003 0301 and.w r3, r3, #1 8028f64: b2da uxtb r2, r3 8028f66: 7d3b ldrb r3, [r7, #20] 8028f68: f362 03c3 bfi r3, r2, #3, #1 8028f6c: 753b strb r3, [r7, #20] header.bits.qos = 1; 8028f6e: 7d3b ldrb r3, [r7, #20] 8028f70: 2201 movs r2, #1 8028f72: f362 0342 bfi r3, r2, #1, #2 8028f76: 753b strb r3, [r7, #20] writeChar(&ptr, header.byte); /* write header */ 8028f78: 7d3a ldrb r2, [r7, #20] 8028f7a: f107 0318 add.w r3, r7, #24 8028f7e: 4611 mov r1, r2 8028f80: 4618 mov r0, r3 8028f82: f7ff fda2 bl 8028aca ptr += MQTTPacket_encode(ptr, rem_len); /* write remaining length */; 8028f86: 69bb ldr r3, [r7, #24] 8028f88: 69f9 ldr r1, [r7, #28] 8028f8a: 4618 mov r0, r3 8028f8c: f7ff fca3 bl 80288d6 8028f90: 4602 mov r2, r0 8028f92: 69bb ldr r3, [r7, #24] 8028f94: 4413 add r3, r2 8028f96: 61bb str r3, [r7, #24] writeInt(&ptr, packetid); 8028f98: 88ba ldrh r2, [r7, #4] 8028f9a: f107 0318 add.w r3, r7, #24 8028f9e: 4611 mov r1, r2 8028fa0: 4618 mov r0, r3 8028fa2: f7ff fda7 bl 8028af4 for (i = 0; i < count; ++i) 8028fa6: 2300 movs r3, #0 8028fa8: 623b str r3, [r7, #32] 8028faa: e01b b.n 8028fe4 { writeMQTTString(&ptr, topicFilters[i]); 8028fac: 6a3a ldr r2, [r7, #32] 8028fae: 4613 mov r3, r2 8028fb0: 005b lsls r3, r3, #1 8028fb2: 4413 add r3, r2 8028fb4: 009b lsls r3, r3, #2 8028fb6: 461a mov r2, r3 8028fb8: 6b7b ldr r3, [r7, #52] @ 0x34 8028fba: 4413 add r3, r2 8028fbc: f107 0018 add.w r0, r7, #24 8028fc0: cb0e ldmia r3, {r1, r2, r3} 8028fc2: f7ff fddf bl 8028b84 writeChar(&ptr, requestedQoSs[i]); 8028fc6: 6a3b ldr r3, [r7, #32] 8028fc8: 009b lsls r3, r3, #2 8028fca: 6bba ldr r2, [r7, #56] @ 0x38 8028fcc: 4413 add r3, r2 8028fce: 681b ldr r3, [r3, #0] 8028fd0: b2da uxtb r2, r3 8028fd2: f107 0318 add.w r3, r7, #24 8028fd6: 4611 mov r1, r2 8028fd8: 4618 mov r0, r3 8028fda: f7ff fd76 bl 8028aca for (i = 0; i < count; ++i) 8028fde: 6a3b ldr r3, [r7, #32] 8028fe0: 3301 adds r3, #1 8028fe2: 623b str r3, [r7, #32] 8028fe4: 6a3a ldr r2, [r7, #32] 8028fe6: 6b3b ldr r3, [r7, #48] @ 0x30 8028fe8: 429a cmp r2, r3 8028fea: dbdf blt.n 8028fac } rc = ptr - buf; 8028fec: 69ba ldr r2, [r7, #24] 8028fee: 68fb ldr r3, [r7, #12] 8028ff0: 1ad3 subs r3, r2, r3 8028ff2: 627b str r3, [r7, #36] @ 0x24 exit: FUNC_EXIT_RC(rc); return rc; 8028ff4: 6a7b ldr r3, [r7, #36] @ 0x24 } 8028ff6: 4618 mov r0, r3 8028ff8: 3728 adds r7, #40 @ 0x28 8028ffa: 46bd mov sp, r7 8028ffc: bd80 pop {r7, pc} 08028ffe : * @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) { 8028ffe: b580 push {r7, lr} 8029000: b08a sub sp, #40 @ 0x28 8029002: af00 add r7, sp, #0 8029004: 60f8 str r0, [r7, #12] 8029006: 60b9 str r1, [r7, #8] 8029008: 607a str r2, [r7, #4] 802900a: 603b str r3, [r7, #0] MQTTHeader header = {0}; 802900c: 2300 movs r3, #0 802900e: 61fb str r3, [r7, #28] unsigned char* curdata = buf; 8029010: 6b3b ldr r3, [r7, #48] @ 0x30 8029012: 61bb str r3, [r7, #24] unsigned char* enddata = NULL; 8029014: 2300 movs r3, #0 8029016: 623b str r3, [r7, #32] int rc = 0; 8029018: 2300 movs r3, #0 802901a: 627b str r3, [r7, #36] @ 0x24 int mylen; FUNC_ENTRY; header.byte = readChar(&curdata); 802901c: f107 0318 add.w r3, r7, #24 8029020: 4618 mov r0, r3 8029022: f7ff fd3e bl 8028aa2 8029026: 4603 mov r3, r0 8029028: 773b strb r3, [r7, #28] if (header.bits.type != SUBACK) 802902a: 7f3b ldrb r3, [r7, #28] 802902c: f023 030f bic.w r3, r3, #15 8029030: b2db uxtb r3, r3 8029032: 2b90 cmp r3, #144 @ 0x90 8029034: d142 bne.n 80290bc goto exit; curdata += (rc = MQTTPacket_decodeBuf(curdata, &mylen)); /* read remaining length */ 8029036: 69bb ldr r3, [r7, #24] 8029038: f107 0214 add.w r2, r7, #20 802903c: 4611 mov r1, r2 802903e: 4618 mov r0, r3 8029040: f7ff fcfe bl 8028a40 8029044: 6278 str r0, [r7, #36] @ 0x24 8029046: 6a7a ldr r2, [r7, #36] @ 0x24 8029048: 69bb ldr r3, [r7, #24] 802904a: 4413 add r3, r2 802904c: 61bb str r3, [r7, #24] enddata = curdata + mylen; 802904e: 69bb ldr r3, [r7, #24] 8029050: 697a ldr r2, [r7, #20] 8029052: 4413 add r3, r2 8029054: 623b str r3, [r7, #32] if (enddata - curdata < 2) 8029056: 69bb ldr r3, [r7, #24] 8029058: 6a3a ldr r2, [r7, #32] 802905a: 1ad3 subs r3, r2, r3 802905c: 2b01 cmp r3, #1 802905e: dd2f ble.n 80290c0 goto exit; *packetid = readInt(&curdata); 8029060: f107 0318 add.w r3, r7, #24 8029064: 4618 mov r0, r3 8029066: f7ff fd01 bl 8028a6c 802906a: 4603 mov r3, r0 802906c: b29a uxth r2, r3 802906e: 68fb ldr r3, [r7, #12] 8029070: 801a strh r2, [r3, #0] *count = 0; 8029072: 687b ldr r3, [r7, #4] 8029074: 2200 movs r2, #0 8029076: 601a str r2, [r3, #0] while (curdata < enddata) 8029078: e019 b.n 80290ae { if (*count > maxcount) 802907a: 687b ldr r3, [r7, #4] 802907c: 681b ldr r3, [r3, #0] 802907e: 68ba ldr r2, [r7, #8] 8029080: 429a cmp r2, r3 8029082: da03 bge.n 802908c { rc = -1; 8029084: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8029088: 627b str r3, [r7, #36] @ 0x24 goto exit; 802908a: e01a b.n 80290c2 } grantedQoSs[(*count)++] = readChar(&curdata); 802908c: f107 0318 add.w r3, r7, #24 8029090: 4618 mov r0, r3 8029092: f7ff fd06 bl 8028aa2 8029096: 4603 mov r3, r0 8029098: 4618 mov r0, r3 802909a: 687b ldr r3, [r7, #4] 802909c: 681b ldr r3, [r3, #0] 802909e: 1c59 adds r1, r3, #1 80290a0: 687a ldr r2, [r7, #4] 80290a2: 6011 str r1, [r2, #0] 80290a4: 009b lsls r3, r3, #2 80290a6: 683a ldr r2, [r7, #0] 80290a8: 4413 add r3, r2 80290aa: 4602 mov r2, r0 80290ac: 601a str r2, [r3, #0] while (curdata < enddata) 80290ae: 69bb ldr r3, [r7, #24] 80290b0: 6a3a ldr r2, [r7, #32] 80290b2: 429a cmp r2, r3 80290b4: d8e1 bhi.n 802907a } rc = 1; 80290b6: 2301 movs r3, #1 80290b8: 627b str r3, [r7, #36] @ 0x24 80290ba: e002 b.n 80290c2 goto exit; 80290bc: bf00 nop 80290be: e000 b.n 80290c2 goto exit; 80290c0: bf00 nop exit: FUNC_EXIT_RC(rc); return rc; 80290c2: 6a7b ldr r3, [r7, #36] @ 0x24 } 80290c4: 4618 mov r0, r3 80290c6: 3728 adds r7, #40 @ 0x28 80290c8: 46bd mov sp, r7 80290ca: bd80 pop {r7, pc} 080290cc : 80290cc: 4b02 ldr r3, [pc, #8] @ (80290d8 ) 80290ce: 4601 mov r1, r0 80290d0: 6818 ldr r0, [r3, #0] 80290d2: f000 b82d b.w 8029130 <_malloc_r> 80290d6: bf00 nop 80290d8: 240001d4 .word 0x240001d4 080290dc : 80290dc: 4b02 ldr r3, [pc, #8] @ (80290e8 ) 80290de: 4601 mov r1, r0 80290e0: 6818 ldr r0, [r3, #0] 80290e2: f002 bc7b b.w 802b9dc <_free_r> 80290e6: bf00 nop 80290e8: 240001d4 .word 0x240001d4 080290ec : 80290ec: b570 push {r4, r5, r6, lr} 80290ee: 4e0f ldr r6, [pc, #60] @ (802912c ) 80290f0: 460c mov r4, r1 80290f2: 6831 ldr r1, [r6, #0] 80290f4: 4605 mov r5, r0 80290f6: b911 cbnz r1, 80290fe 80290f8: f001 fe0a bl 802ad10 <_sbrk_r> 80290fc: 6030 str r0, [r6, #0] 80290fe: 4621 mov r1, r4 8029100: 4628 mov r0, r5 8029102: f001 fe05 bl 802ad10 <_sbrk_r> 8029106: 1c43 adds r3, r0, #1 8029108: d103 bne.n 8029112 802910a: f04f 34ff mov.w r4, #4294967295 @ 0xffffffff 802910e: 4620 mov r0, r4 8029110: bd70 pop {r4, r5, r6, pc} 8029112: 1cc4 adds r4, r0, #3 8029114: f024 0403 bic.w r4, r4, #3 8029118: 42a0 cmp r0, r4 802911a: d0f8 beq.n 802910e 802911c: 1a21 subs r1, r4, r0 802911e: 4628 mov r0, r5 8029120: f001 fdf6 bl 802ad10 <_sbrk_r> 8029124: 3001 adds r0, #1 8029126: d1f2 bne.n 802910e 8029128: e7ef b.n 802910a 802912a: bf00 nop 802912c: 2402b12c .word 0x2402b12c 08029130 <_malloc_r>: 8029130: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8029134: 1ccd adds r5, r1, #3 8029136: f025 0503 bic.w r5, r5, #3 802913a: 3508 adds r5, #8 802913c: 2d0c cmp r5, #12 802913e: bf38 it cc 8029140: 250c movcc r5, #12 8029142: 2d00 cmp r5, #0 8029144: 4606 mov r6, r0 8029146: db01 blt.n 802914c <_malloc_r+0x1c> 8029148: 42a9 cmp r1, r5 802914a: d904 bls.n 8029156 <_malloc_r+0x26> 802914c: 230c movs r3, #12 802914e: 6033 str r3, [r6, #0] 8029150: 2000 movs r0, #0 8029152: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8029156: f8df 80d4 ldr.w r8, [pc, #212] @ 802922c <_malloc_r+0xfc> 802915a: f000 f869 bl 8029230 <__malloc_lock> 802915e: f8d8 3000 ldr.w r3, [r8] 8029162: 461c mov r4, r3 8029164: bb44 cbnz r4, 80291b8 <_malloc_r+0x88> 8029166: 4629 mov r1, r5 8029168: 4630 mov r0, r6 802916a: f7ff ffbf bl 80290ec 802916e: 1c43 adds r3, r0, #1 8029170: 4604 mov r4, r0 8029172: d158 bne.n 8029226 <_malloc_r+0xf6> 8029174: f8d8 4000 ldr.w r4, [r8] 8029178: 4627 mov r7, r4 802917a: 2f00 cmp r7, #0 802917c: d143 bne.n 8029206 <_malloc_r+0xd6> 802917e: 2c00 cmp r4, #0 8029180: d04b beq.n 802921a <_malloc_r+0xea> 8029182: 6823 ldr r3, [r4, #0] 8029184: 4639 mov r1, r7 8029186: 4630 mov r0, r6 8029188: eb04 0903 add.w r9, r4, r3 802918c: f001 fdc0 bl 802ad10 <_sbrk_r> 8029190: 4581 cmp r9, r0 8029192: d142 bne.n 802921a <_malloc_r+0xea> 8029194: 6821 ldr r1, [r4, #0] 8029196: 1a6d subs r5, r5, r1 8029198: 4629 mov r1, r5 802919a: 4630 mov r0, r6 802919c: f7ff ffa6 bl 80290ec 80291a0: 3001 adds r0, #1 80291a2: d03a beq.n 802921a <_malloc_r+0xea> 80291a4: 6823 ldr r3, [r4, #0] 80291a6: 442b add r3, r5 80291a8: 6023 str r3, [r4, #0] 80291aa: f8d8 3000 ldr.w r3, [r8] 80291ae: 685a ldr r2, [r3, #4] 80291b0: bb62 cbnz r2, 802920c <_malloc_r+0xdc> 80291b2: f8c8 7000 str.w r7, [r8] 80291b6: e00f b.n 80291d8 <_malloc_r+0xa8> 80291b8: 6822 ldr r2, [r4, #0] 80291ba: 1b52 subs r2, r2, r5 80291bc: d420 bmi.n 8029200 <_malloc_r+0xd0> 80291be: 2a0b cmp r2, #11 80291c0: d917 bls.n 80291f2 <_malloc_r+0xc2> 80291c2: 1961 adds r1, r4, r5 80291c4: 42a3 cmp r3, r4 80291c6: 6025 str r5, [r4, #0] 80291c8: bf18 it ne 80291ca: 6059 strne r1, [r3, #4] 80291cc: 6863 ldr r3, [r4, #4] 80291ce: bf08 it eq 80291d0: f8c8 1000 streq.w r1, [r8] 80291d4: 5162 str r2, [r4, r5] 80291d6: 604b str r3, [r1, #4] 80291d8: 4630 mov r0, r6 80291da: f000 f82f bl 802923c <__malloc_unlock> 80291de: f104 000b add.w r0, r4, #11 80291e2: 1d23 adds r3, r4, #4 80291e4: f020 0007 bic.w r0, r0, #7 80291e8: 1ac2 subs r2, r0, r3 80291ea: bf1c itt ne 80291ec: 1a1b subne r3, r3, r0 80291ee: 50a3 strne r3, [r4, r2] 80291f0: e7af b.n 8029152 <_malloc_r+0x22> 80291f2: 6862 ldr r2, [r4, #4] 80291f4: 42a3 cmp r3, r4 80291f6: bf0c ite eq 80291f8: f8c8 2000 streq.w r2, [r8] 80291fc: 605a strne r2, [r3, #4] 80291fe: e7eb b.n 80291d8 <_malloc_r+0xa8> 8029200: 4623 mov r3, r4 8029202: 6864 ldr r4, [r4, #4] 8029204: e7ae b.n 8029164 <_malloc_r+0x34> 8029206: 463c mov r4, r7 8029208: 687f ldr r7, [r7, #4] 802920a: e7b6 b.n 802917a <_malloc_r+0x4a> 802920c: 461a mov r2, r3 802920e: 685b ldr r3, [r3, #4] 8029210: 42a3 cmp r3, r4 8029212: d1fb bne.n 802920c <_malloc_r+0xdc> 8029214: 2300 movs r3, #0 8029216: 6053 str r3, [r2, #4] 8029218: e7de b.n 80291d8 <_malloc_r+0xa8> 802921a: 230c movs r3, #12 802921c: 6033 str r3, [r6, #0] 802921e: 4630 mov r0, r6 8029220: f000 f80c bl 802923c <__malloc_unlock> 8029224: e794 b.n 8029150 <_malloc_r+0x20> 8029226: 6005 str r5, [r0, #0] 8029228: e7d6 b.n 80291d8 <_malloc_r+0xa8> 802922a: bf00 nop 802922c: 2402b130 .word 0x2402b130 08029230 <__malloc_lock>: 8029230: 4801 ldr r0, [pc, #4] @ (8029238 <__malloc_lock+0x8>) 8029232: f001 bdba b.w 802adaa <__retarget_lock_acquire_recursive> 8029236: bf00 nop 8029238: 2402b274 .word 0x2402b274 0802923c <__malloc_unlock>: 802923c: 4801 ldr r0, [pc, #4] @ (8029244 <__malloc_unlock+0x8>) 802923e: f001 bdb5 b.w 802adac <__retarget_lock_release_recursive> 8029242: bf00 nop 8029244: 2402b274 .word 0x2402b274 08029248 : 8029248: 4b16 ldr r3, [pc, #88] @ (80292a4 ) 802924a: b510 push {r4, lr} 802924c: 681c ldr r4, [r3, #0] 802924e: 6b23 ldr r3, [r4, #48] @ 0x30 8029250: b9b3 cbnz r3, 8029280 8029252: 2018 movs r0, #24 8029254: f7ff ff3a bl 80290cc 8029258: 4602 mov r2, r0 802925a: 6320 str r0, [r4, #48] @ 0x30 802925c: b920 cbnz r0, 8029268 802925e: 4b12 ldr r3, [pc, #72] @ (80292a8 ) 8029260: 4812 ldr r0, [pc, #72] @ (80292ac ) 8029262: 2152 movs r1, #82 @ 0x52 8029264: f001 fdbc bl 802ade0 <__assert_func> 8029268: 4911 ldr r1, [pc, #68] @ (80292b0 ) 802926a: 4b12 ldr r3, [pc, #72] @ (80292b4 ) 802926c: e9c0 1300 strd r1, r3, [r0] 8029270: 4b11 ldr r3, [pc, #68] @ (80292b8 ) 8029272: 6083 str r3, [r0, #8] 8029274: 230b movs r3, #11 8029276: 8183 strh r3, [r0, #12] 8029278: 2100 movs r1, #0 802927a: 2001 movs r0, #1 802927c: e9c2 0104 strd r0, r1, [r2, #16] 8029280: 6b21 ldr r1, [r4, #48] @ 0x30 8029282: 480e ldr r0, [pc, #56] @ (80292bc ) 8029284: 690b ldr r3, [r1, #16] 8029286: 694c ldr r4, [r1, #20] 8029288: 4a0d ldr r2, [pc, #52] @ (80292c0 ) 802928a: 4358 muls r0, r3 802928c: fb02 0004 mla r0, r2, r4, r0 8029290: fba3 3202 umull r3, r2, r3, r2 8029294: 3301 adds r3, #1 8029296: eb40 0002 adc.w r0, r0, r2 802929a: e9c1 3004 strd r3, r0, [r1, #16] 802929e: f020 4000 bic.w r0, r0, #2147483648 @ 0x80000000 80292a2: bd10 pop {r4, pc} 80292a4: 240001d4 .word 0x240001d4 80292a8: 08031cbe .word 0x08031cbe 80292ac: 08031cd5 .word 0x08031cd5 80292b0: abcd330e .word 0xabcd330e 80292b4: e66d1234 .word 0xe66d1234 80292b8: 0005deec .word 0x0005deec 80292bc: 5851f42d .word 0x5851f42d 80292c0: 4c957f2d .word 0x4c957f2d 080292c4 : 80292c4: 4b02 ldr r3, [pc, #8] @ (80292d0 ) 80292c6: 460a mov r2, r1 80292c8: 4601 mov r1, r0 80292ca: 6818 ldr r0, [r3, #0] 80292cc: f000 b802 b.w 80292d4 <_realloc_r> 80292d0: 240001d4 .word 0x240001d4 080292d4 <_realloc_r>: 80292d4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80292d8: 4680 mov r8, r0 80292da: 4615 mov r5, r2 80292dc: 460c mov r4, r1 80292de: b921 cbnz r1, 80292ea <_realloc_r+0x16> 80292e0: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 80292e4: 4611 mov r1, r2 80292e6: f7ff bf23 b.w 8029130 <_malloc_r> 80292ea: b92a cbnz r2, 80292f8 <_realloc_r+0x24> 80292ec: f002 fb76 bl 802b9dc <_free_r> 80292f0: 2400 movs r4, #0 80292f2: 4620 mov r0, r4 80292f4: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80292f8: f003 fbb5 bl 802ca66 <_malloc_usable_size_r> 80292fc: 4285 cmp r5, r0 80292fe: 4606 mov r6, r0 8029300: d802 bhi.n 8029308 <_realloc_r+0x34> 8029302: ebb5 0f50 cmp.w r5, r0, lsr #1 8029306: d8f4 bhi.n 80292f2 <_realloc_r+0x1e> 8029308: 4629 mov r1, r5 802930a: 4640 mov r0, r8 802930c: f7ff ff10 bl 8029130 <_malloc_r> 8029310: 4607 mov r7, r0 8029312: 2800 cmp r0, #0 8029314: d0ec beq.n 80292f0 <_realloc_r+0x1c> 8029316: 42b5 cmp r5, r6 8029318: 462a mov r2, r5 802931a: 4621 mov r1, r4 802931c: bf28 it cs 802931e: 4632 movcs r2, r6 8029320: f001 fd45 bl 802adae 8029324: 4621 mov r1, r4 8029326: 4640 mov r0, r8 8029328: f002 fb58 bl 802b9dc <_free_r> 802932c: 463c mov r4, r7 802932e: e7e0 b.n 80292f2 <_realloc_r+0x1e> 08029330 : 8029330: b570 push {r4, r5, r6, lr} 8029332: 4604 mov r4, r0 8029334: 460d mov r5, r1 8029336: 4616 mov r6, r2 8029338: ec45 4b10 vmov d0, r4, r5 802933c: f003 fa58 bl 802c7f0 <__ulp> 8029340: b17e cbz r6, 8029362 8029342: f3c5 530a ubfx r3, r5, #20, #11 8029346: f1c3 036b rsb r3, r3, #107 @ 0x6b 802934a: 2b00 cmp r3, #0 802934c: dd09 ble.n 8029362 802934e: 051b lsls r3, r3, #20 8029350: f103 517f add.w r1, r3, #1069547520 @ 0x3fc00000 8029354: 2000 movs r0, #0 8029356: f501 1140 add.w r1, r1, #3145728 @ 0x300000 802935a: ec41 0b17 vmov d7, r0, r1 802935e: ee20 0b07 vmul.f64 d0, d0, d7 8029362: bd70 pop {r4, r5, r6, pc} 8029364: 0000 movs r0, r0 ... 08029368 <_strtod_l>: 8029368: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802936c: ed2d 8b0a vpush {d8-d12} 8029370: b097 sub sp, #92 @ 0x5c 8029372: 4688 mov r8, r1 8029374: 920e str r2, [sp, #56] @ 0x38 8029376: 2200 movs r2, #0 8029378: 9212 str r2, [sp, #72] @ 0x48 802937a: 9005 str r0, [sp, #20] 802937c: f04f 0a00 mov.w sl, #0 8029380: f04f 0b00 mov.w fp, #0 8029384: 460a mov r2, r1 8029386: 9211 str r2, [sp, #68] @ 0x44 8029388: 7811 ldrb r1, [r2, #0] 802938a: 292b cmp r1, #43 @ 0x2b 802938c: d04c beq.n 8029428 <_strtod_l+0xc0> 802938e: d839 bhi.n 8029404 <_strtod_l+0x9c> 8029390: 290d cmp r1, #13 8029392: d833 bhi.n 80293fc <_strtod_l+0x94> 8029394: 2908 cmp r1, #8 8029396: d833 bhi.n 8029400 <_strtod_l+0x98> 8029398: 2900 cmp r1, #0 802939a: d03c beq.n 8029416 <_strtod_l+0xae> 802939c: 2200 movs r2, #0 802939e: 9208 str r2, [sp, #32] 80293a0: 9d11 ldr r5, [sp, #68] @ 0x44 80293a2: 782a ldrb r2, [r5, #0] 80293a4: 2a30 cmp r2, #48 @ 0x30 80293a6: f040 80b5 bne.w 8029514 <_strtod_l+0x1ac> 80293aa: 786a ldrb r2, [r5, #1] 80293ac: f002 02df and.w r2, r2, #223 @ 0xdf 80293b0: 2a58 cmp r2, #88 @ 0x58 80293b2: d170 bne.n 8029496 <_strtod_l+0x12e> 80293b4: 9302 str r3, [sp, #8] 80293b6: 9b08 ldr r3, [sp, #32] 80293b8: 9301 str r3, [sp, #4] 80293ba: ab12 add r3, sp, #72 @ 0x48 80293bc: 9300 str r3, [sp, #0] 80293be: 4a8b ldr r2, [pc, #556] @ (80295ec <_strtod_l+0x284>) 80293c0: 9805 ldr r0, [sp, #20] 80293c2: ab13 add r3, sp, #76 @ 0x4c 80293c4: a911 add r1, sp, #68 @ 0x44 80293c6: f002 fbbb bl 802bb40 <__gethex> 80293ca: f010 060f ands.w r6, r0, #15 80293ce: 4604 mov r4, r0 80293d0: d005 beq.n 80293de <_strtod_l+0x76> 80293d2: 2e06 cmp r6, #6 80293d4: d12a bne.n 802942c <_strtod_l+0xc4> 80293d6: 3501 adds r5, #1 80293d8: 2300 movs r3, #0 80293da: 9511 str r5, [sp, #68] @ 0x44 80293dc: 9308 str r3, [sp, #32] 80293de: 9b0e ldr r3, [sp, #56] @ 0x38 80293e0: 2b00 cmp r3, #0 80293e2: f040 852f bne.w 8029e44 <_strtod_l+0xadc> 80293e6: 9b08 ldr r3, [sp, #32] 80293e8: ec4b ab10 vmov d0, sl, fp 80293ec: b1cb cbz r3, 8029422 <_strtod_l+0xba> 80293ee: eeb1 0b40 vneg.f64 d0, d0 80293f2: b017 add sp, #92 @ 0x5c 80293f4: ecbd 8b0a vpop {d8-d12} 80293f8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80293fc: 2920 cmp r1, #32 80293fe: d1cd bne.n 802939c <_strtod_l+0x34> 8029400: 3201 adds r2, #1 8029402: e7c0 b.n 8029386 <_strtod_l+0x1e> 8029404: 292d cmp r1, #45 @ 0x2d 8029406: d1c9 bne.n 802939c <_strtod_l+0x34> 8029408: 2101 movs r1, #1 802940a: 9108 str r1, [sp, #32] 802940c: 1c51 adds r1, r2, #1 802940e: 9111 str r1, [sp, #68] @ 0x44 8029410: 7852 ldrb r2, [r2, #1] 8029412: 2a00 cmp r2, #0 8029414: d1c4 bne.n 80293a0 <_strtod_l+0x38> 8029416: 9b0e ldr r3, [sp, #56] @ 0x38 8029418: f8cd 8044 str.w r8, [sp, #68] @ 0x44 802941c: 2b00 cmp r3, #0 802941e: f040 850f bne.w 8029e40 <_strtod_l+0xad8> 8029422: ec4b ab10 vmov d0, sl, fp 8029426: e7e4 b.n 80293f2 <_strtod_l+0x8a> 8029428: 2100 movs r1, #0 802942a: e7ee b.n 802940a <_strtod_l+0xa2> 802942c: 9a12 ldr r2, [sp, #72] @ 0x48 802942e: b13a cbz r2, 8029440 <_strtod_l+0xd8> 8029430: 2135 movs r1, #53 @ 0x35 8029432: a814 add r0, sp, #80 @ 0x50 8029434: f003 fad3 bl 802c9de <__copybits> 8029438: 9912 ldr r1, [sp, #72] @ 0x48 802943a: 9805 ldr r0, [sp, #20] 802943c: f002 fea4 bl 802c188 <_Bfree> 8029440: 1e73 subs r3, r6, #1 8029442: 9a13 ldr r2, [sp, #76] @ 0x4c 8029444: 2b04 cmp r3, #4 8029446: d806 bhi.n 8029456 <_strtod_l+0xee> 8029448: e8df f003 tbb [pc, r3] 802944c: 201d0314 .word 0x201d0314 8029450: 14 .byte 0x14 8029451: 00 .byte 0x00 8029452: e9dd ab14 ldrd sl, fp, [sp, #80] @ 0x50 8029456: 05e3 lsls r3, r4, #23 8029458: bf48 it mi 802945a: f04b 4b00 orrmi.w fp, fp, #2147483648 @ 0x80000000 802945e: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029462: 0d1b lsrs r3, r3, #20 8029464: 051b lsls r3, r3, #20 8029466: 2b00 cmp r3, #0 8029468: d1b9 bne.n 80293de <_strtod_l+0x76> 802946a: f001 fc73 bl 802ad54 <__errno> 802946e: 2322 movs r3, #34 @ 0x22 8029470: 6003 str r3, [r0, #0] 8029472: e7b4 b.n 80293de <_strtod_l+0x76> 8029474: e9dd a314 ldrd sl, r3, [sp, #80] @ 0x50 8029478: f202 4233 addw r2, r2, #1075 @ 0x433 802947c: f423 1380 bic.w r3, r3, #1048576 @ 0x100000 8029480: ea43 5b02 orr.w fp, r3, r2, lsl #20 8029484: e7e7 b.n 8029456 <_strtod_l+0xee> 8029486: f8df b16c ldr.w fp, [pc, #364] @ 80295f4 <_strtod_l+0x28c> 802948a: e7e4 b.n 8029456 <_strtod_l+0xee> 802948c: f06f 4b00 mvn.w fp, #2147483648 @ 0x80000000 8029490: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8029494: e7df b.n 8029456 <_strtod_l+0xee> 8029496: 9b11 ldr r3, [sp, #68] @ 0x44 8029498: 1c5a adds r2, r3, #1 802949a: 9211 str r2, [sp, #68] @ 0x44 802949c: 785b ldrb r3, [r3, #1] 802949e: 2b30 cmp r3, #48 @ 0x30 80294a0: d0f9 beq.n 8029496 <_strtod_l+0x12e> 80294a2: 2b00 cmp r3, #0 80294a4: d09b beq.n 80293de <_strtod_l+0x76> 80294a6: 2301 movs r3, #1 80294a8: 2600 movs r6, #0 80294aa: 9307 str r3, [sp, #28] 80294ac: 9b11 ldr r3, [sp, #68] @ 0x44 80294ae: 930a str r3, [sp, #40] @ 0x28 80294b0: 46b1 mov r9, r6 80294b2: 4635 mov r5, r6 80294b4: 220a movs r2, #10 80294b6: 9811 ldr r0, [sp, #68] @ 0x44 80294b8: 7804 ldrb r4, [r0, #0] 80294ba: f1a4 0330 sub.w r3, r4, #48 @ 0x30 80294be: b2d9 uxtb r1, r3 80294c0: 2909 cmp r1, #9 80294c2: d929 bls.n 8029518 <_strtod_l+0x1b0> 80294c4: 494a ldr r1, [pc, #296] @ (80295f0 <_strtod_l+0x288>) 80294c6: 2201 movs r2, #1 80294c8: f001 fb82 bl 802abd0 80294cc: b378 cbz r0, 802952e <_strtod_l+0x1c6> 80294ce: 2000 movs r0, #0 80294d0: 4622 mov r2, r4 80294d2: 462b mov r3, r5 80294d4: 4607 mov r7, r0 80294d6: 9006 str r0, [sp, #24] 80294d8: 2a65 cmp r2, #101 @ 0x65 80294da: d001 beq.n 80294e0 <_strtod_l+0x178> 80294dc: 2a45 cmp r2, #69 @ 0x45 80294de: d117 bne.n 8029510 <_strtod_l+0x1a8> 80294e0: b91b cbnz r3, 80294ea <_strtod_l+0x182> 80294e2: 9b07 ldr r3, [sp, #28] 80294e4: 4303 orrs r3, r0 80294e6: d096 beq.n 8029416 <_strtod_l+0xae> 80294e8: 2300 movs r3, #0 80294ea: f8dd 8044 ldr.w r8, [sp, #68] @ 0x44 80294ee: f108 0201 add.w r2, r8, #1 80294f2: 9211 str r2, [sp, #68] @ 0x44 80294f4: f898 2001 ldrb.w r2, [r8, #1] 80294f8: 2a2b cmp r2, #43 @ 0x2b 80294fa: d06b beq.n 80295d4 <_strtod_l+0x26c> 80294fc: 2a2d cmp r2, #45 @ 0x2d 80294fe: d071 beq.n 80295e4 <_strtod_l+0x27c> 8029500: f04f 0e00 mov.w lr, #0 8029504: f1a2 0430 sub.w r4, r2, #48 @ 0x30 8029508: 2c09 cmp r4, #9 802950a: d979 bls.n 8029600 <_strtod_l+0x298> 802950c: f8cd 8044 str.w r8, [sp, #68] @ 0x44 8029510: 2400 movs r4, #0 8029512: e094 b.n 802963e <_strtod_l+0x2d6> 8029514: 2300 movs r3, #0 8029516: e7c7 b.n 80294a8 <_strtod_l+0x140> 8029518: 2d08 cmp r5, #8 802951a: f100 0001 add.w r0, r0, #1 802951e: bfd4 ite le 8029520: fb02 3909 mlale r9, r2, r9, r3 8029524: fb02 3606 mlagt r6, r2, r6, r3 8029528: 3501 adds r5, #1 802952a: 9011 str r0, [sp, #68] @ 0x44 802952c: e7c3 b.n 80294b6 <_strtod_l+0x14e> 802952e: 9b11 ldr r3, [sp, #68] @ 0x44 8029530: 1c5a adds r2, r3, #1 8029532: 9211 str r2, [sp, #68] @ 0x44 8029534: 785a ldrb r2, [r3, #1] 8029536: b375 cbz r5, 8029596 <_strtod_l+0x22e> 8029538: 4607 mov r7, r0 802953a: 462b mov r3, r5 802953c: f1a2 0130 sub.w r1, r2, #48 @ 0x30 8029540: 2909 cmp r1, #9 8029542: d913 bls.n 802956c <_strtod_l+0x204> 8029544: 2101 movs r1, #1 8029546: 9106 str r1, [sp, #24] 8029548: e7c6 b.n 80294d8 <_strtod_l+0x170> 802954a: 9b11 ldr r3, [sp, #68] @ 0x44 802954c: 1c5a adds r2, r3, #1 802954e: 9211 str r2, [sp, #68] @ 0x44 8029550: 785a ldrb r2, [r3, #1] 8029552: 3001 adds r0, #1 8029554: 2a30 cmp r2, #48 @ 0x30 8029556: d0f8 beq.n 802954a <_strtod_l+0x1e2> 8029558: f1a2 0331 sub.w r3, r2, #49 @ 0x31 802955c: 2b08 cmp r3, #8 802955e: f200 8476 bhi.w 8029e4e <_strtod_l+0xae6> 8029562: 9b11 ldr r3, [sp, #68] @ 0x44 8029564: 930a str r3, [sp, #40] @ 0x28 8029566: 4607 mov r7, r0 8029568: 2000 movs r0, #0 802956a: 4603 mov r3, r0 802956c: 3a30 subs r2, #48 @ 0x30 802956e: f100 0101 add.w r1, r0, #1 8029572: d023 beq.n 80295bc <_strtod_l+0x254> 8029574: 440f add r7, r1 8029576: eb00 0c03 add.w ip, r0, r3 802957a: 4619 mov r1, r3 802957c: 240a movs r4, #10 802957e: 4561 cmp r1, ip 8029580: d10b bne.n 802959a <_strtod_l+0x232> 8029582: 1c5c adds r4, r3, #1 8029584: 4403 add r3, r0 8029586: 2b08 cmp r3, #8 8029588: 4404 add r4, r0 802958a: dc11 bgt.n 80295b0 <_strtod_l+0x248> 802958c: 230a movs r3, #10 802958e: fb03 2909 mla r9, r3, r9, r2 8029592: 2100 movs r1, #0 8029594: e013 b.n 80295be <_strtod_l+0x256> 8029596: 4628 mov r0, r5 8029598: e7dc b.n 8029554 <_strtod_l+0x1ec> 802959a: 2908 cmp r1, #8 802959c: f101 0101 add.w r1, r1, #1 80295a0: dc02 bgt.n 80295a8 <_strtod_l+0x240> 80295a2: fb04 f909 mul.w r9, r4, r9 80295a6: e7ea b.n 802957e <_strtod_l+0x216> 80295a8: 2910 cmp r1, #16 80295aa: bfd8 it le 80295ac: 4366 mulle r6, r4 80295ae: e7e6 b.n 802957e <_strtod_l+0x216> 80295b0: 2b0f cmp r3, #15 80295b2: dcee bgt.n 8029592 <_strtod_l+0x22a> 80295b4: 230a movs r3, #10 80295b6: fb03 2606 mla r6, r3, r6, r2 80295ba: e7ea b.n 8029592 <_strtod_l+0x22a> 80295bc: 461c mov r4, r3 80295be: 9b11 ldr r3, [sp, #68] @ 0x44 80295c0: 1c5a adds r2, r3, #1 80295c2: 9211 str r2, [sp, #68] @ 0x44 80295c4: 785a ldrb r2, [r3, #1] 80295c6: 4608 mov r0, r1 80295c8: 4623 mov r3, r4 80295ca: e7b7 b.n 802953c <_strtod_l+0x1d4> 80295cc: 2301 movs r3, #1 80295ce: 2700 movs r7, #0 80295d0: 9306 str r3, [sp, #24] 80295d2: e786 b.n 80294e2 <_strtod_l+0x17a> 80295d4: f04f 0e00 mov.w lr, #0 80295d8: f108 0202 add.w r2, r8, #2 80295dc: 9211 str r2, [sp, #68] @ 0x44 80295de: f898 2002 ldrb.w r2, [r8, #2] 80295e2: e78f b.n 8029504 <_strtod_l+0x19c> 80295e4: f04f 0e01 mov.w lr, #1 80295e8: e7f6 b.n 80295d8 <_strtod_l+0x270> 80295ea: bf00 nop 80295ec: 08031d44 .word 0x08031d44 80295f0: 08031d2d .word 0x08031d2d 80295f4: 7ff00000 .word 0x7ff00000 80295f8: 9a11 ldr r2, [sp, #68] @ 0x44 80295fa: 1c54 adds r4, r2, #1 80295fc: 9411 str r4, [sp, #68] @ 0x44 80295fe: 7852 ldrb r2, [r2, #1] 8029600: 2a30 cmp r2, #48 @ 0x30 8029602: d0f9 beq.n 80295f8 <_strtod_l+0x290> 8029604: f1a2 0431 sub.w r4, r2, #49 @ 0x31 8029608: 2c08 cmp r4, #8 802960a: d881 bhi.n 8029510 <_strtod_l+0x1a8> 802960c: f1a2 0c30 sub.w ip, r2, #48 @ 0x30 8029610: 9a11 ldr r2, [sp, #68] @ 0x44 8029612: 9209 str r2, [sp, #36] @ 0x24 8029614: 9a11 ldr r2, [sp, #68] @ 0x44 8029616: 1c51 adds r1, r2, #1 8029618: 9111 str r1, [sp, #68] @ 0x44 802961a: 7852 ldrb r2, [r2, #1] 802961c: f1a2 0430 sub.w r4, r2, #48 @ 0x30 8029620: 2c09 cmp r4, #9 8029622: d938 bls.n 8029696 <_strtod_l+0x32e> 8029624: 9c09 ldr r4, [sp, #36] @ 0x24 8029626: 1b0c subs r4, r1, r4 8029628: 2c08 cmp r4, #8 802962a: f644 641f movw r4, #19999 @ 0x4e1f 802962e: dc02 bgt.n 8029636 <_strtod_l+0x2ce> 8029630: 4564 cmp r4, ip 8029632: bfa8 it ge 8029634: 4664 movge r4, ip 8029636: f1be 0f00 cmp.w lr, #0 802963a: d000 beq.n 802963e <_strtod_l+0x2d6> 802963c: 4264 negs r4, r4 802963e: 2b00 cmp r3, #0 8029640: d14e bne.n 80296e0 <_strtod_l+0x378> 8029642: 9b07 ldr r3, [sp, #28] 8029644: 4318 orrs r0, r3 8029646: f47f aeca bne.w 80293de <_strtod_l+0x76> 802964a: 9b06 ldr r3, [sp, #24] 802964c: 2b00 cmp r3, #0 802964e: f47f aee2 bne.w 8029416 <_strtod_l+0xae> 8029652: 2a69 cmp r2, #105 @ 0x69 8029654: d027 beq.n 80296a6 <_strtod_l+0x33e> 8029656: dc24 bgt.n 80296a2 <_strtod_l+0x33a> 8029658: 2a49 cmp r2, #73 @ 0x49 802965a: d024 beq.n 80296a6 <_strtod_l+0x33e> 802965c: 2a4e cmp r2, #78 @ 0x4e 802965e: f47f aeda bne.w 8029416 <_strtod_l+0xae> 8029662: 4997 ldr r1, [pc, #604] @ (80298c0 <_strtod_l+0x558>) 8029664: a811 add r0, sp, #68 @ 0x44 8029666: f002 fc8d bl 802bf84 <__match> 802966a: 2800 cmp r0, #0 802966c: f43f aed3 beq.w 8029416 <_strtod_l+0xae> 8029670: 9b11 ldr r3, [sp, #68] @ 0x44 8029672: 781b ldrb r3, [r3, #0] 8029674: 2b28 cmp r3, #40 @ 0x28 8029676: d12d bne.n 80296d4 <_strtod_l+0x36c> 8029678: 4992 ldr r1, [pc, #584] @ (80298c4 <_strtod_l+0x55c>) 802967a: aa14 add r2, sp, #80 @ 0x50 802967c: a811 add r0, sp, #68 @ 0x44 802967e: f002 fc95 bl 802bfac <__hexnan> 8029682: 2805 cmp r0, #5 8029684: d126 bne.n 80296d4 <_strtod_l+0x36c> 8029686: 9b15 ldr r3, [sp, #84] @ 0x54 8029688: f8dd a050 ldr.w sl, [sp, #80] @ 0x50 802968c: f043 4bff orr.w fp, r3, #2139095040 @ 0x7f800000 8029690: f44b 0be0 orr.w fp, fp, #7340032 @ 0x700000 8029694: e6a3 b.n 80293de <_strtod_l+0x76> 8029696: 240a movs r4, #10 8029698: fb04 2c0c mla ip, r4, ip, r2 802969c: f1ac 0c30 sub.w ip, ip, #48 @ 0x30 80296a0: e7b8 b.n 8029614 <_strtod_l+0x2ac> 80296a2: 2a6e cmp r2, #110 @ 0x6e 80296a4: e7db b.n 802965e <_strtod_l+0x2f6> 80296a6: 4988 ldr r1, [pc, #544] @ (80298c8 <_strtod_l+0x560>) 80296a8: a811 add r0, sp, #68 @ 0x44 80296aa: f002 fc6b bl 802bf84 <__match> 80296ae: 2800 cmp r0, #0 80296b0: f43f aeb1 beq.w 8029416 <_strtod_l+0xae> 80296b4: 9b11 ldr r3, [sp, #68] @ 0x44 80296b6: 4985 ldr r1, [pc, #532] @ (80298cc <_strtod_l+0x564>) 80296b8: 3b01 subs r3, #1 80296ba: a811 add r0, sp, #68 @ 0x44 80296bc: 9311 str r3, [sp, #68] @ 0x44 80296be: f002 fc61 bl 802bf84 <__match> 80296c2: b910 cbnz r0, 80296ca <_strtod_l+0x362> 80296c4: 9b11 ldr r3, [sp, #68] @ 0x44 80296c6: 3301 adds r3, #1 80296c8: 9311 str r3, [sp, #68] @ 0x44 80296ca: f8df b214 ldr.w fp, [pc, #532] @ 80298e0 <_strtod_l+0x578> 80296ce: f04f 0a00 mov.w sl, #0 80296d2: e684 b.n 80293de <_strtod_l+0x76> 80296d4: 487e ldr r0, [pc, #504] @ (80298d0 <_strtod_l+0x568>) 80296d6: f001 fb7b bl 802add0 80296da: ec5b ab10 vmov sl, fp, d0 80296de: e67e b.n 80293de <_strtod_l+0x76> 80296e0: ee07 9a90 vmov s15, r9 80296e4: 1be2 subs r2, r4, r7 80296e6: eeb8 7b67 vcvt.f64.u32 d7, s15 80296ea: 2d00 cmp r5, #0 80296ec: bf08 it eq 80296ee: 461d moveq r5, r3 80296f0: 2b10 cmp r3, #16 80296f2: 9209 str r2, [sp, #36] @ 0x24 80296f4: 461a mov r2, r3 80296f6: bfa8 it ge 80296f8: 2210 movge r2, #16 80296fa: 2b09 cmp r3, #9 80296fc: ec5b ab17 vmov sl, fp, d7 8029700: dc15 bgt.n 802972e <_strtod_l+0x3c6> 8029702: 1be1 subs r1, r4, r7 8029704: 2900 cmp r1, #0 8029706: f43f ae6a beq.w 80293de <_strtod_l+0x76> 802970a: eba4 0107 sub.w r1, r4, r7 802970e: dd72 ble.n 80297f6 <_strtod_l+0x48e> 8029710: 2916 cmp r1, #22 8029712: dc59 bgt.n 80297c8 <_strtod_l+0x460> 8029714: 4b6f ldr r3, [pc, #444] @ (80298d4 <_strtod_l+0x56c>) 8029716: 9a09 ldr r2, [sp, #36] @ 0x24 8029718: eb03 03c2 add.w r3, r3, r2, lsl #3 802971c: ed93 7b00 vldr d7, [r3] 8029720: ec4b ab16 vmov d6, sl, fp 8029724: ee27 7b06 vmul.f64 d7, d7, d6 8029728: ec5b ab17 vmov sl, fp, d7 802972c: e657 b.n 80293de <_strtod_l+0x76> 802972e: 4969 ldr r1, [pc, #420] @ (80298d4 <_strtod_l+0x56c>) 8029730: eb01 01c2 add.w r1, r1, r2, lsl #3 8029734: ed11 5b12 vldr d5, [r1, #-72] @ 0xffffffb8 8029738: ee06 6a90 vmov s13, r6 802973c: 2b0f cmp r3, #15 802973e: eeb8 6b66 vcvt.f64.u32 d6, s13 8029742: eea7 6b05 vfma.f64 d6, d7, d5 8029746: ec5b ab16 vmov sl, fp, d6 802974a: ddda ble.n 8029702 <_strtod_l+0x39a> 802974c: 1a9a subs r2, r3, r2 802974e: 1be1 subs r1, r4, r7 8029750: 440a add r2, r1 8029752: 2a00 cmp r2, #0 8029754: f340 8094 ble.w 8029880 <_strtod_l+0x518> 8029758: f012 000f ands.w r0, r2, #15 802975c: d00a beq.n 8029774 <_strtod_l+0x40c> 802975e: 495d ldr r1, [pc, #372] @ (80298d4 <_strtod_l+0x56c>) 8029760: eb01 01c0 add.w r1, r1, r0, lsl #3 8029764: ed91 7b00 vldr d7, [r1] 8029768: ec4b ab16 vmov d6, sl, fp 802976c: ee27 7b06 vmul.f64 d7, d7, d6 8029770: ec5b ab17 vmov sl, fp, d7 8029774: f032 020f bics.w r2, r2, #15 8029778: d073 beq.n 8029862 <_strtod_l+0x4fa> 802977a: f5b2 7f9a cmp.w r2, #308 @ 0x134 802977e: dd47 ble.n 8029810 <_strtod_l+0x4a8> 8029780: 2400 movs r4, #0 8029782: 4625 mov r5, r4 8029784: 9407 str r4, [sp, #28] 8029786: 4626 mov r6, r4 8029788: 9a05 ldr r2, [sp, #20] 802978a: f8df b154 ldr.w fp, [pc, #340] @ 80298e0 <_strtod_l+0x578> 802978e: 2322 movs r3, #34 @ 0x22 8029790: 6013 str r3, [r2, #0] 8029792: f04f 0a00 mov.w sl, #0 8029796: 9b07 ldr r3, [sp, #28] 8029798: 2b00 cmp r3, #0 802979a: f43f ae20 beq.w 80293de <_strtod_l+0x76> 802979e: 9912 ldr r1, [sp, #72] @ 0x48 80297a0: 9805 ldr r0, [sp, #20] 80297a2: f002 fcf1 bl 802c188 <_Bfree> 80297a6: 9805 ldr r0, [sp, #20] 80297a8: 4631 mov r1, r6 80297aa: f002 fced bl 802c188 <_Bfree> 80297ae: 9805 ldr r0, [sp, #20] 80297b0: 4629 mov r1, r5 80297b2: f002 fce9 bl 802c188 <_Bfree> 80297b6: 9907 ldr r1, [sp, #28] 80297b8: 9805 ldr r0, [sp, #20] 80297ba: f002 fce5 bl 802c188 <_Bfree> 80297be: 9805 ldr r0, [sp, #20] 80297c0: 4621 mov r1, r4 80297c2: f002 fce1 bl 802c188 <_Bfree> 80297c6: e60a b.n 80293de <_strtod_l+0x76> 80297c8: f1c3 0125 rsb r1, r3, #37 @ 0x25 80297cc: 1be0 subs r0, r4, r7 80297ce: 4281 cmp r1, r0 80297d0: dbbc blt.n 802974c <_strtod_l+0x3e4> 80297d2: 4a40 ldr r2, [pc, #256] @ (80298d4 <_strtod_l+0x56c>) 80297d4: f1c3 030f rsb r3, r3, #15 80297d8: eb02 01c3 add.w r1, r2, r3, lsl #3 80297dc: ed91 7b00 vldr d7, [r1] 80297e0: 9909 ldr r1, [sp, #36] @ 0x24 80297e2: ec4b ab16 vmov d6, sl, fp 80297e6: 1acb subs r3, r1, r3 80297e8: eb02 02c3 add.w r2, r2, r3, lsl #3 80297ec: ee27 7b06 vmul.f64 d7, d7, d6 80297f0: ed92 6b00 vldr d6, [r2] 80297f4: e796 b.n 8029724 <_strtod_l+0x3bc> 80297f6: 3116 adds r1, #22 80297f8: dba8 blt.n 802974c <_strtod_l+0x3e4> 80297fa: 4b36 ldr r3, [pc, #216] @ (80298d4 <_strtod_l+0x56c>) 80297fc: 1b3c subs r4, r7, r4 80297fe: eb03 04c4 add.w r4, r3, r4, lsl #3 8029802: ed94 7b00 vldr d7, [r4] 8029806: ec4b ab16 vmov d6, sl, fp 802980a: ee86 7b07 vdiv.f64 d7, d6, d7 802980e: e78b b.n 8029728 <_strtod_l+0x3c0> 8029810: 2000 movs r0, #0 8029812: ec4b ab17 vmov d7, sl, fp 8029816: 4e30 ldr r6, [pc, #192] @ (80298d8 <_strtod_l+0x570>) 8029818: 1112 asrs r2, r2, #4 802981a: 4601 mov r1, r0 802981c: 2a01 cmp r2, #1 802981e: dc23 bgt.n 8029868 <_strtod_l+0x500> 8029820: b108 cbz r0, 8029826 <_strtod_l+0x4be> 8029822: ec5b ab17 vmov sl, fp, d7 8029826: 4a2c ldr r2, [pc, #176] @ (80298d8 <_strtod_l+0x570>) 8029828: 482c ldr r0, [pc, #176] @ (80298dc <_strtod_l+0x574>) 802982a: eb02 02c1 add.w r2, r2, r1, lsl #3 802982e: ed92 7b00 vldr d7, [r2] 8029832: f1ab 7b54 sub.w fp, fp, #55574528 @ 0x3500000 8029836: ec4b ab16 vmov d6, sl, fp 802983a: 4a29 ldr r2, [pc, #164] @ (80298e0 <_strtod_l+0x578>) 802983c: ee27 7b06 vmul.f64 d7, d7, d6 8029840: ee17 1a90 vmov r1, s15 8029844: 400a ands r2, r1 8029846: 4282 cmp r2, r0 8029848: ec5b ab17 vmov sl, fp, d7 802984c: d898 bhi.n 8029780 <_strtod_l+0x418> 802984e: f5a0 1080 sub.w r0, r0, #1048576 @ 0x100000 8029852: 4282 cmp r2, r0 8029854: bf86 itte hi 8029856: f8df b08c ldrhi.w fp, [pc, #140] @ 80298e4 <_strtod_l+0x57c> 802985a: f04f 3aff movhi.w sl, #4294967295 @ 0xffffffff 802985e: f101 7b54 addls.w fp, r1, #55574528 @ 0x3500000 8029862: 2200 movs r2, #0 8029864: 9206 str r2, [sp, #24] 8029866: e076 b.n 8029956 <_strtod_l+0x5ee> 8029868: f012 0f01 tst.w r2, #1 802986c: d004 beq.n 8029878 <_strtod_l+0x510> 802986e: ed96 6b00 vldr d6, [r6] 8029872: 2001 movs r0, #1 8029874: ee27 7b06 vmul.f64 d7, d7, d6 8029878: 3101 adds r1, #1 802987a: 1052 asrs r2, r2, #1 802987c: 3608 adds r6, #8 802987e: e7cd b.n 802981c <_strtod_l+0x4b4> 8029880: d0ef beq.n 8029862 <_strtod_l+0x4fa> 8029882: 4252 negs r2, r2 8029884: f012 000f ands.w r0, r2, #15 8029888: d00a beq.n 80298a0 <_strtod_l+0x538> 802988a: 4912 ldr r1, [pc, #72] @ (80298d4 <_strtod_l+0x56c>) 802988c: eb01 01c0 add.w r1, r1, r0, lsl #3 8029890: ed91 7b00 vldr d7, [r1] 8029894: ec4b ab16 vmov d6, sl, fp 8029898: ee86 7b07 vdiv.f64 d7, d6, d7 802989c: ec5b ab17 vmov sl, fp, d7 80298a0: 1112 asrs r2, r2, #4 80298a2: d0de beq.n 8029862 <_strtod_l+0x4fa> 80298a4: 2a1f cmp r2, #31 80298a6: dd1f ble.n 80298e8 <_strtod_l+0x580> 80298a8: 2400 movs r4, #0 80298aa: 4625 mov r5, r4 80298ac: 9407 str r4, [sp, #28] 80298ae: 4626 mov r6, r4 80298b0: 9a05 ldr r2, [sp, #20] 80298b2: 2322 movs r3, #34 @ 0x22 80298b4: f04f 0a00 mov.w sl, #0 80298b8: f04f 0b00 mov.w fp, #0 80298bc: 6013 str r3, [r2, #0] 80298be: e76a b.n 8029796 <_strtod_l+0x42e> 80298c0: 08031e8e .word 0x08031e8e 80298c4: 08031d30 .word 0x08031d30 80298c8: 08031e86 .word 0x08031e86 80298cc: 08031efc .word 0x08031efc 80298d0: 08031ef8 .word 0x08031ef8 80298d4: 08032060 .word 0x08032060 80298d8: 08032038 .word 0x08032038 80298dc: 7ca00000 .word 0x7ca00000 80298e0: 7ff00000 .word 0x7ff00000 80298e4: 7fefffff .word 0x7fefffff 80298e8: f012 0110 ands.w r1, r2, #16 80298ec: bf18 it ne 80298ee: 216a movne r1, #106 @ 0x6a 80298f0: 9106 str r1, [sp, #24] 80298f2: ec4b ab17 vmov d7, sl, fp 80298f6: 49b0 ldr r1, [pc, #704] @ (8029bb8 <_strtod_l+0x850>) 80298f8: 2000 movs r0, #0 80298fa: 07d6 lsls r6, r2, #31 80298fc: d504 bpl.n 8029908 <_strtod_l+0x5a0> 80298fe: ed91 6b00 vldr d6, [r1] 8029902: 2001 movs r0, #1 8029904: ee27 7b06 vmul.f64 d7, d7, d6 8029908: 1052 asrs r2, r2, #1 802990a: f101 0108 add.w r1, r1, #8 802990e: d1f4 bne.n 80298fa <_strtod_l+0x592> 8029910: b108 cbz r0, 8029916 <_strtod_l+0x5ae> 8029912: ec5b ab17 vmov sl, fp, d7 8029916: 9a06 ldr r2, [sp, #24] 8029918: b1b2 cbz r2, 8029948 <_strtod_l+0x5e0> 802991a: f3cb 510a ubfx r1, fp, #20, #11 802991e: f1c1 026b rsb r2, r1, #107 @ 0x6b 8029922: 2a00 cmp r2, #0 8029924: 4658 mov r0, fp 8029926: dd0f ble.n 8029948 <_strtod_l+0x5e0> 8029928: 2a1f cmp r2, #31 802992a: dd55 ble.n 80299d8 <_strtod_l+0x670> 802992c: 2a34 cmp r2, #52 @ 0x34 802992e: bfde ittt le 8029930: f04f 32ff movle.w r2, #4294967295 @ 0xffffffff 8029934: f1c1 014b rsble r1, r1, #75 @ 0x4b 8029938: 408a lslle r2, r1 802993a: f04f 0a00 mov.w sl, #0 802993e: bfcc ite gt 8029940: f04f 7b5c movgt.w fp, #57671680 @ 0x3700000 8029944: ea02 0b00 andle.w fp, r2, r0 8029948: ec4b ab17 vmov d7, sl, fp 802994c: eeb5 7b40 vcmp.f64 d7, #0.0 8029950: eef1 fa10 vmrs APSR_nzcv, fpscr 8029954: d0a8 beq.n 80298a8 <_strtod_l+0x540> 8029956: 990a ldr r1, [sp, #40] @ 0x28 8029958: 9805 ldr r0, [sp, #20] 802995a: f8cd 9000 str.w r9, [sp] 802995e: 462a mov r2, r5 8029960: f002 fc7a bl 802c258 <__s2b> 8029964: 9007 str r0, [sp, #28] 8029966: 2800 cmp r0, #0 8029968: f43f af0a beq.w 8029780 <_strtod_l+0x418> 802996c: 9b09 ldr r3, [sp, #36] @ 0x24 802996e: 1b3f subs r7, r7, r4 8029970: 2b00 cmp r3, #0 8029972: bfb4 ite lt 8029974: 463b movlt r3, r7 8029976: 2300 movge r3, #0 8029978: 930a str r3, [sp, #40] @ 0x28 802997a: 9b09 ldr r3, [sp, #36] @ 0x24 802997c: ed9f bb8a vldr d11, [pc, #552] @ 8029ba8 <_strtod_l+0x840> 8029980: ea23 73e3 bic.w r3, r3, r3, asr #31 8029984: 2400 movs r4, #0 8029986: 930d str r3, [sp, #52] @ 0x34 8029988: 4625 mov r5, r4 802998a: 9b07 ldr r3, [sp, #28] 802998c: 9805 ldr r0, [sp, #20] 802998e: 6859 ldr r1, [r3, #4] 8029990: f002 fbba bl 802c108 <_Balloc> 8029994: 4606 mov r6, r0 8029996: 2800 cmp r0, #0 8029998: f43f aef6 beq.w 8029788 <_strtod_l+0x420> 802999c: 9b07 ldr r3, [sp, #28] 802999e: 691a ldr r2, [r3, #16] 80299a0: ec4b ab19 vmov d9, sl, fp 80299a4: 3202 adds r2, #2 80299a6: f103 010c add.w r1, r3, #12 80299aa: 0092 lsls r2, r2, #2 80299ac: 300c adds r0, #12 80299ae: f001 f9fe bl 802adae 80299b2: eeb0 0b49 vmov.f64 d0, d9 80299b6: 9805 ldr r0, [sp, #20] 80299b8: aa14 add r2, sp, #80 @ 0x50 80299ba: a913 add r1, sp, #76 @ 0x4c 80299bc: f002 ff88 bl 802c8d0 <__d2b> 80299c0: 9012 str r0, [sp, #72] @ 0x48 80299c2: 2800 cmp r0, #0 80299c4: f43f aee0 beq.w 8029788 <_strtod_l+0x420> 80299c8: 9805 ldr r0, [sp, #20] 80299ca: 2101 movs r1, #1 80299cc: f002 fcda bl 802c384 <__i2b> 80299d0: 4605 mov r5, r0 80299d2: b940 cbnz r0, 80299e6 <_strtod_l+0x67e> 80299d4: 2500 movs r5, #0 80299d6: e6d7 b.n 8029788 <_strtod_l+0x420> 80299d8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 80299dc: fa01 f202 lsl.w r2, r1, r2 80299e0: ea02 0a0a and.w sl, r2, sl 80299e4: e7b0 b.n 8029948 <_strtod_l+0x5e0> 80299e6: 9f13 ldr r7, [sp, #76] @ 0x4c 80299e8: 9a14 ldr r2, [sp, #80] @ 0x50 80299ea: 2f00 cmp r7, #0 80299ec: bfab itete ge 80299ee: 9b0a ldrge r3, [sp, #40] @ 0x28 80299f0: 9b0d ldrlt r3, [sp, #52] @ 0x34 80299f2: f8dd 8034 ldrge.w r8, [sp, #52] @ 0x34 80299f6: f8dd 9028 ldrlt.w r9, [sp, #40] @ 0x28 80299fa: bfac ite ge 80299fc: eb07 0903 addge.w r9, r7, r3 8029a00: eba3 0807 sublt.w r8, r3, r7 8029a04: 9b06 ldr r3, [sp, #24] 8029a06: 1aff subs r7, r7, r3 8029a08: 4417 add r7, r2 8029a0a: f1c2 0336 rsb r3, r2, #54 @ 0x36 8029a0e: 4a6b ldr r2, [pc, #428] @ (8029bbc <_strtod_l+0x854>) 8029a10: 3f01 subs r7, #1 8029a12: 4297 cmp r7, r2 8029a14: da51 bge.n 8029aba <_strtod_l+0x752> 8029a16: 1bd1 subs r1, r2, r7 8029a18: 291f cmp r1, #31 8029a1a: eba3 0301 sub.w r3, r3, r1 8029a1e: f04f 0201 mov.w r2, #1 8029a22: dc3e bgt.n 8029aa2 <_strtod_l+0x73a> 8029a24: 408a lsls r2, r1 8029a26: 920c str r2, [sp, #48] @ 0x30 8029a28: 2200 movs r2, #0 8029a2a: 920b str r2, [sp, #44] @ 0x2c 8029a2c: eb09 0703 add.w r7, r9, r3 8029a30: 4498 add r8, r3 8029a32: 9b06 ldr r3, [sp, #24] 8029a34: 45b9 cmp r9, r7 8029a36: 4498 add r8, r3 8029a38: 464b mov r3, r9 8029a3a: bfa8 it ge 8029a3c: 463b movge r3, r7 8029a3e: 4543 cmp r3, r8 8029a40: bfa8 it ge 8029a42: 4643 movge r3, r8 8029a44: 2b00 cmp r3, #0 8029a46: bfc2 ittt gt 8029a48: 1aff subgt r7, r7, r3 8029a4a: eba8 0803 subgt.w r8, r8, r3 8029a4e: eba9 0903 subgt.w r9, r9, r3 8029a52: 9b0a ldr r3, [sp, #40] @ 0x28 8029a54: 2b00 cmp r3, #0 8029a56: dd16 ble.n 8029a86 <_strtod_l+0x71e> 8029a58: 4629 mov r1, r5 8029a5a: 9805 ldr r0, [sp, #20] 8029a5c: 461a mov r2, r3 8029a5e: f002 fd51 bl 802c504 <__pow5mult> 8029a62: 4605 mov r5, r0 8029a64: 2800 cmp r0, #0 8029a66: d0b5 beq.n 80299d4 <_strtod_l+0x66c> 8029a68: 4601 mov r1, r0 8029a6a: 9a12 ldr r2, [sp, #72] @ 0x48 8029a6c: 9805 ldr r0, [sp, #20] 8029a6e: f002 fc9f bl 802c3b0 <__multiply> 8029a72: 900f str r0, [sp, #60] @ 0x3c 8029a74: 2800 cmp r0, #0 8029a76: f43f ae87 beq.w 8029788 <_strtod_l+0x420> 8029a7a: 9912 ldr r1, [sp, #72] @ 0x48 8029a7c: 9805 ldr r0, [sp, #20] 8029a7e: f002 fb83 bl 802c188 <_Bfree> 8029a82: 9b0f ldr r3, [sp, #60] @ 0x3c 8029a84: 9312 str r3, [sp, #72] @ 0x48 8029a86: 2f00 cmp r7, #0 8029a88: dc1b bgt.n 8029ac2 <_strtod_l+0x75a> 8029a8a: 9b09 ldr r3, [sp, #36] @ 0x24 8029a8c: 2b00 cmp r3, #0 8029a8e: dd21 ble.n 8029ad4 <_strtod_l+0x76c> 8029a90: 4631 mov r1, r6 8029a92: 9a0d ldr r2, [sp, #52] @ 0x34 8029a94: 9805 ldr r0, [sp, #20] 8029a96: f002 fd35 bl 802c504 <__pow5mult> 8029a9a: 4606 mov r6, r0 8029a9c: b9d0 cbnz r0, 8029ad4 <_strtod_l+0x76c> 8029a9e: 2600 movs r6, #0 8029aa0: e672 b.n 8029788 <_strtod_l+0x420> 8029aa2: f1c7 477f rsb r7, r7, #4278190080 @ 0xff000000 8029aa6: f507 077f add.w r7, r7, #16711680 @ 0xff0000 8029aaa: f507 477b add.w r7, r7, #64256 @ 0xfb00 8029aae: 37e2 adds r7, #226 @ 0xe2 8029ab0: fa02 f107 lsl.w r1, r2, r7 8029ab4: 910b str r1, [sp, #44] @ 0x2c 8029ab6: 920c str r2, [sp, #48] @ 0x30 8029ab8: e7b8 b.n 8029a2c <_strtod_l+0x6c4> 8029aba: 2200 movs r2, #0 8029abc: 920b str r2, [sp, #44] @ 0x2c 8029abe: 2201 movs r2, #1 8029ac0: e7f9 b.n 8029ab6 <_strtod_l+0x74e> 8029ac2: 9912 ldr r1, [sp, #72] @ 0x48 8029ac4: 9805 ldr r0, [sp, #20] 8029ac6: 463a mov r2, r7 8029ac8: f002 fd76 bl 802c5b8 <__lshift> 8029acc: 9012 str r0, [sp, #72] @ 0x48 8029ace: 2800 cmp r0, #0 8029ad0: d1db bne.n 8029a8a <_strtod_l+0x722> 8029ad2: e659 b.n 8029788 <_strtod_l+0x420> 8029ad4: f1b8 0f00 cmp.w r8, #0 8029ad8: dd07 ble.n 8029aea <_strtod_l+0x782> 8029ada: 4631 mov r1, r6 8029adc: 9805 ldr r0, [sp, #20] 8029ade: 4642 mov r2, r8 8029ae0: f002 fd6a bl 802c5b8 <__lshift> 8029ae4: 4606 mov r6, r0 8029ae6: 2800 cmp r0, #0 8029ae8: d0d9 beq.n 8029a9e <_strtod_l+0x736> 8029aea: f1b9 0f00 cmp.w r9, #0 8029aee: dd08 ble.n 8029b02 <_strtod_l+0x79a> 8029af0: 4629 mov r1, r5 8029af2: 9805 ldr r0, [sp, #20] 8029af4: 464a mov r2, r9 8029af6: f002 fd5f bl 802c5b8 <__lshift> 8029afa: 4605 mov r5, r0 8029afc: 2800 cmp r0, #0 8029afe: f43f ae43 beq.w 8029788 <_strtod_l+0x420> 8029b02: 9912 ldr r1, [sp, #72] @ 0x48 8029b04: 9805 ldr r0, [sp, #20] 8029b06: 4632 mov r2, r6 8029b08: f002 fdde bl 802c6c8 <__mdiff> 8029b0c: 4604 mov r4, r0 8029b0e: 2800 cmp r0, #0 8029b10: f43f ae3a beq.w 8029788 <_strtod_l+0x420> 8029b14: 2300 movs r3, #0 8029b16: f8d0 800c ldr.w r8, [r0, #12] 8029b1a: 60c3 str r3, [r0, #12] 8029b1c: 4629 mov r1, r5 8029b1e: f002 fdb7 bl 802c690 <__mcmp> 8029b22: 2800 cmp r0, #0 8029b24: da4e bge.n 8029bc4 <_strtod_l+0x85c> 8029b26: ea58 080a orrs.w r8, r8, sl 8029b2a: d174 bne.n 8029c16 <_strtod_l+0x8ae> 8029b2c: f3cb 0313 ubfx r3, fp, #0, #20 8029b30: 2b00 cmp r3, #0 8029b32: d170 bne.n 8029c16 <_strtod_l+0x8ae> 8029b34: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029b38: 0d1b lsrs r3, r3, #20 8029b3a: 051b lsls r3, r3, #20 8029b3c: f1b3 6fd6 cmp.w r3, #112197632 @ 0x6b00000 8029b40: d969 bls.n 8029c16 <_strtod_l+0x8ae> 8029b42: 6963 ldr r3, [r4, #20] 8029b44: b913 cbnz r3, 8029b4c <_strtod_l+0x7e4> 8029b46: 6923 ldr r3, [r4, #16] 8029b48: 2b01 cmp r3, #1 8029b4a: dd64 ble.n 8029c16 <_strtod_l+0x8ae> 8029b4c: 4621 mov r1, r4 8029b4e: 2201 movs r2, #1 8029b50: 9805 ldr r0, [sp, #20] 8029b52: f002 fd31 bl 802c5b8 <__lshift> 8029b56: 4629 mov r1, r5 8029b58: 4604 mov r4, r0 8029b5a: f002 fd99 bl 802c690 <__mcmp> 8029b5e: 2800 cmp r0, #0 8029b60: dd59 ble.n 8029c16 <_strtod_l+0x8ae> 8029b62: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029b66: 9a06 ldr r2, [sp, #24] 8029b68: 0d1b lsrs r3, r3, #20 8029b6a: 051b lsls r3, r3, #20 8029b6c: 2a00 cmp r2, #0 8029b6e: d070 beq.n 8029c52 <_strtod_l+0x8ea> 8029b70: f1b3 6fd6 cmp.w r3, #112197632 @ 0x6b00000 8029b74: d86d bhi.n 8029c52 <_strtod_l+0x8ea> 8029b76: f1b3 7f5c cmp.w r3, #57671680 @ 0x3700000 8029b7a: f67f ae99 bls.w 80298b0 <_strtod_l+0x548> 8029b7e: ed9f 7b0c vldr d7, [pc, #48] @ 8029bb0 <_strtod_l+0x848> 8029b82: ec4b ab16 vmov d6, sl, fp 8029b86: 4b0e ldr r3, [pc, #56] @ (8029bc0 <_strtod_l+0x858>) 8029b88: ee26 7b07 vmul.f64 d7, d6, d7 8029b8c: ee17 2a90 vmov r2, s15 8029b90: 4013 ands r3, r2 8029b92: ec5b ab17 vmov sl, fp, d7 8029b96: 2b00 cmp r3, #0 8029b98: f47f ae01 bne.w 802979e <_strtod_l+0x436> 8029b9c: 9a05 ldr r2, [sp, #20] 8029b9e: 2322 movs r3, #34 @ 0x22 8029ba0: 6013 str r3, [r2, #0] 8029ba2: e5fc b.n 802979e <_strtod_l+0x436> 8029ba4: f3af 8000 nop.w 8029ba8: ffc00000 .word 0xffc00000 8029bac: 41dfffff .word 0x41dfffff 8029bb0: 00000000 .word 0x00000000 8029bb4: 39500000 .word 0x39500000 8029bb8: 08031d58 .word 0x08031d58 8029bbc: fffffc02 .word 0xfffffc02 8029bc0: 7ff00000 .word 0x7ff00000 8029bc4: 46d9 mov r9, fp 8029bc6: d15d bne.n 8029c84 <_strtod_l+0x91c> 8029bc8: f3cb 0313 ubfx r3, fp, #0, #20 8029bcc: f1b8 0f00 cmp.w r8, #0 8029bd0: d02a beq.n 8029c28 <_strtod_l+0x8c0> 8029bd2: 4aab ldr r2, [pc, #684] @ (8029e80 <_strtod_l+0xb18>) 8029bd4: 4293 cmp r3, r2 8029bd6: d12a bne.n 8029c2e <_strtod_l+0x8c6> 8029bd8: 9b06 ldr r3, [sp, #24] 8029bda: 4652 mov r2, sl 8029bdc: b1fb cbz r3, 8029c1e <_strtod_l+0x8b6> 8029bde: 4ba9 ldr r3, [pc, #676] @ (8029e84 <_strtod_l+0xb1c>) 8029be0: ea0b 0303 and.w r3, fp, r3 8029be4: f1b3 6fd4 cmp.w r3, #111149056 @ 0x6a00000 8029be8: f04f 31ff mov.w r1, #4294967295 @ 0xffffffff 8029bec: d81a bhi.n 8029c24 <_strtod_l+0x8bc> 8029bee: 0d1b lsrs r3, r3, #20 8029bf0: f1c3 036b rsb r3, r3, #107 @ 0x6b 8029bf4: fa01 f303 lsl.w r3, r1, r3 8029bf8: 429a cmp r2, r3 8029bfa: d118 bne.n 8029c2e <_strtod_l+0x8c6> 8029bfc: 4ba2 ldr r3, [pc, #648] @ (8029e88 <_strtod_l+0xb20>) 8029bfe: 4599 cmp r9, r3 8029c00: d102 bne.n 8029c08 <_strtod_l+0x8a0> 8029c02: 3201 adds r2, #1 8029c04: f43f adc0 beq.w 8029788 <_strtod_l+0x420> 8029c08: 4b9e ldr r3, [pc, #632] @ (8029e84 <_strtod_l+0xb1c>) 8029c0a: ea09 0303 and.w r3, r9, r3 8029c0e: f503 1b80 add.w fp, r3, #1048576 @ 0x100000 8029c12: f04f 0a00 mov.w sl, #0 8029c16: 9b06 ldr r3, [sp, #24] 8029c18: 2b00 cmp r3, #0 8029c1a: d1b0 bne.n 8029b7e <_strtod_l+0x816> 8029c1c: e5bf b.n 802979e <_strtod_l+0x436> 8029c1e: f04f 33ff mov.w r3, #4294967295 @ 0xffffffff 8029c22: e7e9 b.n 8029bf8 <_strtod_l+0x890> 8029c24: 460b mov r3, r1 8029c26: e7e7 b.n 8029bf8 <_strtod_l+0x890> 8029c28: ea53 030a orrs.w r3, r3, sl 8029c2c: d099 beq.n 8029b62 <_strtod_l+0x7fa> 8029c2e: 9b0b ldr r3, [sp, #44] @ 0x2c 8029c30: b1c3 cbz r3, 8029c64 <_strtod_l+0x8fc> 8029c32: ea13 0f09 tst.w r3, r9 8029c36: d0ee beq.n 8029c16 <_strtod_l+0x8ae> 8029c38: 9a06 ldr r2, [sp, #24] 8029c3a: 4650 mov r0, sl 8029c3c: 4659 mov r1, fp 8029c3e: f1b8 0f00 cmp.w r8, #0 8029c42: d013 beq.n 8029c6c <_strtod_l+0x904> 8029c44: f7ff fb74 bl 8029330 8029c48: ee39 7b00 vadd.f64 d7, d9, d0 8029c4c: ec5b ab17 vmov sl, fp, d7 8029c50: e7e1 b.n 8029c16 <_strtod_l+0x8ae> 8029c52: f5a3 1380 sub.w r3, r3, #1048576 @ 0x100000 8029c56: ea6f 5b13 mvn.w fp, r3, lsr #20 8029c5a: ea6f 5b0b mvn.w fp, fp, lsl #20 8029c5e: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8029c62: e7d8 b.n 8029c16 <_strtod_l+0x8ae> 8029c64: 9b0c ldr r3, [sp, #48] @ 0x30 8029c66: ea13 0f0a tst.w r3, sl 8029c6a: e7e4 b.n 8029c36 <_strtod_l+0x8ce> 8029c6c: f7ff fb60 bl 8029330 8029c70: ee39 0b40 vsub.f64 d0, d9, d0 8029c74: eeb5 0b40 vcmp.f64 d0, #0.0 8029c78: eef1 fa10 vmrs APSR_nzcv, fpscr 8029c7c: ec5b ab10 vmov sl, fp, d0 8029c80: d1c9 bne.n 8029c16 <_strtod_l+0x8ae> 8029c82: e615 b.n 80298b0 <_strtod_l+0x548> 8029c84: 4629 mov r1, r5 8029c86: 4620 mov r0, r4 8029c88: f002 fe7a bl 802c980 <__ratio> 8029c8c: eeb0 7b00 vmov.f64 d7, #0 @ 0x40000000 2.0 8029c90: eeb4 0bc7 vcmpe.f64 d0, d7 8029c94: eef1 fa10 vmrs APSR_nzcv, fpscr 8029c98: d85d bhi.n 8029d56 <_strtod_l+0x9ee> 8029c9a: f1b8 0f00 cmp.w r8, #0 8029c9e: d164 bne.n 8029d6a <_strtod_l+0xa02> 8029ca0: f1ba 0f00 cmp.w sl, #0 8029ca4: d14b bne.n 8029d3e <_strtod_l+0x9d6> 8029ca6: f3cb 0313 ubfx r3, fp, #0, #20 8029caa: eeb7 8b00 vmov.f64 d8, #112 @ 0x3f800000 1.0 8029cae: 2b00 cmp r3, #0 8029cb0: d160 bne.n 8029d74 <_strtod_l+0xa0c> 8029cb2: eeb4 0bc8 vcmpe.f64 d0, d8 8029cb6: eeb6 8b00 vmov.f64 d8, #96 @ 0x3f000000 0.5 8029cba: eef1 fa10 vmrs APSR_nzcv, fpscr 8029cbe: d401 bmi.n 8029cc4 <_strtod_l+0x95c> 8029cc0: ee20 8b08 vmul.f64 d8, d0, d8 8029cc4: eeb1 ab48 vneg.f64 d10, d8 8029cc8: 486e ldr r0, [pc, #440] @ (8029e84 <_strtod_l+0xb1c>) 8029cca: 4970 ldr r1, [pc, #448] @ (8029e8c <_strtod_l+0xb24>) 8029ccc: ea09 0700 and.w r7, r9, r0 8029cd0: 428f cmp r7, r1 8029cd2: ec53 2b1a vmov r2, r3, d10 8029cd6: d17d bne.n 8029dd4 <_strtod_l+0xa6c> 8029cd8: f1a9 7b54 sub.w fp, r9, #55574528 @ 0x3500000 8029cdc: ec4b ab1c vmov d12, sl, fp 8029ce0: eeb0 0b4c vmov.f64 d0, d12 8029ce4: f002 fd84 bl 802c7f0 <__ulp> 8029ce8: 4866 ldr r0, [pc, #408] @ (8029e84 <_strtod_l+0xb1c>) 8029cea: eea0 cb0a vfma.f64 d12, d0, d10 8029cee: ee1c 3a90 vmov r3, s25 8029cf2: 4a67 ldr r2, [pc, #412] @ (8029e90 <_strtod_l+0xb28>) 8029cf4: ea03 0100 and.w r1, r3, r0 8029cf8: 4291 cmp r1, r2 8029cfa: ec5b ab1c vmov sl, fp, d12 8029cfe: d93c bls.n 8029d7a <_strtod_l+0xa12> 8029d00: ee19 2a90 vmov r2, s19 8029d04: 4b60 ldr r3, [pc, #384] @ (8029e88 <_strtod_l+0xb20>) 8029d06: 429a cmp r2, r3 8029d08: d104 bne.n 8029d14 <_strtod_l+0x9ac> 8029d0a: ee19 3a10 vmov r3, s18 8029d0e: 3301 adds r3, #1 8029d10: f43f ad3a beq.w 8029788 <_strtod_l+0x420> 8029d14: f8df b170 ldr.w fp, [pc, #368] @ 8029e88 <_strtod_l+0xb20> 8029d18: f04f 3aff mov.w sl, #4294967295 @ 0xffffffff 8029d1c: 9912 ldr r1, [sp, #72] @ 0x48 8029d1e: 9805 ldr r0, [sp, #20] 8029d20: f002 fa32 bl 802c188 <_Bfree> 8029d24: 9805 ldr r0, [sp, #20] 8029d26: 4631 mov r1, r6 8029d28: f002 fa2e bl 802c188 <_Bfree> 8029d2c: 9805 ldr r0, [sp, #20] 8029d2e: 4629 mov r1, r5 8029d30: f002 fa2a bl 802c188 <_Bfree> 8029d34: 9805 ldr r0, [sp, #20] 8029d36: 4621 mov r1, r4 8029d38: f002 fa26 bl 802c188 <_Bfree> 8029d3c: e625 b.n 802998a <_strtod_l+0x622> 8029d3e: f1ba 0f01 cmp.w sl, #1 8029d42: d103 bne.n 8029d4c <_strtod_l+0x9e4> 8029d44: f1bb 0f00 cmp.w fp, #0 8029d48: f43f adb2 beq.w 80298b0 <_strtod_l+0x548> 8029d4c: eebf ab00 vmov.f64 d10, #240 @ 0xbf800000 -1.0 8029d50: eeb7 8b00 vmov.f64 d8, #112 @ 0x3f800000 1.0 8029d54: e7b8 b.n 8029cc8 <_strtod_l+0x960> 8029d56: eeb6 8b00 vmov.f64 d8, #96 @ 0x3f000000 0.5 8029d5a: ee20 8b08 vmul.f64 d8, d0, d8 8029d5e: f1b8 0f00 cmp.w r8, #0 8029d62: d0af beq.n 8029cc4 <_strtod_l+0x95c> 8029d64: eeb0 ab48 vmov.f64 d10, d8 8029d68: e7ae b.n 8029cc8 <_strtod_l+0x960> 8029d6a: eeb7 ab00 vmov.f64 d10, #112 @ 0x3f800000 1.0 8029d6e: eeb0 8b4a vmov.f64 d8, d10 8029d72: e7a9 b.n 8029cc8 <_strtod_l+0x960> 8029d74: eebf ab00 vmov.f64 d10, #240 @ 0xbf800000 -1.0 8029d78: e7a6 b.n 8029cc8 <_strtod_l+0x960> 8029d7a: f103 7b54 add.w fp, r3, #55574528 @ 0x3500000 8029d7e: 9b06 ldr r3, [sp, #24] 8029d80: 46d9 mov r9, fp 8029d82: 2b00 cmp r3, #0 8029d84: d1ca bne.n 8029d1c <_strtod_l+0x9b4> 8029d86: f02b 4300 bic.w r3, fp, #2147483648 @ 0x80000000 8029d8a: 0d1b lsrs r3, r3, #20 8029d8c: 051b lsls r3, r3, #20 8029d8e: 429f cmp r7, r3 8029d90: d1c4 bne.n 8029d1c <_strtod_l+0x9b4> 8029d92: ec51 0b18 vmov r0, r1, d8 8029d96: f7d6 fcdf bl 8000758 <__aeabi_d2lz> 8029d9a: f7d6 fc97 bl 80006cc <__aeabi_l2d> 8029d9e: f3cb 0913 ubfx r9, fp, #0, #20 8029da2: ec41 0b17 vmov d7, r0, r1 8029da6: ea49 090a orr.w r9, r9, sl 8029daa: ea59 0908 orrs.w r9, r9, r8 8029dae: ee38 8b47 vsub.f64 d8, d8, d7 8029db2: d03c beq.n 8029e2e <_strtod_l+0xac6> 8029db4: ed9f 7b2c vldr d7, [pc, #176] @ 8029e68 <_strtod_l+0xb00> 8029db8: eeb4 8bc7 vcmpe.f64 d8, d7 8029dbc: eef1 fa10 vmrs APSR_nzcv, fpscr 8029dc0: f53f aced bmi.w 802979e <_strtod_l+0x436> 8029dc4: ed9f 7b2a vldr d7, [pc, #168] @ 8029e70 <_strtod_l+0xb08> 8029dc8: eeb4 8bc7 vcmpe.f64 d8, d7 8029dcc: eef1 fa10 vmrs APSR_nzcv, fpscr 8029dd0: dda4 ble.n 8029d1c <_strtod_l+0x9b4> 8029dd2: e4e4 b.n 802979e <_strtod_l+0x436> 8029dd4: 9906 ldr r1, [sp, #24] 8029dd6: b1e1 cbz r1, 8029e12 <_strtod_l+0xaaa> 8029dd8: f1b7 6fd4 cmp.w r7, #111149056 @ 0x6a00000 8029ddc: d819 bhi.n 8029e12 <_strtod_l+0xaaa> 8029dde: eeb4 8bcb vcmpe.f64 d8, d11 8029de2: eef1 fa10 vmrs APSR_nzcv, fpscr 8029de6: d811 bhi.n 8029e0c <_strtod_l+0xaa4> 8029de8: eebc 8bc8 vcvt.u32.f64 s16, d8 8029dec: ee18 3a10 vmov r3, s16 8029df0: 2b01 cmp r3, #1 8029df2: bf38 it cc 8029df4: 2301 movcc r3, #1 8029df6: ee08 3a10 vmov s16, r3 8029dfa: eeb8 8b48 vcvt.f64.u32 d8, s16 8029dfe: f1b8 0f00 cmp.w r8, #0 8029e02: d111 bne.n 8029e28 <_strtod_l+0xac0> 8029e04: eeb1 7b48 vneg.f64 d7, d8 8029e08: ec53 2b17 vmov r2, r3, d7 8029e0c: f103 61d6 add.w r1, r3, #112197632 @ 0x6b00000 8029e10: 1bcb subs r3, r1, r7 8029e12: eeb0 0b49 vmov.f64 d0, d9 8029e16: ec43 2b1a vmov d10, r2, r3 8029e1a: f002 fce9 bl 802c7f0 <__ulp> 8029e1e: eeaa 9b00 vfma.f64 d9, d10, d0 8029e22: ec5b ab19 vmov sl, fp, d9 8029e26: e7aa b.n 8029d7e <_strtod_l+0xa16> 8029e28: eeb0 7b48 vmov.f64 d7, d8 8029e2c: e7ec b.n 8029e08 <_strtod_l+0xaa0> 8029e2e: ed9f 7b12 vldr d7, [pc, #72] @ 8029e78 <_strtod_l+0xb10> 8029e32: eeb4 8bc7 vcmpe.f64 d8, d7 8029e36: eef1 fa10 vmrs APSR_nzcv, fpscr 8029e3a: f57f af6f bpl.w 8029d1c <_strtod_l+0x9b4> 8029e3e: e4ae b.n 802979e <_strtod_l+0x436> 8029e40: 2300 movs r3, #0 8029e42: 9308 str r3, [sp, #32] 8029e44: 9a0e ldr r2, [sp, #56] @ 0x38 8029e46: 9b11 ldr r3, [sp, #68] @ 0x44 8029e48: 6013 str r3, [r2, #0] 8029e4a: f7ff bacc b.w 80293e6 <_strtod_l+0x7e> 8029e4e: 2a65 cmp r2, #101 @ 0x65 8029e50: f43f abbc beq.w 80295cc <_strtod_l+0x264> 8029e54: 2a45 cmp r2, #69 @ 0x45 8029e56: f43f abb9 beq.w 80295cc <_strtod_l+0x264> 8029e5a: 2301 movs r3, #1 8029e5c: 9306 str r3, [sp, #24] 8029e5e: f7ff bbf0 b.w 8029642 <_strtod_l+0x2da> 8029e62: bf00 nop 8029e64: f3af 8000 nop.w 8029e68: 94a03595 .word 0x94a03595 8029e6c: 3fdfffff .word 0x3fdfffff 8029e70: 35afe535 .word 0x35afe535 8029e74: 3fe00000 .word 0x3fe00000 8029e78: 94a03595 .word 0x94a03595 8029e7c: 3fcfffff .word 0x3fcfffff 8029e80: 000fffff .word 0x000fffff 8029e84: 7ff00000 .word 0x7ff00000 8029e88: 7fefffff .word 0x7fefffff 8029e8c: 7fe00000 .word 0x7fe00000 8029e90: 7c9fffff .word 0x7c9fffff 08029e94 : 8029e94: 460a mov r2, r1 8029e96: 4601 mov r1, r0 8029e98: 4802 ldr r0, [pc, #8] @ (8029ea4 ) 8029e9a: 4b03 ldr r3, [pc, #12] @ (8029ea8 ) 8029e9c: 6800 ldr r0, [r0, #0] 8029e9e: f7ff ba63 b.w 8029368 <_strtod_l> 8029ea2: bf00 nop 8029ea4: 240001d4 .word 0x240001d4 8029ea8: 24000068 .word 0x24000068 08029eac <__cvt>: 8029eac: b5f0 push {r4, r5, r6, r7, lr} 8029eae: ed2d 8b02 vpush {d8} 8029eb2: eeb0 8b40 vmov.f64 d8, d0 8029eb6: b085 sub sp, #20 8029eb8: 4617 mov r7, r2 8029eba: 9d0d ldr r5, [sp, #52] @ 0x34 8029ebc: 9e0c ldr r6, [sp, #48] @ 0x30 8029ebe: ee18 2a90 vmov r2, s17 8029ec2: f025 0520 bic.w r5, r5, #32 8029ec6: 2a00 cmp r2, #0 8029ec8: bfb6 itet lt 8029eca: 222d movlt r2, #45 @ 0x2d 8029ecc: 2200 movge r2, #0 8029ece: eeb1 8b40 vneglt.f64 d8, d0 8029ed2: 2d46 cmp r5, #70 @ 0x46 8029ed4: 460c mov r4, r1 8029ed6: 701a strb r2, [r3, #0] 8029ed8: d004 beq.n 8029ee4 <__cvt+0x38> 8029eda: 2d45 cmp r5, #69 @ 0x45 8029edc: d100 bne.n 8029ee0 <__cvt+0x34> 8029ede: 3401 adds r4, #1 8029ee0: 2102 movs r1, #2 8029ee2: e000 b.n 8029ee6 <__cvt+0x3a> 8029ee4: 2103 movs r1, #3 8029ee6: ab03 add r3, sp, #12 8029ee8: 9301 str r3, [sp, #4] 8029eea: ab02 add r3, sp, #8 8029eec: 9300 str r3, [sp, #0] 8029eee: 4622 mov r2, r4 8029ef0: 4633 mov r3, r6 8029ef2: eeb0 0b48 vmov.f64 d0, d8 8029ef6: f001 f81b bl 802af30 <_dtoa_r> 8029efa: 2d47 cmp r5, #71 @ 0x47 8029efc: d114 bne.n 8029f28 <__cvt+0x7c> 8029efe: 07fb lsls r3, r7, #31 8029f00: d50a bpl.n 8029f18 <__cvt+0x6c> 8029f02: 1902 adds r2, r0, r4 8029f04: eeb5 8b40 vcmp.f64 d8, #0.0 8029f08: eef1 fa10 vmrs APSR_nzcv, fpscr 8029f0c: bf08 it eq 8029f0e: 9203 streq r2, [sp, #12] 8029f10: 2130 movs r1, #48 @ 0x30 8029f12: 9b03 ldr r3, [sp, #12] 8029f14: 4293 cmp r3, r2 8029f16: d319 bcc.n 8029f4c <__cvt+0xa0> 8029f18: 9b03 ldr r3, [sp, #12] 8029f1a: 9a0e ldr r2, [sp, #56] @ 0x38 8029f1c: 1a1b subs r3, r3, r0 8029f1e: 6013 str r3, [r2, #0] 8029f20: b005 add sp, #20 8029f22: ecbd 8b02 vpop {d8} 8029f26: bdf0 pop {r4, r5, r6, r7, pc} 8029f28: 2d46 cmp r5, #70 @ 0x46 8029f2a: eb00 0204 add.w r2, r0, r4 8029f2e: d1e9 bne.n 8029f04 <__cvt+0x58> 8029f30: 7803 ldrb r3, [r0, #0] 8029f32: 2b30 cmp r3, #48 @ 0x30 8029f34: d107 bne.n 8029f46 <__cvt+0x9a> 8029f36: eeb5 8b40 vcmp.f64 d8, #0.0 8029f3a: eef1 fa10 vmrs APSR_nzcv, fpscr 8029f3e: bf1c itt ne 8029f40: f1c4 0401 rsbne r4, r4, #1 8029f44: 6034 strne r4, [r6, #0] 8029f46: 6833 ldr r3, [r6, #0] 8029f48: 441a add r2, r3 8029f4a: e7db b.n 8029f04 <__cvt+0x58> 8029f4c: 1c5c adds r4, r3, #1 8029f4e: 9403 str r4, [sp, #12] 8029f50: 7019 strb r1, [r3, #0] 8029f52: e7de b.n 8029f12 <__cvt+0x66> 08029f54 <__exponent>: 8029f54: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 8029f56: 2900 cmp r1, #0 8029f58: bfba itte lt 8029f5a: 4249 neglt r1, r1 8029f5c: 232d movlt r3, #45 @ 0x2d 8029f5e: 232b movge r3, #43 @ 0x2b 8029f60: 2909 cmp r1, #9 8029f62: 7002 strb r2, [r0, #0] 8029f64: 7043 strb r3, [r0, #1] 8029f66: dd29 ble.n 8029fbc <__exponent+0x68> 8029f68: f10d 0307 add.w r3, sp, #7 8029f6c: 461d mov r5, r3 8029f6e: 270a movs r7, #10 8029f70: 461a mov r2, r3 8029f72: fbb1 f6f7 udiv r6, r1, r7 8029f76: fb07 1416 mls r4, r7, r6, r1 8029f7a: 3430 adds r4, #48 @ 0x30 8029f7c: f802 4c01 strb.w r4, [r2, #-1] 8029f80: 460c mov r4, r1 8029f82: 2c63 cmp r4, #99 @ 0x63 8029f84: f103 33ff add.w r3, r3, #4294967295 @ 0xffffffff 8029f88: 4631 mov r1, r6 8029f8a: dcf1 bgt.n 8029f70 <__exponent+0x1c> 8029f8c: 3130 adds r1, #48 @ 0x30 8029f8e: 1e94 subs r4, r2, #2 8029f90: f803 1c01 strb.w r1, [r3, #-1] 8029f94: 1c41 adds r1, r0, #1 8029f96: 4623 mov r3, r4 8029f98: 42ab cmp r3, r5 8029f9a: d30a bcc.n 8029fb2 <__exponent+0x5e> 8029f9c: f10d 0309 add.w r3, sp, #9 8029fa0: 1a9b subs r3, r3, r2 8029fa2: 42ac cmp r4, r5 8029fa4: bf88 it hi 8029fa6: 2300 movhi r3, #0 8029fa8: 3302 adds r3, #2 8029faa: 4403 add r3, r0 8029fac: 1a18 subs r0, r3, r0 8029fae: b003 add sp, #12 8029fb0: bdf0 pop {r4, r5, r6, r7, pc} 8029fb2: f813 6b01 ldrb.w r6, [r3], #1 8029fb6: f801 6f01 strb.w r6, [r1, #1]! 8029fba: e7ed b.n 8029f98 <__exponent+0x44> 8029fbc: 2330 movs r3, #48 @ 0x30 8029fbe: 3130 adds r1, #48 @ 0x30 8029fc0: 7083 strb r3, [r0, #2] 8029fc2: 70c1 strb r1, [r0, #3] 8029fc4: 1d03 adds r3, r0, #4 8029fc6: e7f1 b.n 8029fac <__exponent+0x58> 08029fc8 <_printf_float>: 8029fc8: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8029fcc: b08d sub sp, #52 @ 0x34 8029fce: 460c mov r4, r1 8029fd0: f8dd 8058 ldr.w r8, [sp, #88] @ 0x58 8029fd4: 4616 mov r6, r2 8029fd6: 461f mov r7, r3 8029fd8: 4605 mov r5, r0 8029fda: f000 fe0b bl 802abf4 <_localeconv_r> 8029fde: f8d0 b000 ldr.w fp, [r0] 8029fe2: 4658 mov r0, fp 8029fe4: f7d6 f9dc bl 80003a0 8029fe8: 2300 movs r3, #0 8029fea: 930a str r3, [sp, #40] @ 0x28 8029fec: f8d8 3000 ldr.w r3, [r8] 8029ff0: f894 9018 ldrb.w r9, [r4, #24] 8029ff4: 6822 ldr r2, [r4, #0] 8029ff6: 9005 str r0, [sp, #20] 8029ff8: 3307 adds r3, #7 8029ffa: f023 0307 bic.w r3, r3, #7 8029ffe: f103 0108 add.w r1, r3, #8 802a002: f8c8 1000 str.w r1, [r8] 802a006: ed93 0b00 vldr d0, [r3] 802a00a: ed9f 6b97 vldr d6, [pc, #604] @ 802a268 <_printf_float+0x2a0> 802a00e: eeb0 7bc0 vabs.f64 d7, d0 802a012: eeb4 7b46 vcmp.f64 d7, d6 802a016: eef1 fa10 vmrs APSR_nzcv, fpscr 802a01a: ed84 0b12 vstr d0, [r4, #72] @ 0x48 802a01e: dd24 ble.n 802a06a <_printf_float+0xa2> 802a020: eeb5 0bc0 vcmpe.f64 d0, #0.0 802a024: eef1 fa10 vmrs APSR_nzcv, fpscr 802a028: d502 bpl.n 802a030 <_printf_float+0x68> 802a02a: 232d movs r3, #45 @ 0x2d 802a02c: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a030: 498f ldr r1, [pc, #572] @ (802a270 <_printf_float+0x2a8>) 802a032: 4b90 ldr r3, [pc, #576] @ (802a274 <_printf_float+0x2ac>) 802a034: f1b9 0f47 cmp.w r9, #71 @ 0x47 802a038: bf94 ite ls 802a03a: 4688 movls r8, r1 802a03c: 4698 movhi r8, r3 802a03e: f022 0204 bic.w r2, r2, #4 802a042: 2303 movs r3, #3 802a044: 6123 str r3, [r4, #16] 802a046: 6022 str r2, [r4, #0] 802a048: f04f 0a00 mov.w sl, #0 802a04c: 9700 str r7, [sp, #0] 802a04e: 4633 mov r3, r6 802a050: aa0b add r2, sp, #44 @ 0x2c 802a052: 4621 mov r1, r4 802a054: 4628 mov r0, r5 802a056: f000 f9d1 bl 802a3fc <_printf_common> 802a05a: 3001 adds r0, #1 802a05c: f040 8089 bne.w 802a172 <_printf_float+0x1aa> 802a060: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802a064: b00d add sp, #52 @ 0x34 802a066: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802a06a: eeb4 0b40 vcmp.f64 d0, d0 802a06e: eef1 fa10 vmrs APSR_nzcv, fpscr 802a072: d709 bvc.n 802a088 <_printf_float+0xc0> 802a074: ee10 3a90 vmov r3, s1 802a078: 2b00 cmp r3, #0 802a07a: bfbc itt lt 802a07c: 232d movlt r3, #45 @ 0x2d 802a07e: f884 3043 strblt.w r3, [r4, #67] @ 0x43 802a082: 497d ldr r1, [pc, #500] @ (802a278 <_printf_float+0x2b0>) 802a084: 4b7d ldr r3, [pc, #500] @ (802a27c <_printf_float+0x2b4>) 802a086: e7d5 b.n 802a034 <_printf_float+0x6c> 802a088: 6863 ldr r3, [r4, #4] 802a08a: 1c59 adds r1, r3, #1 802a08c: f009 0adf and.w sl, r9, #223 @ 0xdf 802a090: d139 bne.n 802a106 <_printf_float+0x13e> 802a092: 2306 movs r3, #6 802a094: 6063 str r3, [r4, #4] 802a096: f442 6280 orr.w r2, r2, #1024 @ 0x400 802a09a: 2300 movs r3, #0 802a09c: 6022 str r2, [r4, #0] 802a09e: 9303 str r3, [sp, #12] 802a0a0: ab0a add r3, sp, #40 @ 0x28 802a0a2: e9cd 9301 strd r9, r3, [sp, #4] 802a0a6: ab09 add r3, sp, #36 @ 0x24 802a0a8: 9300 str r3, [sp, #0] 802a0aa: 6861 ldr r1, [r4, #4] 802a0ac: f10d 0323 add.w r3, sp, #35 @ 0x23 802a0b0: 4628 mov r0, r5 802a0b2: f7ff fefb bl 8029eac <__cvt> 802a0b6: f1ba 0f47 cmp.w sl, #71 @ 0x47 802a0ba: 9909 ldr r1, [sp, #36] @ 0x24 802a0bc: 4680 mov r8, r0 802a0be: d129 bne.n 802a114 <_printf_float+0x14c> 802a0c0: 1cc8 adds r0, r1, #3 802a0c2: db02 blt.n 802a0ca <_printf_float+0x102> 802a0c4: 6863 ldr r3, [r4, #4] 802a0c6: 4299 cmp r1, r3 802a0c8: dd41 ble.n 802a14e <_printf_float+0x186> 802a0ca: f1a9 0902 sub.w r9, r9, #2 802a0ce: fa5f f989 uxtb.w r9, r9 802a0d2: 3901 subs r1, #1 802a0d4: 464a mov r2, r9 802a0d6: f104 0050 add.w r0, r4, #80 @ 0x50 802a0da: 9109 str r1, [sp, #36] @ 0x24 802a0dc: f7ff ff3a bl 8029f54 <__exponent> 802a0e0: 9a0a ldr r2, [sp, #40] @ 0x28 802a0e2: 1813 adds r3, r2, r0 802a0e4: 2a01 cmp r2, #1 802a0e6: 4682 mov sl, r0 802a0e8: 6123 str r3, [r4, #16] 802a0ea: dc02 bgt.n 802a0f2 <_printf_float+0x12a> 802a0ec: 6822 ldr r2, [r4, #0] 802a0ee: 07d2 lsls r2, r2, #31 802a0f0: d501 bpl.n 802a0f6 <_printf_float+0x12e> 802a0f2: 3301 adds r3, #1 802a0f4: 6123 str r3, [r4, #16] 802a0f6: f89d 3023 ldrb.w r3, [sp, #35] @ 0x23 802a0fa: 2b00 cmp r3, #0 802a0fc: d0a6 beq.n 802a04c <_printf_float+0x84> 802a0fe: 232d movs r3, #45 @ 0x2d 802a100: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a104: e7a2 b.n 802a04c <_printf_float+0x84> 802a106: f1ba 0f47 cmp.w sl, #71 @ 0x47 802a10a: d1c4 bne.n 802a096 <_printf_float+0xce> 802a10c: 2b00 cmp r3, #0 802a10e: d1c2 bne.n 802a096 <_printf_float+0xce> 802a110: 2301 movs r3, #1 802a112: e7bf b.n 802a094 <_printf_float+0xcc> 802a114: f1b9 0f65 cmp.w r9, #101 @ 0x65 802a118: d9db bls.n 802a0d2 <_printf_float+0x10a> 802a11a: f1b9 0f66 cmp.w r9, #102 @ 0x66 802a11e: d118 bne.n 802a152 <_printf_float+0x18a> 802a120: 2900 cmp r1, #0 802a122: 6863 ldr r3, [r4, #4] 802a124: dd0b ble.n 802a13e <_printf_float+0x176> 802a126: 6121 str r1, [r4, #16] 802a128: b913 cbnz r3, 802a130 <_printf_float+0x168> 802a12a: 6822 ldr r2, [r4, #0] 802a12c: 07d0 lsls r0, r2, #31 802a12e: d502 bpl.n 802a136 <_printf_float+0x16e> 802a130: 3301 adds r3, #1 802a132: 440b add r3, r1 802a134: 6123 str r3, [r4, #16] 802a136: 65a1 str r1, [r4, #88] @ 0x58 802a138: f04f 0a00 mov.w sl, #0 802a13c: e7db b.n 802a0f6 <_printf_float+0x12e> 802a13e: b913 cbnz r3, 802a146 <_printf_float+0x17e> 802a140: 6822 ldr r2, [r4, #0] 802a142: 07d2 lsls r2, r2, #31 802a144: d501 bpl.n 802a14a <_printf_float+0x182> 802a146: 3302 adds r3, #2 802a148: e7f4 b.n 802a134 <_printf_float+0x16c> 802a14a: 2301 movs r3, #1 802a14c: e7f2 b.n 802a134 <_printf_float+0x16c> 802a14e: f04f 0967 mov.w r9, #103 @ 0x67 802a152: 9b0a ldr r3, [sp, #40] @ 0x28 802a154: 4299 cmp r1, r3 802a156: db05 blt.n 802a164 <_printf_float+0x19c> 802a158: 6823 ldr r3, [r4, #0] 802a15a: 6121 str r1, [r4, #16] 802a15c: 07d8 lsls r0, r3, #31 802a15e: d5ea bpl.n 802a136 <_printf_float+0x16e> 802a160: 1c4b adds r3, r1, #1 802a162: e7e7 b.n 802a134 <_printf_float+0x16c> 802a164: 2900 cmp r1, #0 802a166: bfd4 ite le 802a168: f1c1 0202 rsble r2, r1, #2 802a16c: 2201 movgt r2, #1 802a16e: 4413 add r3, r2 802a170: e7e0 b.n 802a134 <_printf_float+0x16c> 802a172: 6823 ldr r3, [r4, #0] 802a174: 055a lsls r2, r3, #21 802a176: d407 bmi.n 802a188 <_printf_float+0x1c0> 802a178: 6923 ldr r3, [r4, #16] 802a17a: 4642 mov r2, r8 802a17c: 4631 mov r1, r6 802a17e: 4628 mov r0, r5 802a180: 47b8 blx r7 802a182: 3001 adds r0, #1 802a184: d12a bne.n 802a1dc <_printf_float+0x214> 802a186: e76b b.n 802a060 <_printf_float+0x98> 802a188: f1b9 0f65 cmp.w r9, #101 @ 0x65 802a18c: f240 80e0 bls.w 802a350 <_printf_float+0x388> 802a190: ed94 7b12 vldr d7, [r4, #72] @ 0x48 802a194: eeb5 7b40 vcmp.f64 d7, #0.0 802a198: eef1 fa10 vmrs APSR_nzcv, fpscr 802a19c: d133 bne.n 802a206 <_printf_float+0x23e> 802a19e: 4a38 ldr r2, [pc, #224] @ (802a280 <_printf_float+0x2b8>) 802a1a0: 2301 movs r3, #1 802a1a2: 4631 mov r1, r6 802a1a4: 4628 mov r0, r5 802a1a6: 47b8 blx r7 802a1a8: 3001 adds r0, #1 802a1aa: f43f af59 beq.w 802a060 <_printf_float+0x98> 802a1ae: e9dd 3809 ldrd r3, r8, [sp, #36] @ 0x24 802a1b2: 4543 cmp r3, r8 802a1b4: db02 blt.n 802a1bc <_printf_float+0x1f4> 802a1b6: 6823 ldr r3, [r4, #0] 802a1b8: 07d8 lsls r0, r3, #31 802a1ba: d50f bpl.n 802a1dc <_printf_float+0x214> 802a1bc: 9b05 ldr r3, [sp, #20] 802a1be: 465a mov r2, fp 802a1c0: 4631 mov r1, r6 802a1c2: 4628 mov r0, r5 802a1c4: 47b8 blx r7 802a1c6: 3001 adds r0, #1 802a1c8: f43f af4a beq.w 802a060 <_printf_float+0x98> 802a1cc: f04f 0900 mov.w r9, #0 802a1d0: f108 38ff add.w r8, r8, #4294967295 @ 0xffffffff 802a1d4: f104 0a1a add.w sl, r4, #26 802a1d8: 45c8 cmp r8, r9 802a1da: dc09 bgt.n 802a1f0 <_printf_float+0x228> 802a1dc: 6823 ldr r3, [r4, #0] 802a1de: 079b lsls r3, r3, #30 802a1e0: f100 8107 bmi.w 802a3f2 <_printf_float+0x42a> 802a1e4: 68e0 ldr r0, [r4, #12] 802a1e6: 9b0b ldr r3, [sp, #44] @ 0x2c 802a1e8: 4298 cmp r0, r3 802a1ea: bfb8 it lt 802a1ec: 4618 movlt r0, r3 802a1ee: e739 b.n 802a064 <_printf_float+0x9c> 802a1f0: 2301 movs r3, #1 802a1f2: 4652 mov r2, sl 802a1f4: 4631 mov r1, r6 802a1f6: 4628 mov r0, r5 802a1f8: 47b8 blx r7 802a1fa: 3001 adds r0, #1 802a1fc: f43f af30 beq.w 802a060 <_printf_float+0x98> 802a200: f109 0901 add.w r9, r9, #1 802a204: e7e8 b.n 802a1d8 <_printf_float+0x210> 802a206: 9b09 ldr r3, [sp, #36] @ 0x24 802a208: 2b00 cmp r3, #0 802a20a: dc3b bgt.n 802a284 <_printf_float+0x2bc> 802a20c: 4a1c ldr r2, [pc, #112] @ (802a280 <_printf_float+0x2b8>) 802a20e: 2301 movs r3, #1 802a210: 4631 mov r1, r6 802a212: 4628 mov r0, r5 802a214: 47b8 blx r7 802a216: 3001 adds r0, #1 802a218: f43f af22 beq.w 802a060 <_printf_float+0x98> 802a21c: e9dd 3909 ldrd r3, r9, [sp, #36] @ 0x24 802a220: ea59 0303 orrs.w r3, r9, r3 802a224: d102 bne.n 802a22c <_printf_float+0x264> 802a226: 6823 ldr r3, [r4, #0] 802a228: 07d9 lsls r1, r3, #31 802a22a: d5d7 bpl.n 802a1dc <_printf_float+0x214> 802a22c: 9b05 ldr r3, [sp, #20] 802a22e: 465a mov r2, fp 802a230: 4631 mov r1, r6 802a232: 4628 mov r0, r5 802a234: 47b8 blx r7 802a236: 3001 adds r0, #1 802a238: f43f af12 beq.w 802a060 <_printf_float+0x98> 802a23c: f04f 0a00 mov.w sl, #0 802a240: f104 0b1a add.w fp, r4, #26 802a244: 9b09 ldr r3, [sp, #36] @ 0x24 802a246: 425b negs r3, r3 802a248: 4553 cmp r3, sl 802a24a: dc01 bgt.n 802a250 <_printf_float+0x288> 802a24c: 464b mov r3, r9 802a24e: e794 b.n 802a17a <_printf_float+0x1b2> 802a250: 2301 movs r3, #1 802a252: 465a mov r2, fp 802a254: 4631 mov r1, r6 802a256: 4628 mov r0, r5 802a258: 47b8 blx r7 802a25a: 3001 adds r0, #1 802a25c: f43f af00 beq.w 802a060 <_printf_float+0x98> 802a260: f10a 0a01 add.w sl, sl, #1 802a264: e7ee b.n 802a244 <_printf_float+0x27c> 802a266: bf00 nop 802a268: ffffffff .word 0xffffffff 802a26c: 7fefffff .word 0x7fefffff 802a270: 08031e81 .word 0x08031e81 802a274: 08031e85 .word 0x08031e85 802a278: 08031e89 .word 0x08031e89 802a27c: 08031e8d .word 0x08031e8d 802a280: 08031e91 .word 0x08031e91 802a284: 6da3 ldr r3, [r4, #88] @ 0x58 802a286: f8dd a028 ldr.w sl, [sp, #40] @ 0x28 802a28a: 4553 cmp r3, sl 802a28c: bfa8 it ge 802a28e: 4653 movge r3, sl 802a290: 2b00 cmp r3, #0 802a292: 4699 mov r9, r3 802a294: dc37 bgt.n 802a306 <_printf_float+0x33e> 802a296: 2300 movs r3, #0 802a298: 9307 str r3, [sp, #28] 802a29a: ea29 79e9 bic.w r9, r9, r9, asr #31 802a29e: f104 021a add.w r2, r4, #26 802a2a2: 6da3 ldr r3, [r4, #88] @ 0x58 802a2a4: 9907 ldr r1, [sp, #28] 802a2a6: 9306 str r3, [sp, #24] 802a2a8: eba3 0309 sub.w r3, r3, r9 802a2ac: 428b cmp r3, r1 802a2ae: dc31 bgt.n 802a314 <_printf_float+0x34c> 802a2b0: 9b09 ldr r3, [sp, #36] @ 0x24 802a2b2: 459a cmp sl, r3 802a2b4: dc3b bgt.n 802a32e <_printf_float+0x366> 802a2b6: 6823 ldr r3, [r4, #0] 802a2b8: 07da lsls r2, r3, #31 802a2ba: d438 bmi.n 802a32e <_printf_float+0x366> 802a2bc: 9b09 ldr r3, [sp, #36] @ 0x24 802a2be: ebaa 0903 sub.w r9, sl, r3 802a2c2: 9b06 ldr r3, [sp, #24] 802a2c4: ebaa 0303 sub.w r3, sl, r3 802a2c8: 4599 cmp r9, r3 802a2ca: bfa8 it ge 802a2cc: 4699 movge r9, r3 802a2ce: f1b9 0f00 cmp.w r9, #0 802a2d2: dc34 bgt.n 802a33e <_printf_float+0x376> 802a2d4: f04f 0800 mov.w r8, #0 802a2d8: ea29 79e9 bic.w r9, r9, r9, asr #31 802a2dc: f104 0b1a add.w fp, r4, #26 802a2e0: 9b09 ldr r3, [sp, #36] @ 0x24 802a2e2: ebaa 0303 sub.w r3, sl, r3 802a2e6: eba3 0309 sub.w r3, r3, r9 802a2ea: 4543 cmp r3, r8 802a2ec: f77f af76 ble.w 802a1dc <_printf_float+0x214> 802a2f0: 2301 movs r3, #1 802a2f2: 465a mov r2, fp 802a2f4: 4631 mov r1, r6 802a2f6: 4628 mov r0, r5 802a2f8: 47b8 blx r7 802a2fa: 3001 adds r0, #1 802a2fc: f43f aeb0 beq.w 802a060 <_printf_float+0x98> 802a300: f108 0801 add.w r8, r8, #1 802a304: e7ec b.n 802a2e0 <_printf_float+0x318> 802a306: 4642 mov r2, r8 802a308: 4631 mov r1, r6 802a30a: 4628 mov r0, r5 802a30c: 47b8 blx r7 802a30e: 3001 adds r0, #1 802a310: d1c1 bne.n 802a296 <_printf_float+0x2ce> 802a312: e6a5 b.n 802a060 <_printf_float+0x98> 802a314: 2301 movs r3, #1 802a316: 4631 mov r1, r6 802a318: 4628 mov r0, r5 802a31a: 9206 str r2, [sp, #24] 802a31c: 47b8 blx r7 802a31e: 3001 adds r0, #1 802a320: f43f ae9e beq.w 802a060 <_printf_float+0x98> 802a324: 9b07 ldr r3, [sp, #28] 802a326: 9a06 ldr r2, [sp, #24] 802a328: 3301 adds r3, #1 802a32a: 9307 str r3, [sp, #28] 802a32c: e7b9 b.n 802a2a2 <_printf_float+0x2da> 802a32e: 9b05 ldr r3, [sp, #20] 802a330: 465a mov r2, fp 802a332: 4631 mov r1, r6 802a334: 4628 mov r0, r5 802a336: 47b8 blx r7 802a338: 3001 adds r0, #1 802a33a: d1bf bne.n 802a2bc <_printf_float+0x2f4> 802a33c: e690 b.n 802a060 <_printf_float+0x98> 802a33e: 9a06 ldr r2, [sp, #24] 802a340: 464b mov r3, r9 802a342: 4442 add r2, r8 802a344: 4631 mov r1, r6 802a346: 4628 mov r0, r5 802a348: 47b8 blx r7 802a34a: 3001 adds r0, #1 802a34c: d1c2 bne.n 802a2d4 <_printf_float+0x30c> 802a34e: e687 b.n 802a060 <_printf_float+0x98> 802a350: f8dd 9028 ldr.w r9, [sp, #40] @ 0x28 802a354: f1b9 0f01 cmp.w r9, #1 802a358: dc01 bgt.n 802a35e <_printf_float+0x396> 802a35a: 07db lsls r3, r3, #31 802a35c: d536 bpl.n 802a3cc <_printf_float+0x404> 802a35e: 2301 movs r3, #1 802a360: 4642 mov r2, r8 802a362: 4631 mov r1, r6 802a364: 4628 mov r0, r5 802a366: 47b8 blx r7 802a368: 3001 adds r0, #1 802a36a: f43f ae79 beq.w 802a060 <_printf_float+0x98> 802a36e: 9b05 ldr r3, [sp, #20] 802a370: 465a mov r2, fp 802a372: 4631 mov r1, r6 802a374: 4628 mov r0, r5 802a376: 47b8 blx r7 802a378: 3001 adds r0, #1 802a37a: f43f ae71 beq.w 802a060 <_printf_float+0x98> 802a37e: ed94 7b12 vldr d7, [r4, #72] @ 0x48 802a382: eeb5 7b40 vcmp.f64 d7, #0.0 802a386: eef1 fa10 vmrs APSR_nzcv, fpscr 802a38a: f109 39ff add.w r9, r9, #4294967295 @ 0xffffffff 802a38e: d018 beq.n 802a3c2 <_printf_float+0x3fa> 802a390: 464b mov r3, r9 802a392: f108 0201 add.w r2, r8, #1 802a396: 4631 mov r1, r6 802a398: 4628 mov r0, r5 802a39a: 47b8 blx r7 802a39c: 3001 adds r0, #1 802a39e: d10c bne.n 802a3ba <_printf_float+0x3f2> 802a3a0: e65e b.n 802a060 <_printf_float+0x98> 802a3a2: 2301 movs r3, #1 802a3a4: 465a mov r2, fp 802a3a6: 4631 mov r1, r6 802a3a8: 4628 mov r0, r5 802a3aa: 47b8 blx r7 802a3ac: 3001 adds r0, #1 802a3ae: f43f ae57 beq.w 802a060 <_printf_float+0x98> 802a3b2: f108 0801 add.w r8, r8, #1 802a3b6: 45c8 cmp r8, r9 802a3b8: dbf3 blt.n 802a3a2 <_printf_float+0x3da> 802a3ba: 4653 mov r3, sl 802a3bc: f104 0250 add.w r2, r4, #80 @ 0x50 802a3c0: e6dc b.n 802a17c <_printf_float+0x1b4> 802a3c2: f04f 0800 mov.w r8, #0 802a3c6: f104 0b1a add.w fp, r4, #26 802a3ca: e7f4 b.n 802a3b6 <_printf_float+0x3ee> 802a3cc: 2301 movs r3, #1 802a3ce: 4642 mov r2, r8 802a3d0: e7e1 b.n 802a396 <_printf_float+0x3ce> 802a3d2: 2301 movs r3, #1 802a3d4: 464a mov r2, r9 802a3d6: 4631 mov r1, r6 802a3d8: 4628 mov r0, r5 802a3da: 47b8 blx r7 802a3dc: 3001 adds r0, #1 802a3de: f43f ae3f beq.w 802a060 <_printf_float+0x98> 802a3e2: f108 0801 add.w r8, r8, #1 802a3e6: 68e3 ldr r3, [r4, #12] 802a3e8: 990b ldr r1, [sp, #44] @ 0x2c 802a3ea: 1a5b subs r3, r3, r1 802a3ec: 4543 cmp r3, r8 802a3ee: dcf0 bgt.n 802a3d2 <_printf_float+0x40a> 802a3f0: e6f8 b.n 802a1e4 <_printf_float+0x21c> 802a3f2: f04f 0800 mov.w r8, #0 802a3f6: f104 0919 add.w r9, r4, #25 802a3fa: e7f4 b.n 802a3e6 <_printf_float+0x41e> 0802a3fc <_printf_common>: 802a3fc: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802a400: 4616 mov r6, r2 802a402: 4698 mov r8, r3 802a404: 688a ldr r2, [r1, #8] 802a406: 690b ldr r3, [r1, #16] 802a408: f8dd 9020 ldr.w r9, [sp, #32] 802a40c: 4293 cmp r3, r2 802a40e: bfb8 it lt 802a410: 4613 movlt r3, r2 802a412: 6033 str r3, [r6, #0] 802a414: f891 2043 ldrb.w r2, [r1, #67] @ 0x43 802a418: 4607 mov r7, r0 802a41a: 460c mov r4, r1 802a41c: b10a cbz r2, 802a422 <_printf_common+0x26> 802a41e: 3301 adds r3, #1 802a420: 6033 str r3, [r6, #0] 802a422: 6823 ldr r3, [r4, #0] 802a424: 0699 lsls r1, r3, #26 802a426: bf42 ittt mi 802a428: 6833 ldrmi r3, [r6, #0] 802a42a: 3302 addmi r3, #2 802a42c: 6033 strmi r3, [r6, #0] 802a42e: 6825 ldr r5, [r4, #0] 802a430: f015 0506 ands.w r5, r5, #6 802a434: d106 bne.n 802a444 <_printf_common+0x48> 802a436: f104 0a19 add.w sl, r4, #25 802a43a: 68e3 ldr r3, [r4, #12] 802a43c: 6832 ldr r2, [r6, #0] 802a43e: 1a9b subs r3, r3, r2 802a440: 42ab cmp r3, r5 802a442: dc26 bgt.n 802a492 <_printf_common+0x96> 802a444: f894 3043 ldrb.w r3, [r4, #67] @ 0x43 802a448: 6822 ldr r2, [r4, #0] 802a44a: 3b00 subs r3, #0 802a44c: bf18 it ne 802a44e: 2301 movne r3, #1 802a450: 0692 lsls r2, r2, #26 802a452: d42b bmi.n 802a4ac <_printf_common+0xb0> 802a454: f104 0243 add.w r2, r4, #67 @ 0x43 802a458: 4641 mov r1, r8 802a45a: 4638 mov r0, r7 802a45c: 47c8 blx r9 802a45e: 3001 adds r0, #1 802a460: d01e beq.n 802a4a0 <_printf_common+0xa4> 802a462: 6823 ldr r3, [r4, #0] 802a464: 6922 ldr r2, [r4, #16] 802a466: f003 0306 and.w r3, r3, #6 802a46a: 2b04 cmp r3, #4 802a46c: bf02 ittt eq 802a46e: 68e5 ldreq r5, [r4, #12] 802a470: 6833 ldreq r3, [r6, #0] 802a472: 1aed subeq r5, r5, r3 802a474: 68a3 ldr r3, [r4, #8] 802a476: bf0c ite eq 802a478: ea25 75e5 biceq.w r5, r5, r5, asr #31 802a47c: 2500 movne r5, #0 802a47e: 4293 cmp r3, r2 802a480: bfc4 itt gt 802a482: 1a9b subgt r3, r3, r2 802a484: 18ed addgt r5, r5, r3 802a486: 2600 movs r6, #0 802a488: 341a adds r4, #26 802a48a: 42b5 cmp r5, r6 802a48c: d11a bne.n 802a4c4 <_printf_common+0xc8> 802a48e: 2000 movs r0, #0 802a490: e008 b.n 802a4a4 <_printf_common+0xa8> 802a492: 2301 movs r3, #1 802a494: 4652 mov r2, sl 802a496: 4641 mov r1, r8 802a498: 4638 mov r0, r7 802a49a: 47c8 blx r9 802a49c: 3001 adds r0, #1 802a49e: d103 bne.n 802a4a8 <_printf_common+0xac> 802a4a0: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802a4a4: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802a4a8: 3501 adds r5, #1 802a4aa: e7c6 b.n 802a43a <_printf_common+0x3e> 802a4ac: 18e1 adds r1, r4, r3 802a4ae: 1c5a adds r2, r3, #1 802a4b0: 2030 movs r0, #48 @ 0x30 802a4b2: f881 0043 strb.w r0, [r1, #67] @ 0x43 802a4b6: 4422 add r2, r4 802a4b8: f894 1045 ldrb.w r1, [r4, #69] @ 0x45 802a4bc: f882 1043 strb.w r1, [r2, #67] @ 0x43 802a4c0: 3302 adds r3, #2 802a4c2: e7c7 b.n 802a454 <_printf_common+0x58> 802a4c4: 2301 movs r3, #1 802a4c6: 4622 mov r2, r4 802a4c8: 4641 mov r1, r8 802a4ca: 4638 mov r0, r7 802a4cc: 47c8 blx r9 802a4ce: 3001 adds r0, #1 802a4d0: d0e6 beq.n 802a4a0 <_printf_common+0xa4> 802a4d2: 3601 adds r6, #1 802a4d4: e7d9 b.n 802a48a <_printf_common+0x8e> ... 0802a4d8 <_printf_i>: 802a4d8: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 802a4dc: 7e0f ldrb r7, [r1, #24] 802a4de: 9e0c ldr r6, [sp, #48] @ 0x30 802a4e0: 2f78 cmp r7, #120 @ 0x78 802a4e2: 4691 mov r9, r2 802a4e4: 4680 mov r8, r0 802a4e6: 460c mov r4, r1 802a4e8: 469a mov sl, r3 802a4ea: f101 0243 add.w r2, r1, #67 @ 0x43 802a4ee: d807 bhi.n 802a500 <_printf_i+0x28> 802a4f0: 2f62 cmp r7, #98 @ 0x62 802a4f2: d80a bhi.n 802a50a <_printf_i+0x32> 802a4f4: 2f00 cmp r7, #0 802a4f6: f000 80d2 beq.w 802a69e <_printf_i+0x1c6> 802a4fa: 2f58 cmp r7, #88 @ 0x58 802a4fc: f000 80b9 beq.w 802a672 <_printf_i+0x19a> 802a500: f104 0642 add.w r6, r4, #66 @ 0x42 802a504: f884 7042 strb.w r7, [r4, #66] @ 0x42 802a508: e03a b.n 802a580 <_printf_i+0xa8> 802a50a: f1a7 0363 sub.w r3, r7, #99 @ 0x63 802a50e: 2b15 cmp r3, #21 802a510: d8f6 bhi.n 802a500 <_printf_i+0x28> 802a512: a101 add r1, pc, #4 @ (adr r1, 802a518 <_printf_i+0x40>) 802a514: f851 f023 ldr.w pc, [r1, r3, lsl #2] 802a518: 0802a571 .word 0x0802a571 802a51c: 0802a585 .word 0x0802a585 802a520: 0802a501 .word 0x0802a501 802a524: 0802a501 .word 0x0802a501 802a528: 0802a501 .word 0x0802a501 802a52c: 0802a501 .word 0x0802a501 802a530: 0802a585 .word 0x0802a585 802a534: 0802a501 .word 0x0802a501 802a538: 0802a501 .word 0x0802a501 802a53c: 0802a501 .word 0x0802a501 802a540: 0802a501 .word 0x0802a501 802a544: 0802a685 .word 0x0802a685 802a548: 0802a5af .word 0x0802a5af 802a54c: 0802a63f .word 0x0802a63f 802a550: 0802a501 .word 0x0802a501 802a554: 0802a501 .word 0x0802a501 802a558: 0802a6a7 .word 0x0802a6a7 802a55c: 0802a501 .word 0x0802a501 802a560: 0802a5af .word 0x0802a5af 802a564: 0802a501 .word 0x0802a501 802a568: 0802a501 .word 0x0802a501 802a56c: 0802a647 .word 0x0802a647 802a570: 6833 ldr r3, [r6, #0] 802a572: 1d1a adds r2, r3, #4 802a574: 681b ldr r3, [r3, #0] 802a576: 6032 str r2, [r6, #0] 802a578: f104 0642 add.w r6, r4, #66 @ 0x42 802a57c: f884 3042 strb.w r3, [r4, #66] @ 0x42 802a580: 2301 movs r3, #1 802a582: e09d b.n 802a6c0 <_printf_i+0x1e8> 802a584: 6833 ldr r3, [r6, #0] 802a586: 6820 ldr r0, [r4, #0] 802a588: 1d19 adds r1, r3, #4 802a58a: 6031 str r1, [r6, #0] 802a58c: 0606 lsls r6, r0, #24 802a58e: d501 bpl.n 802a594 <_printf_i+0xbc> 802a590: 681d ldr r5, [r3, #0] 802a592: e003 b.n 802a59c <_printf_i+0xc4> 802a594: 0645 lsls r5, r0, #25 802a596: d5fb bpl.n 802a590 <_printf_i+0xb8> 802a598: f9b3 5000 ldrsh.w r5, [r3] 802a59c: 2d00 cmp r5, #0 802a59e: da03 bge.n 802a5a8 <_printf_i+0xd0> 802a5a0: 232d movs r3, #45 @ 0x2d 802a5a2: 426d negs r5, r5 802a5a4: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a5a8: 4859 ldr r0, [pc, #356] @ (802a710 <_printf_i+0x238>) 802a5aa: 230a movs r3, #10 802a5ac: e011 b.n 802a5d2 <_printf_i+0xfa> 802a5ae: 6821 ldr r1, [r4, #0] 802a5b0: 6833 ldr r3, [r6, #0] 802a5b2: 0608 lsls r0, r1, #24 802a5b4: f853 5b04 ldr.w r5, [r3], #4 802a5b8: d402 bmi.n 802a5c0 <_printf_i+0xe8> 802a5ba: 0649 lsls r1, r1, #25 802a5bc: bf48 it mi 802a5be: b2ad uxthmi r5, r5 802a5c0: 2f6f cmp r7, #111 @ 0x6f 802a5c2: 4853 ldr r0, [pc, #332] @ (802a710 <_printf_i+0x238>) 802a5c4: 6033 str r3, [r6, #0] 802a5c6: bf14 ite ne 802a5c8: 230a movne r3, #10 802a5ca: 2308 moveq r3, #8 802a5cc: 2100 movs r1, #0 802a5ce: f884 1043 strb.w r1, [r4, #67] @ 0x43 802a5d2: 6866 ldr r6, [r4, #4] 802a5d4: 60a6 str r6, [r4, #8] 802a5d6: 2e00 cmp r6, #0 802a5d8: bfa2 ittt ge 802a5da: 6821 ldrge r1, [r4, #0] 802a5dc: f021 0104 bicge.w r1, r1, #4 802a5e0: 6021 strge r1, [r4, #0] 802a5e2: b90d cbnz r5, 802a5e8 <_printf_i+0x110> 802a5e4: 2e00 cmp r6, #0 802a5e6: d04b beq.n 802a680 <_printf_i+0x1a8> 802a5e8: 4616 mov r6, r2 802a5ea: fbb5 f1f3 udiv r1, r5, r3 802a5ee: fb03 5711 mls r7, r3, r1, r5 802a5f2: 5dc7 ldrb r7, [r0, r7] 802a5f4: f806 7d01 strb.w r7, [r6, #-1]! 802a5f8: 462f mov r7, r5 802a5fa: 42bb cmp r3, r7 802a5fc: 460d mov r5, r1 802a5fe: d9f4 bls.n 802a5ea <_printf_i+0x112> 802a600: 2b08 cmp r3, #8 802a602: d10b bne.n 802a61c <_printf_i+0x144> 802a604: 6823 ldr r3, [r4, #0] 802a606: 07df lsls r7, r3, #31 802a608: d508 bpl.n 802a61c <_printf_i+0x144> 802a60a: 6923 ldr r3, [r4, #16] 802a60c: 6861 ldr r1, [r4, #4] 802a60e: 4299 cmp r1, r3 802a610: bfde ittt le 802a612: 2330 movle r3, #48 @ 0x30 802a614: f806 3c01 strble.w r3, [r6, #-1] 802a618: f106 36ff addle.w r6, r6, #4294967295 @ 0xffffffff 802a61c: 1b92 subs r2, r2, r6 802a61e: 6122 str r2, [r4, #16] 802a620: f8cd a000 str.w sl, [sp] 802a624: 464b mov r3, r9 802a626: aa03 add r2, sp, #12 802a628: 4621 mov r1, r4 802a62a: 4640 mov r0, r8 802a62c: f7ff fee6 bl 802a3fc <_printf_common> 802a630: 3001 adds r0, #1 802a632: d14a bne.n 802a6ca <_printf_i+0x1f2> 802a634: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802a638: b004 add sp, #16 802a63a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802a63e: 6823 ldr r3, [r4, #0] 802a640: f043 0320 orr.w r3, r3, #32 802a644: 6023 str r3, [r4, #0] 802a646: 4833 ldr r0, [pc, #204] @ (802a714 <_printf_i+0x23c>) 802a648: 2778 movs r7, #120 @ 0x78 802a64a: f884 7045 strb.w r7, [r4, #69] @ 0x45 802a64e: 6823 ldr r3, [r4, #0] 802a650: 6831 ldr r1, [r6, #0] 802a652: 061f lsls r7, r3, #24 802a654: f851 5b04 ldr.w r5, [r1], #4 802a658: d402 bmi.n 802a660 <_printf_i+0x188> 802a65a: 065f lsls r7, r3, #25 802a65c: bf48 it mi 802a65e: b2ad uxthmi r5, r5 802a660: 6031 str r1, [r6, #0] 802a662: 07d9 lsls r1, r3, #31 802a664: bf44 itt mi 802a666: f043 0320 orrmi.w r3, r3, #32 802a66a: 6023 strmi r3, [r4, #0] 802a66c: b11d cbz r5, 802a676 <_printf_i+0x19e> 802a66e: 2310 movs r3, #16 802a670: e7ac b.n 802a5cc <_printf_i+0xf4> 802a672: 4827 ldr r0, [pc, #156] @ (802a710 <_printf_i+0x238>) 802a674: e7e9 b.n 802a64a <_printf_i+0x172> 802a676: 6823 ldr r3, [r4, #0] 802a678: f023 0320 bic.w r3, r3, #32 802a67c: 6023 str r3, [r4, #0] 802a67e: e7f6 b.n 802a66e <_printf_i+0x196> 802a680: 4616 mov r6, r2 802a682: e7bd b.n 802a600 <_printf_i+0x128> 802a684: 6833 ldr r3, [r6, #0] 802a686: 6825 ldr r5, [r4, #0] 802a688: 6961 ldr r1, [r4, #20] 802a68a: 1d18 adds r0, r3, #4 802a68c: 6030 str r0, [r6, #0] 802a68e: 062e lsls r6, r5, #24 802a690: 681b ldr r3, [r3, #0] 802a692: d501 bpl.n 802a698 <_printf_i+0x1c0> 802a694: 6019 str r1, [r3, #0] 802a696: e002 b.n 802a69e <_printf_i+0x1c6> 802a698: 0668 lsls r0, r5, #25 802a69a: d5fb bpl.n 802a694 <_printf_i+0x1bc> 802a69c: 8019 strh r1, [r3, #0] 802a69e: 2300 movs r3, #0 802a6a0: 6123 str r3, [r4, #16] 802a6a2: 4616 mov r6, r2 802a6a4: e7bc b.n 802a620 <_printf_i+0x148> 802a6a6: 6833 ldr r3, [r6, #0] 802a6a8: 1d1a adds r2, r3, #4 802a6aa: 6032 str r2, [r6, #0] 802a6ac: 681e ldr r6, [r3, #0] 802a6ae: 6862 ldr r2, [r4, #4] 802a6b0: 2100 movs r1, #0 802a6b2: 4630 mov r0, r6 802a6b4: f7d5 fe24 bl 8000300 802a6b8: b108 cbz r0, 802a6be <_printf_i+0x1e6> 802a6ba: 1b80 subs r0, r0, r6 802a6bc: 6060 str r0, [r4, #4] 802a6be: 6863 ldr r3, [r4, #4] 802a6c0: 6123 str r3, [r4, #16] 802a6c2: 2300 movs r3, #0 802a6c4: f884 3043 strb.w r3, [r4, #67] @ 0x43 802a6c8: e7aa b.n 802a620 <_printf_i+0x148> 802a6ca: 6923 ldr r3, [r4, #16] 802a6cc: 4632 mov r2, r6 802a6ce: 4649 mov r1, r9 802a6d0: 4640 mov r0, r8 802a6d2: 47d0 blx sl 802a6d4: 3001 adds r0, #1 802a6d6: d0ad beq.n 802a634 <_printf_i+0x15c> 802a6d8: 6823 ldr r3, [r4, #0] 802a6da: 079b lsls r3, r3, #30 802a6dc: d413 bmi.n 802a706 <_printf_i+0x22e> 802a6de: 68e0 ldr r0, [r4, #12] 802a6e0: 9b03 ldr r3, [sp, #12] 802a6e2: 4298 cmp r0, r3 802a6e4: bfb8 it lt 802a6e6: 4618 movlt r0, r3 802a6e8: e7a6 b.n 802a638 <_printf_i+0x160> 802a6ea: 2301 movs r3, #1 802a6ec: 4632 mov r2, r6 802a6ee: 4649 mov r1, r9 802a6f0: 4640 mov r0, r8 802a6f2: 47d0 blx sl 802a6f4: 3001 adds r0, #1 802a6f6: d09d beq.n 802a634 <_printf_i+0x15c> 802a6f8: 3501 adds r5, #1 802a6fa: 68e3 ldr r3, [r4, #12] 802a6fc: 9903 ldr r1, [sp, #12] 802a6fe: 1a5b subs r3, r3, r1 802a700: 42ab cmp r3, r5 802a702: dcf2 bgt.n 802a6ea <_printf_i+0x212> 802a704: e7eb b.n 802a6de <_printf_i+0x206> 802a706: 2500 movs r5, #0 802a708: f104 0619 add.w r6, r4, #25 802a70c: e7f5 b.n 802a6fa <_printf_i+0x222> 802a70e: bf00 nop 802a710: 08031e93 .word 0x08031e93 802a714: 08031ea4 .word 0x08031ea4 0802a718 : 802a718: 2300 movs r3, #0 802a71a: b510 push {r4, lr} 802a71c: 4604 mov r4, r0 802a71e: e9c0 3300 strd r3, r3, [r0] 802a722: e9c0 3304 strd r3, r3, [r0, #16] 802a726: 6083 str r3, [r0, #8] 802a728: 8181 strh r1, [r0, #12] 802a72a: 6643 str r3, [r0, #100] @ 0x64 802a72c: 81c2 strh r2, [r0, #14] 802a72e: 6183 str r3, [r0, #24] 802a730: 4619 mov r1, r3 802a732: 2208 movs r2, #8 802a734: 305c adds r0, #92 @ 0x5c 802a736: f000 fa43 bl 802abc0 802a73a: 4b0d ldr r3, [pc, #52] @ (802a770 ) 802a73c: 6263 str r3, [r4, #36] @ 0x24 802a73e: 4b0d ldr r3, [pc, #52] @ (802a774 ) 802a740: 62a3 str r3, [r4, #40] @ 0x28 802a742: 4b0d ldr r3, [pc, #52] @ (802a778 ) 802a744: 62e3 str r3, [r4, #44] @ 0x2c 802a746: 4b0d ldr r3, [pc, #52] @ (802a77c ) 802a748: 6323 str r3, [r4, #48] @ 0x30 802a74a: 4b0d ldr r3, [pc, #52] @ (802a780 ) 802a74c: 6224 str r4, [r4, #32] 802a74e: 429c cmp r4, r3 802a750: d006 beq.n 802a760 802a752: f103 0268 add.w r2, r3, #104 @ 0x68 802a756: 4294 cmp r4, r2 802a758: d002 beq.n 802a760 802a75a: 33d0 adds r3, #208 @ 0xd0 802a75c: 429c cmp r4, r3 802a75e: d105 bne.n 802a76c 802a760: f104 0058 add.w r0, r4, #88 @ 0x58 802a764: e8bd 4010 ldmia.w sp!, {r4, lr} 802a768: f000 bb1e b.w 802ada8 <__retarget_lock_init_recursive> 802a76c: bd10 pop {r4, pc} 802a76e: bf00 nop 802a770: 0802a9bd .word 0x0802a9bd 802a774: 0802a9df .word 0x0802a9df 802a778: 0802aa17 .word 0x0802aa17 802a77c: 0802aa3b .word 0x0802aa3b 802a780: 2402b134 .word 0x2402b134 0802a784 : 802a784: 4a02 ldr r2, [pc, #8] @ (802a790 ) 802a786: 4903 ldr r1, [pc, #12] @ (802a794 ) 802a788: 4803 ldr r0, [pc, #12] @ (802a798 ) 802a78a: f000 b869 b.w 802a860 <_fwalk_sglue> 802a78e: bf00 nop 802a790: 2400005c .word 0x2400005c 802a794: 0802d0cd .word 0x0802d0cd 802a798: 240001d8 .word 0x240001d8 0802a79c : 802a79c: 6841 ldr r1, [r0, #4] 802a79e: 4b0c ldr r3, [pc, #48] @ (802a7d0 ) 802a7a0: 4299 cmp r1, r3 802a7a2: b510 push {r4, lr} 802a7a4: 4604 mov r4, r0 802a7a6: d001 beq.n 802a7ac 802a7a8: f002 fc90 bl 802d0cc <_fflush_r> 802a7ac: 68a1 ldr r1, [r4, #8] 802a7ae: 4b09 ldr r3, [pc, #36] @ (802a7d4 ) 802a7b0: 4299 cmp r1, r3 802a7b2: d002 beq.n 802a7ba 802a7b4: 4620 mov r0, r4 802a7b6: f002 fc89 bl 802d0cc <_fflush_r> 802a7ba: 68e1 ldr r1, [r4, #12] 802a7bc: 4b06 ldr r3, [pc, #24] @ (802a7d8 ) 802a7be: 4299 cmp r1, r3 802a7c0: d004 beq.n 802a7cc 802a7c2: 4620 mov r0, r4 802a7c4: e8bd 4010 ldmia.w sp!, {r4, lr} 802a7c8: f002 bc80 b.w 802d0cc <_fflush_r> 802a7cc: bd10 pop {r4, pc} 802a7ce: bf00 nop 802a7d0: 2402b134 .word 0x2402b134 802a7d4: 2402b19c .word 0x2402b19c 802a7d8: 2402b204 .word 0x2402b204 0802a7dc : 802a7dc: b510 push {r4, lr} 802a7de: 4b0b ldr r3, [pc, #44] @ (802a80c ) 802a7e0: 4c0b ldr r4, [pc, #44] @ (802a810 ) 802a7e2: 4a0c ldr r2, [pc, #48] @ (802a814 ) 802a7e4: 601a str r2, [r3, #0] 802a7e6: 4620 mov r0, r4 802a7e8: 2200 movs r2, #0 802a7ea: 2104 movs r1, #4 802a7ec: f7ff ff94 bl 802a718 802a7f0: f104 0068 add.w r0, r4, #104 @ 0x68 802a7f4: 2201 movs r2, #1 802a7f6: 2109 movs r1, #9 802a7f8: f7ff ff8e bl 802a718 802a7fc: f104 00d0 add.w r0, r4, #208 @ 0xd0 802a800: 2202 movs r2, #2 802a802: e8bd 4010 ldmia.w sp!, {r4, lr} 802a806: 2112 movs r1, #18 802a808: f7ff bf86 b.w 802a718 802a80c: 2402b26c .word 0x2402b26c 802a810: 2402b134 .word 0x2402b134 802a814: 0802a785 .word 0x0802a785 0802a818 <__sfp_lock_acquire>: 802a818: 4801 ldr r0, [pc, #4] @ (802a820 <__sfp_lock_acquire+0x8>) 802a81a: f000 bac6 b.w 802adaa <__retarget_lock_acquire_recursive> 802a81e: bf00 nop 802a820: 2402b275 .word 0x2402b275 0802a824 <__sfp_lock_release>: 802a824: 4801 ldr r0, [pc, #4] @ (802a82c <__sfp_lock_release+0x8>) 802a826: f000 bac1 b.w 802adac <__retarget_lock_release_recursive> 802a82a: bf00 nop 802a82c: 2402b275 .word 0x2402b275 0802a830 <__sinit>: 802a830: b510 push {r4, lr} 802a832: 4604 mov r4, r0 802a834: f7ff fff0 bl 802a818 <__sfp_lock_acquire> 802a838: 6a23 ldr r3, [r4, #32] 802a83a: b11b cbz r3, 802a844 <__sinit+0x14> 802a83c: e8bd 4010 ldmia.w sp!, {r4, lr} 802a840: f7ff bff0 b.w 802a824 <__sfp_lock_release> 802a844: 4b04 ldr r3, [pc, #16] @ (802a858 <__sinit+0x28>) 802a846: 6223 str r3, [r4, #32] 802a848: 4b04 ldr r3, [pc, #16] @ (802a85c <__sinit+0x2c>) 802a84a: 681b ldr r3, [r3, #0] 802a84c: 2b00 cmp r3, #0 802a84e: d1f5 bne.n 802a83c <__sinit+0xc> 802a850: f7ff ffc4 bl 802a7dc 802a854: e7f2 b.n 802a83c <__sinit+0xc> 802a856: bf00 nop 802a858: 0802a79d .word 0x0802a79d 802a85c: 2402b26c .word 0x2402b26c 0802a860 <_fwalk_sglue>: 802a860: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802a864: 4607 mov r7, r0 802a866: 4688 mov r8, r1 802a868: 4614 mov r4, r2 802a86a: 2600 movs r6, #0 802a86c: e9d4 9501 ldrd r9, r5, [r4, #4] 802a870: f1b9 0901 subs.w r9, r9, #1 802a874: d505 bpl.n 802a882 <_fwalk_sglue+0x22> 802a876: 6824 ldr r4, [r4, #0] 802a878: 2c00 cmp r4, #0 802a87a: d1f7 bne.n 802a86c <_fwalk_sglue+0xc> 802a87c: 4630 mov r0, r6 802a87e: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802a882: 89ab ldrh r3, [r5, #12] 802a884: 2b01 cmp r3, #1 802a886: d907 bls.n 802a898 <_fwalk_sglue+0x38> 802a888: f9b5 300e ldrsh.w r3, [r5, #14] 802a88c: 3301 adds r3, #1 802a88e: d003 beq.n 802a898 <_fwalk_sglue+0x38> 802a890: 4629 mov r1, r5 802a892: 4638 mov r0, r7 802a894: 47c0 blx r8 802a896: 4306 orrs r6, r0 802a898: 3568 adds r5, #104 @ 0x68 802a89a: e7e9 b.n 802a870 <_fwalk_sglue+0x10> 0802a89c : 802a89c: b40f push {r0, r1, r2, r3} 802a89e: b507 push {r0, r1, r2, lr} 802a8a0: 4906 ldr r1, [pc, #24] @ (802a8bc ) 802a8a2: ab04 add r3, sp, #16 802a8a4: 6808 ldr r0, [r1, #0] 802a8a6: f853 2b04 ldr.w r2, [r3], #4 802a8aa: 6881 ldr r1, [r0, #8] 802a8ac: 9301 str r3, [sp, #4] 802a8ae: f002 fa71 bl 802cd94 <_vfiprintf_r> 802a8b2: b003 add sp, #12 802a8b4: f85d eb04 ldr.w lr, [sp], #4 802a8b8: b004 add sp, #16 802a8ba: 4770 bx lr 802a8bc: 240001d4 .word 0x240001d4 0802a8c0 <_puts_r>: 802a8c0: 6a03 ldr r3, [r0, #32] 802a8c2: b570 push {r4, r5, r6, lr} 802a8c4: 6884 ldr r4, [r0, #8] 802a8c6: 4605 mov r5, r0 802a8c8: 460e mov r6, r1 802a8ca: b90b cbnz r3, 802a8d0 <_puts_r+0x10> 802a8cc: f7ff ffb0 bl 802a830 <__sinit> 802a8d0: 6e63 ldr r3, [r4, #100] @ 0x64 802a8d2: 07db lsls r3, r3, #31 802a8d4: d405 bmi.n 802a8e2 <_puts_r+0x22> 802a8d6: 89a3 ldrh r3, [r4, #12] 802a8d8: 0598 lsls r0, r3, #22 802a8da: d402 bmi.n 802a8e2 <_puts_r+0x22> 802a8dc: 6da0 ldr r0, [r4, #88] @ 0x58 802a8de: f000 fa64 bl 802adaa <__retarget_lock_acquire_recursive> 802a8e2: 89a3 ldrh r3, [r4, #12] 802a8e4: 0719 lsls r1, r3, #28 802a8e6: d502 bpl.n 802a8ee <_puts_r+0x2e> 802a8e8: 6923 ldr r3, [r4, #16] 802a8ea: 2b00 cmp r3, #0 802a8ec: d135 bne.n 802a95a <_puts_r+0x9a> 802a8ee: 4621 mov r1, r4 802a8f0: 4628 mov r0, r5 802a8f2: f000 f8e5 bl 802aac0 <__swsetup_r> 802a8f6: b380 cbz r0, 802a95a <_puts_r+0x9a> 802a8f8: f04f 35ff mov.w r5, #4294967295 @ 0xffffffff 802a8fc: 6e63 ldr r3, [r4, #100] @ 0x64 802a8fe: 07da lsls r2, r3, #31 802a900: d405 bmi.n 802a90e <_puts_r+0x4e> 802a902: 89a3 ldrh r3, [r4, #12] 802a904: 059b lsls r3, r3, #22 802a906: d402 bmi.n 802a90e <_puts_r+0x4e> 802a908: 6da0 ldr r0, [r4, #88] @ 0x58 802a90a: f000 fa4f bl 802adac <__retarget_lock_release_recursive> 802a90e: 4628 mov r0, r5 802a910: bd70 pop {r4, r5, r6, pc} 802a912: 2b00 cmp r3, #0 802a914: da04 bge.n 802a920 <_puts_r+0x60> 802a916: 69a2 ldr r2, [r4, #24] 802a918: 429a cmp r2, r3 802a91a: dc17 bgt.n 802a94c <_puts_r+0x8c> 802a91c: 290a cmp r1, #10 802a91e: d015 beq.n 802a94c <_puts_r+0x8c> 802a920: 6823 ldr r3, [r4, #0] 802a922: 1c5a adds r2, r3, #1 802a924: 6022 str r2, [r4, #0] 802a926: 7019 strb r1, [r3, #0] 802a928: 68a3 ldr r3, [r4, #8] 802a92a: f816 1f01 ldrb.w r1, [r6, #1]! 802a92e: 3b01 subs r3, #1 802a930: 60a3 str r3, [r4, #8] 802a932: 2900 cmp r1, #0 802a934: d1ed bne.n 802a912 <_puts_r+0x52> 802a936: 2b00 cmp r3, #0 802a938: da11 bge.n 802a95e <_puts_r+0x9e> 802a93a: 4622 mov r2, r4 802a93c: 210a movs r1, #10 802a93e: 4628 mov r0, r5 802a940: f000 f87f bl 802aa42 <__swbuf_r> 802a944: 3001 adds r0, #1 802a946: d0d7 beq.n 802a8f8 <_puts_r+0x38> 802a948: 250a movs r5, #10 802a94a: e7d7 b.n 802a8fc <_puts_r+0x3c> 802a94c: 4622 mov r2, r4 802a94e: 4628 mov r0, r5 802a950: f000 f877 bl 802aa42 <__swbuf_r> 802a954: 3001 adds r0, #1 802a956: d1e7 bne.n 802a928 <_puts_r+0x68> 802a958: e7ce b.n 802a8f8 <_puts_r+0x38> 802a95a: 3e01 subs r6, #1 802a95c: e7e4 b.n 802a928 <_puts_r+0x68> 802a95e: 6823 ldr r3, [r4, #0] 802a960: 1c5a adds r2, r3, #1 802a962: 6022 str r2, [r4, #0] 802a964: 220a movs r2, #10 802a966: 701a strb r2, [r3, #0] 802a968: e7ee b.n 802a948 <_puts_r+0x88> ... 0802a96c : 802a96c: 4b02 ldr r3, [pc, #8] @ (802a978 ) 802a96e: 4601 mov r1, r0 802a970: 6818 ldr r0, [r3, #0] 802a972: f7ff bfa5 b.w 802a8c0 <_puts_r> 802a976: bf00 nop 802a978: 240001d4 .word 0x240001d4 0802a97c : 802a97c: b40e push {r1, r2, r3} 802a97e: b500 push {lr} 802a980: b09c sub sp, #112 @ 0x70 802a982: ab1d add r3, sp, #116 @ 0x74 802a984: 9002 str r0, [sp, #8] 802a986: 9006 str r0, [sp, #24] 802a988: f06f 4100 mvn.w r1, #2147483648 @ 0x80000000 802a98c: 4809 ldr r0, [pc, #36] @ (802a9b4 ) 802a98e: 9107 str r1, [sp, #28] 802a990: 9104 str r1, [sp, #16] 802a992: 4909 ldr r1, [pc, #36] @ (802a9b8 ) 802a994: f853 2b04 ldr.w r2, [r3], #4 802a998: 9105 str r1, [sp, #20] 802a99a: 6800 ldr r0, [r0, #0] 802a99c: 9301 str r3, [sp, #4] 802a99e: a902 add r1, sp, #8 802a9a0: f002 f8d2 bl 802cb48 <_svfiprintf_r> 802a9a4: 9b02 ldr r3, [sp, #8] 802a9a6: 2200 movs r2, #0 802a9a8: 701a strb r2, [r3, #0] 802a9aa: b01c add sp, #112 @ 0x70 802a9ac: f85d eb04 ldr.w lr, [sp], #4 802a9b0: b003 add sp, #12 802a9b2: 4770 bx lr 802a9b4: 240001d4 .word 0x240001d4 802a9b8: ffff0208 .word 0xffff0208 0802a9bc <__sread>: 802a9bc: b510 push {r4, lr} 802a9be: 460c mov r4, r1 802a9c0: f9b1 100e ldrsh.w r1, [r1, #14] 802a9c4: f000 f992 bl 802acec <_read_r> 802a9c8: 2800 cmp r0, #0 802a9ca: bfab itete ge 802a9cc: 6d63 ldrge r3, [r4, #84] @ 0x54 802a9ce: 89a3 ldrhlt r3, [r4, #12] 802a9d0: 181b addge r3, r3, r0 802a9d2: f423 5380 biclt.w r3, r3, #4096 @ 0x1000 802a9d6: bfac ite ge 802a9d8: 6563 strge r3, [r4, #84] @ 0x54 802a9da: 81a3 strhlt r3, [r4, #12] 802a9dc: bd10 pop {r4, pc} 0802a9de <__swrite>: 802a9de: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802a9e2: 461f mov r7, r3 802a9e4: 898b ldrh r3, [r1, #12] 802a9e6: 05db lsls r3, r3, #23 802a9e8: 4605 mov r5, r0 802a9ea: 460c mov r4, r1 802a9ec: 4616 mov r6, r2 802a9ee: d505 bpl.n 802a9fc <__swrite+0x1e> 802a9f0: f9b1 100e ldrsh.w r1, [r1, #14] 802a9f4: 2302 movs r3, #2 802a9f6: 2200 movs r2, #0 802a9f8: f000 f966 bl 802acc8 <_lseek_r> 802a9fc: 89a3 ldrh r3, [r4, #12] 802a9fe: f9b4 100e ldrsh.w r1, [r4, #14] 802aa02: f423 5380 bic.w r3, r3, #4096 @ 0x1000 802aa06: 81a3 strh r3, [r4, #12] 802aa08: 4632 mov r2, r6 802aa0a: 463b mov r3, r7 802aa0c: 4628 mov r0, r5 802aa0e: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} 802aa12: f000 b98d b.w 802ad30 <_write_r> 0802aa16 <__sseek>: 802aa16: b510 push {r4, lr} 802aa18: 460c mov r4, r1 802aa1a: f9b1 100e ldrsh.w r1, [r1, #14] 802aa1e: f000 f953 bl 802acc8 <_lseek_r> 802aa22: 1c43 adds r3, r0, #1 802aa24: 89a3 ldrh r3, [r4, #12] 802aa26: bf15 itete ne 802aa28: 6560 strne r0, [r4, #84] @ 0x54 802aa2a: f423 5380 biceq.w r3, r3, #4096 @ 0x1000 802aa2e: f443 5380 orrne.w r3, r3, #4096 @ 0x1000 802aa32: 81a3 strheq r3, [r4, #12] 802aa34: bf18 it ne 802aa36: 81a3 strhne r3, [r4, #12] 802aa38: bd10 pop {r4, pc} 0802aa3a <__sclose>: 802aa3a: f9b1 100e ldrsh.w r1, [r1, #14] 802aa3e: f000 b8dd b.w 802abfc <_close_r> 0802aa42 <__swbuf_r>: 802aa42: b5f8 push {r3, r4, r5, r6, r7, lr} 802aa44: 460e mov r6, r1 802aa46: 4614 mov r4, r2 802aa48: 4605 mov r5, r0 802aa4a: b118 cbz r0, 802aa54 <__swbuf_r+0x12> 802aa4c: 6a03 ldr r3, [r0, #32] 802aa4e: b90b cbnz r3, 802aa54 <__swbuf_r+0x12> 802aa50: f7ff feee bl 802a830 <__sinit> 802aa54: 69a3 ldr r3, [r4, #24] 802aa56: 60a3 str r3, [r4, #8] 802aa58: 89a3 ldrh r3, [r4, #12] 802aa5a: 071a lsls r2, r3, #28 802aa5c: d501 bpl.n 802aa62 <__swbuf_r+0x20> 802aa5e: 6923 ldr r3, [r4, #16] 802aa60: b943 cbnz r3, 802aa74 <__swbuf_r+0x32> 802aa62: 4621 mov r1, r4 802aa64: 4628 mov r0, r5 802aa66: f000 f82b bl 802aac0 <__swsetup_r> 802aa6a: b118 cbz r0, 802aa74 <__swbuf_r+0x32> 802aa6c: f04f 37ff mov.w r7, #4294967295 @ 0xffffffff 802aa70: 4638 mov r0, r7 802aa72: bdf8 pop {r3, r4, r5, r6, r7, pc} 802aa74: 6823 ldr r3, [r4, #0] 802aa76: 6922 ldr r2, [r4, #16] 802aa78: 1a98 subs r0, r3, r2 802aa7a: 6963 ldr r3, [r4, #20] 802aa7c: b2f6 uxtb r6, r6 802aa7e: 4283 cmp r3, r0 802aa80: 4637 mov r7, r6 802aa82: dc05 bgt.n 802aa90 <__swbuf_r+0x4e> 802aa84: 4621 mov r1, r4 802aa86: 4628 mov r0, r5 802aa88: f002 fb20 bl 802d0cc <_fflush_r> 802aa8c: 2800 cmp r0, #0 802aa8e: d1ed bne.n 802aa6c <__swbuf_r+0x2a> 802aa90: 68a3 ldr r3, [r4, #8] 802aa92: 3b01 subs r3, #1 802aa94: 60a3 str r3, [r4, #8] 802aa96: 6823 ldr r3, [r4, #0] 802aa98: 1c5a adds r2, r3, #1 802aa9a: 6022 str r2, [r4, #0] 802aa9c: 701e strb r6, [r3, #0] 802aa9e: 6962 ldr r2, [r4, #20] 802aaa0: 1c43 adds r3, r0, #1 802aaa2: 429a cmp r2, r3 802aaa4: d004 beq.n 802aab0 <__swbuf_r+0x6e> 802aaa6: 89a3 ldrh r3, [r4, #12] 802aaa8: 07db lsls r3, r3, #31 802aaaa: d5e1 bpl.n 802aa70 <__swbuf_r+0x2e> 802aaac: 2e0a cmp r6, #10 802aaae: d1df bne.n 802aa70 <__swbuf_r+0x2e> 802aab0: 4621 mov r1, r4 802aab2: 4628 mov r0, r5 802aab4: f002 fb0a bl 802d0cc <_fflush_r> 802aab8: 2800 cmp r0, #0 802aaba: d0d9 beq.n 802aa70 <__swbuf_r+0x2e> 802aabc: e7d6 b.n 802aa6c <__swbuf_r+0x2a> ... 0802aac0 <__swsetup_r>: 802aac0: b538 push {r3, r4, r5, lr} 802aac2: 4b29 ldr r3, [pc, #164] @ (802ab68 <__swsetup_r+0xa8>) 802aac4: 4605 mov r5, r0 802aac6: 6818 ldr r0, [r3, #0] 802aac8: 460c mov r4, r1 802aaca: b118 cbz r0, 802aad4 <__swsetup_r+0x14> 802aacc: 6a03 ldr r3, [r0, #32] 802aace: b90b cbnz r3, 802aad4 <__swsetup_r+0x14> 802aad0: f7ff feae bl 802a830 <__sinit> 802aad4: f9b4 300c ldrsh.w r3, [r4, #12] 802aad8: 0719 lsls r1, r3, #28 802aada: d422 bmi.n 802ab22 <__swsetup_r+0x62> 802aadc: 06da lsls r2, r3, #27 802aade: d407 bmi.n 802aaf0 <__swsetup_r+0x30> 802aae0: 2209 movs r2, #9 802aae2: 602a str r2, [r5, #0] 802aae4: f043 0340 orr.w r3, r3, #64 @ 0x40 802aae8: 81a3 strh r3, [r4, #12] 802aaea: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802aaee: e033 b.n 802ab58 <__swsetup_r+0x98> 802aaf0: 0758 lsls r0, r3, #29 802aaf2: d512 bpl.n 802ab1a <__swsetup_r+0x5a> 802aaf4: 6b61 ldr r1, [r4, #52] @ 0x34 802aaf6: b141 cbz r1, 802ab0a <__swsetup_r+0x4a> 802aaf8: f104 0344 add.w r3, r4, #68 @ 0x44 802aafc: 4299 cmp r1, r3 802aafe: d002 beq.n 802ab06 <__swsetup_r+0x46> 802ab00: 4628 mov r0, r5 802ab02: f000 ff6b bl 802b9dc <_free_r> 802ab06: 2300 movs r3, #0 802ab08: 6363 str r3, [r4, #52] @ 0x34 802ab0a: 89a3 ldrh r3, [r4, #12] 802ab0c: f023 0324 bic.w r3, r3, #36 @ 0x24 802ab10: 81a3 strh r3, [r4, #12] 802ab12: 2300 movs r3, #0 802ab14: 6063 str r3, [r4, #4] 802ab16: 6923 ldr r3, [r4, #16] 802ab18: 6023 str r3, [r4, #0] 802ab1a: 89a3 ldrh r3, [r4, #12] 802ab1c: f043 0308 orr.w r3, r3, #8 802ab20: 81a3 strh r3, [r4, #12] 802ab22: 6923 ldr r3, [r4, #16] 802ab24: b94b cbnz r3, 802ab3a <__swsetup_r+0x7a> 802ab26: 89a3 ldrh r3, [r4, #12] 802ab28: f403 7320 and.w r3, r3, #640 @ 0x280 802ab2c: f5b3 7f00 cmp.w r3, #512 @ 0x200 802ab30: d003 beq.n 802ab3a <__swsetup_r+0x7a> 802ab32: 4621 mov r1, r4 802ab34: 4628 mov r0, r5 802ab36: f002 fb29 bl 802d18c <__smakebuf_r> 802ab3a: f9b4 300c ldrsh.w r3, [r4, #12] 802ab3e: f013 0201 ands.w r2, r3, #1 802ab42: d00a beq.n 802ab5a <__swsetup_r+0x9a> 802ab44: 2200 movs r2, #0 802ab46: 60a2 str r2, [r4, #8] 802ab48: 6962 ldr r2, [r4, #20] 802ab4a: 4252 negs r2, r2 802ab4c: 61a2 str r2, [r4, #24] 802ab4e: 6922 ldr r2, [r4, #16] 802ab50: b942 cbnz r2, 802ab64 <__swsetup_r+0xa4> 802ab52: f013 0080 ands.w r0, r3, #128 @ 0x80 802ab56: d1c5 bne.n 802aae4 <__swsetup_r+0x24> 802ab58: bd38 pop {r3, r4, r5, pc} 802ab5a: 0799 lsls r1, r3, #30 802ab5c: bf58 it pl 802ab5e: 6962 ldrpl r2, [r4, #20] 802ab60: 60a2 str r2, [r4, #8] 802ab62: e7f4 b.n 802ab4e <__swsetup_r+0x8e> 802ab64: 2000 movs r0, #0 802ab66: e7f7 b.n 802ab58 <__swsetup_r+0x98> 802ab68: 240001d4 .word 0x240001d4 0802ab6c : 802ab6c: b510 push {r4, lr} 802ab6e: 3901 subs r1, #1 802ab70: 4402 add r2, r0 802ab72: 4290 cmp r0, r2 802ab74: d101 bne.n 802ab7a 802ab76: 2000 movs r0, #0 802ab78: e005 b.n 802ab86 802ab7a: 7803 ldrb r3, [r0, #0] 802ab7c: f811 4f01 ldrb.w r4, [r1, #1]! 802ab80: 42a3 cmp r3, r4 802ab82: d001 beq.n 802ab88 802ab84: 1b18 subs r0, r3, r4 802ab86: bd10 pop {r4, pc} 802ab88: 3001 adds r0, #1 802ab8a: e7f2 b.n 802ab72 0802ab8c : 802ab8c: 4288 cmp r0, r1 802ab8e: b510 push {r4, lr} 802ab90: eb01 0402 add.w r4, r1, r2 802ab94: d902 bls.n 802ab9c 802ab96: 4284 cmp r4, r0 802ab98: 4623 mov r3, r4 802ab9a: d807 bhi.n 802abac 802ab9c: 1e43 subs r3, r0, #1 802ab9e: 42a1 cmp r1, r4 802aba0: d008 beq.n 802abb4 802aba2: f811 2b01 ldrb.w r2, [r1], #1 802aba6: f803 2f01 strb.w r2, [r3, #1]! 802abaa: e7f8 b.n 802ab9e 802abac: 4402 add r2, r0 802abae: 4601 mov r1, r0 802abb0: 428a cmp r2, r1 802abb2: d100 bne.n 802abb6 802abb4: bd10 pop {r4, pc} 802abb6: f813 4d01 ldrb.w r4, [r3, #-1]! 802abba: f802 4d01 strb.w r4, [r2, #-1]! 802abbe: e7f7 b.n 802abb0 0802abc0 : 802abc0: 4402 add r2, r0 802abc2: 4603 mov r3, r0 802abc4: 4293 cmp r3, r2 802abc6: d100 bne.n 802abca 802abc8: 4770 bx lr 802abca: f803 1b01 strb.w r1, [r3], #1 802abce: e7f9 b.n 802abc4 0802abd0 : 802abd0: b510 push {r4, lr} 802abd2: b16a cbz r2, 802abf0 802abd4: 3901 subs r1, #1 802abd6: 1884 adds r4, r0, r2 802abd8: f810 2b01 ldrb.w r2, [r0], #1 802abdc: f811 3f01 ldrb.w r3, [r1, #1]! 802abe0: 429a cmp r2, r3 802abe2: d103 bne.n 802abec 802abe4: 42a0 cmp r0, r4 802abe6: d001 beq.n 802abec 802abe8: 2a00 cmp r2, #0 802abea: d1f5 bne.n 802abd8 802abec: 1ad0 subs r0, r2, r3 802abee: bd10 pop {r4, pc} 802abf0: 4610 mov r0, r2 802abf2: e7fc b.n 802abee 0802abf4 <_localeconv_r>: 802abf4: 4800 ldr r0, [pc, #0] @ (802abf8 <_localeconv_r+0x4>) 802abf6: 4770 bx lr 802abf8: 24000158 .word 0x24000158 0802abfc <_close_r>: 802abfc: b538 push {r3, r4, r5, lr} 802abfe: 4d06 ldr r5, [pc, #24] @ (802ac18 <_close_r+0x1c>) 802ac00: 2300 movs r3, #0 802ac02: 4604 mov r4, r0 802ac04: 4608 mov r0, r1 802ac06: 602b str r3, [r5, #0] 802ac08: f7d9 fb64 bl 80042d4 <_close> 802ac0c: 1c43 adds r3, r0, #1 802ac0e: d102 bne.n 802ac16 <_close_r+0x1a> 802ac10: 682b ldr r3, [r5, #0] 802ac12: b103 cbz r3, 802ac16 <_close_r+0x1a> 802ac14: 6023 str r3, [r4, #0] 802ac16: bd38 pop {r3, r4, r5, pc} 802ac18: 2402b270 .word 0x2402b270 0802ac1c <_reclaim_reent>: 802ac1c: 4b29 ldr r3, [pc, #164] @ (802acc4 <_reclaim_reent+0xa8>) 802ac1e: 681b ldr r3, [r3, #0] 802ac20: 4283 cmp r3, r0 802ac22: b570 push {r4, r5, r6, lr} 802ac24: 4604 mov r4, r0 802ac26: d04b beq.n 802acc0 <_reclaim_reent+0xa4> 802ac28: 69c3 ldr r3, [r0, #28] 802ac2a: b1ab cbz r3, 802ac58 <_reclaim_reent+0x3c> 802ac2c: 68db ldr r3, [r3, #12] 802ac2e: b16b cbz r3, 802ac4c <_reclaim_reent+0x30> 802ac30: 2500 movs r5, #0 802ac32: 69e3 ldr r3, [r4, #28] 802ac34: 68db ldr r3, [r3, #12] 802ac36: 5959 ldr r1, [r3, r5] 802ac38: 2900 cmp r1, #0 802ac3a: d13b bne.n 802acb4 <_reclaim_reent+0x98> 802ac3c: 3504 adds r5, #4 802ac3e: 2d80 cmp r5, #128 @ 0x80 802ac40: d1f7 bne.n 802ac32 <_reclaim_reent+0x16> 802ac42: 69e3 ldr r3, [r4, #28] 802ac44: 4620 mov r0, r4 802ac46: 68d9 ldr r1, [r3, #12] 802ac48: f000 fec8 bl 802b9dc <_free_r> 802ac4c: 69e3 ldr r3, [r4, #28] 802ac4e: 6819 ldr r1, [r3, #0] 802ac50: b111 cbz r1, 802ac58 <_reclaim_reent+0x3c> 802ac52: 4620 mov r0, r4 802ac54: f000 fec2 bl 802b9dc <_free_r> 802ac58: 6961 ldr r1, [r4, #20] 802ac5a: b111 cbz r1, 802ac62 <_reclaim_reent+0x46> 802ac5c: 4620 mov r0, r4 802ac5e: f000 febd bl 802b9dc <_free_r> 802ac62: 69e1 ldr r1, [r4, #28] 802ac64: b111 cbz r1, 802ac6c <_reclaim_reent+0x50> 802ac66: 4620 mov r0, r4 802ac68: f000 feb8 bl 802b9dc <_free_r> 802ac6c: 6b21 ldr r1, [r4, #48] @ 0x30 802ac6e: b111 cbz r1, 802ac76 <_reclaim_reent+0x5a> 802ac70: 4620 mov r0, r4 802ac72: f000 feb3 bl 802b9dc <_free_r> 802ac76: 6b61 ldr r1, [r4, #52] @ 0x34 802ac78: b111 cbz r1, 802ac80 <_reclaim_reent+0x64> 802ac7a: 4620 mov r0, r4 802ac7c: f000 feae bl 802b9dc <_free_r> 802ac80: 6ba1 ldr r1, [r4, #56] @ 0x38 802ac82: b111 cbz r1, 802ac8a <_reclaim_reent+0x6e> 802ac84: 4620 mov r0, r4 802ac86: f000 fea9 bl 802b9dc <_free_r> 802ac8a: 6ca1 ldr r1, [r4, #72] @ 0x48 802ac8c: b111 cbz r1, 802ac94 <_reclaim_reent+0x78> 802ac8e: 4620 mov r0, r4 802ac90: f000 fea4 bl 802b9dc <_free_r> 802ac94: 6c61 ldr r1, [r4, #68] @ 0x44 802ac96: b111 cbz r1, 802ac9e <_reclaim_reent+0x82> 802ac98: 4620 mov r0, r4 802ac9a: f000 fe9f bl 802b9dc <_free_r> 802ac9e: 6ae1 ldr r1, [r4, #44] @ 0x2c 802aca0: b111 cbz r1, 802aca8 <_reclaim_reent+0x8c> 802aca2: 4620 mov r0, r4 802aca4: f000 fe9a bl 802b9dc <_free_r> 802aca8: 6a23 ldr r3, [r4, #32] 802acaa: b14b cbz r3, 802acc0 <_reclaim_reent+0xa4> 802acac: 4620 mov r0, r4 802acae: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} 802acb2: 4718 bx r3 802acb4: 680e ldr r6, [r1, #0] 802acb6: 4620 mov r0, r4 802acb8: f000 fe90 bl 802b9dc <_free_r> 802acbc: 4631 mov r1, r6 802acbe: e7bb b.n 802ac38 <_reclaim_reent+0x1c> 802acc0: bd70 pop {r4, r5, r6, pc} 802acc2: bf00 nop 802acc4: 240001d4 .word 0x240001d4 0802acc8 <_lseek_r>: 802acc8: b538 push {r3, r4, r5, lr} 802acca: 4d07 ldr r5, [pc, #28] @ (802ace8 <_lseek_r+0x20>) 802accc: 4604 mov r4, r0 802acce: 4608 mov r0, r1 802acd0: 4611 mov r1, r2 802acd2: 2200 movs r2, #0 802acd4: 602a str r2, [r5, #0] 802acd6: 461a mov r2, r3 802acd8: f7d9 fb23 bl 8004322 <_lseek> 802acdc: 1c43 adds r3, r0, #1 802acde: d102 bne.n 802ace6 <_lseek_r+0x1e> 802ace0: 682b ldr r3, [r5, #0] 802ace2: b103 cbz r3, 802ace6 <_lseek_r+0x1e> 802ace4: 6023 str r3, [r4, #0] 802ace6: bd38 pop {r3, r4, r5, pc} 802ace8: 2402b270 .word 0x2402b270 0802acec <_read_r>: 802acec: b538 push {r3, r4, r5, lr} 802acee: 4d07 ldr r5, [pc, #28] @ (802ad0c <_read_r+0x20>) 802acf0: 4604 mov r4, r0 802acf2: 4608 mov r0, r1 802acf4: 4611 mov r1, r2 802acf6: 2200 movs r2, #0 802acf8: 602a str r2, [r5, #0] 802acfa: 461a mov r2, r3 802acfc: f7d9 fab1 bl 8004262 <_read> 802ad00: 1c43 adds r3, r0, #1 802ad02: d102 bne.n 802ad0a <_read_r+0x1e> 802ad04: 682b ldr r3, [r5, #0] 802ad06: b103 cbz r3, 802ad0a <_read_r+0x1e> 802ad08: 6023 str r3, [r4, #0] 802ad0a: bd38 pop {r3, r4, r5, pc} 802ad0c: 2402b270 .word 0x2402b270 0802ad10 <_sbrk_r>: 802ad10: b538 push {r3, r4, r5, lr} 802ad12: 4d06 ldr r5, [pc, #24] @ (802ad2c <_sbrk_r+0x1c>) 802ad14: 2300 movs r3, #0 802ad16: 4604 mov r4, r0 802ad18: 4608 mov r0, r1 802ad1a: 602b str r3, [r5, #0] 802ad1c: f7d9 fb0e bl 800433c <_sbrk> 802ad20: 1c43 adds r3, r0, #1 802ad22: d102 bne.n 802ad2a <_sbrk_r+0x1a> 802ad24: 682b ldr r3, [r5, #0] 802ad26: b103 cbz r3, 802ad2a <_sbrk_r+0x1a> 802ad28: 6023 str r3, [r4, #0] 802ad2a: bd38 pop {r3, r4, r5, pc} 802ad2c: 2402b270 .word 0x2402b270 0802ad30 <_write_r>: 802ad30: b538 push {r3, r4, r5, lr} 802ad32: 4d07 ldr r5, [pc, #28] @ (802ad50 <_write_r+0x20>) 802ad34: 4604 mov r4, r0 802ad36: 4608 mov r0, r1 802ad38: 4611 mov r1, r2 802ad3a: 2200 movs r2, #0 802ad3c: 602a str r2, [r5, #0] 802ad3e: 461a mov r2, r3 802ad40: f7d9 faac bl 800429c <_write> 802ad44: 1c43 adds r3, r0, #1 802ad46: d102 bne.n 802ad4e <_write_r+0x1e> 802ad48: 682b ldr r3, [r5, #0] 802ad4a: b103 cbz r3, 802ad4e <_write_r+0x1e> 802ad4c: 6023 str r3, [r4, #0] 802ad4e: bd38 pop {r3, r4, r5, pc} 802ad50: 2402b270 .word 0x2402b270 0802ad54 <__errno>: 802ad54: 4b01 ldr r3, [pc, #4] @ (802ad5c <__errno+0x8>) 802ad56: 6818 ldr r0, [r3, #0] 802ad58: 4770 bx lr 802ad5a: bf00 nop 802ad5c: 240001d4 .word 0x240001d4 0802ad60 <__libc_init_array>: 802ad60: b570 push {r4, r5, r6, lr} 802ad62: 4d0d ldr r5, [pc, #52] @ (802ad98 <__libc_init_array+0x38>) 802ad64: 4c0d ldr r4, [pc, #52] @ (802ad9c <__libc_init_array+0x3c>) 802ad66: 1b64 subs r4, r4, r5 802ad68: 10a4 asrs r4, r4, #2 802ad6a: 2600 movs r6, #0 802ad6c: 42a6 cmp r6, r4 802ad6e: d109 bne.n 802ad84 <__libc_init_array+0x24> 802ad70: 4d0b ldr r5, [pc, #44] @ (802ada0 <__libc_init_array+0x40>) 802ad72: 4c0c ldr r4, [pc, #48] @ (802ada4 <__libc_init_array+0x44>) 802ad74: f002 fac8 bl 802d308 <_init> 802ad78: 1b64 subs r4, r4, r5 802ad7a: 10a4 asrs r4, r4, #2 802ad7c: 2600 movs r6, #0 802ad7e: 42a6 cmp r6, r4 802ad80: d105 bne.n 802ad8e <__libc_init_array+0x2e> 802ad82: bd70 pop {r4, r5, r6, pc} 802ad84: f855 3b04 ldr.w r3, [r5], #4 802ad88: 4798 blx r3 802ad8a: 3601 adds r6, #1 802ad8c: e7ee b.n 802ad6c <__libc_init_array+0xc> 802ad8e: f855 3b04 ldr.w r3, [r5], #4 802ad92: 4798 blx r3 802ad94: 3601 adds r6, #1 802ad96: e7f2 b.n 802ad7e <__libc_init_array+0x1e> 802ad98: 08032144 .word 0x08032144 802ad9c: 08032144 .word 0x08032144 802ada0: 08032144 .word 0x08032144 802ada4: 08032148 .word 0x08032148 0802ada8 <__retarget_lock_init_recursive>: 802ada8: 4770 bx lr 0802adaa <__retarget_lock_acquire_recursive>: 802adaa: 4770 bx lr 0802adac <__retarget_lock_release_recursive>: 802adac: 4770 bx lr 0802adae : 802adae: 440a add r2, r1 802adb0: 4291 cmp r1, r2 802adb2: f100 33ff add.w r3, r0, #4294967295 @ 0xffffffff 802adb6: d100 bne.n 802adba 802adb8: 4770 bx lr 802adba: b510 push {r4, lr} 802adbc: f811 4b01 ldrb.w r4, [r1], #1 802adc0: f803 4f01 strb.w r4, [r3, #1]! 802adc4: 4291 cmp r1, r2 802adc6: d1f9 bne.n 802adbc 802adc8: bd10 pop {r4, pc} 802adca: 0000 movs r0, r0 802adcc: 0000 movs r0, r0 ... 0802add0 : 802add0: ed9f 0b01 vldr d0, [pc, #4] @ 802add8 802add4: 4770 bx lr 802add6: bf00 nop 802add8: 00000000 .word 0x00000000 802addc: 7ff80000 .word 0x7ff80000 0802ade0 <__assert_func>: 802ade0: b51f push {r0, r1, r2, r3, r4, lr} 802ade2: 4614 mov r4, r2 802ade4: 461a mov r2, r3 802ade6: 4b09 ldr r3, [pc, #36] @ (802ae0c <__assert_func+0x2c>) 802ade8: 681b ldr r3, [r3, #0] 802adea: 4605 mov r5, r0 802adec: 68d8 ldr r0, [r3, #12] 802adee: b954 cbnz r4, 802ae06 <__assert_func+0x26> 802adf0: 4b07 ldr r3, [pc, #28] @ (802ae10 <__assert_func+0x30>) 802adf2: 461c mov r4, r3 802adf4: e9cd 3401 strd r3, r4, [sp, #4] 802adf8: 9100 str r1, [sp, #0] 802adfa: 462b mov r3, r5 802adfc: 4905 ldr r1, [pc, #20] @ (802ae14 <__assert_func+0x34>) 802adfe: f002 f98d bl 802d11c 802ae02: f002 fa21 bl 802d248 802ae06: 4b04 ldr r3, [pc, #16] @ (802ae18 <__assert_func+0x38>) 802ae08: e7f4 b.n 802adf4 <__assert_func+0x14> 802ae0a: bf00 nop 802ae0c: 240001d4 .word 0x240001d4 802ae10: 08031ef8 .word 0x08031ef8 802ae14: 08031eca .word 0x08031eca 802ae18: 08031ebd .word 0x08031ebd 0802ae1c : 802ae1c: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802ae20: 6903 ldr r3, [r0, #16] 802ae22: 690c ldr r4, [r1, #16] 802ae24: 42a3 cmp r3, r4 802ae26: 4607 mov r7, r0 802ae28: db7e blt.n 802af28 802ae2a: 3c01 subs r4, #1 802ae2c: f101 0814 add.w r8, r1, #20 802ae30: 00a3 lsls r3, r4, #2 802ae32: f100 0514 add.w r5, r0, #20 802ae36: 9300 str r3, [sp, #0] 802ae38: eb05 0384 add.w r3, r5, r4, lsl #2 802ae3c: 9301 str r3, [sp, #4] 802ae3e: f858 3024 ldr.w r3, [r8, r4, lsl #2] 802ae42: f855 2024 ldr.w r2, [r5, r4, lsl #2] 802ae46: 3301 adds r3, #1 802ae48: 429a cmp r2, r3 802ae4a: eb08 0984 add.w r9, r8, r4, lsl #2 802ae4e: fbb2 f6f3 udiv r6, r2, r3 802ae52: d32e bcc.n 802aeb2 802ae54: f04f 0a00 mov.w sl, #0 802ae58: 46c4 mov ip, r8 802ae5a: 46ae mov lr, r5 802ae5c: 46d3 mov fp, sl 802ae5e: f85c 3b04 ldr.w r3, [ip], #4 802ae62: b298 uxth r0, r3 802ae64: fb06 a000 mla r0, r6, r0, sl 802ae68: 0c02 lsrs r2, r0, #16 802ae6a: 0c1b lsrs r3, r3, #16 802ae6c: fb06 2303 mla r3, r6, r3, r2 802ae70: f8de 2000 ldr.w r2, [lr] 802ae74: b280 uxth r0, r0 802ae76: b292 uxth r2, r2 802ae78: 1a12 subs r2, r2, r0 802ae7a: 445a add r2, fp 802ae7c: f8de 0000 ldr.w r0, [lr] 802ae80: ea4f 4a13 mov.w sl, r3, lsr #16 802ae84: b29b uxth r3, r3 802ae86: ebc3 4322 rsb r3, r3, r2, asr #16 802ae8a: eb03 4310 add.w r3, r3, r0, lsr #16 802ae8e: b292 uxth r2, r2 802ae90: ea42 4203 orr.w r2, r2, r3, lsl #16 802ae94: 45e1 cmp r9, ip 802ae96: f84e 2b04 str.w r2, [lr], #4 802ae9a: ea4f 4b23 mov.w fp, r3, asr #16 802ae9e: d2de bcs.n 802ae5e 802aea0: 9b00 ldr r3, [sp, #0] 802aea2: 58eb ldr r3, [r5, r3] 802aea4: b92b cbnz r3, 802aeb2 802aea6: 9b01 ldr r3, [sp, #4] 802aea8: 3b04 subs r3, #4 802aeaa: 429d cmp r5, r3 802aeac: 461a mov r2, r3 802aeae: d32f bcc.n 802af10 802aeb0: 613c str r4, [r7, #16] 802aeb2: 4638 mov r0, r7 802aeb4: f001 fbec bl 802c690 <__mcmp> 802aeb8: 2800 cmp r0, #0 802aeba: db25 blt.n 802af08 802aebc: 4629 mov r1, r5 802aebe: 2000 movs r0, #0 802aec0: f858 2b04 ldr.w r2, [r8], #4 802aec4: f8d1 c000 ldr.w ip, [r1] 802aec8: fa1f fe82 uxth.w lr, r2 802aecc: fa1f f38c uxth.w r3, ip 802aed0: eba3 030e sub.w r3, r3, lr 802aed4: 4403 add r3, r0 802aed6: 0c12 lsrs r2, r2, #16 802aed8: ebc2 4223 rsb r2, r2, r3, asr #16 802aedc: eb02 421c add.w r2, r2, ip, lsr #16 802aee0: b29b uxth r3, r3 802aee2: ea43 4302 orr.w r3, r3, r2, lsl #16 802aee6: 45c1 cmp r9, r8 802aee8: f841 3b04 str.w r3, [r1], #4 802aeec: ea4f 4022 mov.w r0, r2, asr #16 802aef0: d2e6 bcs.n 802aec0 802aef2: f855 2024 ldr.w r2, [r5, r4, lsl #2] 802aef6: eb05 0384 add.w r3, r5, r4, lsl #2 802aefa: b922 cbnz r2, 802af06 802aefc: 3b04 subs r3, #4 802aefe: 429d cmp r5, r3 802af00: 461a mov r2, r3 802af02: d30b bcc.n 802af1c 802af04: 613c str r4, [r7, #16] 802af06: 3601 adds r6, #1 802af08: 4630 mov r0, r6 802af0a: b003 add sp, #12 802af0c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802af10: 6812 ldr r2, [r2, #0] 802af12: 3b04 subs r3, #4 802af14: 2a00 cmp r2, #0 802af16: d1cb bne.n 802aeb0 802af18: 3c01 subs r4, #1 802af1a: e7c6 b.n 802aeaa 802af1c: 6812 ldr r2, [r2, #0] 802af1e: 3b04 subs r3, #4 802af20: 2a00 cmp r2, #0 802af22: d1ef bne.n 802af04 802af24: 3c01 subs r4, #1 802af26: e7ea b.n 802aefe 802af28: 2000 movs r0, #0 802af2a: e7ee b.n 802af0a 802af2c: 0000 movs r0, r0 ... 0802af30 <_dtoa_r>: 802af30: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802af34: ed2d 8b02 vpush {d8} 802af38: 69c7 ldr r7, [r0, #28] 802af3a: b091 sub sp, #68 @ 0x44 802af3c: ed8d 0b02 vstr d0, [sp, #8] 802af40: ec55 4b10 vmov r4, r5, d0 802af44: 9e1c ldr r6, [sp, #112] @ 0x70 802af46: 9107 str r1, [sp, #28] 802af48: 4681 mov r9, r0 802af4a: 9209 str r2, [sp, #36] @ 0x24 802af4c: 930d str r3, [sp, #52] @ 0x34 802af4e: b97f cbnz r7, 802af70 <_dtoa_r+0x40> 802af50: 2010 movs r0, #16 802af52: f7fe f8bb bl 80290cc 802af56: 4602 mov r2, r0 802af58: f8c9 001c str.w r0, [r9, #28] 802af5c: b920 cbnz r0, 802af68 <_dtoa_r+0x38> 802af5e: 4ba0 ldr r3, [pc, #640] @ (802b1e0 <_dtoa_r+0x2b0>) 802af60: 21ef movs r1, #239 @ 0xef 802af62: 48a0 ldr r0, [pc, #640] @ (802b1e4 <_dtoa_r+0x2b4>) 802af64: f7ff ff3c bl 802ade0 <__assert_func> 802af68: e9c0 7701 strd r7, r7, [r0, #4] 802af6c: 6007 str r7, [r0, #0] 802af6e: 60c7 str r7, [r0, #12] 802af70: f8d9 301c ldr.w r3, [r9, #28] 802af74: 6819 ldr r1, [r3, #0] 802af76: b159 cbz r1, 802af90 <_dtoa_r+0x60> 802af78: 685a ldr r2, [r3, #4] 802af7a: 604a str r2, [r1, #4] 802af7c: 2301 movs r3, #1 802af7e: 4093 lsls r3, r2 802af80: 608b str r3, [r1, #8] 802af82: 4648 mov r0, r9 802af84: f001 f900 bl 802c188 <_Bfree> 802af88: f8d9 301c ldr.w r3, [r9, #28] 802af8c: 2200 movs r2, #0 802af8e: 601a str r2, [r3, #0] 802af90: 1e2b subs r3, r5, #0 802af92: bfbb ittet lt 802af94: f023 4300 biclt.w r3, r3, #2147483648 @ 0x80000000 802af98: 9303 strlt r3, [sp, #12] 802af9a: 2300 movge r3, #0 802af9c: 2201 movlt r2, #1 802af9e: bfac ite ge 802afa0: 6033 strge r3, [r6, #0] 802afa2: 6032 strlt r2, [r6, #0] 802afa4: 4b90 ldr r3, [pc, #576] @ (802b1e8 <_dtoa_r+0x2b8>) 802afa6: 9e03 ldr r6, [sp, #12] 802afa8: 43b3 bics r3, r6 802afaa: d110 bne.n 802afce <_dtoa_r+0x9e> 802afac: 9a0d ldr r2, [sp, #52] @ 0x34 802afae: f242 730f movw r3, #9999 @ 0x270f 802afb2: 6013 str r3, [r2, #0] 802afb4: f3c6 0313 ubfx r3, r6, #0, #20 802afb8: 4323 orrs r3, r4 802afba: f000 84de beq.w 802b97a <_dtoa_r+0xa4a> 802afbe: 9b1d ldr r3, [sp, #116] @ 0x74 802afc0: 4f8a ldr r7, [pc, #552] @ (802b1ec <_dtoa_r+0x2bc>) 802afc2: 2b00 cmp r3, #0 802afc4: f000 84e0 beq.w 802b988 <_dtoa_r+0xa58> 802afc8: 1cfb adds r3, r7, #3 802afca: f000 bcdb b.w 802b984 <_dtoa_r+0xa54> 802afce: ed9d 8b02 vldr d8, [sp, #8] 802afd2: eeb5 8b40 vcmp.f64 d8, #0.0 802afd6: eef1 fa10 vmrs APSR_nzcv, fpscr 802afda: d10a bne.n 802aff2 <_dtoa_r+0xc2> 802afdc: 9a0d ldr r2, [sp, #52] @ 0x34 802afde: 2301 movs r3, #1 802afe0: 6013 str r3, [r2, #0] 802afe2: 9b1d ldr r3, [sp, #116] @ 0x74 802afe4: b113 cbz r3, 802afec <_dtoa_r+0xbc> 802afe6: 9a1d ldr r2, [sp, #116] @ 0x74 802afe8: 4b81 ldr r3, [pc, #516] @ (802b1f0 <_dtoa_r+0x2c0>) 802afea: 6013 str r3, [r2, #0] 802afec: 4f81 ldr r7, [pc, #516] @ (802b1f4 <_dtoa_r+0x2c4>) 802afee: f000 bccb b.w 802b988 <_dtoa_r+0xa58> 802aff2: aa0e add r2, sp, #56 @ 0x38 802aff4: a90f add r1, sp, #60 @ 0x3c 802aff6: 4648 mov r0, r9 802aff8: eeb0 0b48 vmov.f64 d0, d8 802affc: f001 fc68 bl 802c8d0 <__d2b> 802b000: f3c6 530a ubfx r3, r6, #20, #11 802b004: 9a0e ldr r2, [sp, #56] @ 0x38 802b006: 9001 str r0, [sp, #4] 802b008: 2b00 cmp r3, #0 802b00a: d045 beq.n 802b098 <_dtoa_r+0x168> 802b00c: eeb0 7b48 vmov.f64 d7, d8 802b010: ee18 1a90 vmov r1, s17 802b014: f3c1 0113 ubfx r1, r1, #0, #20 802b018: f041 517f orr.w r1, r1, #1069547520 @ 0x3fc00000 802b01c: f441 1140 orr.w r1, r1, #3145728 @ 0x300000 802b020: f2a3 33ff subw r3, r3, #1023 @ 0x3ff 802b024: 2500 movs r5, #0 802b026: ee07 1a90 vmov s15, r1 802b02a: eeb7 6b08 vmov.f64 d6, #120 @ 0x3fc00000 1.5 802b02e: ed9f 5b66 vldr d5, [pc, #408] @ 802b1c8 <_dtoa_r+0x298> 802b032: ee37 7b46 vsub.f64 d7, d7, d6 802b036: ed9f 6b66 vldr d6, [pc, #408] @ 802b1d0 <_dtoa_r+0x2a0> 802b03a: eea7 6b05 vfma.f64 d6, d7, d5 802b03e: ed9f 5b66 vldr d5, [pc, #408] @ 802b1d8 <_dtoa_r+0x2a8> 802b042: ee07 3a90 vmov s15, r3 802b046: eeb8 4be7 vcvt.f64.s32 d4, s15 802b04a: eeb0 7b46 vmov.f64 d7, d6 802b04e: eea4 7b05 vfma.f64 d7, d4, d5 802b052: eefd 6bc7 vcvt.s32.f64 s13, d7 802b056: eeb5 7bc0 vcmpe.f64 d7, #0.0 802b05a: eef1 fa10 vmrs APSR_nzcv, fpscr 802b05e: ee16 8a90 vmov r8, s13 802b062: d508 bpl.n 802b076 <_dtoa_r+0x146> 802b064: eeb8 6be6 vcvt.f64.s32 d6, s13 802b068: eeb4 6b47 vcmp.f64 d6, d7 802b06c: eef1 fa10 vmrs APSR_nzcv, fpscr 802b070: bf18 it ne 802b072: f108 38ff addne.w r8, r8, #4294967295 @ 0xffffffff 802b076: f1b8 0f16 cmp.w r8, #22 802b07a: d82b bhi.n 802b0d4 <_dtoa_r+0x1a4> 802b07c: 495e ldr r1, [pc, #376] @ (802b1f8 <_dtoa_r+0x2c8>) 802b07e: eb01 01c8 add.w r1, r1, r8, lsl #3 802b082: ed91 7b00 vldr d7, [r1] 802b086: eeb4 8bc7 vcmpe.f64 d8, d7 802b08a: eef1 fa10 vmrs APSR_nzcv, fpscr 802b08e: d501 bpl.n 802b094 <_dtoa_r+0x164> 802b090: f108 38ff add.w r8, r8, #4294967295 @ 0xffffffff 802b094: 2100 movs r1, #0 802b096: e01e b.n 802b0d6 <_dtoa_r+0x1a6> 802b098: 9b0f ldr r3, [sp, #60] @ 0x3c 802b09a: 4413 add r3, r2 802b09c: f203 4132 addw r1, r3, #1074 @ 0x432 802b0a0: 2920 cmp r1, #32 802b0a2: bfc1 itttt gt 802b0a4: f1c1 0140 rsbgt r1, r1, #64 @ 0x40 802b0a8: 408e lslgt r6, r1 802b0aa: f203 4112 addwgt r1, r3, #1042 @ 0x412 802b0ae: fa24 f101 lsrgt.w r1, r4, r1 802b0b2: bfd6 itet le 802b0b4: f1c1 0120 rsble r1, r1, #32 802b0b8: 4331 orrgt r1, r6 802b0ba: fa04 f101 lslle.w r1, r4, r1 802b0be: ee07 1a90 vmov s15, r1 802b0c2: eeb8 7b67 vcvt.f64.u32 d7, s15 802b0c6: 3b01 subs r3, #1 802b0c8: ee17 1a90 vmov r1, s15 802b0cc: 2501 movs r5, #1 802b0ce: f1a1 71f8 sub.w r1, r1, #32505856 @ 0x1f00000 802b0d2: e7a8 b.n 802b026 <_dtoa_r+0xf6> 802b0d4: 2101 movs r1, #1 802b0d6: 1ad2 subs r2, r2, r3 802b0d8: 1e53 subs r3, r2, #1 802b0da: 9306 str r3, [sp, #24] 802b0dc: bf45 ittet mi 802b0de: f1c2 0301 rsbmi r3, r2, #1 802b0e2: 9305 strmi r3, [sp, #20] 802b0e4: 2300 movpl r3, #0 802b0e6: 2300 movmi r3, #0 802b0e8: bf4c ite mi 802b0ea: 9306 strmi r3, [sp, #24] 802b0ec: 9305 strpl r3, [sp, #20] 802b0ee: f1b8 0f00 cmp.w r8, #0 802b0f2: 910c str r1, [sp, #48] @ 0x30 802b0f4: db18 blt.n 802b128 <_dtoa_r+0x1f8> 802b0f6: 9b06 ldr r3, [sp, #24] 802b0f8: f8cd 8028 str.w r8, [sp, #40] @ 0x28 802b0fc: 4443 add r3, r8 802b0fe: 9306 str r3, [sp, #24] 802b100: 2300 movs r3, #0 802b102: 9a07 ldr r2, [sp, #28] 802b104: 2a09 cmp r2, #9 802b106: d849 bhi.n 802b19c <_dtoa_r+0x26c> 802b108: 2a05 cmp r2, #5 802b10a: bfc4 itt gt 802b10c: 3a04 subgt r2, #4 802b10e: 9207 strgt r2, [sp, #28] 802b110: 9a07 ldr r2, [sp, #28] 802b112: f1a2 0202 sub.w r2, r2, #2 802b116: bfcc ite gt 802b118: 2400 movgt r4, #0 802b11a: 2401 movle r4, #1 802b11c: 2a03 cmp r2, #3 802b11e: d848 bhi.n 802b1b2 <_dtoa_r+0x282> 802b120: e8df f002 tbb [pc, r2] 802b124: 3a2c2e0b .word 0x3a2c2e0b 802b128: 9b05 ldr r3, [sp, #20] 802b12a: 2200 movs r2, #0 802b12c: eba3 0308 sub.w r3, r3, r8 802b130: 9305 str r3, [sp, #20] 802b132: 920a str r2, [sp, #40] @ 0x28 802b134: f1c8 0300 rsb r3, r8, #0 802b138: e7e3 b.n 802b102 <_dtoa_r+0x1d2> 802b13a: 2200 movs r2, #0 802b13c: 9208 str r2, [sp, #32] 802b13e: 9a09 ldr r2, [sp, #36] @ 0x24 802b140: 2a00 cmp r2, #0 802b142: dc39 bgt.n 802b1b8 <_dtoa_r+0x288> 802b144: f04f 0b01 mov.w fp, #1 802b148: 46da mov sl, fp 802b14a: 465a mov r2, fp 802b14c: f8cd b024 str.w fp, [sp, #36] @ 0x24 802b150: f8d9 701c ldr.w r7, [r9, #28] 802b154: 2100 movs r1, #0 802b156: 2004 movs r0, #4 802b158: f100 0614 add.w r6, r0, #20 802b15c: 4296 cmp r6, r2 802b15e: d930 bls.n 802b1c2 <_dtoa_r+0x292> 802b160: 6079 str r1, [r7, #4] 802b162: 4648 mov r0, r9 802b164: 9304 str r3, [sp, #16] 802b166: f000 ffcf bl 802c108 <_Balloc> 802b16a: 9b04 ldr r3, [sp, #16] 802b16c: 4607 mov r7, r0 802b16e: 2800 cmp r0, #0 802b170: d146 bne.n 802b200 <_dtoa_r+0x2d0> 802b172: 4b22 ldr r3, [pc, #136] @ (802b1fc <_dtoa_r+0x2cc>) 802b174: 4602 mov r2, r0 802b176: f240 11af movw r1, #431 @ 0x1af 802b17a: e6f2 b.n 802af62 <_dtoa_r+0x32> 802b17c: 2201 movs r2, #1 802b17e: e7dd b.n 802b13c <_dtoa_r+0x20c> 802b180: 2200 movs r2, #0 802b182: 9208 str r2, [sp, #32] 802b184: 9a09 ldr r2, [sp, #36] @ 0x24 802b186: eb08 0b02 add.w fp, r8, r2 802b18a: f10b 0a01 add.w sl, fp, #1 802b18e: 4652 mov r2, sl 802b190: 2a01 cmp r2, #1 802b192: bfb8 it lt 802b194: 2201 movlt r2, #1 802b196: e7db b.n 802b150 <_dtoa_r+0x220> 802b198: 2201 movs r2, #1 802b19a: e7f2 b.n 802b182 <_dtoa_r+0x252> 802b19c: 2401 movs r4, #1 802b19e: 2200 movs r2, #0 802b1a0: e9cd 2407 strd r2, r4, [sp, #28] 802b1a4: f04f 3bff mov.w fp, #4294967295 @ 0xffffffff 802b1a8: 2100 movs r1, #0 802b1aa: 46da mov sl, fp 802b1ac: 2212 movs r2, #18 802b1ae: 9109 str r1, [sp, #36] @ 0x24 802b1b0: e7ce b.n 802b150 <_dtoa_r+0x220> 802b1b2: 2201 movs r2, #1 802b1b4: 9208 str r2, [sp, #32] 802b1b6: e7f5 b.n 802b1a4 <_dtoa_r+0x274> 802b1b8: f8dd b024 ldr.w fp, [sp, #36] @ 0x24 802b1bc: 46da mov sl, fp 802b1be: 465a mov r2, fp 802b1c0: e7c6 b.n 802b150 <_dtoa_r+0x220> 802b1c2: 3101 adds r1, #1 802b1c4: 0040 lsls r0, r0, #1 802b1c6: e7c7 b.n 802b158 <_dtoa_r+0x228> 802b1c8: 636f4361 .word 0x636f4361 802b1cc: 3fd287a7 .word 0x3fd287a7 802b1d0: 8b60c8b3 .word 0x8b60c8b3 802b1d4: 3fc68a28 .word 0x3fc68a28 802b1d8: 509f79fb .word 0x509f79fb 802b1dc: 3fd34413 .word 0x3fd34413 802b1e0: 08031cbe .word 0x08031cbe 802b1e4: 08031f06 .word 0x08031f06 802b1e8: 7ff00000 .word 0x7ff00000 802b1ec: 08031f02 .word 0x08031f02 802b1f0: 08031e92 .word 0x08031e92 802b1f4: 08031e91 .word 0x08031e91 802b1f8: 08032060 .word 0x08032060 802b1fc: 08031f5e .word 0x08031f5e 802b200: f8d9 201c ldr.w r2, [r9, #28] 802b204: f1ba 0f0e cmp.w sl, #14 802b208: 6010 str r0, [r2, #0] 802b20a: d86f bhi.n 802b2ec <_dtoa_r+0x3bc> 802b20c: 2c00 cmp r4, #0 802b20e: d06d beq.n 802b2ec <_dtoa_r+0x3bc> 802b210: f1b8 0f00 cmp.w r8, #0 802b214: f340 80c2 ble.w 802b39c <_dtoa_r+0x46c> 802b218: 4aca ldr r2, [pc, #808] @ (802b544 <_dtoa_r+0x614>) 802b21a: f008 010f and.w r1, r8, #15 802b21e: eb02 02c1 add.w r2, r2, r1, lsl #3 802b222: f418 7f80 tst.w r8, #256 @ 0x100 802b226: ed92 7b00 vldr d7, [r2] 802b22a: ea4f 1128 mov.w r1, r8, asr #4 802b22e: f000 80a9 beq.w 802b384 <_dtoa_r+0x454> 802b232: 4ac5 ldr r2, [pc, #788] @ (802b548 <_dtoa_r+0x618>) 802b234: ed92 6b08 vldr d6, [r2, #32] 802b238: ee88 6b06 vdiv.f64 d6, d8, d6 802b23c: ed8d 6b02 vstr d6, [sp, #8] 802b240: f001 010f and.w r1, r1, #15 802b244: 2203 movs r2, #3 802b246: 48c0 ldr r0, [pc, #768] @ (802b548 <_dtoa_r+0x618>) 802b248: 2900 cmp r1, #0 802b24a: f040 809d bne.w 802b388 <_dtoa_r+0x458> 802b24e: ed9d 6b02 vldr d6, [sp, #8] 802b252: ee86 7b07 vdiv.f64 d7, d6, d7 802b256: ed8d 7b02 vstr d7, [sp, #8] 802b25a: 990c ldr r1, [sp, #48] @ 0x30 802b25c: ed9d 7b02 vldr d7, [sp, #8] 802b260: 2900 cmp r1, #0 802b262: f000 80c1 beq.w 802b3e8 <_dtoa_r+0x4b8> 802b266: eeb7 6b00 vmov.f64 d6, #112 @ 0x3f800000 1.0 802b26a: eeb4 7bc6 vcmpe.f64 d7, d6 802b26e: eef1 fa10 vmrs APSR_nzcv, fpscr 802b272: f140 80b9 bpl.w 802b3e8 <_dtoa_r+0x4b8> 802b276: f1ba 0f00 cmp.w sl, #0 802b27a: f000 80b5 beq.w 802b3e8 <_dtoa_r+0x4b8> 802b27e: f1bb 0f00 cmp.w fp, #0 802b282: dd31 ble.n 802b2e8 <_dtoa_r+0x3b8> 802b284: eeb2 6b04 vmov.f64 d6, #36 @ 0x41200000 10.0 802b288: ee27 7b06 vmul.f64 d7, d7, d6 802b28c: ed8d 7b02 vstr d7, [sp, #8] 802b290: f108 31ff add.w r1, r8, #4294967295 @ 0xffffffff 802b294: 9104 str r1, [sp, #16] 802b296: 3201 adds r2, #1 802b298: 465c mov r4, fp 802b29a: ed9d 6b02 vldr d6, [sp, #8] 802b29e: eeb1 5b0c vmov.f64 d5, #28 @ 0x40e00000 7.0 802b2a2: ee07 2a90 vmov s15, r2 802b2a6: eeb8 7be7 vcvt.f64.s32 d7, s15 802b2aa: eea7 5b06 vfma.f64 d5, d7, d6 802b2ae: ee15 2a90 vmov r2, s11 802b2b2: ec51 0b15 vmov r0, r1, d5 802b2b6: f1a2 7150 sub.w r1, r2, #54525952 @ 0x3400000 802b2ba: 2c00 cmp r4, #0 802b2bc: f040 8098 bne.w 802b3f0 <_dtoa_r+0x4c0> 802b2c0: eeb1 7b04 vmov.f64 d7, #20 @ 0x40a00000 5.0 802b2c4: ee36 6b47 vsub.f64 d6, d6, d7 802b2c8: ec41 0b17 vmov d7, r0, r1 802b2cc: eeb4 6bc7 vcmpe.f64 d6, d7 802b2d0: eef1 fa10 vmrs APSR_nzcv, fpscr 802b2d4: f300 8261 bgt.w 802b79a <_dtoa_r+0x86a> 802b2d8: eeb1 7b47 vneg.f64 d7, d7 802b2dc: eeb4 6bc7 vcmpe.f64 d6, d7 802b2e0: eef1 fa10 vmrs APSR_nzcv, fpscr 802b2e4: f100 80f5 bmi.w 802b4d2 <_dtoa_r+0x5a2> 802b2e8: ed8d 8b02 vstr d8, [sp, #8] 802b2ec: 9a0f ldr r2, [sp, #60] @ 0x3c 802b2ee: 2a00 cmp r2, #0 802b2f0: f2c0 812c blt.w 802b54c <_dtoa_r+0x61c> 802b2f4: f1b8 0f0e cmp.w r8, #14 802b2f8: f300 8128 bgt.w 802b54c <_dtoa_r+0x61c> 802b2fc: 4b91 ldr r3, [pc, #580] @ (802b544 <_dtoa_r+0x614>) 802b2fe: eb03 03c8 add.w r3, r3, r8, lsl #3 802b302: ed93 6b00 vldr d6, [r3] 802b306: 9b09 ldr r3, [sp, #36] @ 0x24 802b308: 2b00 cmp r3, #0 802b30a: da03 bge.n 802b314 <_dtoa_r+0x3e4> 802b30c: f1ba 0f00 cmp.w sl, #0 802b310: f340 80d2 ble.w 802b4b8 <_dtoa_r+0x588> 802b314: eeb2 4b04 vmov.f64 d4, #36 @ 0x41200000 10.0 802b318: ed9d 7b02 vldr d7, [sp, #8] 802b31c: 463e mov r6, r7 802b31e: ee87 5b06 vdiv.f64 d5, d7, d6 802b322: eebd 5bc5 vcvt.s32.f64 s10, d5 802b326: ee15 3a10 vmov r3, s10 802b32a: 3330 adds r3, #48 @ 0x30 802b32c: f806 3b01 strb.w r3, [r6], #1 802b330: 1bf3 subs r3, r6, r7 802b332: 459a cmp sl, r3 802b334: eeb8 3bc5 vcvt.f64.s32 d3, s10 802b338: eea3 7b46 vfms.f64 d7, d3, d6 802b33c: f040 80f8 bne.w 802b530 <_dtoa_r+0x600> 802b340: ee37 7b07 vadd.f64 d7, d7, d7 802b344: eeb4 7bc6 vcmpe.f64 d7, d6 802b348: eef1 fa10 vmrs APSR_nzcv, fpscr 802b34c: f300 80dd bgt.w 802b50a <_dtoa_r+0x5da> 802b350: eeb4 7b46 vcmp.f64 d7, d6 802b354: eef1 fa10 vmrs APSR_nzcv, fpscr 802b358: d104 bne.n 802b364 <_dtoa_r+0x434> 802b35a: ee15 3a10 vmov r3, s10 802b35e: 07db lsls r3, r3, #31 802b360: f100 80d3 bmi.w 802b50a <_dtoa_r+0x5da> 802b364: 9901 ldr r1, [sp, #4] 802b366: 4648 mov r0, r9 802b368: f000 ff0e bl 802c188 <_Bfree> 802b36c: 2300 movs r3, #0 802b36e: 9a0d ldr r2, [sp, #52] @ 0x34 802b370: 7033 strb r3, [r6, #0] 802b372: f108 0301 add.w r3, r8, #1 802b376: 6013 str r3, [r2, #0] 802b378: 9b1d ldr r3, [sp, #116] @ 0x74 802b37a: 2b00 cmp r3, #0 802b37c: f000 8304 beq.w 802b988 <_dtoa_r+0xa58> 802b380: 601e str r6, [r3, #0] 802b382: e301 b.n 802b988 <_dtoa_r+0xa58> 802b384: 2202 movs r2, #2 802b386: e75e b.n 802b246 <_dtoa_r+0x316> 802b388: 07cc lsls r4, r1, #31 802b38a: d504 bpl.n 802b396 <_dtoa_r+0x466> 802b38c: ed90 6b00 vldr d6, [r0] 802b390: 3201 adds r2, #1 802b392: ee27 7b06 vmul.f64 d7, d7, d6 802b396: 1049 asrs r1, r1, #1 802b398: 3008 adds r0, #8 802b39a: e755 b.n 802b248 <_dtoa_r+0x318> 802b39c: d022 beq.n 802b3e4 <_dtoa_r+0x4b4> 802b39e: f1c8 0100 rsb r1, r8, #0 802b3a2: 4a68 ldr r2, [pc, #416] @ (802b544 <_dtoa_r+0x614>) 802b3a4: f001 000f and.w r0, r1, #15 802b3a8: eb02 02c0 add.w r2, r2, r0, lsl #3 802b3ac: ed92 7b00 vldr d7, [r2] 802b3b0: ee28 7b07 vmul.f64 d7, d8, d7 802b3b4: ed8d 7b02 vstr d7, [sp, #8] 802b3b8: 4863 ldr r0, [pc, #396] @ (802b548 <_dtoa_r+0x618>) 802b3ba: 1109 asrs r1, r1, #4 802b3bc: 2400 movs r4, #0 802b3be: 2202 movs r2, #2 802b3c0: b929 cbnz r1, 802b3ce <_dtoa_r+0x49e> 802b3c2: 2c00 cmp r4, #0 802b3c4: f43f af49 beq.w 802b25a <_dtoa_r+0x32a> 802b3c8: ed8d 7b02 vstr d7, [sp, #8] 802b3cc: e745 b.n 802b25a <_dtoa_r+0x32a> 802b3ce: 07ce lsls r6, r1, #31 802b3d0: d505 bpl.n 802b3de <_dtoa_r+0x4ae> 802b3d2: ed90 6b00 vldr d6, [r0] 802b3d6: 3201 adds r2, #1 802b3d8: 2401 movs r4, #1 802b3da: ee27 7b06 vmul.f64 d7, d7, d6 802b3de: 1049 asrs r1, r1, #1 802b3e0: 3008 adds r0, #8 802b3e2: e7ed b.n 802b3c0 <_dtoa_r+0x490> 802b3e4: 2202 movs r2, #2 802b3e6: e738 b.n 802b25a <_dtoa_r+0x32a> 802b3e8: f8cd 8010 str.w r8, [sp, #16] 802b3ec: 4654 mov r4, sl 802b3ee: e754 b.n 802b29a <_dtoa_r+0x36a> 802b3f0: 4a54 ldr r2, [pc, #336] @ (802b544 <_dtoa_r+0x614>) 802b3f2: eb02 02c4 add.w r2, r2, r4, lsl #3 802b3f6: ed12 4b02 vldr d4, [r2, #-8] 802b3fa: 9a08 ldr r2, [sp, #32] 802b3fc: ec41 0b17 vmov d7, r0, r1 802b400: 443c add r4, r7 802b402: b34a cbz r2, 802b458 <_dtoa_r+0x528> 802b404: eeb6 3b00 vmov.f64 d3, #96 @ 0x3f000000 0.5 802b408: eeb7 2b00 vmov.f64 d2, #112 @ 0x3f800000 1.0 802b40c: 463e mov r6, r7 802b40e: ee83 5b04 vdiv.f64 d5, d3, d4 802b412: eeb2 3b04 vmov.f64 d3, #36 @ 0x41200000 10.0 802b416: ee35 7b47 vsub.f64 d7, d5, d7 802b41a: eefd 4bc6 vcvt.s32.f64 s9, d6 802b41e: ee14 2a90 vmov r2, s9 802b422: eeb8 5be4 vcvt.f64.s32 d5, s9 802b426: 3230 adds r2, #48 @ 0x30 802b428: ee36 6b45 vsub.f64 d6, d6, d5 802b42c: eeb4 6bc7 vcmpe.f64 d6, d7 802b430: eef1 fa10 vmrs APSR_nzcv, fpscr 802b434: f806 2b01 strb.w r2, [r6], #1 802b438: d438 bmi.n 802b4ac <_dtoa_r+0x57c> 802b43a: ee32 5b46 vsub.f64 d5, d2, d6 802b43e: eeb4 5bc7 vcmpe.f64 d5, d7 802b442: eef1 fa10 vmrs APSR_nzcv, fpscr 802b446: d462 bmi.n 802b50e <_dtoa_r+0x5de> 802b448: 42a6 cmp r6, r4 802b44a: f43f af4d beq.w 802b2e8 <_dtoa_r+0x3b8> 802b44e: ee27 7b03 vmul.f64 d7, d7, d3 802b452: ee26 6b03 vmul.f64 d6, d6, d3 802b456: e7e0 b.n 802b41a <_dtoa_r+0x4ea> 802b458: 4621 mov r1, r4 802b45a: 463e mov r6, r7 802b45c: ee27 7b04 vmul.f64 d7, d7, d4 802b460: eeb2 3b04 vmov.f64 d3, #36 @ 0x41200000 10.0 802b464: eefd 4bc6 vcvt.s32.f64 s9, d6 802b468: ee14 2a90 vmov r2, s9 802b46c: 3230 adds r2, #48 @ 0x30 802b46e: f806 2b01 strb.w r2, [r6], #1 802b472: 42a6 cmp r6, r4 802b474: eeb8 5be4 vcvt.f64.s32 d5, s9 802b478: ee36 6b45 vsub.f64 d6, d6, d5 802b47c: d119 bne.n 802b4b2 <_dtoa_r+0x582> 802b47e: eeb6 5b00 vmov.f64 d5, #96 @ 0x3f000000 0.5 802b482: ee37 4b05 vadd.f64 d4, d7, d5 802b486: eeb4 6bc4 vcmpe.f64 d6, d4 802b48a: eef1 fa10 vmrs APSR_nzcv, fpscr 802b48e: dc3e bgt.n 802b50e <_dtoa_r+0x5de> 802b490: ee35 5b47 vsub.f64 d5, d5, d7 802b494: eeb4 6bc5 vcmpe.f64 d6, d5 802b498: eef1 fa10 vmrs APSR_nzcv, fpscr 802b49c: f57f af24 bpl.w 802b2e8 <_dtoa_r+0x3b8> 802b4a0: 460e mov r6, r1 802b4a2: 3901 subs r1, #1 802b4a4: f816 3c01 ldrb.w r3, [r6, #-1] 802b4a8: 2b30 cmp r3, #48 @ 0x30 802b4aa: d0f9 beq.n 802b4a0 <_dtoa_r+0x570> 802b4ac: f8dd 8010 ldr.w r8, [sp, #16] 802b4b0: e758 b.n 802b364 <_dtoa_r+0x434> 802b4b2: ee26 6b03 vmul.f64 d6, d6, d3 802b4b6: e7d5 b.n 802b464 <_dtoa_r+0x534> 802b4b8: d10b bne.n 802b4d2 <_dtoa_r+0x5a2> 802b4ba: eeb1 7b04 vmov.f64 d7, #20 @ 0x40a00000 5.0 802b4be: ee26 6b07 vmul.f64 d6, d6, d7 802b4c2: ed9d 7b02 vldr d7, [sp, #8] 802b4c6: eeb4 6bc7 vcmpe.f64 d6, d7 802b4ca: eef1 fa10 vmrs APSR_nzcv, fpscr 802b4ce: f2c0 8161 blt.w 802b794 <_dtoa_r+0x864> 802b4d2: 2400 movs r4, #0 802b4d4: 4625 mov r5, r4 802b4d6: 9b09 ldr r3, [sp, #36] @ 0x24 802b4d8: 43db mvns r3, r3 802b4da: 9304 str r3, [sp, #16] 802b4dc: 463e mov r6, r7 802b4de: f04f 0800 mov.w r8, #0 802b4e2: 4621 mov r1, r4 802b4e4: 4648 mov r0, r9 802b4e6: f000 fe4f bl 802c188 <_Bfree> 802b4ea: 2d00 cmp r5, #0 802b4ec: d0de beq.n 802b4ac <_dtoa_r+0x57c> 802b4ee: f1b8 0f00 cmp.w r8, #0 802b4f2: d005 beq.n 802b500 <_dtoa_r+0x5d0> 802b4f4: 45a8 cmp r8, r5 802b4f6: d003 beq.n 802b500 <_dtoa_r+0x5d0> 802b4f8: 4641 mov r1, r8 802b4fa: 4648 mov r0, r9 802b4fc: f000 fe44 bl 802c188 <_Bfree> 802b500: 4629 mov r1, r5 802b502: 4648 mov r0, r9 802b504: f000 fe40 bl 802c188 <_Bfree> 802b508: e7d0 b.n 802b4ac <_dtoa_r+0x57c> 802b50a: f8cd 8010 str.w r8, [sp, #16] 802b50e: 4633 mov r3, r6 802b510: 461e mov r6, r3 802b512: f813 2d01 ldrb.w r2, [r3, #-1]! 802b516: 2a39 cmp r2, #57 @ 0x39 802b518: d106 bne.n 802b528 <_dtoa_r+0x5f8> 802b51a: 429f cmp r7, r3 802b51c: d1f8 bne.n 802b510 <_dtoa_r+0x5e0> 802b51e: 9a04 ldr r2, [sp, #16] 802b520: 3201 adds r2, #1 802b522: 9204 str r2, [sp, #16] 802b524: 2230 movs r2, #48 @ 0x30 802b526: 703a strb r2, [r7, #0] 802b528: 781a ldrb r2, [r3, #0] 802b52a: 3201 adds r2, #1 802b52c: 701a strb r2, [r3, #0] 802b52e: e7bd b.n 802b4ac <_dtoa_r+0x57c> 802b530: ee27 7b04 vmul.f64 d7, d7, d4 802b534: eeb5 7b40 vcmp.f64 d7, #0.0 802b538: eef1 fa10 vmrs APSR_nzcv, fpscr 802b53c: f47f aeef bne.w 802b31e <_dtoa_r+0x3ee> 802b540: e710 b.n 802b364 <_dtoa_r+0x434> 802b542: bf00 nop 802b544: 08032060 .word 0x08032060 802b548: 08032038 .word 0x08032038 802b54c: 9908 ldr r1, [sp, #32] 802b54e: 2900 cmp r1, #0 802b550: f000 80e3 beq.w 802b71a <_dtoa_r+0x7ea> 802b554: 9907 ldr r1, [sp, #28] 802b556: 2901 cmp r1, #1 802b558: f300 80c8 bgt.w 802b6ec <_dtoa_r+0x7bc> 802b55c: 2d00 cmp r5, #0 802b55e: f000 80c1 beq.w 802b6e4 <_dtoa_r+0x7b4> 802b562: f202 4233 addw r2, r2, #1075 @ 0x433 802b566: 9e05 ldr r6, [sp, #20] 802b568: 461c mov r4, r3 802b56a: 9304 str r3, [sp, #16] 802b56c: 9b05 ldr r3, [sp, #20] 802b56e: 4413 add r3, r2 802b570: 9305 str r3, [sp, #20] 802b572: 9b06 ldr r3, [sp, #24] 802b574: 2101 movs r1, #1 802b576: 4413 add r3, r2 802b578: 4648 mov r0, r9 802b57a: 9306 str r3, [sp, #24] 802b57c: f000 ff02 bl 802c384 <__i2b> 802b580: 9b04 ldr r3, [sp, #16] 802b582: 4605 mov r5, r0 802b584: b166 cbz r6, 802b5a0 <_dtoa_r+0x670> 802b586: 9a06 ldr r2, [sp, #24] 802b588: 2a00 cmp r2, #0 802b58a: dd09 ble.n 802b5a0 <_dtoa_r+0x670> 802b58c: 42b2 cmp r2, r6 802b58e: 9905 ldr r1, [sp, #20] 802b590: bfa8 it ge 802b592: 4632 movge r2, r6 802b594: 1a89 subs r1, r1, r2 802b596: 9105 str r1, [sp, #20] 802b598: 9906 ldr r1, [sp, #24] 802b59a: 1ab6 subs r6, r6, r2 802b59c: 1a8a subs r2, r1, r2 802b59e: 9206 str r2, [sp, #24] 802b5a0: b1fb cbz r3, 802b5e2 <_dtoa_r+0x6b2> 802b5a2: 9a08 ldr r2, [sp, #32] 802b5a4: 2a00 cmp r2, #0 802b5a6: f000 80bc beq.w 802b722 <_dtoa_r+0x7f2> 802b5aa: b19c cbz r4, 802b5d4 <_dtoa_r+0x6a4> 802b5ac: 4629 mov r1, r5 802b5ae: 4622 mov r2, r4 802b5b0: 4648 mov r0, r9 802b5b2: 930b str r3, [sp, #44] @ 0x2c 802b5b4: f000 ffa6 bl 802c504 <__pow5mult> 802b5b8: 9a01 ldr r2, [sp, #4] 802b5ba: 4601 mov r1, r0 802b5bc: 4605 mov r5, r0 802b5be: 4648 mov r0, r9 802b5c0: f000 fef6 bl 802c3b0 <__multiply> 802b5c4: 9901 ldr r1, [sp, #4] 802b5c6: 9004 str r0, [sp, #16] 802b5c8: 4648 mov r0, r9 802b5ca: f000 fddd bl 802c188 <_Bfree> 802b5ce: 9a04 ldr r2, [sp, #16] 802b5d0: 9b0b ldr r3, [sp, #44] @ 0x2c 802b5d2: 9201 str r2, [sp, #4] 802b5d4: 1b1a subs r2, r3, r4 802b5d6: d004 beq.n 802b5e2 <_dtoa_r+0x6b2> 802b5d8: 9901 ldr r1, [sp, #4] 802b5da: 4648 mov r0, r9 802b5dc: f000 ff92 bl 802c504 <__pow5mult> 802b5e0: 9001 str r0, [sp, #4] 802b5e2: 2101 movs r1, #1 802b5e4: 4648 mov r0, r9 802b5e6: f000 fecd bl 802c384 <__i2b> 802b5ea: 9b0a ldr r3, [sp, #40] @ 0x28 802b5ec: 4604 mov r4, r0 802b5ee: 2b00 cmp r3, #0 802b5f0: f000 81d0 beq.w 802b994 <_dtoa_r+0xa64> 802b5f4: 461a mov r2, r3 802b5f6: 4601 mov r1, r0 802b5f8: 4648 mov r0, r9 802b5fa: f000 ff83 bl 802c504 <__pow5mult> 802b5fe: 9b07 ldr r3, [sp, #28] 802b600: 2b01 cmp r3, #1 802b602: 4604 mov r4, r0 802b604: f300 8095 bgt.w 802b732 <_dtoa_r+0x802> 802b608: 9b02 ldr r3, [sp, #8] 802b60a: 2b00 cmp r3, #0 802b60c: f040 808b bne.w 802b726 <_dtoa_r+0x7f6> 802b610: 9b03 ldr r3, [sp, #12] 802b612: f3c3 0213 ubfx r2, r3, #0, #20 802b616: 2a00 cmp r2, #0 802b618: f040 8087 bne.w 802b72a <_dtoa_r+0x7fa> 802b61c: f023 4200 bic.w r2, r3, #2147483648 @ 0x80000000 802b620: 0d12 lsrs r2, r2, #20 802b622: 0512 lsls r2, r2, #20 802b624: 2a00 cmp r2, #0 802b626: f000 8082 beq.w 802b72e <_dtoa_r+0x7fe> 802b62a: 9b05 ldr r3, [sp, #20] 802b62c: 3301 adds r3, #1 802b62e: 9305 str r3, [sp, #20] 802b630: 9b06 ldr r3, [sp, #24] 802b632: 3301 adds r3, #1 802b634: 9306 str r3, [sp, #24] 802b636: 2301 movs r3, #1 802b638: 930b str r3, [sp, #44] @ 0x2c 802b63a: 9b0a ldr r3, [sp, #40] @ 0x28 802b63c: 2b00 cmp r3, #0 802b63e: f000 81af beq.w 802b9a0 <_dtoa_r+0xa70> 802b642: 6922 ldr r2, [r4, #16] 802b644: eb04 0282 add.w r2, r4, r2, lsl #2 802b648: 6910 ldr r0, [r2, #16] 802b64a: f000 fe4f bl 802c2ec <__hi0bits> 802b64e: f1c0 0020 rsb r0, r0, #32 802b652: 9b06 ldr r3, [sp, #24] 802b654: 4418 add r0, r3 802b656: f010 001f ands.w r0, r0, #31 802b65a: d076 beq.n 802b74a <_dtoa_r+0x81a> 802b65c: f1c0 0220 rsb r2, r0, #32 802b660: 2a04 cmp r2, #4 802b662: dd69 ble.n 802b738 <_dtoa_r+0x808> 802b664: 9b05 ldr r3, [sp, #20] 802b666: f1c0 001c rsb r0, r0, #28 802b66a: 4403 add r3, r0 802b66c: 9305 str r3, [sp, #20] 802b66e: 9b06 ldr r3, [sp, #24] 802b670: 4406 add r6, r0 802b672: 4403 add r3, r0 802b674: 9306 str r3, [sp, #24] 802b676: 9b05 ldr r3, [sp, #20] 802b678: 2b00 cmp r3, #0 802b67a: dd05 ble.n 802b688 <_dtoa_r+0x758> 802b67c: 9901 ldr r1, [sp, #4] 802b67e: 461a mov r2, r3 802b680: 4648 mov r0, r9 802b682: f000 ff99 bl 802c5b8 <__lshift> 802b686: 9001 str r0, [sp, #4] 802b688: 9b06 ldr r3, [sp, #24] 802b68a: 2b00 cmp r3, #0 802b68c: dd05 ble.n 802b69a <_dtoa_r+0x76a> 802b68e: 4621 mov r1, r4 802b690: 461a mov r2, r3 802b692: 4648 mov r0, r9 802b694: f000 ff90 bl 802c5b8 <__lshift> 802b698: 4604 mov r4, r0 802b69a: 9b0c ldr r3, [sp, #48] @ 0x30 802b69c: 2b00 cmp r3, #0 802b69e: d056 beq.n 802b74e <_dtoa_r+0x81e> 802b6a0: 9801 ldr r0, [sp, #4] 802b6a2: 4621 mov r1, r4 802b6a4: f000 fff4 bl 802c690 <__mcmp> 802b6a8: 2800 cmp r0, #0 802b6aa: da50 bge.n 802b74e <_dtoa_r+0x81e> 802b6ac: f108 33ff add.w r3, r8, #4294967295 @ 0xffffffff 802b6b0: 9304 str r3, [sp, #16] 802b6b2: 9901 ldr r1, [sp, #4] 802b6b4: 2300 movs r3, #0 802b6b6: 220a movs r2, #10 802b6b8: 4648 mov r0, r9 802b6ba: f000 fd87 bl 802c1cc <__multadd> 802b6be: 9b08 ldr r3, [sp, #32] 802b6c0: 9001 str r0, [sp, #4] 802b6c2: 2b00 cmp r3, #0 802b6c4: f000 816e beq.w 802b9a4 <_dtoa_r+0xa74> 802b6c8: 4629 mov r1, r5 802b6ca: 2300 movs r3, #0 802b6cc: 220a movs r2, #10 802b6ce: 4648 mov r0, r9 802b6d0: f000 fd7c bl 802c1cc <__multadd> 802b6d4: f1bb 0f00 cmp.w fp, #0 802b6d8: 4605 mov r5, r0 802b6da: dc64 bgt.n 802b7a6 <_dtoa_r+0x876> 802b6dc: 9b07 ldr r3, [sp, #28] 802b6de: 2b02 cmp r3, #2 802b6e0: dc3e bgt.n 802b760 <_dtoa_r+0x830> 802b6e2: e060 b.n 802b7a6 <_dtoa_r+0x876> 802b6e4: 9a0e ldr r2, [sp, #56] @ 0x38 802b6e6: f1c2 0236 rsb r2, r2, #54 @ 0x36 802b6ea: e73c b.n 802b566 <_dtoa_r+0x636> 802b6ec: f10a 34ff add.w r4, sl, #4294967295 @ 0xffffffff 802b6f0: 42a3 cmp r3, r4 802b6f2: bfbf itttt lt 802b6f4: 1ae2 sublt r2, r4, r3 802b6f6: 9b0a ldrlt r3, [sp, #40] @ 0x28 802b6f8: 189b addlt r3, r3, r2 802b6fa: 930a strlt r3, [sp, #40] @ 0x28 802b6fc: bfae itee ge 802b6fe: 1b1c subge r4, r3, r4 802b700: 4623 movlt r3, r4 802b702: 2400 movlt r4, #0 802b704: f1ba 0f00 cmp.w sl, #0 802b708: bfb5 itete lt 802b70a: 9a05 ldrlt r2, [sp, #20] 802b70c: 9e05 ldrge r6, [sp, #20] 802b70e: eba2 060a sublt.w r6, r2, sl 802b712: 4652 movge r2, sl 802b714: bfb8 it lt 802b716: 2200 movlt r2, #0 802b718: e727 b.n 802b56a <_dtoa_r+0x63a> 802b71a: 9e05 ldr r6, [sp, #20] 802b71c: 9d08 ldr r5, [sp, #32] 802b71e: 461c mov r4, r3 802b720: e730 b.n 802b584 <_dtoa_r+0x654> 802b722: 461a mov r2, r3 802b724: e758 b.n 802b5d8 <_dtoa_r+0x6a8> 802b726: 2300 movs r3, #0 802b728: e786 b.n 802b638 <_dtoa_r+0x708> 802b72a: 9b02 ldr r3, [sp, #8] 802b72c: e784 b.n 802b638 <_dtoa_r+0x708> 802b72e: 920b str r2, [sp, #44] @ 0x2c 802b730: e783 b.n 802b63a <_dtoa_r+0x70a> 802b732: 2300 movs r3, #0 802b734: 930b str r3, [sp, #44] @ 0x2c 802b736: e784 b.n 802b642 <_dtoa_r+0x712> 802b738: d09d beq.n 802b676 <_dtoa_r+0x746> 802b73a: 9b05 ldr r3, [sp, #20] 802b73c: 321c adds r2, #28 802b73e: 4413 add r3, r2 802b740: 9305 str r3, [sp, #20] 802b742: 9b06 ldr r3, [sp, #24] 802b744: 4416 add r6, r2 802b746: 4413 add r3, r2 802b748: e794 b.n 802b674 <_dtoa_r+0x744> 802b74a: 4602 mov r2, r0 802b74c: e7f5 b.n 802b73a <_dtoa_r+0x80a> 802b74e: f1ba 0f00 cmp.w sl, #0 802b752: f8cd 8010 str.w r8, [sp, #16] 802b756: 46d3 mov fp, sl 802b758: dc21 bgt.n 802b79e <_dtoa_r+0x86e> 802b75a: 9b07 ldr r3, [sp, #28] 802b75c: 2b02 cmp r3, #2 802b75e: dd1e ble.n 802b79e <_dtoa_r+0x86e> 802b760: f1bb 0f00 cmp.w fp, #0 802b764: f47f aeb7 bne.w 802b4d6 <_dtoa_r+0x5a6> 802b768: 4621 mov r1, r4 802b76a: 465b mov r3, fp 802b76c: 2205 movs r2, #5 802b76e: 4648 mov r0, r9 802b770: f000 fd2c bl 802c1cc <__multadd> 802b774: 4601 mov r1, r0 802b776: 4604 mov r4, r0 802b778: 9801 ldr r0, [sp, #4] 802b77a: f000 ff89 bl 802c690 <__mcmp> 802b77e: 2800 cmp r0, #0 802b780: f77f aea9 ble.w 802b4d6 <_dtoa_r+0x5a6> 802b784: 463e mov r6, r7 802b786: 2331 movs r3, #49 @ 0x31 802b788: f806 3b01 strb.w r3, [r6], #1 802b78c: 9b04 ldr r3, [sp, #16] 802b78e: 3301 adds r3, #1 802b790: 9304 str r3, [sp, #16] 802b792: e6a4 b.n 802b4de <_dtoa_r+0x5ae> 802b794: f8cd 8010 str.w r8, [sp, #16] 802b798: 4654 mov r4, sl 802b79a: 4625 mov r5, r4 802b79c: e7f2 b.n 802b784 <_dtoa_r+0x854> 802b79e: 9b08 ldr r3, [sp, #32] 802b7a0: 2b00 cmp r3, #0 802b7a2: f000 8103 beq.w 802b9ac <_dtoa_r+0xa7c> 802b7a6: 2e00 cmp r6, #0 802b7a8: dd05 ble.n 802b7b6 <_dtoa_r+0x886> 802b7aa: 4629 mov r1, r5 802b7ac: 4632 mov r2, r6 802b7ae: 4648 mov r0, r9 802b7b0: f000 ff02 bl 802c5b8 <__lshift> 802b7b4: 4605 mov r5, r0 802b7b6: 9b0b ldr r3, [sp, #44] @ 0x2c 802b7b8: 2b00 cmp r3, #0 802b7ba: d058 beq.n 802b86e <_dtoa_r+0x93e> 802b7bc: 6869 ldr r1, [r5, #4] 802b7be: 4648 mov r0, r9 802b7c0: f000 fca2 bl 802c108 <_Balloc> 802b7c4: 4606 mov r6, r0 802b7c6: b928 cbnz r0, 802b7d4 <_dtoa_r+0x8a4> 802b7c8: 4b82 ldr r3, [pc, #520] @ (802b9d4 <_dtoa_r+0xaa4>) 802b7ca: 4602 mov r2, r0 802b7cc: f240 21ef movw r1, #751 @ 0x2ef 802b7d0: f7ff bbc7 b.w 802af62 <_dtoa_r+0x32> 802b7d4: 692a ldr r2, [r5, #16] 802b7d6: 3202 adds r2, #2 802b7d8: 0092 lsls r2, r2, #2 802b7da: f105 010c add.w r1, r5, #12 802b7de: 300c adds r0, #12 802b7e0: f7ff fae5 bl 802adae 802b7e4: 2201 movs r2, #1 802b7e6: 4631 mov r1, r6 802b7e8: 4648 mov r0, r9 802b7ea: f000 fee5 bl 802c5b8 <__lshift> 802b7ee: 1c7b adds r3, r7, #1 802b7f0: 9305 str r3, [sp, #20] 802b7f2: eb07 030b add.w r3, r7, fp 802b7f6: 9309 str r3, [sp, #36] @ 0x24 802b7f8: 9b02 ldr r3, [sp, #8] 802b7fa: f003 0301 and.w r3, r3, #1 802b7fe: 46a8 mov r8, r5 802b800: 9308 str r3, [sp, #32] 802b802: 4605 mov r5, r0 802b804: 9b05 ldr r3, [sp, #20] 802b806: 9801 ldr r0, [sp, #4] 802b808: 4621 mov r1, r4 802b80a: f103 3bff add.w fp, r3, #4294967295 @ 0xffffffff 802b80e: f7ff fb05 bl 802ae1c 802b812: 4641 mov r1, r8 802b814: 9002 str r0, [sp, #8] 802b816: f100 0a30 add.w sl, r0, #48 @ 0x30 802b81a: 9801 ldr r0, [sp, #4] 802b81c: f000 ff38 bl 802c690 <__mcmp> 802b820: 462a mov r2, r5 802b822: 9006 str r0, [sp, #24] 802b824: 4621 mov r1, r4 802b826: 4648 mov r0, r9 802b828: f000 ff4e bl 802c6c8 <__mdiff> 802b82c: 68c2 ldr r2, [r0, #12] 802b82e: 4606 mov r6, r0 802b830: b9fa cbnz r2, 802b872 <_dtoa_r+0x942> 802b832: 4601 mov r1, r0 802b834: 9801 ldr r0, [sp, #4] 802b836: f000 ff2b bl 802c690 <__mcmp> 802b83a: 4602 mov r2, r0 802b83c: 4631 mov r1, r6 802b83e: 4648 mov r0, r9 802b840: 920a str r2, [sp, #40] @ 0x28 802b842: f000 fca1 bl 802c188 <_Bfree> 802b846: 9b07 ldr r3, [sp, #28] 802b848: 9a0a ldr r2, [sp, #40] @ 0x28 802b84a: 9e05 ldr r6, [sp, #20] 802b84c: ea43 0102 orr.w r1, r3, r2 802b850: 9b08 ldr r3, [sp, #32] 802b852: 4319 orrs r1, r3 802b854: d10f bne.n 802b876 <_dtoa_r+0x946> 802b856: f1ba 0f39 cmp.w sl, #57 @ 0x39 802b85a: d028 beq.n 802b8ae <_dtoa_r+0x97e> 802b85c: 9b06 ldr r3, [sp, #24] 802b85e: 2b00 cmp r3, #0 802b860: dd02 ble.n 802b868 <_dtoa_r+0x938> 802b862: 9b02 ldr r3, [sp, #8] 802b864: f103 0a31 add.w sl, r3, #49 @ 0x31 802b868: f88b a000 strb.w sl, [fp] 802b86c: e639 b.n 802b4e2 <_dtoa_r+0x5b2> 802b86e: 4628 mov r0, r5 802b870: e7bd b.n 802b7ee <_dtoa_r+0x8be> 802b872: 2201 movs r2, #1 802b874: e7e2 b.n 802b83c <_dtoa_r+0x90c> 802b876: 9b06 ldr r3, [sp, #24] 802b878: 2b00 cmp r3, #0 802b87a: db04 blt.n 802b886 <_dtoa_r+0x956> 802b87c: 9907 ldr r1, [sp, #28] 802b87e: 430b orrs r3, r1 802b880: 9908 ldr r1, [sp, #32] 802b882: 430b orrs r3, r1 802b884: d120 bne.n 802b8c8 <_dtoa_r+0x998> 802b886: 2a00 cmp r2, #0 802b888: ddee ble.n 802b868 <_dtoa_r+0x938> 802b88a: 9901 ldr r1, [sp, #4] 802b88c: 2201 movs r2, #1 802b88e: 4648 mov r0, r9 802b890: f000 fe92 bl 802c5b8 <__lshift> 802b894: 4621 mov r1, r4 802b896: 9001 str r0, [sp, #4] 802b898: f000 fefa bl 802c690 <__mcmp> 802b89c: 2800 cmp r0, #0 802b89e: dc03 bgt.n 802b8a8 <_dtoa_r+0x978> 802b8a0: d1e2 bne.n 802b868 <_dtoa_r+0x938> 802b8a2: f01a 0f01 tst.w sl, #1 802b8a6: d0df beq.n 802b868 <_dtoa_r+0x938> 802b8a8: f1ba 0f39 cmp.w sl, #57 @ 0x39 802b8ac: d1d9 bne.n 802b862 <_dtoa_r+0x932> 802b8ae: 2339 movs r3, #57 @ 0x39 802b8b0: f88b 3000 strb.w r3, [fp] 802b8b4: 4633 mov r3, r6 802b8b6: 461e mov r6, r3 802b8b8: 3b01 subs r3, #1 802b8ba: f816 2c01 ldrb.w r2, [r6, #-1] 802b8be: 2a39 cmp r2, #57 @ 0x39 802b8c0: d053 beq.n 802b96a <_dtoa_r+0xa3a> 802b8c2: 3201 adds r2, #1 802b8c4: 701a strb r2, [r3, #0] 802b8c6: e60c b.n 802b4e2 <_dtoa_r+0x5b2> 802b8c8: 2a00 cmp r2, #0 802b8ca: dd07 ble.n 802b8dc <_dtoa_r+0x9ac> 802b8cc: f1ba 0f39 cmp.w sl, #57 @ 0x39 802b8d0: d0ed beq.n 802b8ae <_dtoa_r+0x97e> 802b8d2: f10a 0301 add.w r3, sl, #1 802b8d6: f88b 3000 strb.w r3, [fp] 802b8da: e602 b.n 802b4e2 <_dtoa_r+0x5b2> 802b8dc: 9b05 ldr r3, [sp, #20] 802b8de: 9a05 ldr r2, [sp, #20] 802b8e0: f803 ac01 strb.w sl, [r3, #-1] 802b8e4: 9b09 ldr r3, [sp, #36] @ 0x24 802b8e6: 4293 cmp r3, r2 802b8e8: d029 beq.n 802b93e <_dtoa_r+0xa0e> 802b8ea: 9901 ldr r1, [sp, #4] 802b8ec: 2300 movs r3, #0 802b8ee: 220a movs r2, #10 802b8f0: 4648 mov r0, r9 802b8f2: f000 fc6b bl 802c1cc <__multadd> 802b8f6: 45a8 cmp r8, r5 802b8f8: 9001 str r0, [sp, #4] 802b8fa: f04f 0300 mov.w r3, #0 802b8fe: f04f 020a mov.w r2, #10 802b902: 4641 mov r1, r8 802b904: 4648 mov r0, r9 802b906: d107 bne.n 802b918 <_dtoa_r+0x9e8> 802b908: f000 fc60 bl 802c1cc <__multadd> 802b90c: 4680 mov r8, r0 802b90e: 4605 mov r5, r0 802b910: 9b05 ldr r3, [sp, #20] 802b912: 3301 adds r3, #1 802b914: 9305 str r3, [sp, #20] 802b916: e775 b.n 802b804 <_dtoa_r+0x8d4> 802b918: f000 fc58 bl 802c1cc <__multadd> 802b91c: 4629 mov r1, r5 802b91e: 4680 mov r8, r0 802b920: 2300 movs r3, #0 802b922: 220a movs r2, #10 802b924: 4648 mov r0, r9 802b926: f000 fc51 bl 802c1cc <__multadd> 802b92a: 4605 mov r5, r0 802b92c: e7f0 b.n 802b910 <_dtoa_r+0x9e0> 802b92e: f1bb 0f00 cmp.w fp, #0 802b932: bfcc ite gt 802b934: 465e movgt r6, fp 802b936: 2601 movle r6, #1 802b938: 443e add r6, r7 802b93a: f04f 0800 mov.w r8, #0 802b93e: 9901 ldr r1, [sp, #4] 802b940: 2201 movs r2, #1 802b942: 4648 mov r0, r9 802b944: f000 fe38 bl 802c5b8 <__lshift> 802b948: 4621 mov r1, r4 802b94a: 9001 str r0, [sp, #4] 802b94c: f000 fea0 bl 802c690 <__mcmp> 802b950: 2800 cmp r0, #0 802b952: dcaf bgt.n 802b8b4 <_dtoa_r+0x984> 802b954: d102 bne.n 802b95c <_dtoa_r+0xa2c> 802b956: f01a 0f01 tst.w sl, #1 802b95a: d1ab bne.n 802b8b4 <_dtoa_r+0x984> 802b95c: 4633 mov r3, r6 802b95e: 461e mov r6, r3 802b960: f813 2d01 ldrb.w r2, [r3, #-1]! 802b964: 2a30 cmp r2, #48 @ 0x30 802b966: d0fa beq.n 802b95e <_dtoa_r+0xa2e> 802b968: e5bb b.n 802b4e2 <_dtoa_r+0x5b2> 802b96a: 429f cmp r7, r3 802b96c: d1a3 bne.n 802b8b6 <_dtoa_r+0x986> 802b96e: 9b04 ldr r3, [sp, #16] 802b970: 3301 adds r3, #1 802b972: 9304 str r3, [sp, #16] 802b974: 2331 movs r3, #49 @ 0x31 802b976: 703b strb r3, [r7, #0] 802b978: e5b3 b.n 802b4e2 <_dtoa_r+0x5b2> 802b97a: 9b1d ldr r3, [sp, #116] @ 0x74 802b97c: 4f16 ldr r7, [pc, #88] @ (802b9d8 <_dtoa_r+0xaa8>) 802b97e: b11b cbz r3, 802b988 <_dtoa_r+0xa58> 802b980: f107 0308 add.w r3, r7, #8 802b984: 9a1d ldr r2, [sp, #116] @ 0x74 802b986: 6013 str r3, [r2, #0] 802b988: 4638 mov r0, r7 802b98a: b011 add sp, #68 @ 0x44 802b98c: ecbd 8b02 vpop {d8} 802b990: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802b994: 9b07 ldr r3, [sp, #28] 802b996: 2b01 cmp r3, #1 802b998: f77f ae36 ble.w 802b608 <_dtoa_r+0x6d8> 802b99c: 9b0a ldr r3, [sp, #40] @ 0x28 802b99e: 930b str r3, [sp, #44] @ 0x2c 802b9a0: 2001 movs r0, #1 802b9a2: e656 b.n 802b652 <_dtoa_r+0x722> 802b9a4: f1bb 0f00 cmp.w fp, #0 802b9a8: f77f aed7 ble.w 802b75a <_dtoa_r+0x82a> 802b9ac: 463e mov r6, r7 802b9ae: 9801 ldr r0, [sp, #4] 802b9b0: 4621 mov r1, r4 802b9b2: f7ff fa33 bl 802ae1c 802b9b6: f100 0a30 add.w sl, r0, #48 @ 0x30 802b9ba: f806 ab01 strb.w sl, [r6], #1 802b9be: 1bf2 subs r2, r6, r7 802b9c0: 4593 cmp fp, r2 802b9c2: ddb4 ble.n 802b92e <_dtoa_r+0x9fe> 802b9c4: 9901 ldr r1, [sp, #4] 802b9c6: 2300 movs r3, #0 802b9c8: 220a movs r2, #10 802b9ca: 4648 mov r0, r9 802b9cc: f000 fbfe bl 802c1cc <__multadd> 802b9d0: 9001 str r0, [sp, #4] 802b9d2: e7ec b.n 802b9ae <_dtoa_r+0xa7e> 802b9d4: 08031f5e .word 0x08031f5e 802b9d8: 08031ef9 .word 0x08031ef9 0802b9dc <_free_r>: 802b9dc: b538 push {r3, r4, r5, lr} 802b9de: 4605 mov r5, r0 802b9e0: 2900 cmp r1, #0 802b9e2: d041 beq.n 802ba68 <_free_r+0x8c> 802b9e4: f851 3c04 ldr.w r3, [r1, #-4] 802b9e8: 1f0c subs r4, r1, #4 802b9ea: 2b00 cmp r3, #0 802b9ec: bfb8 it lt 802b9ee: 18e4 addlt r4, r4, r3 802b9f0: f7fd fc1e bl 8029230 <__malloc_lock> 802b9f4: 4a1d ldr r2, [pc, #116] @ (802ba6c <_free_r+0x90>) 802b9f6: 6813 ldr r3, [r2, #0] 802b9f8: b933 cbnz r3, 802ba08 <_free_r+0x2c> 802b9fa: 6063 str r3, [r4, #4] 802b9fc: 6014 str r4, [r2, #0] 802b9fe: 4628 mov r0, r5 802ba00: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 802ba04: f7fd bc1a b.w 802923c <__malloc_unlock> 802ba08: 42a3 cmp r3, r4 802ba0a: d908 bls.n 802ba1e <_free_r+0x42> 802ba0c: 6820 ldr r0, [r4, #0] 802ba0e: 1821 adds r1, r4, r0 802ba10: 428b cmp r3, r1 802ba12: bf01 itttt eq 802ba14: 6819 ldreq r1, [r3, #0] 802ba16: 685b ldreq r3, [r3, #4] 802ba18: 1809 addeq r1, r1, r0 802ba1a: 6021 streq r1, [r4, #0] 802ba1c: e7ed b.n 802b9fa <_free_r+0x1e> 802ba1e: 461a mov r2, r3 802ba20: 685b ldr r3, [r3, #4] 802ba22: b10b cbz r3, 802ba28 <_free_r+0x4c> 802ba24: 42a3 cmp r3, r4 802ba26: d9fa bls.n 802ba1e <_free_r+0x42> 802ba28: 6811 ldr r1, [r2, #0] 802ba2a: 1850 adds r0, r2, r1 802ba2c: 42a0 cmp r0, r4 802ba2e: d10b bne.n 802ba48 <_free_r+0x6c> 802ba30: 6820 ldr r0, [r4, #0] 802ba32: 4401 add r1, r0 802ba34: 1850 adds r0, r2, r1 802ba36: 4283 cmp r3, r0 802ba38: 6011 str r1, [r2, #0] 802ba3a: d1e0 bne.n 802b9fe <_free_r+0x22> 802ba3c: 6818 ldr r0, [r3, #0] 802ba3e: 685b ldr r3, [r3, #4] 802ba40: 6053 str r3, [r2, #4] 802ba42: 4408 add r0, r1 802ba44: 6010 str r0, [r2, #0] 802ba46: e7da b.n 802b9fe <_free_r+0x22> 802ba48: d902 bls.n 802ba50 <_free_r+0x74> 802ba4a: 230c movs r3, #12 802ba4c: 602b str r3, [r5, #0] 802ba4e: e7d6 b.n 802b9fe <_free_r+0x22> 802ba50: 6820 ldr r0, [r4, #0] 802ba52: 1821 adds r1, r4, r0 802ba54: 428b cmp r3, r1 802ba56: bf04 itt eq 802ba58: 6819 ldreq r1, [r3, #0] 802ba5a: 685b ldreq r3, [r3, #4] 802ba5c: 6063 str r3, [r4, #4] 802ba5e: bf04 itt eq 802ba60: 1809 addeq r1, r1, r0 802ba62: 6021 streq r1, [r4, #0] 802ba64: 6054 str r4, [r2, #4] 802ba66: e7ca b.n 802b9fe <_free_r+0x22> 802ba68: bd38 pop {r3, r4, r5, pc} 802ba6a: bf00 nop 802ba6c: 2402b130 .word 0x2402b130 0802ba70 : 802ba70: 6903 ldr r3, [r0, #16] 802ba72: ebb3 1f61 cmp.w r3, r1, asr #5 802ba76: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802ba7a: ea4f 1261 mov.w r2, r1, asr #5 802ba7e: f100 0414 add.w r4, r0, #20 802ba82: dd45 ble.n 802bb10 802ba84: f011 011f ands.w r1, r1, #31 802ba88: eb04 0683 add.w r6, r4, r3, lsl #2 802ba8c: eb04 0582 add.w r5, r4, r2, lsl #2 802ba90: d10c bne.n 802baac 802ba92: f100 0710 add.w r7, r0, #16 802ba96: 4629 mov r1, r5 802ba98: 42b1 cmp r1, r6 802ba9a: d334 bcc.n 802bb06 802ba9c: 1a9b subs r3, r3, r2 802ba9e: 009b lsls r3, r3, #2 802baa0: 1eea subs r2, r5, #3 802baa2: 4296 cmp r6, r2 802baa4: bf38 it cc 802baa6: 2300 movcc r3, #0 802baa8: 4423 add r3, r4 802baaa: e015 b.n 802bad8 802baac: f854 7022 ldr.w r7, [r4, r2, lsl #2] 802bab0: f1c1 0820 rsb r8, r1, #32 802bab4: 40cf lsrs r7, r1 802bab6: f105 0e04 add.w lr, r5, #4 802baba: 46a1 mov r9, r4 802babc: 4576 cmp r6, lr 802babe: 46f4 mov ip, lr 802bac0: d815 bhi.n 802baee 802bac2: 1a9a subs r2, r3, r2 802bac4: 0092 lsls r2, r2, #2 802bac6: 3a04 subs r2, #4 802bac8: 3501 adds r5, #1 802baca: 42ae cmp r6, r5 802bacc: bf38 it cc 802bace: 2200 movcc r2, #0 802bad0: 18a3 adds r3, r4, r2 802bad2: 50a7 str r7, [r4, r2] 802bad4: b107 cbz r7, 802bad8 802bad6: 3304 adds r3, #4 802bad8: 1b1a subs r2, r3, r4 802bada: 42a3 cmp r3, r4 802badc: ea4f 02a2 mov.w r2, r2, asr #2 802bae0: bf08 it eq 802bae2: 2300 moveq r3, #0 802bae4: 6102 str r2, [r0, #16] 802bae6: bf08 it eq 802bae8: 6143 streq r3, [r0, #20] 802baea: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802baee: f8dc c000 ldr.w ip, [ip] 802baf2: fa0c fc08 lsl.w ip, ip, r8 802baf6: ea4c 0707 orr.w r7, ip, r7 802bafa: f849 7b04 str.w r7, [r9], #4 802bafe: f85e 7b04 ldr.w r7, [lr], #4 802bb02: 40cf lsrs r7, r1 802bb04: e7da b.n 802babc 802bb06: f851 cb04 ldr.w ip, [r1], #4 802bb0a: f847 cf04 str.w ip, [r7, #4]! 802bb0e: e7c3 b.n 802ba98 802bb10: 4623 mov r3, r4 802bb12: e7e1 b.n 802bad8 0802bb14 <__hexdig_fun>: 802bb14: f1a0 0330 sub.w r3, r0, #48 @ 0x30 802bb18: 2b09 cmp r3, #9 802bb1a: d802 bhi.n 802bb22 <__hexdig_fun+0xe> 802bb1c: 3820 subs r0, #32 802bb1e: b2c0 uxtb r0, r0 802bb20: 4770 bx lr 802bb22: f1a0 0361 sub.w r3, r0, #97 @ 0x61 802bb26: 2b05 cmp r3, #5 802bb28: d801 bhi.n 802bb2e <__hexdig_fun+0x1a> 802bb2a: 3847 subs r0, #71 @ 0x47 802bb2c: e7f7 b.n 802bb1e <__hexdig_fun+0xa> 802bb2e: f1a0 0341 sub.w r3, r0, #65 @ 0x41 802bb32: 2b05 cmp r3, #5 802bb34: d801 bhi.n 802bb3a <__hexdig_fun+0x26> 802bb36: 3827 subs r0, #39 @ 0x27 802bb38: e7f1 b.n 802bb1e <__hexdig_fun+0xa> 802bb3a: 2000 movs r0, #0 802bb3c: 4770 bx lr ... 0802bb40 <__gethex>: 802bb40: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802bb44: b085 sub sp, #20 802bb46: 468a mov sl, r1 802bb48: 9302 str r3, [sp, #8] 802bb4a: 680b ldr r3, [r1, #0] 802bb4c: 9001 str r0, [sp, #4] 802bb4e: 4690 mov r8, r2 802bb50: 1c9c adds r4, r3, #2 802bb52: 46a1 mov r9, r4 802bb54: f814 0b01 ldrb.w r0, [r4], #1 802bb58: 2830 cmp r0, #48 @ 0x30 802bb5a: d0fa beq.n 802bb52 <__gethex+0x12> 802bb5c: eba9 0303 sub.w r3, r9, r3 802bb60: f1a3 0b02 sub.w fp, r3, #2 802bb64: f7ff ffd6 bl 802bb14 <__hexdig_fun> 802bb68: 4605 mov r5, r0 802bb6a: 2800 cmp r0, #0 802bb6c: d168 bne.n 802bc40 <__gethex+0x100> 802bb6e: 49a0 ldr r1, [pc, #640] @ (802bdf0 <__gethex+0x2b0>) 802bb70: 2201 movs r2, #1 802bb72: 4648 mov r0, r9 802bb74: f7ff f82c bl 802abd0 802bb78: 4607 mov r7, r0 802bb7a: 2800 cmp r0, #0 802bb7c: d167 bne.n 802bc4e <__gethex+0x10e> 802bb7e: f899 0001 ldrb.w r0, [r9, #1] 802bb82: 4626 mov r6, r4 802bb84: f7ff ffc6 bl 802bb14 <__hexdig_fun> 802bb88: 2800 cmp r0, #0 802bb8a: d062 beq.n 802bc52 <__gethex+0x112> 802bb8c: 4623 mov r3, r4 802bb8e: 7818 ldrb r0, [r3, #0] 802bb90: 2830 cmp r0, #48 @ 0x30 802bb92: 4699 mov r9, r3 802bb94: f103 0301 add.w r3, r3, #1 802bb98: d0f9 beq.n 802bb8e <__gethex+0x4e> 802bb9a: f7ff ffbb bl 802bb14 <__hexdig_fun> 802bb9e: fab0 f580 clz r5, r0 802bba2: 096d lsrs r5, r5, #5 802bba4: f04f 0b01 mov.w fp, #1 802bba8: 464a mov r2, r9 802bbaa: 4616 mov r6, r2 802bbac: 3201 adds r2, #1 802bbae: 7830 ldrb r0, [r6, #0] 802bbb0: f7ff ffb0 bl 802bb14 <__hexdig_fun> 802bbb4: 2800 cmp r0, #0 802bbb6: d1f8 bne.n 802bbaa <__gethex+0x6a> 802bbb8: 498d ldr r1, [pc, #564] @ (802bdf0 <__gethex+0x2b0>) 802bbba: 2201 movs r2, #1 802bbbc: 4630 mov r0, r6 802bbbe: f7ff f807 bl 802abd0 802bbc2: 2800 cmp r0, #0 802bbc4: d13f bne.n 802bc46 <__gethex+0x106> 802bbc6: b944 cbnz r4, 802bbda <__gethex+0x9a> 802bbc8: 1c74 adds r4, r6, #1 802bbca: 4622 mov r2, r4 802bbcc: 4616 mov r6, r2 802bbce: 3201 adds r2, #1 802bbd0: 7830 ldrb r0, [r6, #0] 802bbd2: f7ff ff9f bl 802bb14 <__hexdig_fun> 802bbd6: 2800 cmp r0, #0 802bbd8: d1f8 bne.n 802bbcc <__gethex+0x8c> 802bbda: 1ba4 subs r4, r4, r6 802bbdc: 00a7 lsls r7, r4, #2 802bbde: 7833 ldrb r3, [r6, #0] 802bbe0: f003 03df and.w r3, r3, #223 @ 0xdf 802bbe4: 2b50 cmp r3, #80 @ 0x50 802bbe6: d13e bne.n 802bc66 <__gethex+0x126> 802bbe8: 7873 ldrb r3, [r6, #1] 802bbea: 2b2b cmp r3, #43 @ 0x2b 802bbec: d033 beq.n 802bc56 <__gethex+0x116> 802bbee: 2b2d cmp r3, #45 @ 0x2d 802bbf0: d034 beq.n 802bc5c <__gethex+0x11c> 802bbf2: 1c71 adds r1, r6, #1 802bbf4: 2400 movs r4, #0 802bbf6: 7808 ldrb r0, [r1, #0] 802bbf8: f7ff ff8c bl 802bb14 <__hexdig_fun> 802bbfc: 1e43 subs r3, r0, #1 802bbfe: b2db uxtb r3, r3 802bc00: 2b18 cmp r3, #24 802bc02: d830 bhi.n 802bc66 <__gethex+0x126> 802bc04: f1a0 0210 sub.w r2, r0, #16 802bc08: f811 0f01 ldrb.w r0, [r1, #1]! 802bc0c: f7ff ff82 bl 802bb14 <__hexdig_fun> 802bc10: f100 3cff add.w ip, r0, #4294967295 @ 0xffffffff 802bc14: fa5f fc8c uxtb.w ip, ip 802bc18: f1bc 0f18 cmp.w ip, #24 802bc1c: f04f 030a mov.w r3, #10 802bc20: d91e bls.n 802bc60 <__gethex+0x120> 802bc22: b104 cbz r4, 802bc26 <__gethex+0xe6> 802bc24: 4252 negs r2, r2 802bc26: 4417 add r7, r2 802bc28: f8ca 1000 str.w r1, [sl] 802bc2c: b1ed cbz r5, 802bc6a <__gethex+0x12a> 802bc2e: f1bb 0f00 cmp.w fp, #0 802bc32: bf0c ite eq 802bc34: 2506 moveq r5, #6 802bc36: 2500 movne r5, #0 802bc38: 4628 mov r0, r5 802bc3a: b005 add sp, #20 802bc3c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802bc40: 2500 movs r5, #0 802bc42: 462c mov r4, r5 802bc44: e7b0 b.n 802bba8 <__gethex+0x68> 802bc46: 2c00 cmp r4, #0 802bc48: d1c7 bne.n 802bbda <__gethex+0x9a> 802bc4a: 4627 mov r7, r4 802bc4c: e7c7 b.n 802bbde <__gethex+0x9e> 802bc4e: 464e mov r6, r9 802bc50: 462f mov r7, r5 802bc52: 2501 movs r5, #1 802bc54: e7c3 b.n 802bbde <__gethex+0x9e> 802bc56: 2400 movs r4, #0 802bc58: 1cb1 adds r1, r6, #2 802bc5a: e7cc b.n 802bbf6 <__gethex+0xb6> 802bc5c: 2401 movs r4, #1 802bc5e: e7fb b.n 802bc58 <__gethex+0x118> 802bc60: fb03 0002 mla r0, r3, r2, r0 802bc64: e7ce b.n 802bc04 <__gethex+0xc4> 802bc66: 4631 mov r1, r6 802bc68: e7de b.n 802bc28 <__gethex+0xe8> 802bc6a: eba6 0309 sub.w r3, r6, r9 802bc6e: 3b01 subs r3, #1 802bc70: 4629 mov r1, r5 802bc72: 2b07 cmp r3, #7 802bc74: dc0a bgt.n 802bc8c <__gethex+0x14c> 802bc76: 9801 ldr r0, [sp, #4] 802bc78: f000 fa46 bl 802c108 <_Balloc> 802bc7c: 4604 mov r4, r0 802bc7e: b940 cbnz r0, 802bc92 <__gethex+0x152> 802bc80: 4b5c ldr r3, [pc, #368] @ (802bdf4 <__gethex+0x2b4>) 802bc82: 4602 mov r2, r0 802bc84: 21e4 movs r1, #228 @ 0xe4 802bc86: 485c ldr r0, [pc, #368] @ (802bdf8 <__gethex+0x2b8>) 802bc88: f7ff f8aa bl 802ade0 <__assert_func> 802bc8c: 3101 adds r1, #1 802bc8e: 105b asrs r3, r3, #1 802bc90: e7ef b.n 802bc72 <__gethex+0x132> 802bc92: f100 0a14 add.w sl, r0, #20 802bc96: 2300 movs r3, #0 802bc98: 4655 mov r5, sl 802bc9a: 469b mov fp, r3 802bc9c: 45b1 cmp r9, r6 802bc9e: d337 bcc.n 802bd10 <__gethex+0x1d0> 802bca0: f845 bb04 str.w fp, [r5], #4 802bca4: eba5 050a sub.w r5, r5, sl 802bca8: 10ad asrs r5, r5, #2 802bcaa: 6125 str r5, [r4, #16] 802bcac: 4658 mov r0, fp 802bcae: f000 fb1d bl 802c2ec <__hi0bits> 802bcb2: 016d lsls r5, r5, #5 802bcb4: f8d8 6000 ldr.w r6, [r8] 802bcb8: 1a2d subs r5, r5, r0 802bcba: 42b5 cmp r5, r6 802bcbc: dd54 ble.n 802bd68 <__gethex+0x228> 802bcbe: 1bad subs r5, r5, r6 802bcc0: 4629 mov r1, r5 802bcc2: 4620 mov r0, r4 802bcc4: f000 feae bl 802ca24 <__any_on> 802bcc8: 4681 mov r9, r0 802bcca: b178 cbz r0, 802bcec <__gethex+0x1ac> 802bccc: 1e6b subs r3, r5, #1 802bcce: 1159 asrs r1, r3, #5 802bcd0: f003 021f and.w r2, r3, #31 802bcd4: f85a 1021 ldr.w r1, [sl, r1, lsl #2] 802bcd8: f04f 0901 mov.w r9, #1 802bcdc: fa09 f202 lsl.w r2, r9, r2 802bce0: 420a tst r2, r1 802bce2: d003 beq.n 802bcec <__gethex+0x1ac> 802bce4: 454b cmp r3, r9 802bce6: dc36 bgt.n 802bd56 <__gethex+0x216> 802bce8: f04f 0902 mov.w r9, #2 802bcec: 4629 mov r1, r5 802bcee: 4620 mov r0, r4 802bcf0: f7ff febe bl 802ba70 802bcf4: 442f add r7, r5 802bcf6: f8d8 3008 ldr.w r3, [r8, #8] 802bcfa: 42bb cmp r3, r7 802bcfc: da42 bge.n 802bd84 <__gethex+0x244> 802bcfe: 9801 ldr r0, [sp, #4] 802bd00: 4621 mov r1, r4 802bd02: f000 fa41 bl 802c188 <_Bfree> 802bd06: 9a0e ldr r2, [sp, #56] @ 0x38 802bd08: 2300 movs r3, #0 802bd0a: 6013 str r3, [r2, #0] 802bd0c: 25a3 movs r5, #163 @ 0xa3 802bd0e: e793 b.n 802bc38 <__gethex+0xf8> 802bd10: f816 2d01 ldrb.w r2, [r6, #-1]! 802bd14: 2a2e cmp r2, #46 @ 0x2e 802bd16: d012 beq.n 802bd3e <__gethex+0x1fe> 802bd18: 2b20 cmp r3, #32 802bd1a: d104 bne.n 802bd26 <__gethex+0x1e6> 802bd1c: f845 bb04 str.w fp, [r5], #4 802bd20: f04f 0b00 mov.w fp, #0 802bd24: 465b mov r3, fp 802bd26: 7830 ldrb r0, [r6, #0] 802bd28: 9303 str r3, [sp, #12] 802bd2a: f7ff fef3 bl 802bb14 <__hexdig_fun> 802bd2e: 9b03 ldr r3, [sp, #12] 802bd30: f000 000f and.w r0, r0, #15 802bd34: 4098 lsls r0, r3 802bd36: ea4b 0b00 orr.w fp, fp, r0 802bd3a: 3304 adds r3, #4 802bd3c: e7ae b.n 802bc9c <__gethex+0x15c> 802bd3e: 45b1 cmp r9, r6 802bd40: d8ea bhi.n 802bd18 <__gethex+0x1d8> 802bd42: 492b ldr r1, [pc, #172] @ (802bdf0 <__gethex+0x2b0>) 802bd44: 9303 str r3, [sp, #12] 802bd46: 2201 movs r2, #1 802bd48: 4630 mov r0, r6 802bd4a: f7fe ff41 bl 802abd0 802bd4e: 9b03 ldr r3, [sp, #12] 802bd50: 2800 cmp r0, #0 802bd52: d1e1 bne.n 802bd18 <__gethex+0x1d8> 802bd54: e7a2 b.n 802bc9c <__gethex+0x15c> 802bd56: 1ea9 subs r1, r5, #2 802bd58: 4620 mov r0, r4 802bd5a: f000 fe63 bl 802ca24 <__any_on> 802bd5e: 2800 cmp r0, #0 802bd60: d0c2 beq.n 802bce8 <__gethex+0x1a8> 802bd62: f04f 0903 mov.w r9, #3 802bd66: e7c1 b.n 802bcec <__gethex+0x1ac> 802bd68: da09 bge.n 802bd7e <__gethex+0x23e> 802bd6a: 1b75 subs r5, r6, r5 802bd6c: 4621 mov r1, r4 802bd6e: 9801 ldr r0, [sp, #4] 802bd70: 462a mov r2, r5 802bd72: f000 fc21 bl 802c5b8 <__lshift> 802bd76: 1b7f subs r7, r7, r5 802bd78: 4604 mov r4, r0 802bd7a: f100 0a14 add.w sl, r0, #20 802bd7e: f04f 0900 mov.w r9, #0 802bd82: e7b8 b.n 802bcf6 <__gethex+0x1b6> 802bd84: f8d8 5004 ldr.w r5, [r8, #4] 802bd88: 42bd cmp r5, r7 802bd8a: dd6f ble.n 802be6c <__gethex+0x32c> 802bd8c: 1bed subs r5, r5, r7 802bd8e: 42ae cmp r6, r5 802bd90: dc34 bgt.n 802bdfc <__gethex+0x2bc> 802bd92: f8d8 300c ldr.w r3, [r8, #12] 802bd96: 2b02 cmp r3, #2 802bd98: d022 beq.n 802bde0 <__gethex+0x2a0> 802bd9a: 2b03 cmp r3, #3 802bd9c: d024 beq.n 802bde8 <__gethex+0x2a8> 802bd9e: 2b01 cmp r3, #1 802bda0: d115 bne.n 802bdce <__gethex+0x28e> 802bda2: 42ae cmp r6, r5 802bda4: d113 bne.n 802bdce <__gethex+0x28e> 802bda6: 2e01 cmp r6, #1 802bda8: d10b bne.n 802bdc2 <__gethex+0x282> 802bdaa: 9a02 ldr r2, [sp, #8] 802bdac: f8d8 3004 ldr.w r3, [r8, #4] 802bdb0: 6013 str r3, [r2, #0] 802bdb2: 2301 movs r3, #1 802bdb4: 6123 str r3, [r4, #16] 802bdb6: f8ca 3000 str.w r3, [sl] 802bdba: 9b0e ldr r3, [sp, #56] @ 0x38 802bdbc: 2562 movs r5, #98 @ 0x62 802bdbe: 601c str r4, [r3, #0] 802bdc0: e73a b.n 802bc38 <__gethex+0xf8> 802bdc2: 1e71 subs r1, r6, #1 802bdc4: 4620 mov r0, r4 802bdc6: f000 fe2d bl 802ca24 <__any_on> 802bdca: 2800 cmp r0, #0 802bdcc: d1ed bne.n 802bdaa <__gethex+0x26a> 802bdce: 9801 ldr r0, [sp, #4] 802bdd0: 4621 mov r1, r4 802bdd2: f000 f9d9 bl 802c188 <_Bfree> 802bdd6: 9a0e ldr r2, [sp, #56] @ 0x38 802bdd8: 2300 movs r3, #0 802bdda: 6013 str r3, [r2, #0] 802bddc: 2550 movs r5, #80 @ 0x50 802bdde: e72b b.n 802bc38 <__gethex+0xf8> 802bde0: 9b0f ldr r3, [sp, #60] @ 0x3c 802bde2: 2b00 cmp r3, #0 802bde4: d1f3 bne.n 802bdce <__gethex+0x28e> 802bde6: e7e0 b.n 802bdaa <__gethex+0x26a> 802bde8: 9b0f ldr r3, [sp, #60] @ 0x3c 802bdea: 2b00 cmp r3, #0 802bdec: d1dd bne.n 802bdaa <__gethex+0x26a> 802bdee: e7ee b.n 802bdce <__gethex+0x28e> 802bdf0: 08031d2d .word 0x08031d2d 802bdf4: 08031f5e .word 0x08031f5e 802bdf8: 08031f6f .word 0x08031f6f 802bdfc: 1e6f subs r7, r5, #1 802bdfe: f1b9 0f00 cmp.w r9, #0 802be02: d130 bne.n 802be66 <__gethex+0x326> 802be04: b127 cbz r7, 802be10 <__gethex+0x2d0> 802be06: 4639 mov r1, r7 802be08: 4620 mov r0, r4 802be0a: f000 fe0b bl 802ca24 <__any_on> 802be0e: 4681 mov r9, r0 802be10: 117a asrs r2, r7, #5 802be12: 2301 movs r3, #1 802be14: f85a 2022 ldr.w r2, [sl, r2, lsl #2] 802be18: f007 071f and.w r7, r7, #31 802be1c: 40bb lsls r3, r7 802be1e: 4213 tst r3, r2 802be20: 4629 mov r1, r5 802be22: 4620 mov r0, r4 802be24: bf18 it ne 802be26: f049 0902 orrne.w r9, r9, #2 802be2a: f7ff fe21 bl 802ba70 802be2e: f8d8 7004 ldr.w r7, [r8, #4] 802be32: 1b76 subs r6, r6, r5 802be34: 2502 movs r5, #2 802be36: f1b9 0f00 cmp.w r9, #0 802be3a: d047 beq.n 802becc <__gethex+0x38c> 802be3c: f8d8 300c ldr.w r3, [r8, #12] 802be40: 2b02 cmp r3, #2 802be42: d015 beq.n 802be70 <__gethex+0x330> 802be44: 2b03 cmp r3, #3 802be46: d017 beq.n 802be78 <__gethex+0x338> 802be48: 2b01 cmp r3, #1 802be4a: d109 bne.n 802be60 <__gethex+0x320> 802be4c: f019 0f02 tst.w r9, #2 802be50: d006 beq.n 802be60 <__gethex+0x320> 802be52: f8da 3000 ldr.w r3, [sl] 802be56: ea49 0903 orr.w r9, r9, r3 802be5a: f019 0f01 tst.w r9, #1 802be5e: d10e bne.n 802be7e <__gethex+0x33e> 802be60: f045 0510 orr.w r5, r5, #16 802be64: e032 b.n 802becc <__gethex+0x38c> 802be66: f04f 0901 mov.w r9, #1 802be6a: e7d1 b.n 802be10 <__gethex+0x2d0> 802be6c: 2501 movs r5, #1 802be6e: e7e2 b.n 802be36 <__gethex+0x2f6> 802be70: 9b0f ldr r3, [sp, #60] @ 0x3c 802be72: f1c3 0301 rsb r3, r3, #1 802be76: 930f str r3, [sp, #60] @ 0x3c 802be78: 9b0f ldr r3, [sp, #60] @ 0x3c 802be7a: 2b00 cmp r3, #0 802be7c: d0f0 beq.n 802be60 <__gethex+0x320> 802be7e: f8d4 b010 ldr.w fp, [r4, #16] 802be82: f104 0314 add.w r3, r4, #20 802be86: ea4f 0a8b mov.w sl, fp, lsl #2 802be8a: eb03 018b add.w r1, r3, fp, lsl #2 802be8e: f04f 0c00 mov.w ip, #0 802be92: 4618 mov r0, r3 802be94: f853 2b04 ldr.w r2, [r3], #4 802be98: f1b2 3fff cmp.w r2, #4294967295 @ 0xffffffff 802be9c: d01b beq.n 802bed6 <__gethex+0x396> 802be9e: 3201 adds r2, #1 802bea0: 6002 str r2, [r0, #0] 802bea2: 2d02 cmp r5, #2 802bea4: f104 0314 add.w r3, r4, #20 802bea8: d13c bne.n 802bf24 <__gethex+0x3e4> 802beaa: f8d8 2000 ldr.w r2, [r8] 802beae: 3a01 subs r2, #1 802beb0: 42b2 cmp r2, r6 802beb2: d109 bne.n 802bec8 <__gethex+0x388> 802beb4: 1171 asrs r1, r6, #5 802beb6: 2201 movs r2, #1 802beb8: f853 3021 ldr.w r3, [r3, r1, lsl #2] 802bebc: f006 061f and.w r6, r6, #31 802bec0: fa02 f606 lsl.w r6, r2, r6 802bec4: 421e tst r6, r3 802bec6: d13a bne.n 802bf3e <__gethex+0x3fe> 802bec8: f045 0520 orr.w r5, r5, #32 802becc: 9b0e ldr r3, [sp, #56] @ 0x38 802bece: 601c str r4, [r3, #0] 802bed0: 9b02 ldr r3, [sp, #8] 802bed2: 601f str r7, [r3, #0] 802bed4: e6b0 b.n 802bc38 <__gethex+0xf8> 802bed6: 4299 cmp r1, r3 802bed8: f843 cc04 str.w ip, [r3, #-4] 802bedc: d8d9 bhi.n 802be92 <__gethex+0x352> 802bede: 68a3 ldr r3, [r4, #8] 802bee0: 459b cmp fp, r3 802bee2: db17 blt.n 802bf14 <__gethex+0x3d4> 802bee4: 6861 ldr r1, [r4, #4] 802bee6: 9801 ldr r0, [sp, #4] 802bee8: 3101 adds r1, #1 802beea: f000 f90d bl 802c108 <_Balloc> 802beee: 4681 mov r9, r0 802bef0: b918 cbnz r0, 802befa <__gethex+0x3ba> 802bef2: 4b1a ldr r3, [pc, #104] @ (802bf5c <__gethex+0x41c>) 802bef4: 4602 mov r2, r0 802bef6: 2184 movs r1, #132 @ 0x84 802bef8: e6c5 b.n 802bc86 <__gethex+0x146> 802befa: 6922 ldr r2, [r4, #16] 802befc: 3202 adds r2, #2 802befe: f104 010c add.w r1, r4, #12 802bf02: 0092 lsls r2, r2, #2 802bf04: 300c adds r0, #12 802bf06: f7fe ff52 bl 802adae 802bf0a: 4621 mov r1, r4 802bf0c: 9801 ldr r0, [sp, #4] 802bf0e: f000 f93b bl 802c188 <_Bfree> 802bf12: 464c mov r4, r9 802bf14: 6923 ldr r3, [r4, #16] 802bf16: 1c5a adds r2, r3, #1 802bf18: eb04 0383 add.w r3, r4, r3, lsl #2 802bf1c: 6122 str r2, [r4, #16] 802bf1e: 2201 movs r2, #1 802bf20: 615a str r2, [r3, #20] 802bf22: e7be b.n 802bea2 <__gethex+0x362> 802bf24: 6922 ldr r2, [r4, #16] 802bf26: 455a cmp r2, fp 802bf28: dd0b ble.n 802bf42 <__gethex+0x402> 802bf2a: 2101 movs r1, #1 802bf2c: 4620 mov r0, r4 802bf2e: f7ff fd9f bl 802ba70 802bf32: f8d8 3008 ldr.w r3, [r8, #8] 802bf36: 3701 adds r7, #1 802bf38: 42bb cmp r3, r7 802bf3a: f6ff aee0 blt.w 802bcfe <__gethex+0x1be> 802bf3e: 2501 movs r5, #1 802bf40: e7c2 b.n 802bec8 <__gethex+0x388> 802bf42: f016 061f ands.w r6, r6, #31 802bf46: d0fa beq.n 802bf3e <__gethex+0x3fe> 802bf48: 4453 add r3, sl 802bf4a: f1c6 0620 rsb r6, r6, #32 802bf4e: f853 0c04 ldr.w r0, [r3, #-4] 802bf52: f000 f9cb bl 802c2ec <__hi0bits> 802bf56: 42b0 cmp r0, r6 802bf58: dbe7 blt.n 802bf2a <__gethex+0x3ea> 802bf5a: e7f0 b.n 802bf3e <__gethex+0x3fe> 802bf5c: 08031f5e .word 0x08031f5e 0802bf60 : 802bf60: f1c2 0208 rsb r2, r2, #8 802bf64: 0092 lsls r2, r2, #2 802bf66: b570 push {r4, r5, r6, lr} 802bf68: f1c2 0620 rsb r6, r2, #32 802bf6c: 6843 ldr r3, [r0, #4] 802bf6e: 6804 ldr r4, [r0, #0] 802bf70: fa03 f506 lsl.w r5, r3, r6 802bf74: 432c orrs r4, r5 802bf76: 40d3 lsrs r3, r2 802bf78: 6004 str r4, [r0, #0] 802bf7a: f840 3f04 str.w r3, [r0, #4]! 802bf7e: 4288 cmp r0, r1 802bf80: d3f4 bcc.n 802bf6c 802bf82: bd70 pop {r4, r5, r6, pc} 0802bf84 <__match>: 802bf84: b530 push {r4, r5, lr} 802bf86: 6803 ldr r3, [r0, #0] 802bf88: 3301 adds r3, #1 802bf8a: f811 4b01 ldrb.w r4, [r1], #1 802bf8e: b914 cbnz r4, 802bf96 <__match+0x12> 802bf90: 6003 str r3, [r0, #0] 802bf92: 2001 movs r0, #1 802bf94: bd30 pop {r4, r5, pc} 802bf96: f813 2b01 ldrb.w r2, [r3], #1 802bf9a: f1a2 0541 sub.w r5, r2, #65 @ 0x41 802bf9e: 2d19 cmp r5, #25 802bfa0: bf98 it ls 802bfa2: 3220 addls r2, #32 802bfa4: 42a2 cmp r2, r4 802bfa6: d0f0 beq.n 802bf8a <__match+0x6> 802bfa8: 2000 movs r0, #0 802bfaa: e7f3 b.n 802bf94 <__match+0x10> 0802bfac <__hexnan>: 802bfac: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802bfb0: 680b ldr r3, [r1, #0] 802bfb2: 6801 ldr r1, [r0, #0] 802bfb4: 115e asrs r6, r3, #5 802bfb6: eb02 0686 add.w r6, r2, r6, lsl #2 802bfba: f013 031f ands.w r3, r3, #31 802bfbe: b087 sub sp, #28 802bfc0: bf18 it ne 802bfc2: 3604 addne r6, #4 802bfc4: 2500 movs r5, #0 802bfc6: 1f37 subs r7, r6, #4 802bfc8: 4682 mov sl, r0 802bfca: 4690 mov r8, r2 802bfcc: 9301 str r3, [sp, #4] 802bfce: f846 5c04 str.w r5, [r6, #-4] 802bfd2: 46b9 mov r9, r7 802bfd4: 463c mov r4, r7 802bfd6: 9502 str r5, [sp, #8] 802bfd8: 46ab mov fp, r5 802bfda: 784a ldrb r2, [r1, #1] 802bfdc: 1c4b adds r3, r1, #1 802bfde: 9303 str r3, [sp, #12] 802bfe0: b342 cbz r2, 802c034 <__hexnan+0x88> 802bfe2: 4610 mov r0, r2 802bfe4: 9105 str r1, [sp, #20] 802bfe6: 9204 str r2, [sp, #16] 802bfe8: f7ff fd94 bl 802bb14 <__hexdig_fun> 802bfec: 2800 cmp r0, #0 802bfee: d151 bne.n 802c094 <__hexnan+0xe8> 802bff0: 9a04 ldr r2, [sp, #16] 802bff2: 9905 ldr r1, [sp, #20] 802bff4: 2a20 cmp r2, #32 802bff6: d818 bhi.n 802c02a <__hexnan+0x7e> 802bff8: 9b02 ldr r3, [sp, #8] 802bffa: 459b cmp fp, r3 802bffc: dd13 ble.n 802c026 <__hexnan+0x7a> 802bffe: 454c cmp r4, r9 802c000: d206 bcs.n 802c010 <__hexnan+0x64> 802c002: 2d07 cmp r5, #7 802c004: dc04 bgt.n 802c010 <__hexnan+0x64> 802c006: 462a mov r2, r5 802c008: 4649 mov r1, r9 802c00a: 4620 mov r0, r4 802c00c: f7ff ffa8 bl 802bf60 802c010: 4544 cmp r4, r8 802c012: d952 bls.n 802c0ba <__hexnan+0x10e> 802c014: 2300 movs r3, #0 802c016: f1a4 0904 sub.w r9, r4, #4 802c01a: f844 3c04 str.w r3, [r4, #-4] 802c01e: f8cd b008 str.w fp, [sp, #8] 802c022: 464c mov r4, r9 802c024: 461d mov r5, r3 802c026: 9903 ldr r1, [sp, #12] 802c028: e7d7 b.n 802bfda <__hexnan+0x2e> 802c02a: 2a29 cmp r2, #41 @ 0x29 802c02c: d157 bne.n 802c0de <__hexnan+0x132> 802c02e: 3102 adds r1, #2 802c030: f8ca 1000 str.w r1, [sl] 802c034: f1bb 0f00 cmp.w fp, #0 802c038: d051 beq.n 802c0de <__hexnan+0x132> 802c03a: 454c cmp r4, r9 802c03c: d206 bcs.n 802c04c <__hexnan+0xa0> 802c03e: 2d07 cmp r5, #7 802c040: dc04 bgt.n 802c04c <__hexnan+0xa0> 802c042: 462a mov r2, r5 802c044: 4649 mov r1, r9 802c046: 4620 mov r0, r4 802c048: f7ff ff8a bl 802bf60 802c04c: 4544 cmp r4, r8 802c04e: d936 bls.n 802c0be <__hexnan+0x112> 802c050: f1a8 0204 sub.w r2, r8, #4 802c054: 4623 mov r3, r4 802c056: f853 1b04 ldr.w r1, [r3], #4 802c05a: f842 1f04 str.w r1, [r2, #4]! 802c05e: 429f cmp r7, r3 802c060: d2f9 bcs.n 802c056 <__hexnan+0xaa> 802c062: 1b3b subs r3, r7, r4 802c064: f023 0303 bic.w r3, r3, #3 802c068: 3304 adds r3, #4 802c06a: 3401 adds r4, #1 802c06c: 3e03 subs r6, #3 802c06e: 42b4 cmp r4, r6 802c070: bf88 it hi 802c072: 2304 movhi r3, #4 802c074: 4443 add r3, r8 802c076: 2200 movs r2, #0 802c078: f843 2b04 str.w r2, [r3], #4 802c07c: 429f cmp r7, r3 802c07e: d2fb bcs.n 802c078 <__hexnan+0xcc> 802c080: 683b ldr r3, [r7, #0] 802c082: b91b cbnz r3, 802c08c <__hexnan+0xe0> 802c084: 4547 cmp r7, r8 802c086: d128 bne.n 802c0da <__hexnan+0x12e> 802c088: 2301 movs r3, #1 802c08a: 603b str r3, [r7, #0] 802c08c: 2005 movs r0, #5 802c08e: b007 add sp, #28 802c090: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802c094: 3501 adds r5, #1 802c096: 2d08 cmp r5, #8 802c098: f10b 0b01 add.w fp, fp, #1 802c09c: dd06 ble.n 802c0ac <__hexnan+0x100> 802c09e: 4544 cmp r4, r8 802c0a0: d9c1 bls.n 802c026 <__hexnan+0x7a> 802c0a2: 2300 movs r3, #0 802c0a4: f844 3c04 str.w r3, [r4, #-4] 802c0a8: 2501 movs r5, #1 802c0aa: 3c04 subs r4, #4 802c0ac: 6822 ldr r2, [r4, #0] 802c0ae: f000 000f and.w r0, r0, #15 802c0b2: ea40 1002 orr.w r0, r0, r2, lsl #4 802c0b6: 6020 str r0, [r4, #0] 802c0b8: e7b5 b.n 802c026 <__hexnan+0x7a> 802c0ba: 2508 movs r5, #8 802c0bc: e7b3 b.n 802c026 <__hexnan+0x7a> 802c0be: 9b01 ldr r3, [sp, #4] 802c0c0: 2b00 cmp r3, #0 802c0c2: d0dd beq.n 802c080 <__hexnan+0xd4> 802c0c4: f1c3 0320 rsb r3, r3, #32 802c0c8: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802c0cc: 40da lsrs r2, r3 802c0ce: f856 3c04 ldr.w r3, [r6, #-4] 802c0d2: 4013 ands r3, r2 802c0d4: f846 3c04 str.w r3, [r6, #-4] 802c0d8: e7d2 b.n 802c080 <__hexnan+0xd4> 802c0da: 3f04 subs r7, #4 802c0dc: e7d0 b.n 802c080 <__hexnan+0xd4> 802c0de: 2004 movs r0, #4 802c0e0: e7d5 b.n 802c08e <__hexnan+0xe2> 0802c0e2 <__ascii_mbtowc>: 802c0e2: b082 sub sp, #8 802c0e4: b901 cbnz r1, 802c0e8 <__ascii_mbtowc+0x6> 802c0e6: a901 add r1, sp, #4 802c0e8: b142 cbz r2, 802c0fc <__ascii_mbtowc+0x1a> 802c0ea: b14b cbz r3, 802c100 <__ascii_mbtowc+0x1e> 802c0ec: 7813 ldrb r3, [r2, #0] 802c0ee: 600b str r3, [r1, #0] 802c0f0: 7812 ldrb r2, [r2, #0] 802c0f2: 1e10 subs r0, r2, #0 802c0f4: bf18 it ne 802c0f6: 2001 movne r0, #1 802c0f8: b002 add sp, #8 802c0fa: 4770 bx lr 802c0fc: 4610 mov r0, r2 802c0fe: e7fb b.n 802c0f8 <__ascii_mbtowc+0x16> 802c100: f06f 0001 mvn.w r0, #1 802c104: e7f8 b.n 802c0f8 <__ascii_mbtowc+0x16> ... 0802c108 <_Balloc>: 802c108: b570 push {r4, r5, r6, lr} 802c10a: 69c6 ldr r6, [r0, #28] 802c10c: 4604 mov r4, r0 802c10e: 460d mov r5, r1 802c110: b976 cbnz r6, 802c130 <_Balloc+0x28> 802c112: 2010 movs r0, #16 802c114: f7fc ffda bl 80290cc 802c118: 4602 mov r2, r0 802c11a: 61e0 str r0, [r4, #28] 802c11c: b920 cbnz r0, 802c128 <_Balloc+0x20> 802c11e: 4b18 ldr r3, [pc, #96] @ (802c180 <_Balloc+0x78>) 802c120: 4818 ldr r0, [pc, #96] @ (802c184 <_Balloc+0x7c>) 802c122: 216b movs r1, #107 @ 0x6b 802c124: f7fe fe5c bl 802ade0 <__assert_func> 802c128: e9c0 6601 strd r6, r6, [r0, #4] 802c12c: 6006 str r6, [r0, #0] 802c12e: 60c6 str r6, [r0, #12] 802c130: 69e6 ldr r6, [r4, #28] 802c132: 68f3 ldr r3, [r6, #12] 802c134: b183 cbz r3, 802c158 <_Balloc+0x50> 802c136: 69e3 ldr r3, [r4, #28] 802c138: 68db ldr r3, [r3, #12] 802c13a: f853 0025 ldr.w r0, [r3, r5, lsl #2] 802c13e: b9b8 cbnz r0, 802c170 <_Balloc+0x68> 802c140: 2101 movs r1, #1 802c142: fa01 f605 lsl.w r6, r1, r5 802c146: 1d72 adds r2, r6, #5 802c148: 0092 lsls r2, r2, #2 802c14a: 4620 mov r0, r4 802c14c: f001 f883 bl 802d256 <_calloc_r> 802c150: b160 cbz r0, 802c16c <_Balloc+0x64> 802c152: e9c0 5601 strd r5, r6, [r0, #4] 802c156: e00e b.n 802c176 <_Balloc+0x6e> 802c158: 2221 movs r2, #33 @ 0x21 802c15a: 2104 movs r1, #4 802c15c: 4620 mov r0, r4 802c15e: f001 f87a bl 802d256 <_calloc_r> 802c162: 69e3 ldr r3, [r4, #28] 802c164: 60f0 str r0, [r6, #12] 802c166: 68db ldr r3, [r3, #12] 802c168: 2b00 cmp r3, #0 802c16a: d1e4 bne.n 802c136 <_Balloc+0x2e> 802c16c: 2000 movs r0, #0 802c16e: bd70 pop {r4, r5, r6, pc} 802c170: 6802 ldr r2, [r0, #0] 802c172: f843 2025 str.w r2, [r3, r5, lsl #2] 802c176: 2300 movs r3, #0 802c178: e9c0 3303 strd r3, r3, [r0, #12] 802c17c: e7f7 b.n 802c16e <_Balloc+0x66> 802c17e: bf00 nop 802c180: 08031cbe .word 0x08031cbe 802c184: 08031fcf .word 0x08031fcf 0802c188 <_Bfree>: 802c188: b570 push {r4, r5, r6, lr} 802c18a: 69c6 ldr r6, [r0, #28] 802c18c: 4605 mov r5, r0 802c18e: 460c mov r4, r1 802c190: b976 cbnz r6, 802c1b0 <_Bfree+0x28> 802c192: 2010 movs r0, #16 802c194: f7fc ff9a bl 80290cc 802c198: 4602 mov r2, r0 802c19a: 61e8 str r0, [r5, #28] 802c19c: b920 cbnz r0, 802c1a8 <_Bfree+0x20> 802c19e: 4b09 ldr r3, [pc, #36] @ (802c1c4 <_Bfree+0x3c>) 802c1a0: 4809 ldr r0, [pc, #36] @ (802c1c8 <_Bfree+0x40>) 802c1a2: 218f movs r1, #143 @ 0x8f 802c1a4: f7fe fe1c bl 802ade0 <__assert_func> 802c1a8: e9c0 6601 strd r6, r6, [r0, #4] 802c1ac: 6006 str r6, [r0, #0] 802c1ae: 60c6 str r6, [r0, #12] 802c1b0: b13c cbz r4, 802c1c2 <_Bfree+0x3a> 802c1b2: 69eb ldr r3, [r5, #28] 802c1b4: 6862 ldr r2, [r4, #4] 802c1b6: 68db ldr r3, [r3, #12] 802c1b8: f853 1022 ldr.w r1, [r3, r2, lsl #2] 802c1bc: 6021 str r1, [r4, #0] 802c1be: f843 4022 str.w r4, [r3, r2, lsl #2] 802c1c2: bd70 pop {r4, r5, r6, pc} 802c1c4: 08031cbe .word 0x08031cbe 802c1c8: 08031fcf .word 0x08031fcf 0802c1cc <__multadd>: 802c1cc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c1d0: 690d ldr r5, [r1, #16] 802c1d2: 4607 mov r7, r0 802c1d4: 460c mov r4, r1 802c1d6: 461e mov r6, r3 802c1d8: f101 0c14 add.w ip, r1, #20 802c1dc: 2000 movs r0, #0 802c1de: f8dc 3000 ldr.w r3, [ip] 802c1e2: b299 uxth r1, r3 802c1e4: fb02 6101 mla r1, r2, r1, r6 802c1e8: 0c1e lsrs r6, r3, #16 802c1ea: 0c0b lsrs r3, r1, #16 802c1ec: fb02 3306 mla r3, r2, r6, r3 802c1f0: b289 uxth r1, r1 802c1f2: 3001 adds r0, #1 802c1f4: eb01 4103 add.w r1, r1, r3, lsl #16 802c1f8: 4285 cmp r5, r0 802c1fa: f84c 1b04 str.w r1, [ip], #4 802c1fe: ea4f 4613 mov.w r6, r3, lsr #16 802c202: dcec bgt.n 802c1de <__multadd+0x12> 802c204: b30e cbz r6, 802c24a <__multadd+0x7e> 802c206: 68a3 ldr r3, [r4, #8] 802c208: 42ab cmp r3, r5 802c20a: dc19 bgt.n 802c240 <__multadd+0x74> 802c20c: 6861 ldr r1, [r4, #4] 802c20e: 4638 mov r0, r7 802c210: 3101 adds r1, #1 802c212: f7ff ff79 bl 802c108 <_Balloc> 802c216: 4680 mov r8, r0 802c218: b928 cbnz r0, 802c226 <__multadd+0x5a> 802c21a: 4602 mov r2, r0 802c21c: 4b0c ldr r3, [pc, #48] @ (802c250 <__multadd+0x84>) 802c21e: 480d ldr r0, [pc, #52] @ (802c254 <__multadd+0x88>) 802c220: 21ba movs r1, #186 @ 0xba 802c222: f7fe fddd bl 802ade0 <__assert_func> 802c226: 6922 ldr r2, [r4, #16] 802c228: 3202 adds r2, #2 802c22a: f104 010c add.w r1, r4, #12 802c22e: 0092 lsls r2, r2, #2 802c230: 300c adds r0, #12 802c232: f7fe fdbc bl 802adae 802c236: 4621 mov r1, r4 802c238: 4638 mov r0, r7 802c23a: f7ff ffa5 bl 802c188 <_Bfree> 802c23e: 4644 mov r4, r8 802c240: eb04 0385 add.w r3, r4, r5, lsl #2 802c244: 3501 adds r5, #1 802c246: 615e str r6, [r3, #20] 802c248: 6125 str r5, [r4, #16] 802c24a: 4620 mov r0, r4 802c24c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c250: 08031f5e .word 0x08031f5e 802c254: 08031fcf .word 0x08031fcf 0802c258 <__s2b>: 802c258: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802c25c: 460c mov r4, r1 802c25e: 4615 mov r5, r2 802c260: 461f mov r7, r3 802c262: 2209 movs r2, #9 802c264: 3308 adds r3, #8 802c266: 4606 mov r6, r0 802c268: fb93 f3f2 sdiv r3, r3, r2 802c26c: 2100 movs r1, #0 802c26e: 2201 movs r2, #1 802c270: 429a cmp r2, r3 802c272: db09 blt.n 802c288 <__s2b+0x30> 802c274: 4630 mov r0, r6 802c276: f7ff ff47 bl 802c108 <_Balloc> 802c27a: b940 cbnz r0, 802c28e <__s2b+0x36> 802c27c: 4602 mov r2, r0 802c27e: 4b19 ldr r3, [pc, #100] @ (802c2e4 <__s2b+0x8c>) 802c280: 4819 ldr r0, [pc, #100] @ (802c2e8 <__s2b+0x90>) 802c282: 21d3 movs r1, #211 @ 0xd3 802c284: f7fe fdac bl 802ade0 <__assert_func> 802c288: 0052 lsls r2, r2, #1 802c28a: 3101 adds r1, #1 802c28c: e7f0 b.n 802c270 <__s2b+0x18> 802c28e: 9b08 ldr r3, [sp, #32] 802c290: 6143 str r3, [r0, #20] 802c292: 2d09 cmp r5, #9 802c294: f04f 0301 mov.w r3, #1 802c298: 6103 str r3, [r0, #16] 802c29a: dd16 ble.n 802c2ca <__s2b+0x72> 802c29c: f104 0909 add.w r9, r4, #9 802c2a0: 46c8 mov r8, r9 802c2a2: 442c add r4, r5 802c2a4: f818 3b01 ldrb.w r3, [r8], #1 802c2a8: 4601 mov r1, r0 802c2aa: 3b30 subs r3, #48 @ 0x30 802c2ac: 220a movs r2, #10 802c2ae: 4630 mov r0, r6 802c2b0: f7ff ff8c bl 802c1cc <__multadd> 802c2b4: 45a0 cmp r8, r4 802c2b6: d1f5 bne.n 802c2a4 <__s2b+0x4c> 802c2b8: f1a5 0408 sub.w r4, r5, #8 802c2bc: 444c add r4, r9 802c2be: 1b2d subs r5, r5, r4 802c2c0: 1963 adds r3, r4, r5 802c2c2: 42bb cmp r3, r7 802c2c4: db04 blt.n 802c2d0 <__s2b+0x78> 802c2c6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802c2ca: 340a adds r4, #10 802c2cc: 2509 movs r5, #9 802c2ce: e7f6 b.n 802c2be <__s2b+0x66> 802c2d0: f814 3b01 ldrb.w r3, [r4], #1 802c2d4: 4601 mov r1, r0 802c2d6: 3b30 subs r3, #48 @ 0x30 802c2d8: 220a movs r2, #10 802c2da: 4630 mov r0, r6 802c2dc: f7ff ff76 bl 802c1cc <__multadd> 802c2e0: e7ee b.n 802c2c0 <__s2b+0x68> 802c2e2: bf00 nop 802c2e4: 08031f5e .word 0x08031f5e 802c2e8: 08031fcf .word 0x08031fcf 0802c2ec <__hi0bits>: 802c2ec: f5b0 3f80 cmp.w r0, #65536 @ 0x10000 802c2f0: 4603 mov r3, r0 802c2f2: bf36 itet cc 802c2f4: 0403 lslcc r3, r0, #16 802c2f6: 2000 movcs r0, #0 802c2f8: 2010 movcc r0, #16 802c2fa: f1b3 7f80 cmp.w r3, #16777216 @ 0x1000000 802c2fe: bf3c itt cc 802c300: 021b lslcc r3, r3, #8 802c302: 3008 addcc r0, #8 802c304: f1b3 5f80 cmp.w r3, #268435456 @ 0x10000000 802c308: bf3c itt cc 802c30a: 011b lslcc r3, r3, #4 802c30c: 3004 addcc r0, #4 802c30e: f1b3 4f80 cmp.w r3, #1073741824 @ 0x40000000 802c312: bf3c itt cc 802c314: 009b lslcc r3, r3, #2 802c316: 3002 addcc r0, #2 802c318: 2b00 cmp r3, #0 802c31a: db05 blt.n 802c328 <__hi0bits+0x3c> 802c31c: f013 4f80 tst.w r3, #1073741824 @ 0x40000000 802c320: f100 0001 add.w r0, r0, #1 802c324: bf08 it eq 802c326: 2020 moveq r0, #32 802c328: 4770 bx lr 0802c32a <__lo0bits>: 802c32a: 6803 ldr r3, [r0, #0] 802c32c: 4602 mov r2, r0 802c32e: f013 0007 ands.w r0, r3, #7 802c332: d00b beq.n 802c34c <__lo0bits+0x22> 802c334: 07d9 lsls r1, r3, #31 802c336: d421 bmi.n 802c37c <__lo0bits+0x52> 802c338: 0798 lsls r0, r3, #30 802c33a: bf49 itett mi 802c33c: 085b lsrmi r3, r3, #1 802c33e: 089b lsrpl r3, r3, #2 802c340: 2001 movmi r0, #1 802c342: 6013 strmi r3, [r2, #0] 802c344: bf5c itt pl 802c346: 6013 strpl r3, [r2, #0] 802c348: 2002 movpl r0, #2 802c34a: 4770 bx lr 802c34c: b299 uxth r1, r3 802c34e: b909 cbnz r1, 802c354 <__lo0bits+0x2a> 802c350: 0c1b lsrs r3, r3, #16 802c352: 2010 movs r0, #16 802c354: b2d9 uxtb r1, r3 802c356: b909 cbnz r1, 802c35c <__lo0bits+0x32> 802c358: 3008 adds r0, #8 802c35a: 0a1b lsrs r3, r3, #8 802c35c: 0719 lsls r1, r3, #28 802c35e: bf04 itt eq 802c360: 091b lsreq r3, r3, #4 802c362: 3004 addeq r0, #4 802c364: 0799 lsls r1, r3, #30 802c366: bf04 itt eq 802c368: 089b lsreq r3, r3, #2 802c36a: 3002 addeq r0, #2 802c36c: 07d9 lsls r1, r3, #31 802c36e: d403 bmi.n 802c378 <__lo0bits+0x4e> 802c370: 085b lsrs r3, r3, #1 802c372: f100 0001 add.w r0, r0, #1 802c376: d003 beq.n 802c380 <__lo0bits+0x56> 802c378: 6013 str r3, [r2, #0] 802c37a: 4770 bx lr 802c37c: 2000 movs r0, #0 802c37e: 4770 bx lr 802c380: 2020 movs r0, #32 802c382: 4770 bx lr 0802c384 <__i2b>: 802c384: b510 push {r4, lr} 802c386: 460c mov r4, r1 802c388: 2101 movs r1, #1 802c38a: f7ff febd bl 802c108 <_Balloc> 802c38e: 4602 mov r2, r0 802c390: b928 cbnz r0, 802c39e <__i2b+0x1a> 802c392: 4b05 ldr r3, [pc, #20] @ (802c3a8 <__i2b+0x24>) 802c394: 4805 ldr r0, [pc, #20] @ (802c3ac <__i2b+0x28>) 802c396: f240 1145 movw r1, #325 @ 0x145 802c39a: f7fe fd21 bl 802ade0 <__assert_func> 802c39e: 2301 movs r3, #1 802c3a0: 6144 str r4, [r0, #20] 802c3a2: 6103 str r3, [r0, #16] 802c3a4: bd10 pop {r4, pc} 802c3a6: bf00 nop 802c3a8: 08031f5e .word 0x08031f5e 802c3ac: 08031fcf .word 0x08031fcf 0802c3b0 <__multiply>: 802c3b0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802c3b4: 4614 mov r4, r2 802c3b6: 690a ldr r2, [r1, #16] 802c3b8: 6923 ldr r3, [r4, #16] 802c3ba: 429a cmp r2, r3 802c3bc: bfa8 it ge 802c3be: 4623 movge r3, r4 802c3c0: 460f mov r7, r1 802c3c2: bfa4 itt ge 802c3c4: 460c movge r4, r1 802c3c6: 461f movge r7, r3 802c3c8: f8d4 a010 ldr.w sl, [r4, #16] 802c3cc: f8d7 9010 ldr.w r9, [r7, #16] 802c3d0: 68a3 ldr r3, [r4, #8] 802c3d2: 6861 ldr r1, [r4, #4] 802c3d4: eb0a 0609 add.w r6, sl, r9 802c3d8: 42b3 cmp r3, r6 802c3da: b085 sub sp, #20 802c3dc: bfb8 it lt 802c3de: 3101 addlt r1, #1 802c3e0: f7ff fe92 bl 802c108 <_Balloc> 802c3e4: b930 cbnz r0, 802c3f4 <__multiply+0x44> 802c3e6: 4602 mov r2, r0 802c3e8: 4b44 ldr r3, [pc, #272] @ (802c4fc <__multiply+0x14c>) 802c3ea: 4845 ldr r0, [pc, #276] @ (802c500 <__multiply+0x150>) 802c3ec: f44f 71b1 mov.w r1, #354 @ 0x162 802c3f0: f7fe fcf6 bl 802ade0 <__assert_func> 802c3f4: f100 0514 add.w r5, r0, #20 802c3f8: eb05 0886 add.w r8, r5, r6, lsl #2 802c3fc: 462b mov r3, r5 802c3fe: 2200 movs r2, #0 802c400: 4543 cmp r3, r8 802c402: d321 bcc.n 802c448 <__multiply+0x98> 802c404: f107 0114 add.w r1, r7, #20 802c408: f104 0214 add.w r2, r4, #20 802c40c: eb02 028a add.w r2, r2, sl, lsl #2 802c410: eb01 0389 add.w r3, r1, r9, lsl #2 802c414: 9302 str r3, [sp, #8] 802c416: 1b13 subs r3, r2, r4 802c418: 3b15 subs r3, #21 802c41a: f023 0303 bic.w r3, r3, #3 802c41e: 3304 adds r3, #4 802c420: f104 0715 add.w r7, r4, #21 802c424: 42ba cmp r2, r7 802c426: bf38 it cc 802c428: 2304 movcc r3, #4 802c42a: 9301 str r3, [sp, #4] 802c42c: 9b02 ldr r3, [sp, #8] 802c42e: 9103 str r1, [sp, #12] 802c430: 428b cmp r3, r1 802c432: d80c bhi.n 802c44e <__multiply+0x9e> 802c434: 2e00 cmp r6, #0 802c436: dd03 ble.n 802c440 <__multiply+0x90> 802c438: f858 3d04 ldr.w r3, [r8, #-4]! 802c43c: 2b00 cmp r3, #0 802c43e: d05b beq.n 802c4f8 <__multiply+0x148> 802c440: 6106 str r6, [r0, #16] 802c442: b005 add sp, #20 802c444: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802c448: f843 2b04 str.w r2, [r3], #4 802c44c: e7d8 b.n 802c400 <__multiply+0x50> 802c44e: f8b1 a000 ldrh.w sl, [r1] 802c452: f1ba 0f00 cmp.w sl, #0 802c456: d024 beq.n 802c4a2 <__multiply+0xf2> 802c458: f104 0e14 add.w lr, r4, #20 802c45c: 46a9 mov r9, r5 802c45e: f04f 0c00 mov.w ip, #0 802c462: f85e 7b04 ldr.w r7, [lr], #4 802c466: f8d9 3000 ldr.w r3, [r9] 802c46a: fa1f fb87 uxth.w fp, r7 802c46e: b29b uxth r3, r3 802c470: fb0a 330b mla r3, sl, fp, r3 802c474: ea4f 4b17 mov.w fp, r7, lsr #16 802c478: f8d9 7000 ldr.w r7, [r9] 802c47c: 4463 add r3, ip 802c47e: ea4f 4c17 mov.w ip, r7, lsr #16 802c482: fb0a c70b mla r7, sl, fp, ip 802c486: eb07 4713 add.w r7, r7, r3, lsr #16 802c48a: b29b uxth r3, r3 802c48c: ea43 4307 orr.w r3, r3, r7, lsl #16 802c490: 4572 cmp r2, lr 802c492: f849 3b04 str.w r3, [r9], #4 802c496: ea4f 4c17 mov.w ip, r7, lsr #16 802c49a: d8e2 bhi.n 802c462 <__multiply+0xb2> 802c49c: 9b01 ldr r3, [sp, #4] 802c49e: f845 c003 str.w ip, [r5, r3] 802c4a2: 9b03 ldr r3, [sp, #12] 802c4a4: f8b3 9002 ldrh.w r9, [r3, #2] 802c4a8: 3104 adds r1, #4 802c4aa: f1b9 0f00 cmp.w r9, #0 802c4ae: d021 beq.n 802c4f4 <__multiply+0x144> 802c4b0: 682b ldr r3, [r5, #0] 802c4b2: f104 0c14 add.w ip, r4, #20 802c4b6: 46ae mov lr, r5 802c4b8: f04f 0a00 mov.w sl, #0 802c4bc: f8bc b000 ldrh.w fp, [ip] 802c4c0: f8be 7002 ldrh.w r7, [lr, #2] 802c4c4: fb09 770b mla r7, r9, fp, r7 802c4c8: 4457 add r7, sl 802c4ca: b29b uxth r3, r3 802c4cc: ea43 4307 orr.w r3, r3, r7, lsl #16 802c4d0: f84e 3b04 str.w r3, [lr], #4 802c4d4: f85c 3b04 ldr.w r3, [ip], #4 802c4d8: ea4f 4a13 mov.w sl, r3, lsr #16 802c4dc: f8be 3000 ldrh.w r3, [lr] 802c4e0: fb09 330a mla r3, r9, sl, r3 802c4e4: eb03 4317 add.w r3, r3, r7, lsr #16 802c4e8: 4562 cmp r2, ip 802c4ea: ea4f 4a13 mov.w sl, r3, lsr #16 802c4ee: d8e5 bhi.n 802c4bc <__multiply+0x10c> 802c4f0: 9f01 ldr r7, [sp, #4] 802c4f2: 51eb str r3, [r5, r7] 802c4f4: 3504 adds r5, #4 802c4f6: e799 b.n 802c42c <__multiply+0x7c> 802c4f8: 3e01 subs r6, #1 802c4fa: e79b b.n 802c434 <__multiply+0x84> 802c4fc: 08031f5e .word 0x08031f5e 802c500: 08031fcf .word 0x08031fcf 0802c504 <__pow5mult>: 802c504: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802c508: 4615 mov r5, r2 802c50a: f012 0203 ands.w r2, r2, #3 802c50e: 4607 mov r7, r0 802c510: 460e mov r6, r1 802c512: d007 beq.n 802c524 <__pow5mult+0x20> 802c514: 4c25 ldr r4, [pc, #148] @ (802c5ac <__pow5mult+0xa8>) 802c516: 3a01 subs r2, #1 802c518: 2300 movs r3, #0 802c51a: f854 2022 ldr.w r2, [r4, r2, lsl #2] 802c51e: f7ff fe55 bl 802c1cc <__multadd> 802c522: 4606 mov r6, r0 802c524: 10ad asrs r5, r5, #2 802c526: d03d beq.n 802c5a4 <__pow5mult+0xa0> 802c528: 69fc ldr r4, [r7, #28] 802c52a: b97c cbnz r4, 802c54c <__pow5mult+0x48> 802c52c: 2010 movs r0, #16 802c52e: f7fc fdcd bl 80290cc 802c532: 4602 mov r2, r0 802c534: 61f8 str r0, [r7, #28] 802c536: b928 cbnz r0, 802c544 <__pow5mult+0x40> 802c538: 4b1d ldr r3, [pc, #116] @ (802c5b0 <__pow5mult+0xac>) 802c53a: 481e ldr r0, [pc, #120] @ (802c5b4 <__pow5mult+0xb0>) 802c53c: f240 11b3 movw r1, #435 @ 0x1b3 802c540: f7fe fc4e bl 802ade0 <__assert_func> 802c544: e9c0 4401 strd r4, r4, [r0, #4] 802c548: 6004 str r4, [r0, #0] 802c54a: 60c4 str r4, [r0, #12] 802c54c: f8d7 801c ldr.w r8, [r7, #28] 802c550: f8d8 4008 ldr.w r4, [r8, #8] 802c554: b94c cbnz r4, 802c56a <__pow5mult+0x66> 802c556: f240 2171 movw r1, #625 @ 0x271 802c55a: 4638 mov r0, r7 802c55c: f7ff ff12 bl 802c384 <__i2b> 802c560: 2300 movs r3, #0 802c562: f8c8 0008 str.w r0, [r8, #8] 802c566: 4604 mov r4, r0 802c568: 6003 str r3, [r0, #0] 802c56a: f04f 0900 mov.w r9, #0 802c56e: 07eb lsls r3, r5, #31 802c570: d50a bpl.n 802c588 <__pow5mult+0x84> 802c572: 4631 mov r1, r6 802c574: 4622 mov r2, r4 802c576: 4638 mov r0, r7 802c578: f7ff ff1a bl 802c3b0 <__multiply> 802c57c: 4631 mov r1, r6 802c57e: 4680 mov r8, r0 802c580: 4638 mov r0, r7 802c582: f7ff fe01 bl 802c188 <_Bfree> 802c586: 4646 mov r6, r8 802c588: 106d asrs r5, r5, #1 802c58a: d00b beq.n 802c5a4 <__pow5mult+0xa0> 802c58c: 6820 ldr r0, [r4, #0] 802c58e: b938 cbnz r0, 802c5a0 <__pow5mult+0x9c> 802c590: 4622 mov r2, r4 802c592: 4621 mov r1, r4 802c594: 4638 mov r0, r7 802c596: f7ff ff0b bl 802c3b0 <__multiply> 802c59a: 6020 str r0, [r4, #0] 802c59c: f8c0 9000 str.w r9, [r0] 802c5a0: 4604 mov r4, r0 802c5a2: e7e4 b.n 802c56e <__pow5mult+0x6a> 802c5a4: 4630 mov r0, r6 802c5a6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802c5aa: bf00 nop 802c5ac: 08032028 .word 0x08032028 802c5b0: 08031cbe .word 0x08031cbe 802c5b4: 08031fcf .word 0x08031fcf 0802c5b8 <__lshift>: 802c5b8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802c5bc: 460c mov r4, r1 802c5be: 6849 ldr r1, [r1, #4] 802c5c0: 6923 ldr r3, [r4, #16] 802c5c2: eb03 1862 add.w r8, r3, r2, asr #5 802c5c6: 68a3 ldr r3, [r4, #8] 802c5c8: 4607 mov r7, r0 802c5ca: 4691 mov r9, r2 802c5cc: ea4f 1a62 mov.w sl, r2, asr #5 802c5d0: f108 0601 add.w r6, r8, #1 802c5d4: 42b3 cmp r3, r6 802c5d6: db0b blt.n 802c5f0 <__lshift+0x38> 802c5d8: 4638 mov r0, r7 802c5da: f7ff fd95 bl 802c108 <_Balloc> 802c5de: 4605 mov r5, r0 802c5e0: b948 cbnz r0, 802c5f6 <__lshift+0x3e> 802c5e2: 4602 mov r2, r0 802c5e4: 4b28 ldr r3, [pc, #160] @ (802c688 <__lshift+0xd0>) 802c5e6: 4829 ldr r0, [pc, #164] @ (802c68c <__lshift+0xd4>) 802c5e8: f44f 71ef mov.w r1, #478 @ 0x1de 802c5ec: f7fe fbf8 bl 802ade0 <__assert_func> 802c5f0: 3101 adds r1, #1 802c5f2: 005b lsls r3, r3, #1 802c5f4: e7ee b.n 802c5d4 <__lshift+0x1c> 802c5f6: 2300 movs r3, #0 802c5f8: f100 0114 add.w r1, r0, #20 802c5fc: f100 0210 add.w r2, r0, #16 802c600: 4618 mov r0, r3 802c602: 4553 cmp r3, sl 802c604: db33 blt.n 802c66e <__lshift+0xb6> 802c606: 6920 ldr r0, [r4, #16] 802c608: ea2a 7aea bic.w sl, sl, sl, asr #31 802c60c: f104 0314 add.w r3, r4, #20 802c610: f019 091f ands.w r9, r9, #31 802c614: eb01 018a add.w r1, r1, sl, lsl #2 802c618: eb03 0c80 add.w ip, r3, r0, lsl #2 802c61c: d02b beq.n 802c676 <__lshift+0xbe> 802c61e: f1c9 0e20 rsb lr, r9, #32 802c622: 468a mov sl, r1 802c624: 2200 movs r2, #0 802c626: 6818 ldr r0, [r3, #0] 802c628: fa00 f009 lsl.w r0, r0, r9 802c62c: 4310 orrs r0, r2 802c62e: f84a 0b04 str.w r0, [sl], #4 802c632: f853 2b04 ldr.w r2, [r3], #4 802c636: 459c cmp ip, r3 802c638: fa22 f20e lsr.w r2, r2, lr 802c63c: d8f3 bhi.n 802c626 <__lshift+0x6e> 802c63e: ebac 0304 sub.w r3, ip, r4 802c642: 3b15 subs r3, #21 802c644: f023 0303 bic.w r3, r3, #3 802c648: 3304 adds r3, #4 802c64a: f104 0015 add.w r0, r4, #21 802c64e: 4584 cmp ip, r0 802c650: bf38 it cc 802c652: 2304 movcc r3, #4 802c654: 50ca str r2, [r1, r3] 802c656: b10a cbz r2, 802c65c <__lshift+0xa4> 802c658: f108 0602 add.w r6, r8, #2 802c65c: 3e01 subs r6, #1 802c65e: 4638 mov r0, r7 802c660: 612e str r6, [r5, #16] 802c662: 4621 mov r1, r4 802c664: f7ff fd90 bl 802c188 <_Bfree> 802c668: 4628 mov r0, r5 802c66a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802c66e: f842 0f04 str.w r0, [r2, #4]! 802c672: 3301 adds r3, #1 802c674: e7c5 b.n 802c602 <__lshift+0x4a> 802c676: 3904 subs r1, #4 802c678: f853 2b04 ldr.w r2, [r3], #4 802c67c: f841 2f04 str.w r2, [r1, #4]! 802c680: 459c cmp ip, r3 802c682: d8f9 bhi.n 802c678 <__lshift+0xc0> 802c684: e7ea b.n 802c65c <__lshift+0xa4> 802c686: bf00 nop 802c688: 08031f5e .word 0x08031f5e 802c68c: 08031fcf .word 0x08031fcf 0802c690 <__mcmp>: 802c690: 690a ldr r2, [r1, #16] 802c692: 4603 mov r3, r0 802c694: 6900 ldr r0, [r0, #16] 802c696: 1a80 subs r0, r0, r2 802c698: b530 push {r4, r5, lr} 802c69a: d10e bne.n 802c6ba <__mcmp+0x2a> 802c69c: 3314 adds r3, #20 802c69e: 3114 adds r1, #20 802c6a0: eb03 0482 add.w r4, r3, r2, lsl #2 802c6a4: eb01 0182 add.w r1, r1, r2, lsl #2 802c6a8: f854 5d04 ldr.w r5, [r4, #-4]! 802c6ac: f851 2d04 ldr.w r2, [r1, #-4]! 802c6b0: 4295 cmp r5, r2 802c6b2: d003 beq.n 802c6bc <__mcmp+0x2c> 802c6b4: d205 bcs.n 802c6c2 <__mcmp+0x32> 802c6b6: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802c6ba: bd30 pop {r4, r5, pc} 802c6bc: 42a3 cmp r3, r4 802c6be: d3f3 bcc.n 802c6a8 <__mcmp+0x18> 802c6c0: e7fb b.n 802c6ba <__mcmp+0x2a> 802c6c2: 2001 movs r0, #1 802c6c4: e7f9 b.n 802c6ba <__mcmp+0x2a> ... 0802c6c8 <__mdiff>: 802c6c8: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802c6cc: 4689 mov r9, r1 802c6ce: 4606 mov r6, r0 802c6d0: 4611 mov r1, r2 802c6d2: 4648 mov r0, r9 802c6d4: 4614 mov r4, r2 802c6d6: f7ff ffdb bl 802c690 <__mcmp> 802c6da: 1e05 subs r5, r0, #0 802c6dc: d112 bne.n 802c704 <__mdiff+0x3c> 802c6de: 4629 mov r1, r5 802c6e0: 4630 mov r0, r6 802c6e2: f7ff fd11 bl 802c108 <_Balloc> 802c6e6: 4602 mov r2, r0 802c6e8: b928 cbnz r0, 802c6f6 <__mdiff+0x2e> 802c6ea: 4b3f ldr r3, [pc, #252] @ (802c7e8 <__mdiff+0x120>) 802c6ec: f240 2137 movw r1, #567 @ 0x237 802c6f0: 483e ldr r0, [pc, #248] @ (802c7ec <__mdiff+0x124>) 802c6f2: f7fe fb75 bl 802ade0 <__assert_func> 802c6f6: 2301 movs r3, #1 802c6f8: e9c0 3504 strd r3, r5, [r0, #16] 802c6fc: 4610 mov r0, r2 802c6fe: b003 add sp, #12 802c700: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802c704: bfbc itt lt 802c706: 464b movlt r3, r9 802c708: 46a1 movlt r9, r4 802c70a: 4630 mov r0, r6 802c70c: f8d9 1004 ldr.w r1, [r9, #4] 802c710: bfba itte lt 802c712: 461c movlt r4, r3 802c714: 2501 movlt r5, #1 802c716: 2500 movge r5, #0 802c718: f7ff fcf6 bl 802c108 <_Balloc> 802c71c: 4602 mov r2, r0 802c71e: b918 cbnz r0, 802c728 <__mdiff+0x60> 802c720: 4b31 ldr r3, [pc, #196] @ (802c7e8 <__mdiff+0x120>) 802c722: f240 2145 movw r1, #581 @ 0x245 802c726: e7e3 b.n 802c6f0 <__mdiff+0x28> 802c728: f8d9 7010 ldr.w r7, [r9, #16] 802c72c: 6926 ldr r6, [r4, #16] 802c72e: 60c5 str r5, [r0, #12] 802c730: f109 0310 add.w r3, r9, #16 802c734: f109 0514 add.w r5, r9, #20 802c738: f104 0e14 add.w lr, r4, #20 802c73c: f100 0b14 add.w fp, r0, #20 802c740: eb05 0887 add.w r8, r5, r7, lsl #2 802c744: eb0e 0686 add.w r6, lr, r6, lsl #2 802c748: 9301 str r3, [sp, #4] 802c74a: 46d9 mov r9, fp 802c74c: f04f 0c00 mov.w ip, #0 802c750: 9b01 ldr r3, [sp, #4] 802c752: f85e 0b04 ldr.w r0, [lr], #4 802c756: f853 af04 ldr.w sl, [r3, #4]! 802c75a: 9301 str r3, [sp, #4] 802c75c: fa1f f38a uxth.w r3, sl 802c760: 4619 mov r1, r3 802c762: b283 uxth r3, r0 802c764: 1acb subs r3, r1, r3 802c766: 0c00 lsrs r0, r0, #16 802c768: 4463 add r3, ip 802c76a: ebc0 401a rsb r0, r0, sl, lsr #16 802c76e: eb00 4023 add.w r0, r0, r3, asr #16 802c772: b29b uxth r3, r3 802c774: ea43 4300 orr.w r3, r3, r0, lsl #16 802c778: 4576 cmp r6, lr 802c77a: f849 3b04 str.w r3, [r9], #4 802c77e: ea4f 4c20 mov.w ip, r0, asr #16 802c782: d8e5 bhi.n 802c750 <__mdiff+0x88> 802c784: 1b33 subs r3, r6, r4 802c786: 3b15 subs r3, #21 802c788: f023 0303 bic.w r3, r3, #3 802c78c: 3415 adds r4, #21 802c78e: 3304 adds r3, #4 802c790: 42a6 cmp r6, r4 802c792: bf38 it cc 802c794: 2304 movcc r3, #4 802c796: 441d add r5, r3 802c798: 445b add r3, fp 802c79a: 461e mov r6, r3 802c79c: 462c mov r4, r5 802c79e: 4544 cmp r4, r8 802c7a0: d30e bcc.n 802c7c0 <__mdiff+0xf8> 802c7a2: f108 0103 add.w r1, r8, #3 802c7a6: 1b49 subs r1, r1, r5 802c7a8: f021 0103 bic.w r1, r1, #3 802c7ac: 3d03 subs r5, #3 802c7ae: 45a8 cmp r8, r5 802c7b0: bf38 it cc 802c7b2: 2100 movcc r1, #0 802c7b4: 440b add r3, r1 802c7b6: f853 1d04 ldr.w r1, [r3, #-4]! 802c7ba: b191 cbz r1, 802c7e2 <__mdiff+0x11a> 802c7bc: 6117 str r7, [r2, #16] 802c7be: e79d b.n 802c6fc <__mdiff+0x34> 802c7c0: f854 1b04 ldr.w r1, [r4], #4 802c7c4: 46e6 mov lr, ip 802c7c6: 0c08 lsrs r0, r1, #16 802c7c8: fa1c fc81 uxtah ip, ip, r1 802c7cc: 4471 add r1, lr 802c7ce: eb00 402c add.w r0, r0, ip, asr #16 802c7d2: b289 uxth r1, r1 802c7d4: ea41 4100 orr.w r1, r1, r0, lsl #16 802c7d8: f846 1b04 str.w r1, [r6], #4 802c7dc: ea4f 4c20 mov.w ip, r0, asr #16 802c7e0: e7dd b.n 802c79e <__mdiff+0xd6> 802c7e2: 3f01 subs r7, #1 802c7e4: e7e7 b.n 802c7b6 <__mdiff+0xee> 802c7e6: bf00 nop 802c7e8: 08031f5e .word 0x08031f5e 802c7ec: 08031fcf .word 0x08031fcf 0802c7f0 <__ulp>: 802c7f0: b082 sub sp, #8 802c7f2: ed8d 0b00 vstr d0, [sp] 802c7f6: 9a01 ldr r2, [sp, #4] 802c7f8: 4b0f ldr r3, [pc, #60] @ (802c838 <__ulp+0x48>) 802c7fa: 4013 ands r3, r2 802c7fc: f1a3 7350 sub.w r3, r3, #54525952 @ 0x3400000 802c800: 2b00 cmp r3, #0 802c802: dc08 bgt.n 802c816 <__ulp+0x26> 802c804: 425b negs r3, r3 802c806: f1b3 7fa0 cmp.w r3, #20971520 @ 0x1400000 802c80a: ea4f 5223 mov.w r2, r3, asr #20 802c80e: da04 bge.n 802c81a <__ulp+0x2a> 802c810: f44f 2300 mov.w r3, #524288 @ 0x80000 802c814: 4113 asrs r3, r2 802c816: 2200 movs r2, #0 802c818: e008 b.n 802c82c <__ulp+0x3c> 802c81a: f1a2 0314 sub.w r3, r2, #20 802c81e: 2b1e cmp r3, #30 802c820: bfda itte le 802c822: f04f 4200 movle.w r2, #2147483648 @ 0x80000000 802c826: 40da lsrle r2, r3 802c828: 2201 movgt r2, #1 802c82a: 2300 movs r3, #0 802c82c: 4619 mov r1, r3 802c82e: 4610 mov r0, r2 802c830: ec41 0b10 vmov d0, r0, r1 802c834: b002 add sp, #8 802c836: 4770 bx lr 802c838: 7ff00000 .word 0x7ff00000 0802c83c <__b2d>: 802c83c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802c840: 6906 ldr r6, [r0, #16] 802c842: f100 0814 add.w r8, r0, #20 802c846: eb08 0686 add.w r6, r8, r6, lsl #2 802c84a: 1f37 subs r7, r6, #4 802c84c: f856 2c04 ldr.w r2, [r6, #-4] 802c850: 4610 mov r0, r2 802c852: f7ff fd4b bl 802c2ec <__hi0bits> 802c856: f1c0 0320 rsb r3, r0, #32 802c85a: 280a cmp r0, #10 802c85c: 600b str r3, [r1, #0] 802c85e: 491b ldr r1, [pc, #108] @ (802c8cc <__b2d+0x90>) 802c860: dc15 bgt.n 802c88e <__b2d+0x52> 802c862: f1c0 0c0b rsb ip, r0, #11 802c866: fa22 f30c lsr.w r3, r2, ip 802c86a: 45b8 cmp r8, r7 802c86c: ea43 0501 orr.w r5, r3, r1 802c870: bf34 ite cc 802c872: f856 3c08 ldrcc.w r3, [r6, #-8] 802c876: 2300 movcs r3, #0 802c878: 3015 adds r0, #21 802c87a: fa02 f000 lsl.w r0, r2, r0 802c87e: fa23 f30c lsr.w r3, r3, ip 802c882: 4303 orrs r3, r0 802c884: 461c mov r4, r3 802c886: ec45 4b10 vmov d0, r4, r5 802c88a: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802c88e: 45b8 cmp r8, r7 802c890: bf3a itte cc 802c892: f856 3c08 ldrcc.w r3, [r6, #-8] 802c896: f1a6 0708 subcc.w r7, r6, #8 802c89a: 2300 movcs r3, #0 802c89c: 380b subs r0, #11 802c89e: d012 beq.n 802c8c6 <__b2d+0x8a> 802c8a0: f1c0 0120 rsb r1, r0, #32 802c8a4: fa23 f401 lsr.w r4, r3, r1 802c8a8: 4082 lsls r2, r0 802c8aa: 4322 orrs r2, r4 802c8ac: 4547 cmp r7, r8 802c8ae: f042 557f orr.w r5, r2, #1069547520 @ 0x3fc00000 802c8b2: bf8c ite hi 802c8b4: f857 2c04 ldrhi.w r2, [r7, #-4] 802c8b8: 2200 movls r2, #0 802c8ba: 4083 lsls r3, r0 802c8bc: 40ca lsrs r2, r1 802c8be: f445 1540 orr.w r5, r5, #3145728 @ 0x300000 802c8c2: 4313 orrs r3, r2 802c8c4: e7de b.n 802c884 <__b2d+0x48> 802c8c6: ea42 0501 orr.w r5, r2, r1 802c8ca: e7db b.n 802c884 <__b2d+0x48> 802c8cc: 3ff00000 .word 0x3ff00000 0802c8d0 <__d2b>: 802c8d0: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 802c8d4: 460f mov r7, r1 802c8d6: 2101 movs r1, #1 802c8d8: ec59 8b10 vmov r8, r9, d0 802c8dc: 4616 mov r6, r2 802c8de: f7ff fc13 bl 802c108 <_Balloc> 802c8e2: 4604 mov r4, r0 802c8e4: b930 cbnz r0, 802c8f4 <__d2b+0x24> 802c8e6: 4602 mov r2, r0 802c8e8: 4b23 ldr r3, [pc, #140] @ (802c978 <__d2b+0xa8>) 802c8ea: 4824 ldr r0, [pc, #144] @ (802c97c <__d2b+0xac>) 802c8ec: f240 310f movw r1, #783 @ 0x30f 802c8f0: f7fe fa76 bl 802ade0 <__assert_func> 802c8f4: f3c9 550a ubfx r5, r9, #20, #11 802c8f8: f3c9 0313 ubfx r3, r9, #0, #20 802c8fc: b10d cbz r5, 802c902 <__d2b+0x32> 802c8fe: f443 1380 orr.w r3, r3, #1048576 @ 0x100000 802c902: 9301 str r3, [sp, #4] 802c904: f1b8 0300 subs.w r3, r8, #0 802c908: d023 beq.n 802c952 <__d2b+0x82> 802c90a: 4668 mov r0, sp 802c90c: 9300 str r3, [sp, #0] 802c90e: f7ff fd0c bl 802c32a <__lo0bits> 802c912: e9dd 1200 ldrd r1, r2, [sp] 802c916: b1d0 cbz r0, 802c94e <__d2b+0x7e> 802c918: f1c0 0320 rsb r3, r0, #32 802c91c: fa02 f303 lsl.w r3, r2, r3 802c920: 430b orrs r3, r1 802c922: 40c2 lsrs r2, r0 802c924: 6163 str r3, [r4, #20] 802c926: 9201 str r2, [sp, #4] 802c928: 9b01 ldr r3, [sp, #4] 802c92a: 61a3 str r3, [r4, #24] 802c92c: 2b00 cmp r3, #0 802c92e: bf0c ite eq 802c930: 2201 moveq r2, #1 802c932: 2202 movne r2, #2 802c934: 6122 str r2, [r4, #16] 802c936: b1a5 cbz r5, 802c962 <__d2b+0x92> 802c938: f2a5 4533 subw r5, r5, #1075 @ 0x433 802c93c: 4405 add r5, r0 802c93e: 603d str r5, [r7, #0] 802c940: f1c0 0035 rsb r0, r0, #53 @ 0x35 802c944: 6030 str r0, [r6, #0] 802c946: 4620 mov r0, r4 802c948: b003 add sp, #12 802c94a: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802c94e: 6161 str r1, [r4, #20] 802c950: e7ea b.n 802c928 <__d2b+0x58> 802c952: a801 add r0, sp, #4 802c954: f7ff fce9 bl 802c32a <__lo0bits> 802c958: 9b01 ldr r3, [sp, #4] 802c95a: 6163 str r3, [r4, #20] 802c95c: 3020 adds r0, #32 802c95e: 2201 movs r2, #1 802c960: e7e8 b.n 802c934 <__d2b+0x64> 802c962: eb04 0382 add.w r3, r4, r2, lsl #2 802c966: f2a0 4032 subw r0, r0, #1074 @ 0x432 802c96a: 6038 str r0, [r7, #0] 802c96c: 6918 ldr r0, [r3, #16] 802c96e: f7ff fcbd bl 802c2ec <__hi0bits> 802c972: ebc0 1042 rsb r0, r0, r2, lsl #5 802c976: e7e5 b.n 802c944 <__d2b+0x74> 802c978: 08031f5e .word 0x08031f5e 802c97c: 08031fcf .word 0x08031fcf 0802c980 <__ratio>: 802c980: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802c984: 4688 mov r8, r1 802c986: 4669 mov r1, sp 802c988: 4681 mov r9, r0 802c98a: f7ff ff57 bl 802c83c <__b2d> 802c98e: a901 add r1, sp, #4 802c990: 4640 mov r0, r8 802c992: ec55 4b10 vmov r4, r5, d0 802c996: f7ff ff51 bl 802c83c <__b2d> 802c99a: f8d8 3010 ldr.w r3, [r8, #16] 802c99e: f8d9 2010 ldr.w r2, [r9, #16] 802c9a2: 1ad2 subs r2, r2, r3 802c9a4: e9dd 3100 ldrd r3, r1, [sp] 802c9a8: 1a5b subs r3, r3, r1 802c9aa: eb03 1342 add.w r3, r3, r2, lsl #5 802c9ae: ec57 6b10 vmov r6, r7, d0 802c9b2: 2b00 cmp r3, #0 802c9b4: bfd6 itet le 802c9b6: ebc3 3303 rsble r3, r3, r3, lsl #12 802c9ba: 462a movgt r2, r5 802c9bc: 463a movle r2, r7 802c9be: 46ab mov fp, r5 802c9c0: 46a2 mov sl, r4 802c9c2: bfce itee gt 802c9c4: eb02 5b03 addgt.w fp, r2, r3, lsl #20 802c9c8: eb02 5303 addle.w r3, r2, r3, lsl #20 802c9cc: ee00 3a90 vmovle s1, r3 802c9d0: ec4b ab17 vmov d7, sl, fp 802c9d4: ee87 0b00 vdiv.f64 d0, d7, d0 802c9d8: b003 add sp, #12 802c9da: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802c9de <__copybits>: 802c9de: 3901 subs r1, #1 802c9e0: b570 push {r4, r5, r6, lr} 802c9e2: 1149 asrs r1, r1, #5 802c9e4: 6914 ldr r4, [r2, #16] 802c9e6: 3101 adds r1, #1 802c9e8: f102 0314 add.w r3, r2, #20 802c9ec: eb00 0181 add.w r1, r0, r1, lsl #2 802c9f0: eb03 0484 add.w r4, r3, r4, lsl #2 802c9f4: 1f05 subs r5, r0, #4 802c9f6: 42a3 cmp r3, r4 802c9f8: d30c bcc.n 802ca14 <__copybits+0x36> 802c9fa: 1aa3 subs r3, r4, r2 802c9fc: 3b11 subs r3, #17 802c9fe: f023 0303 bic.w r3, r3, #3 802ca02: 3211 adds r2, #17 802ca04: 42a2 cmp r2, r4 802ca06: bf88 it hi 802ca08: 2300 movhi r3, #0 802ca0a: 4418 add r0, r3 802ca0c: 2300 movs r3, #0 802ca0e: 4288 cmp r0, r1 802ca10: d305 bcc.n 802ca1e <__copybits+0x40> 802ca12: bd70 pop {r4, r5, r6, pc} 802ca14: f853 6b04 ldr.w r6, [r3], #4 802ca18: f845 6f04 str.w r6, [r5, #4]! 802ca1c: e7eb b.n 802c9f6 <__copybits+0x18> 802ca1e: f840 3b04 str.w r3, [r0], #4 802ca22: e7f4 b.n 802ca0e <__copybits+0x30> 0802ca24 <__any_on>: 802ca24: f100 0214 add.w r2, r0, #20 802ca28: 6900 ldr r0, [r0, #16] 802ca2a: 114b asrs r3, r1, #5 802ca2c: 4298 cmp r0, r3 802ca2e: b510 push {r4, lr} 802ca30: db11 blt.n 802ca56 <__any_on+0x32> 802ca32: dd0a ble.n 802ca4a <__any_on+0x26> 802ca34: f011 011f ands.w r1, r1, #31 802ca38: d007 beq.n 802ca4a <__any_on+0x26> 802ca3a: f852 4023 ldr.w r4, [r2, r3, lsl #2] 802ca3e: fa24 f001 lsr.w r0, r4, r1 802ca42: fa00 f101 lsl.w r1, r0, r1 802ca46: 428c cmp r4, r1 802ca48: d10b bne.n 802ca62 <__any_on+0x3e> 802ca4a: eb02 0383 add.w r3, r2, r3, lsl #2 802ca4e: 4293 cmp r3, r2 802ca50: d803 bhi.n 802ca5a <__any_on+0x36> 802ca52: 2000 movs r0, #0 802ca54: bd10 pop {r4, pc} 802ca56: 4603 mov r3, r0 802ca58: e7f7 b.n 802ca4a <__any_on+0x26> 802ca5a: f853 1d04 ldr.w r1, [r3, #-4]! 802ca5e: 2900 cmp r1, #0 802ca60: d0f5 beq.n 802ca4e <__any_on+0x2a> 802ca62: 2001 movs r0, #1 802ca64: e7f6 b.n 802ca54 <__any_on+0x30> 0802ca66 <_malloc_usable_size_r>: 802ca66: f851 3c04 ldr.w r3, [r1, #-4] 802ca6a: 1f18 subs r0, r3, #4 802ca6c: 2b00 cmp r3, #0 802ca6e: bfbc itt lt 802ca70: 580b ldrlt r3, [r1, r0] 802ca72: 18c0 addlt r0, r0, r3 802ca74: 4770 bx lr 0802ca76 <__ascii_wctomb>: 802ca76: 4603 mov r3, r0 802ca78: 4608 mov r0, r1 802ca7a: b141 cbz r1, 802ca8e <__ascii_wctomb+0x18> 802ca7c: 2aff cmp r2, #255 @ 0xff 802ca7e: d904 bls.n 802ca8a <__ascii_wctomb+0x14> 802ca80: 228a movs r2, #138 @ 0x8a 802ca82: 601a str r2, [r3, #0] 802ca84: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802ca88: 4770 bx lr 802ca8a: 700a strb r2, [r1, #0] 802ca8c: 2001 movs r0, #1 802ca8e: 4770 bx lr 0802ca90 <__ssputs_r>: 802ca90: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802ca94: 688e ldr r6, [r1, #8] 802ca96: 461f mov r7, r3 802ca98: 42be cmp r6, r7 802ca9a: 680b ldr r3, [r1, #0] 802ca9c: 4682 mov sl, r0 802ca9e: 460c mov r4, r1 802caa0: 4690 mov r8, r2 802caa2: d82d bhi.n 802cb00 <__ssputs_r+0x70> 802caa4: f9b1 200c ldrsh.w r2, [r1, #12] 802caa8: f412 6f90 tst.w r2, #1152 @ 0x480 802caac: d026 beq.n 802cafc <__ssputs_r+0x6c> 802caae: 6965 ldr r5, [r4, #20] 802cab0: 6909 ldr r1, [r1, #16] 802cab2: eb05 0545 add.w r5, r5, r5, lsl #1 802cab6: eba3 0901 sub.w r9, r3, r1 802caba: eb05 75d5 add.w r5, r5, r5, lsr #31 802cabe: 1c7b adds r3, r7, #1 802cac0: 444b add r3, r9 802cac2: 106d asrs r5, r5, #1 802cac4: 429d cmp r5, r3 802cac6: bf38 it cc 802cac8: 461d movcc r5, r3 802caca: 0553 lsls r3, r2, #21 802cacc: d527 bpl.n 802cb1e <__ssputs_r+0x8e> 802cace: 4629 mov r1, r5 802cad0: f7fc fb2e bl 8029130 <_malloc_r> 802cad4: 4606 mov r6, r0 802cad6: b360 cbz r0, 802cb32 <__ssputs_r+0xa2> 802cad8: 6921 ldr r1, [r4, #16] 802cada: 464a mov r2, r9 802cadc: f7fe f967 bl 802adae 802cae0: 89a3 ldrh r3, [r4, #12] 802cae2: f423 6390 bic.w r3, r3, #1152 @ 0x480 802cae6: f043 0380 orr.w r3, r3, #128 @ 0x80 802caea: 81a3 strh r3, [r4, #12] 802caec: 6126 str r6, [r4, #16] 802caee: 6165 str r5, [r4, #20] 802caf0: 444e add r6, r9 802caf2: eba5 0509 sub.w r5, r5, r9 802caf6: 6026 str r6, [r4, #0] 802caf8: 60a5 str r5, [r4, #8] 802cafa: 463e mov r6, r7 802cafc: 42be cmp r6, r7 802cafe: d900 bls.n 802cb02 <__ssputs_r+0x72> 802cb00: 463e mov r6, r7 802cb02: 6820 ldr r0, [r4, #0] 802cb04: 4632 mov r2, r6 802cb06: 4641 mov r1, r8 802cb08: f7fe f840 bl 802ab8c 802cb0c: 68a3 ldr r3, [r4, #8] 802cb0e: 1b9b subs r3, r3, r6 802cb10: 60a3 str r3, [r4, #8] 802cb12: 6823 ldr r3, [r4, #0] 802cb14: 4433 add r3, r6 802cb16: 6023 str r3, [r4, #0] 802cb18: 2000 movs r0, #0 802cb1a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802cb1e: 462a mov r2, r5 802cb20: f7fc fbd8 bl 80292d4 <_realloc_r> 802cb24: 4606 mov r6, r0 802cb26: 2800 cmp r0, #0 802cb28: d1e0 bne.n 802caec <__ssputs_r+0x5c> 802cb2a: 6921 ldr r1, [r4, #16] 802cb2c: 4650 mov r0, sl 802cb2e: f7fe ff55 bl 802b9dc <_free_r> 802cb32: 230c movs r3, #12 802cb34: f8ca 3000 str.w r3, [sl] 802cb38: 89a3 ldrh r3, [r4, #12] 802cb3a: f043 0340 orr.w r3, r3, #64 @ 0x40 802cb3e: 81a3 strh r3, [r4, #12] 802cb40: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802cb44: e7e9 b.n 802cb1a <__ssputs_r+0x8a> ... 0802cb48 <_svfiprintf_r>: 802cb48: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cb4c: 4698 mov r8, r3 802cb4e: 898b ldrh r3, [r1, #12] 802cb50: 061b lsls r3, r3, #24 802cb52: b09d sub sp, #116 @ 0x74 802cb54: 4607 mov r7, r0 802cb56: 460d mov r5, r1 802cb58: 4614 mov r4, r2 802cb5a: d510 bpl.n 802cb7e <_svfiprintf_r+0x36> 802cb5c: 690b ldr r3, [r1, #16] 802cb5e: b973 cbnz r3, 802cb7e <_svfiprintf_r+0x36> 802cb60: 2140 movs r1, #64 @ 0x40 802cb62: f7fc fae5 bl 8029130 <_malloc_r> 802cb66: 6028 str r0, [r5, #0] 802cb68: 6128 str r0, [r5, #16] 802cb6a: b930 cbnz r0, 802cb7a <_svfiprintf_r+0x32> 802cb6c: 230c movs r3, #12 802cb6e: 603b str r3, [r7, #0] 802cb70: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802cb74: b01d add sp, #116 @ 0x74 802cb76: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802cb7a: 2340 movs r3, #64 @ 0x40 802cb7c: 616b str r3, [r5, #20] 802cb7e: 2300 movs r3, #0 802cb80: 9309 str r3, [sp, #36] @ 0x24 802cb82: 2320 movs r3, #32 802cb84: f88d 3029 strb.w r3, [sp, #41] @ 0x29 802cb88: f8cd 800c str.w r8, [sp, #12] 802cb8c: 2330 movs r3, #48 @ 0x30 802cb8e: f8df 819c ldr.w r8, [pc, #412] @ 802cd2c <_svfiprintf_r+0x1e4> 802cb92: f88d 302a strb.w r3, [sp, #42] @ 0x2a 802cb96: f04f 0901 mov.w r9, #1 802cb9a: 4623 mov r3, r4 802cb9c: 469a mov sl, r3 802cb9e: f813 2b01 ldrb.w r2, [r3], #1 802cba2: b10a cbz r2, 802cba8 <_svfiprintf_r+0x60> 802cba4: 2a25 cmp r2, #37 @ 0x25 802cba6: d1f9 bne.n 802cb9c <_svfiprintf_r+0x54> 802cba8: ebba 0b04 subs.w fp, sl, r4 802cbac: d00b beq.n 802cbc6 <_svfiprintf_r+0x7e> 802cbae: 465b mov r3, fp 802cbb0: 4622 mov r2, r4 802cbb2: 4629 mov r1, r5 802cbb4: 4638 mov r0, r7 802cbb6: f7ff ff6b bl 802ca90 <__ssputs_r> 802cbba: 3001 adds r0, #1 802cbbc: f000 80a7 beq.w 802cd0e <_svfiprintf_r+0x1c6> 802cbc0: 9a09 ldr r2, [sp, #36] @ 0x24 802cbc2: 445a add r2, fp 802cbc4: 9209 str r2, [sp, #36] @ 0x24 802cbc6: f89a 3000 ldrb.w r3, [sl] 802cbca: 2b00 cmp r3, #0 802cbcc: f000 809f beq.w 802cd0e <_svfiprintf_r+0x1c6> 802cbd0: 2300 movs r3, #0 802cbd2: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802cbd6: e9cd 2305 strd r2, r3, [sp, #20] 802cbda: f10a 0a01 add.w sl, sl, #1 802cbde: 9304 str r3, [sp, #16] 802cbe0: 9307 str r3, [sp, #28] 802cbe2: f88d 3053 strb.w r3, [sp, #83] @ 0x53 802cbe6: 931a str r3, [sp, #104] @ 0x68 802cbe8: 4654 mov r4, sl 802cbea: 2205 movs r2, #5 802cbec: f814 1b01 ldrb.w r1, [r4], #1 802cbf0: 484e ldr r0, [pc, #312] @ (802cd2c <_svfiprintf_r+0x1e4>) 802cbf2: f7d3 fb85 bl 8000300 802cbf6: 9a04 ldr r2, [sp, #16] 802cbf8: b9d8 cbnz r0, 802cc32 <_svfiprintf_r+0xea> 802cbfa: 06d0 lsls r0, r2, #27 802cbfc: bf44 itt mi 802cbfe: 2320 movmi r3, #32 802cc00: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802cc04: 0711 lsls r1, r2, #28 802cc06: bf44 itt mi 802cc08: 232b movmi r3, #43 @ 0x2b 802cc0a: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802cc0e: f89a 3000 ldrb.w r3, [sl] 802cc12: 2b2a cmp r3, #42 @ 0x2a 802cc14: d015 beq.n 802cc42 <_svfiprintf_r+0xfa> 802cc16: 9a07 ldr r2, [sp, #28] 802cc18: 4654 mov r4, sl 802cc1a: 2000 movs r0, #0 802cc1c: f04f 0c0a mov.w ip, #10 802cc20: 4621 mov r1, r4 802cc22: f811 3b01 ldrb.w r3, [r1], #1 802cc26: 3b30 subs r3, #48 @ 0x30 802cc28: 2b09 cmp r3, #9 802cc2a: d94b bls.n 802ccc4 <_svfiprintf_r+0x17c> 802cc2c: b1b0 cbz r0, 802cc5c <_svfiprintf_r+0x114> 802cc2e: 9207 str r2, [sp, #28] 802cc30: e014 b.n 802cc5c <_svfiprintf_r+0x114> 802cc32: eba0 0308 sub.w r3, r0, r8 802cc36: fa09 f303 lsl.w r3, r9, r3 802cc3a: 4313 orrs r3, r2 802cc3c: 9304 str r3, [sp, #16] 802cc3e: 46a2 mov sl, r4 802cc40: e7d2 b.n 802cbe8 <_svfiprintf_r+0xa0> 802cc42: 9b03 ldr r3, [sp, #12] 802cc44: 1d19 adds r1, r3, #4 802cc46: 681b ldr r3, [r3, #0] 802cc48: 9103 str r1, [sp, #12] 802cc4a: 2b00 cmp r3, #0 802cc4c: bfbb ittet lt 802cc4e: 425b neglt r3, r3 802cc50: f042 0202 orrlt.w r2, r2, #2 802cc54: 9307 strge r3, [sp, #28] 802cc56: 9307 strlt r3, [sp, #28] 802cc58: bfb8 it lt 802cc5a: 9204 strlt r2, [sp, #16] 802cc5c: 7823 ldrb r3, [r4, #0] 802cc5e: 2b2e cmp r3, #46 @ 0x2e 802cc60: d10a bne.n 802cc78 <_svfiprintf_r+0x130> 802cc62: 7863 ldrb r3, [r4, #1] 802cc64: 2b2a cmp r3, #42 @ 0x2a 802cc66: d132 bne.n 802ccce <_svfiprintf_r+0x186> 802cc68: 9b03 ldr r3, [sp, #12] 802cc6a: 1d1a adds r2, r3, #4 802cc6c: 681b ldr r3, [r3, #0] 802cc6e: 9203 str r2, [sp, #12] 802cc70: ea43 73e3 orr.w r3, r3, r3, asr #31 802cc74: 3402 adds r4, #2 802cc76: 9305 str r3, [sp, #20] 802cc78: f8df a0c0 ldr.w sl, [pc, #192] @ 802cd3c <_svfiprintf_r+0x1f4> 802cc7c: 7821 ldrb r1, [r4, #0] 802cc7e: 2203 movs r2, #3 802cc80: 4650 mov r0, sl 802cc82: f7d3 fb3d bl 8000300 802cc86: b138 cbz r0, 802cc98 <_svfiprintf_r+0x150> 802cc88: 9b04 ldr r3, [sp, #16] 802cc8a: eba0 000a sub.w r0, r0, sl 802cc8e: 2240 movs r2, #64 @ 0x40 802cc90: 4082 lsls r2, r0 802cc92: 4313 orrs r3, r2 802cc94: 3401 adds r4, #1 802cc96: 9304 str r3, [sp, #16] 802cc98: f814 1b01 ldrb.w r1, [r4], #1 802cc9c: 4824 ldr r0, [pc, #144] @ (802cd30 <_svfiprintf_r+0x1e8>) 802cc9e: f88d 1028 strb.w r1, [sp, #40] @ 0x28 802cca2: 2206 movs r2, #6 802cca4: f7d3 fb2c bl 8000300 802cca8: 2800 cmp r0, #0 802ccaa: d036 beq.n 802cd1a <_svfiprintf_r+0x1d2> 802ccac: 4b21 ldr r3, [pc, #132] @ (802cd34 <_svfiprintf_r+0x1ec>) 802ccae: bb1b cbnz r3, 802ccf8 <_svfiprintf_r+0x1b0> 802ccb0: 9b03 ldr r3, [sp, #12] 802ccb2: 3307 adds r3, #7 802ccb4: f023 0307 bic.w r3, r3, #7 802ccb8: 3308 adds r3, #8 802ccba: 9303 str r3, [sp, #12] 802ccbc: 9b09 ldr r3, [sp, #36] @ 0x24 802ccbe: 4433 add r3, r6 802ccc0: 9309 str r3, [sp, #36] @ 0x24 802ccc2: e76a b.n 802cb9a <_svfiprintf_r+0x52> 802ccc4: fb0c 3202 mla r2, ip, r2, r3 802ccc8: 460c mov r4, r1 802ccca: 2001 movs r0, #1 802cccc: e7a8 b.n 802cc20 <_svfiprintf_r+0xd8> 802ccce: 2300 movs r3, #0 802ccd0: 3401 adds r4, #1 802ccd2: 9305 str r3, [sp, #20] 802ccd4: 4619 mov r1, r3 802ccd6: f04f 0c0a mov.w ip, #10 802ccda: 4620 mov r0, r4 802ccdc: f810 2b01 ldrb.w r2, [r0], #1 802cce0: 3a30 subs r2, #48 @ 0x30 802cce2: 2a09 cmp r2, #9 802cce4: d903 bls.n 802ccee <_svfiprintf_r+0x1a6> 802cce6: 2b00 cmp r3, #0 802cce8: d0c6 beq.n 802cc78 <_svfiprintf_r+0x130> 802ccea: 9105 str r1, [sp, #20] 802ccec: e7c4 b.n 802cc78 <_svfiprintf_r+0x130> 802ccee: fb0c 2101 mla r1, ip, r1, r2 802ccf2: 4604 mov r4, r0 802ccf4: 2301 movs r3, #1 802ccf6: e7f0 b.n 802ccda <_svfiprintf_r+0x192> 802ccf8: ab03 add r3, sp, #12 802ccfa: 9300 str r3, [sp, #0] 802ccfc: 462a mov r2, r5 802ccfe: 4b0e ldr r3, [pc, #56] @ (802cd38 <_svfiprintf_r+0x1f0>) 802cd00: a904 add r1, sp, #16 802cd02: 4638 mov r0, r7 802cd04: f7fd f960 bl 8029fc8 <_printf_float> 802cd08: 1c42 adds r2, r0, #1 802cd0a: 4606 mov r6, r0 802cd0c: d1d6 bne.n 802ccbc <_svfiprintf_r+0x174> 802cd0e: 89ab ldrh r3, [r5, #12] 802cd10: 065b lsls r3, r3, #25 802cd12: f53f af2d bmi.w 802cb70 <_svfiprintf_r+0x28> 802cd16: 9809 ldr r0, [sp, #36] @ 0x24 802cd18: e72c b.n 802cb74 <_svfiprintf_r+0x2c> 802cd1a: ab03 add r3, sp, #12 802cd1c: 9300 str r3, [sp, #0] 802cd1e: 462a mov r2, r5 802cd20: 4b05 ldr r3, [pc, #20] @ (802cd38 <_svfiprintf_r+0x1f0>) 802cd22: a904 add r1, sp, #16 802cd24: 4638 mov r0, r7 802cd26: f7fd fbd7 bl 802a4d8 <_printf_i> 802cd2a: e7ed b.n 802cd08 <_svfiprintf_r+0x1c0> 802cd2c: 08032128 .word 0x08032128 802cd30: 08032132 .word 0x08032132 802cd34: 08029fc9 .word 0x08029fc9 802cd38: 0802ca91 .word 0x0802ca91 802cd3c: 0803212e .word 0x0803212e 0802cd40 <__sfputc_r>: 802cd40: 6893 ldr r3, [r2, #8] 802cd42: 3b01 subs r3, #1 802cd44: 2b00 cmp r3, #0 802cd46: b410 push {r4} 802cd48: 6093 str r3, [r2, #8] 802cd4a: da08 bge.n 802cd5e <__sfputc_r+0x1e> 802cd4c: 6994 ldr r4, [r2, #24] 802cd4e: 42a3 cmp r3, r4 802cd50: db01 blt.n 802cd56 <__sfputc_r+0x16> 802cd52: 290a cmp r1, #10 802cd54: d103 bne.n 802cd5e <__sfputc_r+0x1e> 802cd56: f85d 4b04 ldr.w r4, [sp], #4 802cd5a: f7fd be72 b.w 802aa42 <__swbuf_r> 802cd5e: 6813 ldr r3, [r2, #0] 802cd60: 1c58 adds r0, r3, #1 802cd62: 6010 str r0, [r2, #0] 802cd64: 7019 strb r1, [r3, #0] 802cd66: 4608 mov r0, r1 802cd68: f85d 4b04 ldr.w r4, [sp], #4 802cd6c: 4770 bx lr 0802cd6e <__sfputs_r>: 802cd6e: b5f8 push {r3, r4, r5, r6, r7, lr} 802cd70: 4606 mov r6, r0 802cd72: 460f mov r7, r1 802cd74: 4614 mov r4, r2 802cd76: 18d5 adds r5, r2, r3 802cd78: 42ac cmp r4, r5 802cd7a: d101 bne.n 802cd80 <__sfputs_r+0x12> 802cd7c: 2000 movs r0, #0 802cd7e: e007 b.n 802cd90 <__sfputs_r+0x22> 802cd80: f814 1b01 ldrb.w r1, [r4], #1 802cd84: 463a mov r2, r7 802cd86: 4630 mov r0, r6 802cd88: f7ff ffda bl 802cd40 <__sfputc_r> 802cd8c: 1c43 adds r3, r0, #1 802cd8e: d1f3 bne.n 802cd78 <__sfputs_r+0xa> 802cd90: bdf8 pop {r3, r4, r5, r6, r7, pc} ... 0802cd94 <_vfiprintf_r>: 802cd94: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802cd98: 460d mov r5, r1 802cd9a: b09d sub sp, #116 @ 0x74 802cd9c: 4614 mov r4, r2 802cd9e: 4698 mov r8, r3 802cda0: 4606 mov r6, r0 802cda2: b118 cbz r0, 802cdac <_vfiprintf_r+0x18> 802cda4: 6a03 ldr r3, [r0, #32] 802cda6: b90b cbnz r3, 802cdac <_vfiprintf_r+0x18> 802cda8: f7fd fd42 bl 802a830 <__sinit> 802cdac: 6e6b ldr r3, [r5, #100] @ 0x64 802cdae: 07d9 lsls r1, r3, #31 802cdb0: d405 bmi.n 802cdbe <_vfiprintf_r+0x2a> 802cdb2: 89ab ldrh r3, [r5, #12] 802cdb4: 059a lsls r2, r3, #22 802cdb6: d402 bmi.n 802cdbe <_vfiprintf_r+0x2a> 802cdb8: 6da8 ldr r0, [r5, #88] @ 0x58 802cdba: f7fd fff6 bl 802adaa <__retarget_lock_acquire_recursive> 802cdbe: 89ab ldrh r3, [r5, #12] 802cdc0: 071b lsls r3, r3, #28 802cdc2: d501 bpl.n 802cdc8 <_vfiprintf_r+0x34> 802cdc4: 692b ldr r3, [r5, #16] 802cdc6: b99b cbnz r3, 802cdf0 <_vfiprintf_r+0x5c> 802cdc8: 4629 mov r1, r5 802cdca: 4630 mov r0, r6 802cdcc: f7fd fe78 bl 802aac0 <__swsetup_r> 802cdd0: b170 cbz r0, 802cdf0 <_vfiprintf_r+0x5c> 802cdd2: 6e6b ldr r3, [r5, #100] @ 0x64 802cdd4: 07dc lsls r4, r3, #31 802cdd6: d504 bpl.n 802cde2 <_vfiprintf_r+0x4e> 802cdd8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802cddc: b01d add sp, #116 @ 0x74 802cdde: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802cde2: 89ab ldrh r3, [r5, #12] 802cde4: 0598 lsls r0, r3, #22 802cde6: d4f7 bmi.n 802cdd8 <_vfiprintf_r+0x44> 802cde8: 6da8 ldr r0, [r5, #88] @ 0x58 802cdea: f7fd ffdf bl 802adac <__retarget_lock_release_recursive> 802cdee: e7f3 b.n 802cdd8 <_vfiprintf_r+0x44> 802cdf0: 2300 movs r3, #0 802cdf2: 9309 str r3, [sp, #36] @ 0x24 802cdf4: 2320 movs r3, #32 802cdf6: f88d 3029 strb.w r3, [sp, #41] @ 0x29 802cdfa: f8cd 800c str.w r8, [sp, #12] 802cdfe: 2330 movs r3, #48 @ 0x30 802ce00: f8df 81ac ldr.w r8, [pc, #428] @ 802cfb0 <_vfiprintf_r+0x21c> 802ce04: f88d 302a strb.w r3, [sp, #42] @ 0x2a 802ce08: f04f 0901 mov.w r9, #1 802ce0c: 4623 mov r3, r4 802ce0e: 469a mov sl, r3 802ce10: f813 2b01 ldrb.w r2, [r3], #1 802ce14: b10a cbz r2, 802ce1a <_vfiprintf_r+0x86> 802ce16: 2a25 cmp r2, #37 @ 0x25 802ce18: d1f9 bne.n 802ce0e <_vfiprintf_r+0x7a> 802ce1a: ebba 0b04 subs.w fp, sl, r4 802ce1e: d00b beq.n 802ce38 <_vfiprintf_r+0xa4> 802ce20: 465b mov r3, fp 802ce22: 4622 mov r2, r4 802ce24: 4629 mov r1, r5 802ce26: 4630 mov r0, r6 802ce28: f7ff ffa1 bl 802cd6e <__sfputs_r> 802ce2c: 3001 adds r0, #1 802ce2e: f000 80a7 beq.w 802cf80 <_vfiprintf_r+0x1ec> 802ce32: 9a09 ldr r2, [sp, #36] @ 0x24 802ce34: 445a add r2, fp 802ce36: 9209 str r2, [sp, #36] @ 0x24 802ce38: f89a 3000 ldrb.w r3, [sl] 802ce3c: 2b00 cmp r3, #0 802ce3e: f000 809f beq.w 802cf80 <_vfiprintf_r+0x1ec> 802ce42: 2300 movs r3, #0 802ce44: f04f 32ff mov.w r2, #4294967295 @ 0xffffffff 802ce48: e9cd 2305 strd r2, r3, [sp, #20] 802ce4c: f10a 0a01 add.w sl, sl, #1 802ce50: 9304 str r3, [sp, #16] 802ce52: 9307 str r3, [sp, #28] 802ce54: f88d 3053 strb.w r3, [sp, #83] @ 0x53 802ce58: 931a str r3, [sp, #104] @ 0x68 802ce5a: 4654 mov r4, sl 802ce5c: 2205 movs r2, #5 802ce5e: f814 1b01 ldrb.w r1, [r4], #1 802ce62: 4853 ldr r0, [pc, #332] @ (802cfb0 <_vfiprintf_r+0x21c>) 802ce64: f7d3 fa4c bl 8000300 802ce68: 9a04 ldr r2, [sp, #16] 802ce6a: b9d8 cbnz r0, 802cea4 <_vfiprintf_r+0x110> 802ce6c: 06d1 lsls r1, r2, #27 802ce6e: bf44 itt mi 802ce70: 2320 movmi r3, #32 802ce72: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802ce76: 0713 lsls r3, r2, #28 802ce78: bf44 itt mi 802ce7a: 232b movmi r3, #43 @ 0x2b 802ce7c: f88d 3053 strbmi.w r3, [sp, #83] @ 0x53 802ce80: f89a 3000 ldrb.w r3, [sl] 802ce84: 2b2a cmp r3, #42 @ 0x2a 802ce86: d015 beq.n 802ceb4 <_vfiprintf_r+0x120> 802ce88: 9a07 ldr r2, [sp, #28] 802ce8a: 4654 mov r4, sl 802ce8c: 2000 movs r0, #0 802ce8e: f04f 0c0a mov.w ip, #10 802ce92: 4621 mov r1, r4 802ce94: f811 3b01 ldrb.w r3, [r1], #1 802ce98: 3b30 subs r3, #48 @ 0x30 802ce9a: 2b09 cmp r3, #9 802ce9c: d94b bls.n 802cf36 <_vfiprintf_r+0x1a2> 802ce9e: b1b0 cbz r0, 802cece <_vfiprintf_r+0x13a> 802cea0: 9207 str r2, [sp, #28] 802cea2: e014 b.n 802cece <_vfiprintf_r+0x13a> 802cea4: eba0 0308 sub.w r3, r0, r8 802cea8: fa09 f303 lsl.w r3, r9, r3 802ceac: 4313 orrs r3, r2 802ceae: 9304 str r3, [sp, #16] 802ceb0: 46a2 mov sl, r4 802ceb2: e7d2 b.n 802ce5a <_vfiprintf_r+0xc6> 802ceb4: 9b03 ldr r3, [sp, #12] 802ceb6: 1d19 adds r1, r3, #4 802ceb8: 681b ldr r3, [r3, #0] 802ceba: 9103 str r1, [sp, #12] 802cebc: 2b00 cmp r3, #0 802cebe: bfbb ittet lt 802cec0: 425b neglt r3, r3 802cec2: f042 0202 orrlt.w r2, r2, #2 802cec6: 9307 strge r3, [sp, #28] 802cec8: 9307 strlt r3, [sp, #28] 802ceca: bfb8 it lt 802cecc: 9204 strlt r2, [sp, #16] 802cece: 7823 ldrb r3, [r4, #0] 802ced0: 2b2e cmp r3, #46 @ 0x2e 802ced2: d10a bne.n 802ceea <_vfiprintf_r+0x156> 802ced4: 7863 ldrb r3, [r4, #1] 802ced6: 2b2a cmp r3, #42 @ 0x2a 802ced8: d132 bne.n 802cf40 <_vfiprintf_r+0x1ac> 802ceda: 9b03 ldr r3, [sp, #12] 802cedc: 1d1a adds r2, r3, #4 802cede: 681b ldr r3, [r3, #0] 802cee0: 9203 str r2, [sp, #12] 802cee2: ea43 73e3 orr.w r3, r3, r3, asr #31 802cee6: 3402 adds r4, #2 802cee8: 9305 str r3, [sp, #20] 802ceea: f8df a0d4 ldr.w sl, [pc, #212] @ 802cfc0 <_vfiprintf_r+0x22c> 802ceee: 7821 ldrb r1, [r4, #0] 802cef0: 2203 movs r2, #3 802cef2: 4650 mov r0, sl 802cef4: f7d3 fa04 bl 8000300 802cef8: b138 cbz r0, 802cf0a <_vfiprintf_r+0x176> 802cefa: 9b04 ldr r3, [sp, #16] 802cefc: eba0 000a sub.w r0, r0, sl 802cf00: 2240 movs r2, #64 @ 0x40 802cf02: 4082 lsls r2, r0 802cf04: 4313 orrs r3, r2 802cf06: 3401 adds r4, #1 802cf08: 9304 str r3, [sp, #16] 802cf0a: f814 1b01 ldrb.w r1, [r4], #1 802cf0e: 4829 ldr r0, [pc, #164] @ (802cfb4 <_vfiprintf_r+0x220>) 802cf10: f88d 1028 strb.w r1, [sp, #40] @ 0x28 802cf14: 2206 movs r2, #6 802cf16: f7d3 f9f3 bl 8000300 802cf1a: 2800 cmp r0, #0 802cf1c: d03f beq.n 802cf9e <_vfiprintf_r+0x20a> 802cf1e: 4b26 ldr r3, [pc, #152] @ (802cfb8 <_vfiprintf_r+0x224>) 802cf20: bb1b cbnz r3, 802cf6a <_vfiprintf_r+0x1d6> 802cf22: 9b03 ldr r3, [sp, #12] 802cf24: 3307 adds r3, #7 802cf26: f023 0307 bic.w r3, r3, #7 802cf2a: 3308 adds r3, #8 802cf2c: 9303 str r3, [sp, #12] 802cf2e: 9b09 ldr r3, [sp, #36] @ 0x24 802cf30: 443b add r3, r7 802cf32: 9309 str r3, [sp, #36] @ 0x24 802cf34: e76a b.n 802ce0c <_vfiprintf_r+0x78> 802cf36: fb0c 3202 mla r2, ip, r2, r3 802cf3a: 460c mov r4, r1 802cf3c: 2001 movs r0, #1 802cf3e: e7a8 b.n 802ce92 <_vfiprintf_r+0xfe> 802cf40: 2300 movs r3, #0 802cf42: 3401 adds r4, #1 802cf44: 9305 str r3, [sp, #20] 802cf46: 4619 mov r1, r3 802cf48: f04f 0c0a mov.w ip, #10 802cf4c: 4620 mov r0, r4 802cf4e: f810 2b01 ldrb.w r2, [r0], #1 802cf52: 3a30 subs r2, #48 @ 0x30 802cf54: 2a09 cmp r2, #9 802cf56: d903 bls.n 802cf60 <_vfiprintf_r+0x1cc> 802cf58: 2b00 cmp r3, #0 802cf5a: d0c6 beq.n 802ceea <_vfiprintf_r+0x156> 802cf5c: 9105 str r1, [sp, #20] 802cf5e: e7c4 b.n 802ceea <_vfiprintf_r+0x156> 802cf60: fb0c 2101 mla r1, ip, r1, r2 802cf64: 4604 mov r4, r0 802cf66: 2301 movs r3, #1 802cf68: e7f0 b.n 802cf4c <_vfiprintf_r+0x1b8> 802cf6a: ab03 add r3, sp, #12 802cf6c: 9300 str r3, [sp, #0] 802cf6e: 462a mov r2, r5 802cf70: 4b12 ldr r3, [pc, #72] @ (802cfbc <_vfiprintf_r+0x228>) 802cf72: a904 add r1, sp, #16 802cf74: 4630 mov r0, r6 802cf76: f7fd f827 bl 8029fc8 <_printf_float> 802cf7a: 4607 mov r7, r0 802cf7c: 1c78 adds r0, r7, #1 802cf7e: d1d6 bne.n 802cf2e <_vfiprintf_r+0x19a> 802cf80: 6e6b ldr r3, [r5, #100] @ 0x64 802cf82: 07d9 lsls r1, r3, #31 802cf84: d405 bmi.n 802cf92 <_vfiprintf_r+0x1fe> 802cf86: 89ab ldrh r3, [r5, #12] 802cf88: 059a lsls r2, r3, #22 802cf8a: d402 bmi.n 802cf92 <_vfiprintf_r+0x1fe> 802cf8c: 6da8 ldr r0, [r5, #88] @ 0x58 802cf8e: f7fd ff0d bl 802adac <__retarget_lock_release_recursive> 802cf92: 89ab ldrh r3, [r5, #12] 802cf94: 065b lsls r3, r3, #25 802cf96: f53f af1f bmi.w 802cdd8 <_vfiprintf_r+0x44> 802cf9a: 9809 ldr r0, [sp, #36] @ 0x24 802cf9c: e71e b.n 802cddc <_vfiprintf_r+0x48> 802cf9e: ab03 add r3, sp, #12 802cfa0: 9300 str r3, [sp, #0] 802cfa2: 462a mov r2, r5 802cfa4: 4b05 ldr r3, [pc, #20] @ (802cfbc <_vfiprintf_r+0x228>) 802cfa6: a904 add r1, sp, #16 802cfa8: 4630 mov r0, r6 802cfaa: f7fd fa95 bl 802a4d8 <_printf_i> 802cfae: e7e4 b.n 802cf7a <_vfiprintf_r+0x1e6> 802cfb0: 08032128 .word 0x08032128 802cfb4: 08032132 .word 0x08032132 802cfb8: 08029fc9 .word 0x08029fc9 802cfbc: 0802cd6f .word 0x0802cd6f 802cfc0: 0803212e .word 0x0803212e 0802cfc4 <__sflush_r>: 802cfc4: f9b1 200c ldrsh.w r2, [r1, #12] 802cfc8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802cfcc: 0716 lsls r6, r2, #28 802cfce: 4605 mov r5, r0 802cfd0: 460c mov r4, r1 802cfd2: d454 bmi.n 802d07e <__sflush_r+0xba> 802cfd4: 684b ldr r3, [r1, #4] 802cfd6: 2b00 cmp r3, #0 802cfd8: dc02 bgt.n 802cfe0 <__sflush_r+0x1c> 802cfda: 6c0b ldr r3, [r1, #64] @ 0x40 802cfdc: 2b00 cmp r3, #0 802cfde: dd48 ble.n 802d072 <__sflush_r+0xae> 802cfe0: 6ae6 ldr r6, [r4, #44] @ 0x2c 802cfe2: 2e00 cmp r6, #0 802cfe4: d045 beq.n 802d072 <__sflush_r+0xae> 802cfe6: 2300 movs r3, #0 802cfe8: f412 5280 ands.w r2, r2, #4096 @ 0x1000 802cfec: 682f ldr r7, [r5, #0] 802cfee: 6a21 ldr r1, [r4, #32] 802cff0: 602b str r3, [r5, #0] 802cff2: d030 beq.n 802d056 <__sflush_r+0x92> 802cff4: 6d62 ldr r2, [r4, #84] @ 0x54 802cff6: 89a3 ldrh r3, [r4, #12] 802cff8: 0759 lsls r1, r3, #29 802cffa: d505 bpl.n 802d008 <__sflush_r+0x44> 802cffc: 6863 ldr r3, [r4, #4] 802cffe: 1ad2 subs r2, r2, r3 802d000: 6b63 ldr r3, [r4, #52] @ 0x34 802d002: b10b cbz r3, 802d008 <__sflush_r+0x44> 802d004: 6c23 ldr r3, [r4, #64] @ 0x40 802d006: 1ad2 subs r2, r2, r3 802d008: 2300 movs r3, #0 802d00a: 6ae6 ldr r6, [r4, #44] @ 0x2c 802d00c: 6a21 ldr r1, [r4, #32] 802d00e: 4628 mov r0, r5 802d010: 47b0 blx r6 802d012: 1c43 adds r3, r0, #1 802d014: 89a3 ldrh r3, [r4, #12] 802d016: d106 bne.n 802d026 <__sflush_r+0x62> 802d018: 6829 ldr r1, [r5, #0] 802d01a: 291d cmp r1, #29 802d01c: d82b bhi.n 802d076 <__sflush_r+0xb2> 802d01e: 4a2a ldr r2, [pc, #168] @ (802d0c8 <__sflush_r+0x104>) 802d020: 410a asrs r2, r1 802d022: 07d6 lsls r6, r2, #31 802d024: d427 bmi.n 802d076 <__sflush_r+0xb2> 802d026: 2200 movs r2, #0 802d028: 6062 str r2, [r4, #4] 802d02a: 04d9 lsls r1, r3, #19 802d02c: 6922 ldr r2, [r4, #16] 802d02e: 6022 str r2, [r4, #0] 802d030: d504 bpl.n 802d03c <__sflush_r+0x78> 802d032: 1c42 adds r2, r0, #1 802d034: d101 bne.n 802d03a <__sflush_r+0x76> 802d036: 682b ldr r3, [r5, #0] 802d038: b903 cbnz r3, 802d03c <__sflush_r+0x78> 802d03a: 6560 str r0, [r4, #84] @ 0x54 802d03c: 6b61 ldr r1, [r4, #52] @ 0x34 802d03e: 602f str r7, [r5, #0] 802d040: b1b9 cbz r1, 802d072 <__sflush_r+0xae> 802d042: f104 0344 add.w r3, r4, #68 @ 0x44 802d046: 4299 cmp r1, r3 802d048: d002 beq.n 802d050 <__sflush_r+0x8c> 802d04a: 4628 mov r0, r5 802d04c: f7fe fcc6 bl 802b9dc <_free_r> 802d050: 2300 movs r3, #0 802d052: 6363 str r3, [r4, #52] @ 0x34 802d054: e00d b.n 802d072 <__sflush_r+0xae> 802d056: 2301 movs r3, #1 802d058: 4628 mov r0, r5 802d05a: 47b0 blx r6 802d05c: 4602 mov r2, r0 802d05e: 1c50 adds r0, r2, #1 802d060: d1c9 bne.n 802cff6 <__sflush_r+0x32> 802d062: 682b ldr r3, [r5, #0] 802d064: 2b00 cmp r3, #0 802d066: d0c6 beq.n 802cff6 <__sflush_r+0x32> 802d068: 2b1d cmp r3, #29 802d06a: d001 beq.n 802d070 <__sflush_r+0xac> 802d06c: 2b16 cmp r3, #22 802d06e: d11e bne.n 802d0ae <__sflush_r+0xea> 802d070: 602f str r7, [r5, #0] 802d072: 2000 movs r0, #0 802d074: e022 b.n 802d0bc <__sflush_r+0xf8> 802d076: f043 0340 orr.w r3, r3, #64 @ 0x40 802d07a: b21b sxth r3, r3 802d07c: e01b b.n 802d0b6 <__sflush_r+0xf2> 802d07e: 690f ldr r7, [r1, #16] 802d080: 2f00 cmp r7, #0 802d082: d0f6 beq.n 802d072 <__sflush_r+0xae> 802d084: 0793 lsls r3, r2, #30 802d086: 680e ldr r6, [r1, #0] 802d088: bf08 it eq 802d08a: 694b ldreq r3, [r1, #20] 802d08c: 600f str r7, [r1, #0] 802d08e: bf18 it ne 802d090: 2300 movne r3, #0 802d092: eba6 0807 sub.w r8, r6, r7 802d096: 608b str r3, [r1, #8] 802d098: f1b8 0f00 cmp.w r8, #0 802d09c: dde9 ble.n 802d072 <__sflush_r+0xae> 802d09e: 6a21 ldr r1, [r4, #32] 802d0a0: 6aa6 ldr r6, [r4, #40] @ 0x28 802d0a2: 4643 mov r3, r8 802d0a4: 463a mov r2, r7 802d0a6: 4628 mov r0, r5 802d0a8: 47b0 blx r6 802d0aa: 2800 cmp r0, #0 802d0ac: dc08 bgt.n 802d0c0 <__sflush_r+0xfc> 802d0ae: f9b4 300c ldrsh.w r3, [r4, #12] 802d0b2: f043 0340 orr.w r3, r3, #64 @ 0x40 802d0b6: 81a3 strh r3, [r4, #12] 802d0b8: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802d0bc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802d0c0: 4407 add r7, r0 802d0c2: eba8 0800 sub.w r8, r8, r0 802d0c6: e7e7 b.n 802d098 <__sflush_r+0xd4> 802d0c8: dfbffffe .word 0xdfbffffe 0802d0cc <_fflush_r>: 802d0cc: b538 push {r3, r4, r5, lr} 802d0ce: 690b ldr r3, [r1, #16] 802d0d0: 4605 mov r5, r0 802d0d2: 460c mov r4, r1 802d0d4: b913 cbnz r3, 802d0dc <_fflush_r+0x10> 802d0d6: 2500 movs r5, #0 802d0d8: 4628 mov r0, r5 802d0da: bd38 pop {r3, r4, r5, pc} 802d0dc: b118 cbz r0, 802d0e6 <_fflush_r+0x1a> 802d0de: 6a03 ldr r3, [r0, #32] 802d0e0: b90b cbnz r3, 802d0e6 <_fflush_r+0x1a> 802d0e2: f7fd fba5 bl 802a830 <__sinit> 802d0e6: f9b4 300c ldrsh.w r3, [r4, #12] 802d0ea: 2b00 cmp r3, #0 802d0ec: d0f3 beq.n 802d0d6 <_fflush_r+0xa> 802d0ee: 6e62 ldr r2, [r4, #100] @ 0x64 802d0f0: 07d0 lsls r0, r2, #31 802d0f2: d404 bmi.n 802d0fe <_fflush_r+0x32> 802d0f4: 0599 lsls r1, r3, #22 802d0f6: d402 bmi.n 802d0fe <_fflush_r+0x32> 802d0f8: 6da0 ldr r0, [r4, #88] @ 0x58 802d0fa: f7fd fe56 bl 802adaa <__retarget_lock_acquire_recursive> 802d0fe: 4628 mov r0, r5 802d100: 4621 mov r1, r4 802d102: f7ff ff5f bl 802cfc4 <__sflush_r> 802d106: 6e63 ldr r3, [r4, #100] @ 0x64 802d108: 07da lsls r2, r3, #31 802d10a: 4605 mov r5, r0 802d10c: d4e4 bmi.n 802d0d8 <_fflush_r+0xc> 802d10e: 89a3 ldrh r3, [r4, #12] 802d110: 059b lsls r3, r3, #22 802d112: d4e1 bmi.n 802d0d8 <_fflush_r+0xc> 802d114: 6da0 ldr r0, [r4, #88] @ 0x58 802d116: f7fd fe49 bl 802adac <__retarget_lock_release_recursive> 802d11a: e7dd b.n 802d0d8 <_fflush_r+0xc> 0802d11c : 802d11c: b40e push {r1, r2, r3} 802d11e: b503 push {r0, r1, lr} 802d120: 4601 mov r1, r0 802d122: ab03 add r3, sp, #12 802d124: 4805 ldr r0, [pc, #20] @ (802d13c ) 802d126: f853 2b04 ldr.w r2, [r3], #4 802d12a: 6800 ldr r0, [r0, #0] 802d12c: 9301 str r3, [sp, #4] 802d12e: f7ff fe31 bl 802cd94 <_vfiprintf_r> 802d132: b002 add sp, #8 802d134: f85d eb04 ldr.w lr, [sp], #4 802d138: b003 add sp, #12 802d13a: 4770 bx lr 802d13c: 240001d4 .word 0x240001d4 0802d140 <__swhatbuf_r>: 802d140: b570 push {r4, r5, r6, lr} 802d142: 460c mov r4, r1 802d144: f9b1 100e ldrsh.w r1, [r1, #14] 802d148: 2900 cmp r1, #0 802d14a: b096 sub sp, #88 @ 0x58 802d14c: 4615 mov r5, r2 802d14e: 461e mov r6, r3 802d150: da0d bge.n 802d16e <__swhatbuf_r+0x2e> 802d152: 89a3 ldrh r3, [r4, #12] 802d154: f013 0f80 tst.w r3, #128 @ 0x80 802d158: f04f 0100 mov.w r1, #0 802d15c: bf14 ite ne 802d15e: 2340 movne r3, #64 @ 0x40 802d160: f44f 6380 moveq.w r3, #1024 @ 0x400 802d164: 2000 movs r0, #0 802d166: 6031 str r1, [r6, #0] 802d168: 602b str r3, [r5, #0] 802d16a: b016 add sp, #88 @ 0x58 802d16c: bd70 pop {r4, r5, r6, pc} 802d16e: 466a mov r2, sp 802d170: f000 f848 bl 802d204 <_fstat_r> 802d174: 2800 cmp r0, #0 802d176: dbec blt.n 802d152 <__swhatbuf_r+0x12> 802d178: 9901 ldr r1, [sp, #4] 802d17a: f401 4170 and.w r1, r1, #61440 @ 0xf000 802d17e: f5a1 5300 sub.w r3, r1, #8192 @ 0x2000 802d182: 4259 negs r1, r3 802d184: 4159 adcs r1, r3 802d186: f44f 6380 mov.w r3, #1024 @ 0x400 802d18a: e7eb b.n 802d164 <__swhatbuf_r+0x24> 0802d18c <__smakebuf_r>: 802d18c: 898b ldrh r3, [r1, #12] 802d18e: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 802d190: 079d lsls r5, r3, #30 802d192: 4606 mov r6, r0 802d194: 460c mov r4, r1 802d196: d507 bpl.n 802d1a8 <__smakebuf_r+0x1c> 802d198: f104 0347 add.w r3, r4, #71 @ 0x47 802d19c: 6023 str r3, [r4, #0] 802d19e: 6123 str r3, [r4, #16] 802d1a0: 2301 movs r3, #1 802d1a2: 6163 str r3, [r4, #20] 802d1a4: b003 add sp, #12 802d1a6: bdf0 pop {r4, r5, r6, r7, pc} 802d1a8: ab01 add r3, sp, #4 802d1aa: 466a mov r2, sp 802d1ac: f7ff ffc8 bl 802d140 <__swhatbuf_r> 802d1b0: 9f00 ldr r7, [sp, #0] 802d1b2: 4605 mov r5, r0 802d1b4: 4639 mov r1, r7 802d1b6: 4630 mov r0, r6 802d1b8: f7fb ffba bl 8029130 <_malloc_r> 802d1bc: b948 cbnz r0, 802d1d2 <__smakebuf_r+0x46> 802d1be: f9b4 300c ldrsh.w r3, [r4, #12] 802d1c2: 059a lsls r2, r3, #22 802d1c4: d4ee bmi.n 802d1a4 <__smakebuf_r+0x18> 802d1c6: f023 0303 bic.w r3, r3, #3 802d1ca: f043 0302 orr.w r3, r3, #2 802d1ce: 81a3 strh r3, [r4, #12] 802d1d0: e7e2 b.n 802d198 <__smakebuf_r+0xc> 802d1d2: 89a3 ldrh r3, [r4, #12] 802d1d4: 6020 str r0, [r4, #0] 802d1d6: f043 0380 orr.w r3, r3, #128 @ 0x80 802d1da: 81a3 strh r3, [r4, #12] 802d1dc: 9b01 ldr r3, [sp, #4] 802d1de: e9c4 0704 strd r0, r7, [r4, #16] 802d1e2: b15b cbz r3, 802d1fc <__smakebuf_r+0x70> 802d1e4: f9b4 100e ldrsh.w r1, [r4, #14] 802d1e8: 4630 mov r0, r6 802d1ea: f000 f81d bl 802d228 <_isatty_r> 802d1ee: b128 cbz r0, 802d1fc <__smakebuf_r+0x70> 802d1f0: 89a3 ldrh r3, [r4, #12] 802d1f2: f023 0303 bic.w r3, r3, #3 802d1f6: f043 0301 orr.w r3, r3, #1 802d1fa: 81a3 strh r3, [r4, #12] 802d1fc: 89a3 ldrh r3, [r4, #12] 802d1fe: 431d orrs r5, r3 802d200: 81a5 strh r5, [r4, #12] 802d202: e7cf b.n 802d1a4 <__smakebuf_r+0x18> 0802d204 <_fstat_r>: 802d204: b538 push {r3, r4, r5, lr} 802d206: 4d07 ldr r5, [pc, #28] @ (802d224 <_fstat_r+0x20>) 802d208: 2300 movs r3, #0 802d20a: 4604 mov r4, r0 802d20c: 4608 mov r0, r1 802d20e: 4611 mov r1, r2 802d210: 602b str r3, [r5, #0] 802d212: f7d7 f86b bl 80042ec <_fstat> 802d216: 1c43 adds r3, r0, #1 802d218: d102 bne.n 802d220 <_fstat_r+0x1c> 802d21a: 682b ldr r3, [r5, #0] 802d21c: b103 cbz r3, 802d220 <_fstat_r+0x1c> 802d21e: 6023 str r3, [r4, #0] 802d220: bd38 pop {r3, r4, r5, pc} 802d222: bf00 nop 802d224: 2402b270 .word 0x2402b270 0802d228 <_isatty_r>: 802d228: b538 push {r3, r4, r5, lr} 802d22a: 4d06 ldr r5, [pc, #24] @ (802d244 <_isatty_r+0x1c>) 802d22c: 2300 movs r3, #0 802d22e: 4604 mov r4, r0 802d230: 4608 mov r0, r1 802d232: 602b str r3, [r5, #0] 802d234: f7d7 f86a bl 800430c <_isatty> 802d238: 1c43 adds r3, r0, #1 802d23a: d102 bne.n 802d242 <_isatty_r+0x1a> 802d23c: 682b ldr r3, [r5, #0] 802d23e: b103 cbz r3, 802d242 <_isatty_r+0x1a> 802d240: 6023 str r3, [r4, #0] 802d242: bd38 pop {r3, r4, r5, pc} 802d244: 2402b270 .word 0x2402b270 0802d248 : 802d248: b508 push {r3, lr} 802d24a: 2006 movs r0, #6 802d24c: f000 f840 bl 802d2d0 802d250: 2001 movs r0, #1 802d252: f7d6 fffb bl 800424c <_exit> 0802d256 <_calloc_r>: 802d256: b570 push {r4, r5, r6, lr} 802d258: fba1 5402 umull r5, r4, r1, r2 802d25c: b93c cbnz r4, 802d26e <_calloc_r+0x18> 802d25e: 4629 mov r1, r5 802d260: f7fb ff66 bl 8029130 <_malloc_r> 802d264: 4606 mov r6, r0 802d266: b928 cbnz r0, 802d274 <_calloc_r+0x1e> 802d268: 2600 movs r6, #0 802d26a: 4630 mov r0, r6 802d26c: bd70 pop {r4, r5, r6, pc} 802d26e: 220c movs r2, #12 802d270: 6002 str r2, [r0, #0] 802d272: e7f9 b.n 802d268 <_calloc_r+0x12> 802d274: 462a mov r2, r5 802d276: 4621 mov r1, r4 802d278: f7fd fca2 bl 802abc0 802d27c: e7f5 b.n 802d26a <_calloc_r+0x14> 0802d27e <_raise_r>: 802d27e: 291f cmp r1, #31 802d280: b538 push {r3, r4, r5, lr} 802d282: 4605 mov r5, r0 802d284: 460c mov r4, r1 802d286: d904 bls.n 802d292 <_raise_r+0x14> 802d288: 2316 movs r3, #22 802d28a: 6003 str r3, [r0, #0] 802d28c: f04f 30ff mov.w r0, #4294967295 @ 0xffffffff 802d290: bd38 pop {r3, r4, r5, pc} 802d292: 6bc2 ldr r2, [r0, #60] @ 0x3c 802d294: b112 cbz r2, 802d29c <_raise_r+0x1e> 802d296: f852 3021 ldr.w r3, [r2, r1, lsl #2] 802d29a: b94b cbnz r3, 802d2b0 <_raise_r+0x32> 802d29c: 4628 mov r0, r5 802d29e: f000 f831 bl 802d304 <_getpid_r> 802d2a2: 4622 mov r2, r4 802d2a4: 4601 mov r1, r0 802d2a6: 4628 mov r0, r5 802d2a8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} 802d2ac: f000 b818 b.w 802d2e0 <_kill_r> 802d2b0: 2b01 cmp r3, #1 802d2b2: d00a beq.n 802d2ca <_raise_r+0x4c> 802d2b4: 1c59 adds r1, r3, #1 802d2b6: d103 bne.n 802d2c0 <_raise_r+0x42> 802d2b8: 2316 movs r3, #22 802d2ba: 6003 str r3, [r0, #0] 802d2bc: 2001 movs r0, #1 802d2be: e7e7 b.n 802d290 <_raise_r+0x12> 802d2c0: 2100 movs r1, #0 802d2c2: f842 1024 str.w r1, [r2, r4, lsl #2] 802d2c6: 4620 mov r0, r4 802d2c8: 4798 blx r3 802d2ca: 2000 movs r0, #0 802d2cc: e7e0 b.n 802d290 <_raise_r+0x12> ... 0802d2d0 : 802d2d0: 4b02 ldr r3, [pc, #8] @ (802d2dc ) 802d2d2: 4601 mov r1, r0 802d2d4: 6818 ldr r0, [r3, #0] 802d2d6: f7ff bfd2 b.w 802d27e <_raise_r> 802d2da: bf00 nop 802d2dc: 240001d4 .word 0x240001d4 0802d2e0 <_kill_r>: 802d2e0: b538 push {r3, r4, r5, lr} 802d2e2: 4d07 ldr r5, [pc, #28] @ (802d300 <_kill_r+0x20>) 802d2e4: 2300 movs r3, #0 802d2e6: 4604 mov r4, r0 802d2e8: 4608 mov r0, r1 802d2ea: 4611 mov r1, r2 802d2ec: 602b str r3, [r5, #0] 802d2ee: f7d6 ff9b bl 8004228 <_kill> 802d2f2: 1c43 adds r3, r0, #1 802d2f4: d102 bne.n 802d2fc <_kill_r+0x1c> 802d2f6: 682b ldr r3, [r5, #0] 802d2f8: b103 cbz r3, 802d2fc <_kill_r+0x1c> 802d2fa: 6023 str r3, [r4, #0] 802d2fc: bd38 pop {r3, r4, r5, pc} 802d2fe: bf00 nop 802d300: 2402b270 .word 0x2402b270 0802d304 <_getpid_r>: 802d304: f7d6 bf88 b.w 8004218 <_getpid> 0802d308 <_init>: 802d308: b5f8 push {r3, r4, r5, r6, r7, lr} 802d30a: bf00 nop 802d30c: bcf8 pop {r3, r4, r5, r6, r7} 802d30e: bc08 pop {r3} 802d310: 469e mov lr, r3 802d312: 4770 bx lr 0802d314 <_fini>: 802d314: b5f8 push {r3, r4, r5, r6, r7, lr} 802d316: bf00 nop 802d318: bcf8 pop {r3, r4, r5, r6, r7} 802d31a: bc08 pop {r3} 802d31c: 469e mov lr, r3 802d31e: 4770 bx lr